feat(webui): an agent's detail opens in a drawer from the Agents page and an organization's sessions table, with its role, state, model, tasks and decisions, Message and Stop (#1873)
#1976
Selecting an agent on #/agents, or in an organization page's "Active agent sessions" table, opens a detail drawer at the right of the page. At 700 px and below it is a full-width sheet. The page under it stays.
The address carries the selection as ?agent=<org>:<name>. A reload or a shared link opens the same drawer. Back closes it. Close and Escape close it and return focus to the row.
The drawer shows the agent's name, organization, role and source, state in the Agents page's words, model, current project and task, up to five open tasks with a link to the Tasks board filtered to it, and up to five decisions it raised with links into the Inbox.
Message opens the agent's thread as a pane on the Assistant page. It shows only for thread agents (the assistant), where the Console can send chat.
Stop ends that one agent's session after a confirm. It shows only for a running, unprotected organization agent where the Console can change settings. Otherwise a note says why Stop is not offered.
The Tasks board reads assignee from the address.
From the Dashboard the drawer opens in 2 clicks.
How
workspace.js holds the drawer. bus.js passes the query and organization config to the two pages and treats a hash change that only opens, closes or switches the drawer as a repaint. shell.css has the drawer styles. tasks-board.js reads the assignee filter.
Reads that exist: /api/workspace, GET /api/orgs/<org>/instances, GET /api/orgs/<org>/business. Stop uses the existing POST /api/orgs/<org>/agent/terminate with one instance and follows GET /api/orgs/<org>/agent/request.
No new server route, no new write route, no schema change, nothing under roles/ or contracts/.
The drawer holds at most one history entry, so Close never takes two presses and never leaves the Console from a shared link.
Tests
New tests/agent-drawer-browser.test.mjs, 11 results, red first.
Lane gate on 69ce460f9: 191 webui test files, 1538 pass, 0 fail, 4 skipped (org-quick-live, needs a live scratch instance).
Lead check on 69ce460f9: 196 pass, 0 fail over the new test file plus the agents, tasks, single-pane, workspace, tiles, assistant, workflows, inbox and switch files.
Review
Two rounds, each a fresh claude-opus-5-5 reviewer. Round 1 asked for five changes (Close could take two presses or leave the Console from a shared link, the board kept a dropped assignee filter, Escape during the Stop question closed the drawer, a wrong "last activity" label, missing tests). All fixed in 69ce460f9. Round 2 approved.
Left for later
No test that a repaint keeps the Stop question on screen. The re-check's probe showed the code keeps it.
Last activity time: no read gives it.
The template a hired agent came from: no read names it. The drawer shows "Hired" and the hire decision id.
Message for role agents other than the assistant.
Restart from the drawer.
The organization page clips its Settings column and sessions table at about 735 px of content width. This predates the slice.
## What changes
- Selecting an agent on `#/agents`, or in an organization page's "Active agent sessions" table, opens a detail drawer at the right of the page. At 700 px and below it is a full-width sheet. The page under it stays.
- The address carries the selection as `?agent=<org>:<name>`. A reload or a shared link opens the same drawer. Back closes it. Close and Escape close it and return focus to the row.
- The drawer shows the agent's name, organization, role and source, state in the Agents page's words, model, current project and task, up to five open tasks with a link to the Tasks board filtered to it, and up to five decisions it raised with links into the Inbox.
- Message opens the agent's thread as a pane on the Assistant page. It shows only for thread agents (the assistant), where the Console can send chat.
- Stop ends that one agent's session after a confirm. It shows only for a running, unprotected organization agent where the Console can change settings. Otherwise a note says why Stop is not offered.
- The Tasks board reads `assignee` from the address.
- From the Dashboard the drawer opens in 2 clicks.
## How
- `workspace.js` holds the drawer. `bus.js` passes the query and organization config to the two pages and treats a hash change that only opens, closes or switches the drawer as a repaint. `shell.css` has the drawer styles. `tasks-board.js` reads the assignee filter.
- Reads that exist: `/api/workspace`, `GET /api/orgs/<org>/instances`, `GET /api/orgs/<org>/business`. Stop uses the existing `POST /api/orgs/<org>/agent/terminate` with one instance and follows `GET /api/orgs/<org>/agent/request`.
- No new server route, no new write route, no schema change, nothing under `roles/` or `contracts/`.
- The drawer holds at most one history entry, so Close never takes two presses and never leaves the Console from a shared link.
## Tests
- New `tests/agent-drawer-browser.test.mjs`, 11 results, red first.
- Lane gate on 69ce460f9: 191 webui test files, 1538 pass, 0 fail, 4 skipped (`org-quick-live`, needs a live scratch instance).
- Lead check on 69ce460f9: 196 pass, 0 fail over the new test file plus the agents, tasks, single-pane, workspace, tiles, assistant, workflows, inbox and switch files.
## Review
Two rounds, each a fresh claude-opus-5-5 reviewer. Round 1 asked for five changes (Close could take two presses or leave the Console from a shared link, the board kept a dropped assignee filter, Escape during the Stop question closed the drawer, a wrong "last activity" label, missing tests). All fixed in 69ce460f9. Round 2 approved.
## Left for later
- No test that a repaint keeps the Stop question on screen. The re-check's probe showed the code keeps it.
- Last activity time: no read gives it.
- The template a hired agent came from: no read names it. The drawer shows "Hired" and the hire decision id.
- Message for role agents other than the assistant.
- Restart from the drawer.
- The organization page clips its Settings column and sessions table at about 735 px of content width. This predates the slice.
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
#/agents, or in an organization page's "Active agent sessions" table, opens a detail drawer at the right of the page. At 700 px and below it is a full-width sheet. The page under it stays.?agent=<org>:<name>. A reload or a shared link opens the same drawer. Back closes it. Close and Escape close it and return focus to the row.assigneefrom the address.How
workspace.jsholds the drawer.bus.jspasses the query and organization config to the two pages and treats a hash change that only opens, closes or switches the drawer as a repaint.shell.csshas the drawer styles.tasks-board.jsreads the assignee filter./api/workspace,GET /api/orgs/<org>/instances,GET /api/orgs/<org>/business. Stop uses the existingPOST /api/orgs/<org>/agent/terminatewith one instance and followsGET /api/orgs/<org>/agent/request.roles/orcontracts/.Tests
tests/agent-drawer-browser.test.mjs, 11 results, red first.69ce460f9: 191 webui test files, 1538 pass, 0 fail, 4 skipped (org-quick-live, needs a live scratch instance).69ce460f9: 196 pass, 0 fail over the new test file plus the agents, tasks, single-pane, workspace, tiles, assistant, workflows, inbox and switch files.Review
Two rounds, each a fresh claude-opus-5-5 reviewer. Round 1 asked for five changes (Close could take two presses or leave the Console from a shared link, the board kept a dropped assignee filter, Escape during the Stop question closed the drawer, a wrong "last activity" label, missing tests). All fixed in
69ce460f9. Round 2 approved.Left for later