Skip to content

feat(web): start, watch and control a native dispatch pair from its chat - #38

Draft
mayberuk wants to merge 1 commit into
rucode-pair-ui-basefrom
rucode-pair-ui
Draft

mayberuk wants to merge 1 commit into
rucode-pair-ui-basefrom
rucode-pair-ui

Conversation

@mayberuk

@mayberuk mayberuk commented Dec 4, 2026

Copy link
Copy Markdown
Owner

Part 5 of 6 of "Long-running agent work as RuCode threads, not tmux tabs". This is the web UI for native dispatch pairs: start one from a chat, pick the machine it runs on, watch and control it from the chat, and move between its seats.

Stacked on #32, #33 and #36. This branch is built on rucode-pair-ui-base, which is those three published heads merged. The diff here is only this part's own work. Retarget to main once those three merge.

What it does

  • Start card. A chat with a plan can offer to start a pair: a machine picker with a per-row reason when a machine cannot take it (dp missing or too old, not connected, operator-unbound, unreadable, no permission), spend ceiling, and "Not now". Choosing another machine moves the chat and the pair there (pack, hand off, unpack, decline). A move whose pair cannot follow the chat says so, opens the moved chat and keeps the reason.
  • Pair card in the chat timeline: spend against the ceiling, wave progress, a row per seat (driver, supervisor) with status and cost, a menu (pause, resume, check in now, stop, settle, message the supervisor), and a line under the card for whatever needs the person (decisions, ceiling reached, a failed driver) with the answers inline. Raising the ceiling is a dialog that accepts any amount above the spend.
  • Seat switcher in the chat header, seat.previous / seat.next keybindings, nested seats under the planner in the sidebar (with approvals and input requests surfaced), supervisor notes shown as notes in the driver's timeline, pair actions in the thread menu, sidebar menu and command palette, machine load footer.
  • Every action is gated on the operate permission in the UI; the server stays authoritative. Translations in every locale and a user guide (docs/user/dispatch-pairs.md).

How it was checked

  • vp run i18n:check passes. Format, lint, knip, typecheck (45 packages) and the React compiler check pass (dp ran them on the commit before the last; the last commit only renames sample names in three test files, which were retested).
  • Unit and browser tests for each piece, including denied-permission cases for the card, the now line and the start card. Review findings that were real each have a test that fails without the fix.
  • A real-app pass: the web app against the real dev server with a stand-in dp, in T3 Chat light, T3 Chat dark and Grove light: start card with machine picker, start, pair card, seat switcher on both seats, pause and resume, at-ceiling, raise ceiling, sidebar menu. Screenshots are not attached; add them by hand.
  • A design critique and accessibility audit of the surfaces, with the accepted fixes applied (a wrapping, announced now line; seat status in names; folded switcher markers; contrast; dialog helper text and focus).

Open points

  • dp's gate did not pass for this part. check:changed fails on one test, ChatView.browser.test.tsx "a file picked after the phone composer collapses still attaches" (15 s timeout when the whole file runs, passes alone). It fails the same way on the feat(server): dispatch pairs run as RuCode threads, and updates wait for running work #36 tree, which has no ChatView change. dp could not prove it as a baseline failure because its comparison runs on the main checkout, whose installed packages are stale. dp's unit stage was never reached for waves 1 to 4.
  • Not run, because they need a dp release and a real Claude seat: the thread-move-over-link-routes probe (the spec says it gates the merge), restart mid-wave, and the person-only checks (laptop sleep and wake, a Mac in the machine picker, renaming one "devbox" environment).
  • Not exercised in the real-app pass: the supervisor-note row, Stop pair (native confirm), and the raise-ceiling dialog's look (it asserts text but did not appear in the captures).
  • ChatView, the header and the details panel still re-render on every pair snapshot for planner and seat chats. Not flagged by review; worth a role-only hook later.
  • Mobile has no pair surface yet.
  • Local waivers recorded in dp: ownership on files earlier phases own (pairState.ts, usePairActions.ts were edited for the null-thread fix) and on 13 baseline paths dp's snapshot lacks; wave 1 was committed with the pre-commit unused-code hook skipped because its pieces are used by wave 2.

🤖 Generated with Claude Code

The web UI for native dispatch pairs: a start card with a machine picker and move-then-start, the pair card with spend, seats and controls, a seat switcher, supervisor notes, nested seats in the sidebar, pair actions in menus and the palette, keybindings, translations and a user guide.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
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