Repository navigation
fix(web): make Supervisor actions report their outcome and pin the chat recipient - #827
Merged
Merged
Conversation
…at recipient
The dashboard design review (2026-10-19) found four trust failures on the
operator's highest-stakes controls:
- Stop/Restart ignored res.ok, so a refused systemctl call was logged as
"requested". The button now says "Stop failed"/"Restart sent" with the
daemon's reason as its title, and the live log records the failure.
- Heartbeat could spin on "Running…" forever: the route answered 202 even
with no runner attached (`openswarm dash`), and the start signal is an SSE
event that a skipped or dropped run never sends. The route now answers 503
without a runner, and the button gives up after 15s with "No response".
- Provider and Thinking switched the whole fleet on one click. The provider
button now arms like Stop ("Switch fleet?"), and a Thinking change is
staged behind a "Set fleet to X?" confirm that lapses after 6s.
- The chat composer re-targeted whoever spoke last, so a message drafted for
one agent could leave addressed to another. The recipient is now a pinned
picker that only the operator moves, and it warns (without refusing) when
the pinned agent has failed, expired or delivered its result.
The /api/service/* routes move verbatim into webServiceControl.ts so
web.ts stays under the 1500-line gate.
This was referenced Oct 19, 2026
Merged
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.
Why
Step 0 of the dashboard redesign workflow (design review 2026-10-19, 19/40). These are behaviour defects on the operator's highest-stakes controls, independent of any visual direction, so they ship first and separately.
What
dashboardHtml.ts): checkres.ok; say the outcome on the button (Stop failed+ reason as title, orRestart sent) and in the live log.POST /api/heartbeatanswers 503 when no runner is attached (openswarm dash), instead of a 202 nothing could follow up. The client waits at most 15 s for the SSE start signal, then showsNo responsewith the reason.Switch fleet?, one armed at a time). A Thinking change is staged behind aSet fleet to X?confirm that lapses after 6 s back to the applied level.chatView.mjs,conversationModel.mjs): the composer used to follow whoever spoke last. It is now a pinnedTopicker over every addressable agent+task. It defaults to the first addressable speaker and only the operator moves it. It warns, without blocking, when the pinned agent failed, expired or already delivered its result./api/service/*routes moved verbatim intosrc/support/webServiceControl.tssoweb.tsstays under the 1500-line gate. It is coverage-excluded likewebExecTasks.ts, for the same reason.Verification
tests/web/supervisorActions.test.ts(new) runs the real inline Supervisor script in jsdom with scripted fetch and a hand-driven clock: 9 tests.tests/web/chatView.test.ts: 4 new recipient-pin tests.src/support/web.heartbeat.test.ts: 503 without a runner. The existingweb.serviceControl.test.tsstill passes against the moved routes.npx vitest run tests/web src/supportall green. Lint shows no new warnings. Typecheck and build pass.openswarm dashfrom this build (1440 dark, 390 light): Heartbeat showsHeartbeat failedwith the 503 reason; provider showsSwitch fleet?; Thinking showsSet fleet to Low?; Chat shows theTo: CopperBuilds · worker · AX-1767picker with the failed warning.The control bar still wraps when the Thinking confirm appears. Step 6 of the redesign replaces that bar.