Skip to content

feat(dashboard): unified operator experience with one scope - #8

Merged
markhazleton merged 4 commits into
mainfrom
002-work-ps-022-unified-operator
Nov 22, 2026
Merged

markhazleton merged 4 commits into
mainfrom
002-work-ps-022-unified-operator

Conversation

@markhazleton

@markhazleton markhazleton commented Nov 22, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

The self-hosted dashboard now works as one application. A single scope drives every section, each number has one source, and views link to each other. The public GitHub Pages dashboard is unchanged.

  • Scope selector. A bar under the header chooses client (repositories with no client are Internal), source and repository, plus a filter for each domain. Each list offers only choices within the levels above it. The scope is held in the URL (?client=…&source=…&repo=…&d.tier=…) and changes without a page reload. Back and Forward step through scopes, and old ?user= links still work. Overview, Insights, Health and Security all follow it.
  • One number per fact. Health, the drawer, the fix-score prompt and exports read open alert counts from the stored Dependabot alerts that Security uses, not the first-page summary (at most 100). Health no longer shows 0 when alerts could not be read.
  • Links between views. A repository in Security opens its drawer, and the drawer has a Security panel with its open alerts.
  • Shared building blocks. A page header with scope and per-source freshness, a filter bar, a data table, and a coverage state that shows zero, a count, unavailable, no access, not enabled and stale differently. Security exports through ExportButton, and CSV export now neutralises spreadsheet formulas for every table.
  • Sections. Navigation and the mobile tab bar come from one list. Admin replaces Sources and #sources still works. Sites, Delivery and Presence stay hidden until they have data. On mobile, sections that do not fit go behind More.
  • Clean-up. Removed nine unused components, including the second LoadingState. "Reload data" (footer) and "Collect now" (Admin) name the two refresh actions.

Excluded:

  • Content for undelivered sections.
  • Rebranding and per-client access.
  • Any change to the attention-score model. The score is still computed at collection time; only the displayed counts changed.

Data stays per source: the browser loads the files a scope needs and joins classifications from portfolio.json. The worker is unchanged.

Changes

  • New: scope, merge and stored-alert utils; usePortfolio and useScope hooks; config/sections.js; shared Common components; Shell/AppHeader and AppFooter; the drawer SecuritySection.
  • Updated: App.jsx (split, 444 lines), data and shell hooks, Security, Health, ExportButton, TabBar, the drawer and Admin.
  • Removed: UserPicker and useUserOptions, plus the unused components above.
  • Tests: new Scope.test.jsx and SharedComponents.test.jsx, plus self-hosted cases in existing tests.
  • Docs: "Scope and sections" in DOCKER_DEPLOYMENT.md.

62 files, +3439 / −2803.

Verification

  • ./run-validation.ps1: exit 0. pytest 572 passed, vitest 206 passed, plus lint, prettier, build, pip-audit and npm audit (0 vulnerabilities).
  • Public dashboard unchanged. I rendered the public dashboard with real components and the same data on main and on this branch, then diffed the HTML. The header, Overview, Insights, Health and tab bar are byte-identical. The drawer page differs only in the footer's new "Reload data" label.
  • Server data. I ran the scope, merge and alert-count logic against the home server's data files (5 sources, 45 repositories).
    • Each scope loads only the sources it needs, and no repository is listed twice.
    • One repository's count corrected from the collected 2 to the stored 1.
    • The per-source files hold 38 repositories while Security covers 45. The collector writes fewer records than discovery finds; this predates this branch.

Quality Gates

No gate artifacts. Knowledge builds; no .knowledge/ nodes changed.

Deployment status

Ready to deploy, not deployed. After deploy: choose a client and a domain filter, then confirm Security and Health follow the scope and show the same alert counts.

🤖 Generated with Claude Code

markhazleton and others added 4 commits November 21, 2026 20:47
Self-hosted dashboard:
- Scope selector (client, source, repository, domain filters) held in
  the URL, changed without a reload, followed by every section including
  Security; old ?user= links still work.
- Alert counts in Health, the drawer, the fix-score prompt and exports
  come from the stored Dependabot alerts; missing readings show why.
- Security rows open the repository drawer, which gains a Security panel.
- Shared page header, filter bar, data table and coverage state; Security
  exports through ExportButton (CSV now neutralises formulas everywhere).
- Sections from one list (Admin replaces Sources, #sources still works);
  mobile tab bar puts overflow behind More.
- "Reload data" and "Collect now" name the two refresh actions.
- Unused layout and mobile components removed.

The public Pages dashboard renders Overview, Insights and Health
unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Test portfolio detection (public mode on HTML or network failure,
  enabled sources, slugs, readiness) and the scope loading path
  (only the scope's sources are fetched and merged).
- Identify repositories by full name in list keys and drawer
  navigation, so repositories from different owners that share a name
  stay distinct.
- Name the source whose data could not be loaded.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
M-01, L-01 and L-02 remediated in 4108483 and awaiting independent
verification.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@markhazleton
markhazleton merged commit 26fcc91 into main Nov 22, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant