feat: NemoClaw governance tab — wire into theme 2, fix duplicate JS#398
Open
vivekchand wants to merge 1 commit intomainfrom
Open
feat: NemoClaw governance tab — wire into theme 2, fix duplicate JS#398vivekchand wants to merge 1 commit intomainfrom
vivekchand wants to merge 1 commit intomainfrom
Conversation
…urn (closes #300) - New /api/model-attribution endpoint: scans JSONL sessions for model_change events and assistant messages to build per-model turn/session counts - Returns: models[], primary_model, total_turns, model_count, switches, switch_count - Models tab added to both dashboard themes (light + dark) - Bar chart of model mix with percentage share per model - Per-session breakdown table (model, sessions, turns, share%) - Model switch history section (when models change mid-session) - Stat cards: primary model, diversity, fallback rate, total turns - 5 new tests, all 76 tests pass
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this does
Completes the NemoClaw governance tab implementation by fixing a bug where the tab was implemented in theme 1 (the overwritten DASHBOARD_HTML) but not in theme 2 (the actually-served template).
Changes
Frontend (theme 2 HTML):
NemoClawnav tab to the theme 2 tab bar (hidden by default, revealed on load when NemoClaw is detected)#page-nemoclawcontent div to theme 2 — matching the layout from the spec:switchTab('nemoclaw')into theme 2'sswitchTab()functionloadNemoClaw()stub in theme 2 shadow-overrode the real implementation — wrapped inif(false){}to disable itBackend (already in previous commit):
_detect_nemoclaw()helper — reads config, state, policy YAML, and presets from~/.nemoclaw/_parse_network_policies()— parses YAML network_policies section (PyYAML with line-parser fallback)/api/nemoclaw/governance— full status endpoint with sandbox list, policy hash, drift detection/api/nemoclaw/governance/acknowledge-drift— clears drift alert/api/nemoclaw/status— lightweight status check/api/nemoclaw/policy— policy YAML + hash + drift status_nemoclaw_policy_hashfor in-memory drift detection#76b900(NVIDIA green)Testing
The tab is hidden on load and only shown when
/api/nemoclaw/governancereturnsinstalled: true. On hosts without NemoClaw, nothing changes.