fix(webui): the organization page drops the Queue card and says running was not read when the bus sent no runs, kept Assistant drafts belong to the signed-in person, the agent drawer repaints alone (#1873) #1978

Merged
jason.woltje merged 2 commits from sp14-org-page-truth into refactor 2026-11-15 20:18:15 +00:00
Owner

What changes

  • The Queue card and its queue read leave the organization page. The card showed the repository's development queue, the same for every organization. The Queue page at #/queue is unchanged.
  • When no instance in the bus answer carries running, the organization page says "running not read" in the Active agent sessions heading, the Agents working tile and the Settings "Agents and roles" row. Before, it said "none running" and "0 running". The Dashboard's Agents working tile and organization rows follow the same rule.
  • The Assistant keeps a pane's unsent message only for the person who wrote it. A draft stored under another person, or under none, is removed on load.
  • After the agent drawer's pending instances read answers, only the drawer repaints. Before, the page ran 15 requests again to fill one field. Now it runs none.

How

  • serve.mjs: the existing /api/config answer gains one field, viewer. It is the first 32 hex characters of a sha256 over the session's provider, issuer and subject, or local on a Console with no sign-in. The subject itself is never sent. No route was added.
  • bus.js exposes the viewer to the page. assistant.js stores drafts as {viewer, drafts} and writes nothing until the viewer is known.
  • workspace.js: runsUnread decides the "not read" wording in one place. drawerHtml() rebuilds the drawer from reads already made, and each pending drawer names the read it waits on.
  • No new write route, no schema change, nothing under roles/, contracts/, packages/bus/ or packages/queue/.

Tests

  • org-page-fit-browser.test.mjs: no Queue card and no queue read, the three "not read" places, the drawer repaint request count, and a second agent opened while the read is held. assistant-threads-browser.test.mjs: two identities on one tab. Each new test failed on the code before its change.
  • Lane gate on c26879637: 192 webui test files, 1549 pass, 0 fail, 4 skipped (org-quick-live, needs a live scratch instance).
  • Lead check on c26879637: 218 pass, 0 fail over the changed test files plus the drawer, agents, assistant, single-pane, tiles, serve, SSO and workspace files, and the two cli files that read /api/config.

Review

One fresh claude-opus-5-5 reviewer asked for one change (P2): a second agent opened while the drawer's read was open stayed on "Reading state…" until the next poll. c26879637 fixes it with a test. A second fresh reviewer approved with no P1 or P2.

Left for later

  • A drawer can stay on "Reading state…" until the next poll if its read answers after the drawer is built and before it is on screen. Present before this change.
  • A tab reads who is signed in once per page load. The viewer hash is unsalted.
  • The set of open Assistant panes is still kept per browser, not per person.
  • At 390 wide the Dashboard's Organizations table scrolls sideways.
## What changes - The Queue card and its queue read leave the organization page. The card showed the repository's development queue, the same for every organization. The Queue page at `#/queue` is unchanged. - When no instance in the bus answer carries `running`, the organization page says "running not read" in the Active agent sessions heading, the Agents working tile and the Settings "Agents and roles" row. Before, it said "none running" and "0 running". The Dashboard's Agents working tile and organization rows follow the same rule. - The Assistant keeps a pane's unsent message only for the person who wrote it. A draft stored under another person, or under none, is removed on load. - After the agent drawer's pending instances read answers, only the drawer repaints. Before, the page ran 15 requests again to fill one field. Now it runs none. ## How - `serve.mjs`: the existing `/api/config` answer gains one field, `viewer`. It is the first 32 hex characters of a sha256 over the session's provider, issuer and subject, or `local` on a Console with no sign-in. The subject itself is never sent. No route was added. - `bus.js` exposes the viewer to the page. `assistant.js` stores drafts as `{viewer, drafts}` and writes nothing until the viewer is known. - `workspace.js`: `runsUnread` decides the "not read" wording in one place. `drawerHtml()` rebuilds the drawer from reads already made, and each pending drawer names the read it waits on. - No new write route, no schema change, nothing under `roles/`, `contracts/`, `packages/bus/` or `packages/queue/`. ## Tests - `org-page-fit-browser.test.mjs`: no Queue card and no queue read, the three "not read" places, the drawer repaint request count, and a second agent opened while the read is held. `assistant-threads-browser.test.mjs`: two identities on one tab. Each new test failed on the code before its change. - Lane gate on c26879637: 192 webui test files, 1549 pass, 0 fail, 4 skipped (`org-quick-live`, needs a live scratch instance). - Lead check on c26879637: 218 pass, 0 fail over the changed test files plus the drawer, agents, assistant, single-pane, tiles, serve, SSO and workspace files, and the two cli files that read `/api/config`. ## Review One fresh claude-opus-5-5 reviewer asked for one change (P2): a second agent opened while the drawer's read was open stayed on "Reading state…" until the next poll. c26879637 fixes it with a test. A second fresh reviewer approved with no P1 or P2. ## Left for later - A drawer can stay on "Reading state…" until the next poll if its read answers after the drawer is built and before it is on screen. Present before this change. - A tab reads who is signed in once per page load. The viewer hash is unsalted. - The set of open Assistant panes is still kept per browser, not per person. - At 390 wide the Dashboard's Organizations table scrolls sideways.
jason.woltje added 2 commits 2026-11-15 20:18:12 +00:00
jason.woltje merged commit c26879637a into refactor 2026-11-15 20:18:15 +00:00
Sign in to join this conversation.