feat(monitor): reroute — one-click change of agent type on an assigned issue #232

Closed
opened 2026-04-21 12:49:11 +00:00 by claude-desktop · 0 comments
Collaborator

User story

As an operator, I want a Reroute to… dropdown on the Monitor row of an assigned issue so that when the dependency propagator (or I) picked the wrong type, I can reassign with a single click instead of the Forgejo unassign + reassign dance.

Complements #222 (re-dispatch same type) — this is "change type" rather than "re-run same type".

Acceptance criteria

Server

  • POST /board/reroute { repo, issue_number, new_type } — auth-gated (M18-8). Internally does PATCH /issues/{N} with assignees: [new_type], which fires the issues.assigned webhook and dispatches normally. Returns 202.
  • Refuses reroute to architect / foreman (host-mode) — returns 400 with a hint that foreman chat is driven from /app/planner.
  • Posts a short audit comment: 🔀 Rerouted from **dev** → **boss** by <operator>.

UI

  • routes/monitor.index.tsx — add a Reroute ▾ icon-button next to each row's assignee. Click opens a menu with the 5 container-mode types (boss / dev / reviewer / designer / design-reviewer). Disable the current assignee. Disable any option whose pool has 0 registered instances.
  • Same button on the task-detail page header (will be revisited in #223 mockup, but don't block).
  • Optimistic update: the row's assignee flips immediately, rolls back on non-2xx.

Safety rails

  • Reroute on a running task first sends /cancel, waits for the task to settle, then reroutes. If the task refuses to cancel within 5 s, return 409 Conflict with a hint.
  • Rate-limit reroutes to 3 per minute per issue.

Verification

  • Playwright smoke — open monitor, click reroute, pick a different type, assert POST + toast.
  • Manual: reroute an idle-assigned issue from dev to boss, confirm boss picks it up.

Out of scope

  • Bulk reroute — file a follow-up if it comes up.
  • Per-instance routing (dev-2 vs dev-default) — the pool scheduler picks.
  • Reroute to a not-yet-created specialised instance — operator needs to create the instance via /agents first.

References

  • apps/server/src/forgejo-api.ts::updateIssueAssignees — already in use by the dependency propagator.
  • Companion: #222 re-dispatch button — same surface area, different intent.
## User story As an operator, I want a **Reroute to…** dropdown on the Monitor row of an assigned issue so that when the dependency propagator (or I) picked the wrong type, I can reassign with a single click instead of the Forgejo unassign + reassign dance. Complements #222 (re-dispatch same type) — this is "change type" rather than "re-run same type". ## Acceptance criteria ### Server - [ ] `POST /board/reroute` `{ repo, issue_number, new_type }` — auth-gated (M18-8). Internally does `PATCH /issues/{N}` with `assignees: [new_type]`, which fires the `issues.assigned` webhook and dispatches normally. Returns `202`. - [ ] Refuses reroute to `architect` / `foreman` (host-mode) — returns `400` with a hint that foreman chat is driven from `/app/planner`. - [ ] Posts a short audit comment: `🔀 Rerouted from **dev** → **boss** by <operator>`. ### UI - [ ] `routes/monitor.index.tsx` — add a `Reroute ▾` icon-button next to each row's assignee. Click opens a menu with the 5 container-mode types (boss / dev / reviewer / designer / design-reviewer). Disable the current assignee. Disable any option whose pool has 0 registered instances. - [ ] Same button on the task-detail page header (will be revisited in #223 mockup, but don't block). - [ ] Optimistic update: the row's assignee flips immediately, rolls back on non-2xx. ### Safety rails - [ ] Reroute on a running task first sends `/cancel`, waits for the task to settle, then reroutes. If the task refuses to cancel within 5 s, return `409 Conflict` with a hint. - [ ] Rate-limit reroutes to 3 per minute per issue. ### Verification - [ ] Playwright smoke — open monitor, click reroute, pick a different type, assert POST + toast. - [ ] Manual: reroute an idle-assigned issue from dev to boss, confirm boss picks it up. ## Out of scope - Bulk reroute — file a follow-up if it comes up. - Per-instance routing (dev-2 vs dev-default) — the pool scheduler picks. - Reroute to a not-yet-created specialised instance — operator needs to create the instance via `/agents` first. ## References - `apps/server/src/forgejo-api.ts::updateIssueAssignees` — already in use by the dependency propagator. - Companion: #222 re-dispatch button — same surface area, different intent.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
charles/claude-hooks#232
No description provided.