Skip to content

feat(web): specialist grants, assign step and Runs as (issue 749 slice 3) - #926

Merged
thachp merged 3 commits into
mainfrom
feat/specialists-web
Dec 4, 2026
Merged

thachp merged 3 commits into
mainfrom
feat/specialists-web

Conversation

@thachp

@thachp thachp commented Dec 4, 2026

Copy link
Copy Markdown
Owner

Part of #749

The web side of slice 3 (RUNNER-DEEP-AGENTS.md), following the merged demo screens from PR 912. It calls the routes added in #924 (getMemberSpecialists, setMemberSpecialists, and assignTask.specialist), so merge it after #924. Until #924 is deployed:

  • the panel says it couldn't read the agent's specialists;
  • the assign menu sends a plain offer, as today;
  • the "Runs as" row stays hidden.

Summary

 <AccessBody> (team/access-sheet.tsx)          # Team › agent Sheet
   Workroom access …
+  <SpecialistsPanel>                          # team/specialists-panel.tsx
+    owner / human admins: switch per offered specialist, Auto row, "Never" row,
+      pending-change box (Allows / Stops allowing / which running task stops), Save · Cancel
+    members: one line, no read, no switches
 <PeopleRows> (tasks/task-people.tsx)
   Assignee <PersonMenu>
+    owner / human admins, agent offers specialists → second step "Run {agent} as":
+      No specialist · Auto (only with one usable) · each offered specialist, greyed with its reason
+  <RunsAsRow>  owner / human admins only: read-only, note when it can't run any more

team/specialists-model.ts is pure. It checks the read's shape, builds the assign options in catalog order (labels from lib/role-catalog.ts, never matched on label), works out which tasks a draft stops, and explains refusal codes.

Where this follows the specs rather than the demo, or the demo is specific to its seed data:

  • The demo names Sam and Elena, so the copy says "its owner" and "the owner and human admins".
  • The pending-change box says "A task running as …" rather than "fix: answer only over HTTPS on deployed gateways #19 runs as …", because the read gives task IDs, not keys.
  • "Choose which are allowed…" is a line of text naming Team › agent, not a link.

Evidence

  • apps/web npm run typecheck: exit 0.
  • apps/web npm test: exit 0, 201 files and 3881 tests passed.
  • team/specialists.test.tsx (new, 10 tests):
    • the model's options, stopped tasks and "Runs as" notes;
    • the panel's switches, draft, Save body { specialists }, Cancel, a kept-but-not-offered choice, refusal wording, the member line (no read), and an agent that offers none.
  • tasks/task-sheet.test.tsx (+4 tests):
    • the owner's second step with a greyed option and the specialist sent;
    • a plain offer for No specialist and for an agent offering none;
    • a member gets a plain offer only, with no specialists read and no row;
    • the owner's "Runs as" row with its revoked note.
  • node e2e/test-timing-check.mjs: passed.

Not verified: the browser, a11y and e2e suites (left to CI), phone width, and keyboard use of the second step. Nothing ran against staging or a real API.

Merge Danger

Door: two-way. This is UI only: no contract, migration or server change.

Blast Radius: small. It touches the Team › agent Sheet and the task's Assignee row. For owners and admins, offering a task now first reads the agent's specialists, and falls back to a plain offer if that read fails.

@thachp
thachp merged commit 88564fd into main Dec 4, 2026
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant