fix(webui): eight single-pane fixes, agent counts agree, Done this week filters Tasks, Resume only when stopped, pane drafts kept, class words, Dashboard with no organizations (#1873)
#1975
Eight fixes to the single pane, found on the live dev instance.
Agent counts agree. The tiles say how many agents run beside how many work ("Agents working 0 of 2, 1 running"). The Dashboard organization rows, the sessions heading and the Agents page count the same rows. When neither bus read gives activity, the heading says "N running, working not read", never a figure.
The "Done this week" tile opens #/tasks?done=week, the Tasks board filtered to the tasks it counted. A chip clears the filter. The count line says the bus records no time a task was done, so the filter goes by last change.
"Resume assistant" shows only when the bus instances read says the thread's agent runs no process. A failed read or an unlisted agent keeps the control.
A pane's unsent message is kept per thread for the tab's life (sessionStorage) and comes back when the pane opens again, Full view included. Closing a pane that holds one asks first. Signing out, by the form or by an expired session, drops them all.
A pane whose send still waits for its receipt is held. A fourth thread does not replace it.
An organization's decision page, decision list, replies and messages name a decision class in the Inbox's words, from the same map. An unknown class shows as it is.
The organization header line beside the disabled reload says in plain words that the bus reads the organization file when it starts and a change loads on restart.
With no organizations, #/dashboard is the Dashboard. It says there is nothing to count and offers New organization.
How
workspace.js, chat.js, assistant.js, tasks-board.js, bus.js. One line in display.js: the leave guard no longer asks about Assistant drafts, because they are kept.
No new server route, no schema change, nothing under roles/ or contracts/.
tests/w15-fixture.mjs answers the bus instances read that item 3 adds, with no rows.
Tests
New and changed tests in assistant-threads-browser, kpi-tiles-browser, system-agents-browser, system-tasks-browser, workspace-pages-browser and unified-workspace-browser. Each failed before its fix.
Lane gate on 5b6b39f08 (rebased onto bd29e756a): 190 webui test files, 1527 pass, 0 fail, 4 skipped (org-quick-live, needs a live scratch instance).
Lead check on 5b6b39f08: 164 pass, 0 fail over the changed test files plus the w15, workflows, single-pane, inbox, switch and restart files.
Review
Three rounds, each a fresh claude-opus-5-5 reviewer. Round 1 and round 2 each asked for two changes (drafts survived sign-out, the heading and the tile counted from different reads, the Sign out form saved the draft on unload, "0 working" shown when both reads failed). All fixed. Round 3 approved.
Left for later
A sign-out this tab never notices (another tab, or expiry while paused) still carries kept drafts to the next person on that tab. The fix is to key stored drafts by the signed-in identity.
When a session expires mid-message, that pane's draft is lost after signing back in.
A held pane's line is not repainted on sign-out until the next poll.
chat.js awaits the instances read before the message read on each refresh.
No test for class words on replies and decision.raised text.
With no organizations, the sidebar shows a stray "Projects unavailable" line and no rail item is highlighted on #/dashboard.
## What changes
Eight fixes to the single pane, found on the live dev instance.
1. Agent counts agree. The tiles say how many agents run beside how many work ("Agents working 0 of 2, 1 running"). The Dashboard organization rows, the sessions heading and the Agents page count the same rows. When neither bus read gives activity, the heading says "N running, working not read", never a figure.
2. The "Done this week" tile opens `#/tasks?done=week`, the Tasks board filtered to the tasks it counted. A chip clears the filter. The count line says the bus records no time a task was done, so the filter goes by last change.
3. "Resume assistant" shows only when the bus instances read says the thread's agent runs no process. A failed read or an unlisted agent keeps the control.
4. A pane's unsent message is kept per thread for the tab's life (sessionStorage) and comes back when the pane opens again, Full view included. Closing a pane that holds one asks first. Signing out, by the form or by an expired session, drops them all.
5. A pane whose send still waits for its receipt is held. A fourth thread does not replace it.
6. An organization's decision page, decision list, replies and messages name a decision class in the Inbox's words, from the same map. An unknown class shows as it is.
7. The organization header line beside the disabled reload says in plain words that the bus reads the organization file when it starts and a change loads on restart.
8. With no organizations, `#/dashboard` is the Dashboard. It says there is nothing to count and offers New organization.
## How
- `workspace.js`, `chat.js`, `assistant.js`, `tasks-board.js`, `bus.js`. One line in `display.js`: the leave guard no longer asks about Assistant drafts, because they are kept.
- No new server route, no schema change, nothing under `roles/` or `contracts/`.
- `tests/w15-fixture.mjs` answers the bus instances read that item 3 adds, with no rows.
## Tests
- New and changed tests in `assistant-threads-browser`, `kpi-tiles-browser`, `system-agents-browser`, `system-tasks-browser`, `workspace-pages-browser` and `unified-workspace-browser`. Each failed before its fix.
- Lane gate on 5b6b39f08 (rebased onto bd29e756a): 190 webui test files, 1527 pass, 0 fail, 4 skipped (`org-quick-live`, needs a live scratch instance).
- Lead check on 5b6b39f08: 164 pass, 0 fail over the changed test files plus the w15, workflows, single-pane, inbox, switch and restart files.
## Review
Three rounds, each a fresh claude-opus-5-5 reviewer. Round 1 and round 2 each asked for two changes (drafts survived sign-out, the heading and the tile counted from different reads, the Sign out form saved the draft on unload, "0 working" shown when both reads failed). All fixed. Round 3 approved.
## Left for later
- A sign-out this tab never notices (another tab, or expiry while paused) still carries kept drafts to the next person on that tab. The fix is to key stored drafts by the signed-in identity.
- When a session expires mid-message, that pane's draft is lost after signing back in.
- A held pane's line is not repainted on sign-out until the next poll.
- `chat.js` awaits the instances read before the message read on each refresh.
- No test for class words on replies and `decision.raised` text.
- With no organizations, the sidebar shows a stray "Projects unavailable" line and no rail item is highlighted on `#/dashboard`.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
What changes
Eight fixes to the single pane, found on the live dev instance.
#/tasks?done=week, the Tasks board filtered to the tasks it counted. A chip clears the filter. The count line says the bus records no time a task was done, so the filter goes by last change.#/dashboardis the Dashboard. It says there is nothing to count and offers New organization.How
workspace.js,chat.js,assistant.js,tasks-board.js,bus.js. One line indisplay.js: the leave guard no longer asks about Assistant drafts, because they are kept.roles/orcontracts/.tests/w15-fixture.mjsanswers the bus instances read that item 3 adds, with no rows.Tests
assistant-threads-browser,kpi-tiles-browser,system-agents-browser,system-tasks-browser,workspace-pages-browserandunified-workspace-browser. Each failed before its fix.5b6b39f08(rebased ontobd29e756a): 190 webui test files, 1527 pass, 0 fail, 4 skipped (org-quick-live, needs a live scratch instance).5b6b39f08: 164 pass, 0 fail over the changed test files plus the w15, workflows, single-pane, inbox, switch and restart files.Review
Three rounds, each a fresh claude-opus-5-5 reviewer. Round 1 and round 2 each asked for two changes (drafts survived sign-out, the heading and the tile counted from different reads, the Sign out form saved the draft on unload, "0 working" shown when both reads failed). All fixed. Round 3 approved.
Left for later
chat.jsawaits the instances read before the message read on each refresh.decision.raisedtext.#/dashboard.