Repository navigation
refactor(web): serve the Supervisor as a static page instead of a server-rendered string - #830
Merged
Merged
Conversation
…ver-rendered string The Supervisor was the last page built from a 1958-line TS template literal (src/support/dashboardHtml.ts). It now lives in web/static/supervisor.html plus web/static/js/supervisor.js, served at `/` and `/index.html` through PAGE_SHELLS like every other page. Behaviour is unchanged; this is the mechanical half of redesign step 6 so the Departure Board rewrite can land as a reviewable diff on top of real module boundaries. - The provider toggle used to be injected server-side from the adapter registry (INT-3284). The page now builds it from GET /api/providers, which returns listAdapterNames(), so it still cannot drift from isKnownAdapter. - The script keeps its inline onclick handlers for now, hence a file-level no-unused-vars disable; legacy colour aliases in the strings it emits are replaced with the semantic tokens. - Tests: supervisorActions runs the real page + script in jsdom; the source-shape checks from dashboardHtml.test.ts became behaviour tests (registry-built buttons with the active default, stage-status escaping, verified to fail with the escaper removed); web.providers.test.ts covers the new route.
unohee
added a commit
that referenced
this pull request
Oct 19, 2026
Redesign step 6b, on top of the static-page migration (#830). The page now reads top to bottom in the order an on-call operator needs it: - Notice band (timetable yellow, hidden when empty): open human questions with "Answer in Chat", parked runs, and stuck/failed tracker issues with "Move all to Todo". Counts come from /api/shell-status, the same source as the shell status line, so the two never disagree. A tracker error is shown as an error instead of reading as "nothing stuck"; issue links are http(s) only. - Fleet counts: running, queued, waiting on you, failed, done today, recent cost. Colour appears only when a count is non-zero. - Controls in two groups: Routine (Heartbeat, PR review, Provider, Thinking) and, behind a rule, Service (daemon state, Stop daemon, Restart daemon). The 11 provider buttons became one select from GET /api/providers, staged and confirmed like Thinking. - Live work: a departure-board table built from /api/tasks (startedAt, stage) plus runs that ended while the page was open; failed runs carry a vermilion tag. Below it, the log and the raw stage events share one tabbed panel. - References (repositories, agent chat, PR processor, monitors and processes, agent coordination) sit beside the board, each naming its source. - Under 900px the page is one scrolling document in that order; the board rows stack, so nothing scrolls sideways. The mobile tab bar and the duplicate SSE badge are gone. Unicode glyph icons in the controls and dialogs are replaced with text or SVG.
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.
Dashboard redesign, step 6a: the mechanical half of the Supervisor migration. The Departure Board redesign (6b) lands on top of this.
What
src/support/dashboardHtml.ts(1958-line template literal) →web/static/supervisor.html+web/static/js/supervisor.js, served at/and/index.htmlthroughPAGE_SHELLSlike every other page. No behaviour change.GET /api/providers(listAdapterNames()), so it still cannot drift fromisKnownAdapter.onclick) → file-levelno-unused-varsdisable; 6b replaces both with modules + listeners. Legacy colour aliases in emitted strings swapped for semantic tokens.Tests
tests/web/supervisorActions.test.tsruns the real page + script in jsdom.dashboardHtml.test.tsbecame behaviour tests: registry-built buttons with the active default; stage status escaped in class and label (AGT-3476) — verified to fail with the escaper removed.src/support/web.providers.test.tscovers the route./renders identically, 11 provider buttons, no page errors.