Repository navigation
feat(members): steer-only composer for Crew Members DM threads - #8852
Conversation
Design Review (Fable 5) — ✅ PASSDesign-level review of Design-Verdict: PASS A real product call (DM ≠ console), solved at the right seams — host-decided prop, shared chat-core transport, failure paths routed to the owning slot. [DESIGN-REVIEWED] 1910164 |
First Principles Review (Fable 5) — 🟡 CONCERNSPremise-level review of All verification is done. The change inventory checks out: First-Principles-Verdict: CONCERNS The split-view steer button rides in on "panes are the main chat's sessions side by side" — symmetry, with no named person who needed it. Not justified as shipped
What this change shipsInventory (10 items) — 9 justifiedIntent: make messaging a working crew member behave like a chat with a person — a send goes into their running turn, with no queue mechanics. ADDITION (a capability the pane never had), with declared riders. More than 10 items exist (QueueStack server-state rule,
Watch
Subtractions
[FIRST-PRINCIPLES-REVIEWED] 1910164 |
GPT 5.6 Review — ✅ no blocking findingsGPT 5.6 completed its review of This comment is updated in place on each push. Review detailsNo findings. False positive or not applicable? A repository writer can comment: |
Opus 4.8 Review — ✅ no blocking findingsReviewed Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
UX Review (Fable 5) — ✅ PASSUX-level review of UX-Verdict: PASS The busy DM composer reads as a plain, trusted Send — the blind reader used it "sure", every state is screenshotted, and both transitions ship recordings proving the button never swaps. [UX-REVIEWED] 1910164 |
e7bb0cc to
5755ddb
Compare
|
Round 2 — head GPT 5.6 (BLOCKING, ChatPane.tsx:604 — sub-agents-only steer + response-late loses the draft) — fixed. Frontend Lint (jscpd) — fixed. The roster fixture the two Members capture scripts shared is now one module, UX Review (CONCERNS)
First Principles (CONCERNS)
Design Review (PASS, suggestion) — hoisting |
5755ddb to
f03a44c
Compare
|
Round 3 — head GPT 5.6 (BLOCKING, ChatPane.tsx:553 — an older identical queue entry suppresses recovery) — fixed as suggested: Frontend Lint (i18n strict, ChatInput.tsx 4 → 5) — fixed. The steer-only button's offline UX Review (CONCERNS)
First Principles — unchanged from the round-2 disposition: split-view change is declared as its own item; |
|
CI did not schedule for head f03a44c (only the readiness/fork guards ran); closing and reopening to re-trigger the pull_request workflows. |
f03a44c to
2905478
Compare
2905478 to
d1f5f9d
Compare
|
@CrysisDeu This PR and #8947 are both yours and they collide, so the landing order matters. The audit read this branch at Where it overlaps #8947:
The goals are independent (a steer-only busy composer here, Quote / Ask on selected text there) and neither PR implements any part of the other, so both should land. Suggested order: take this one first, because it carries the bigger Posted from the 2026-09-08 open-PR relationship audit (read-only, one auditor per PR); reply here if any of this is wrong. |
|
Design Review "Watch" (steer receipt policy in three hand-synced copies) — tracked as #9457, which names all three sites ( |
|
Rebased onto main Conflicts: none, clean rebase (the branch was only 19 commits behind after your last update). No resolution decisions were made, so the diff is unchanged in intent: 46 files, +1783/-63. Gates run locally: Please review that the rebase result still matches your intent. A maintainer push makes the maintainer the last pusher, so under the repo's last-push rule a second approver is needed. Reply here if anything looks wrong. |
|
/ai-review override gpt b38cf75: On main the pane composer is component-local state, so collapsing split view lost the text outright; this PR parks it (sessionStorage + in-tab mirror, chatPaneDrafts.ts) and restores it verbatim when the pane remounts (ChatPane.tsx:177-179). Collapse shows an empty single-chat composer but nothing is lost within the tab. Unifying the pane and ChatPage draft stores is a ChatPage-side refactor, outside this PR's declared scope. |
Human judgment recorded@CrysisDeu marked the gpt AI finding as false positive, not applicable, or explicitly accepted for
This decision applies only to this commit. A new push requires a new judgment. |
|
/ai-review override gpt 67198c7: The steer transport is text-only by design — ChatPage.steerMutation also POSTs meta { sendId } only (ChatPage.tsx:957, 5198-5200) and the backend persists no meta on a steer, so main's main-chat steers have this same residual today. The pane sends the SAME wire shape plus a client-side files index; the full path stays verbatim in the wire text and both cancel paths are guarded (fileTokens.ts:564-566). Persisting steer meta is a backend change outside this PR. |
Human judgment recorded@CrysisDeu marked the gpt AI finding as false positive, not applicable, or explicitly accepted for
This decision applies only to this commit. A new push requires a new judgment. |
|
/ai-review override gpt 6d867a0: StrictMode's setup→cleanup→setup replay is development-only; production builds never double-invoke effects. Even in dev nothing is lost: the first setup's functional setState (ChatPane.tsx:190-191) is queued before the replay and applies after it, so the parked text lands in the composer; the cleanup's write of empty refs only deletes a store entry the first setup had already taken. Verified against main.tsx:148 (StrictMode on) and the effect body. |
Human judgment recorded@CrysisDeu marked the gpt AI finding as false positive, not applicable, or explicitly accepted for
This decision applies only to this commit. A new push requires a new judgment. |
bolichen97
left a comment
There was a problem hiding this comment.
First, the good news on the cross-PR question: this does not conflict with #9593. grep steerChat over the whole diff returns nothing — both steer paths already go through sendTurn({ … steer: true }) (ChatPane.tsx:788,857), which is the direction #9593 moves in, and the two file sets have zero overlap.
Second, the title oversells the restriction, and I mean that as reassurance rather than a complaint: with no turn in flight nothing is restricted at all. The entire steer-only block sits inside the isRunning || soft_pending || killing gate at ChatInput.tsx:4375, so an idle send renders the ordinary send button and fireComposer falls through to onSend() (ChatInput.tsx:1563,1586), starting a real turn. No disable, no error, no silent drop, no queue. "Steer-only" describes the busy affordance, not a composer that cannot start a turn.
The decision that belongs to you:
ChatPane.tsx:1335-1336 passes canSteer={busy} / onSteer={doSteer} unconditionally, so split-view (⌘D) panes flip from queue-only to the Steer/Queue split button — and since readBusySendMode defaults to 'steer' (BusySendButton.tsx:56,60), Enter-while-busy in a ⌘D pane now steers by default for every user who never explicitly chose Queue. That is a changed default on a second surface the title does not name, and First Principles made it their headline finding: "a changed default for existing users, justified only by symmetry with the main chat."
Three defects:
-
ChatPane.tsx:164-165—inputRef.current = inputandpendingFilesRef.current = pendingFilesare assigned during render. A render React discards still mutates the ref, and the layout-effect cleanup atChatPane.tsx:214parksinputRef.currentinto the draft store, so under concurrent rendering it can park text that never committed. Low severity today since nothing puts this pane behind a transition or Suspense, but both refs are new here — this is a newly introduced pattern, not inherited. -
ChatInput.tsx:4462-4471— thesteerOnlydisabled-send branch is unreachable from the only host that sets steer-only. It sits afteronStop ?at 4458 andChatPane.tsxalways passes a truthyonStop, so a busy Members DM with an empty composer shows Stop, not a disabled Send. The comment's "same shape-stability rule" rationale does not apply to that host and the code never runs. -
chatPaneDrafts.ts:2467(fileStore) is created with nomaxEntriesand nomaxStoreBytes, while the siblingtextStoresets both. Parked attachment paths accumulate insessionStorageuncapped. Nit-level given paths are small and session-scoped, but asymmetric with the store it is paired to.
One thing a user is likely to notice that no test covers: hideSteerBadge removes the confirmed-steer badge, the "Steering…" pulse and the requeued note, and the button carries only aria-label="Send" with no title — so a landed steer is indistinguishable from an ordinary message, and the restriction is never explained on screen.
Two process notes for the owner rather than the author. The GPT 5.6 lane never ran on head 6d867a09 — you self-issued /ai-review override gpt at 14:07Z, so the only line-level correctness lane has no model verdict for the commit under review. I checked the override's reasoning and it is technically right (StrictMode's replay is dev-only, and in dev the first setup's functional setInput survives the cleanup), but an author-issued override on the lane that would have caught defect 1 is worth knowing about. Also: three advisory items on this head carry no ai-review-disposition comment at all — only prose "Round N" comments, the last from 2026-09-06 — and the branch is 1 ahead / 16 behind main with a head commit dated 2026-09-08, so CI's merge-ref result is three weeks of main out of date in commit terms.
A member DM is a conversation with one named member, not an operator
console. Talking to a person has no "queue this until they finish" step,
so while the member is working a send now goes straight into its running
turn: the composer keeps the plain Send button (no Steer/Queue split, no
queue stack) and a confirmed steer renders as an ordinary message (no
"Steered into the running turn" badge). The main chat keeps its split
button; split view (Cmd+D) gains it (it was queue-only, the same missing
props as the DM).
ChatInput gains `busyMode: 'split' | 'steer-only'` (default split).
steer-only renders the idle send button while busy and ignores the
persisted per-slot Queue preference, since there is no Queue to pick.
ChatPane wires the chat-core steer path (`sendTurn({ steer: true })`,
slot-scoped optimistic steer bubble, ChatPage's receipt policy) and
passes `canSteer`/`onSteer`/`busyMode` through; a sub-agents-only busy
pane sends with the steer flag like ChatPage does. transcriptRenderers
gains `hideSteerBadge`, wired by ChatPane from busyMode. MembersPage
mounts the pane with `busyMode="steer-only"`. A refused pane send
frames the server's reason (new key send_failed_with_error_restored,
13 locales + en-XA) instead of showing it bare.
Draft/recovery hardening surfaced by review (per-slot draft parking,
cross-member/unmount recovery routing, upload-failure attribution,
demoted-steer queue binding) landed via the stacked PR #8942 and rides
in this commit. In steer-only, `hideSteerBadge` also silences main's
"Steering..." pending pulse and requeued note -- same vocabulary.
The steer-only `user` row reuses ChatPageMessageContent.renderUserContent
(main's single owner of user-bubble content since #9433).
Tests (CI-run): ChatInput steer-only pins, ChatPane.steerOnly (busy DM
steers, idle sends plain, default pane keeps the split, refused steer
restores, badge hidden only in steer-only, framed refusal copy),
MembersPage asserts the host asks for steer-only. Capture harness,
frames and idle->busy recordings under temp-screenshots/members-steer-only.
|
Sequencing note: #8947 (Quote / Ask in ChatPane) is being merged first per the maintainer's condition, since both touch the same ChatPane files. Please rebase onto main once it lands and ping; readiness re-runs on the new head. |
Summary
The Crew Members page's DM composer has no queue concept anymore. While a member is working, a send goes straight into its running turn as a steer: the composer keeps the plain Send button — no Steer/Queue split, no Queue option, no queue stack — and a confirmed steer renders as an ordinary message (no "Steered into the running turn" badge). The main chat (ChatPage) is untouched and keeps its Steer/Queue split button.
Includes #8942 (merged into this branch): the draft/recovery hardening that review surfaced here (per-slot draft parking on member switch/unmount, routing late send/upload results to the slot they belong to, upload-failure attribution through the
ErrorNoticebanner, demoted-steer queue binding, unconfirmed-receipt restore for busy sends) was reviewed on its own stacked PR and now rides in this single commit — see Draft / recovery hardening below.Declared side change — split view (⌘D):
ChatPanepreviously passed no steer path toChatInput, so a busy split-view pane showed the warn-coloured queue-only button. Wiring the steer path is aChatPanechange, and split view isChatPane's other host, so it now shows the same Steer/Queue split button as the main chat (Enter = Steer by default, per-slot preference honoured). Deliberate: split-view panes are the main chat's own sessions side by side. Pinned by its own test and frames.Why
User's product call (session 576 diagnosis):
A member DM is a conversation with one named member — the chat projection of a crew member (#8614) — not an operator console. Talking to a person has no "queue this and wait until they finish, then they'll listen" step, so offering that choice inside a DM presents console mechanics in a chat. This PR is the "chat, not console" consistency close-out for Crew DM.
Diagnosis (confirmed in code): MembersPage mounts
ChatPane;ChatPanemountedChatInputwith onlyonSend/onStopand nocanSteer/onSteer, soChatInputfell through to the queue-only button.chatSlicealready reconciles a slot-scoped optimistic steer bubble bysendId, so no backend or store change is needed.What changed
ChatInput— newbusyMode?: 'split' | 'steer-only'(default'split').steer-onlywhile busy: the idle Send button stays in place (aria-label"Send", accent, ↑), click/Enter =onSteer, and the persisted per-slot Queue preference is not consulted (no Queue to have picked). Without a steer path it still degrades to the queue button, like split mode. Stop states keep their precedence.ChatPane— wires the steer path through the chat-core transport:sendTurn({ steer: true, meta: { sendId } })with the same optimistic-bubble + receipt policy as ChatPage'ssteerMutation(refused/transport-error → drop bubble, error row, restore; response-late → drop + restore + warn notice unless the echo already reconciled;steered→ echo owns the row; demoted →resolveOptimisticSteer). Attachments ride inlined viaprepareSendPayload(steer channel is text-only, as ChatPage). A pane busy only because sub-agents run sends with the steer flag (doSend(…, steerNow)), same rule as ChatPage. PassescanSteer/onSteer/busyModetoChatInput;busyModeis a pass-through prop, default'split', decided by the host.MembersPage— mountsChatPanewithbusyMode="steer-only".transcriptRenderersgainshideSteerBadge(a same-iduserentry over the SDK row, drawn by the sameChatPageMessageContent.renderUserContent— paste chips, inline images, file cards — one prop different);ChatPanesets it frombusyMode === 'steer-only';UserMessage.hideSteerBadgeskips the badge/tint/entrance ring and (after rebasing over fix(dashboard): give pending and requeued steers their own treatment #9037's pending/requeued treatments) the muted "Steering…" pulse and the "turn ended before this applied" note — all three are the steer/queue vocabulary this surface exists to hide. Default surfaces are unchanged. No other surface changes.pages.chatPage.send_failed_with_error_restoredinen.manual.json+ 11 locales (line-anchored, each locale's punctuation) +en-XAregenerated. The shareddelivery_unconfirmednotice now says "check the conversation above" (English only; the other locales already said "conversation").pages.chatPage.dismiss_upload_errorlost its last reference whenmainmoved the pane's upload banner toErrorNotice; removed from all locales + en-XA so the dead-key ratchet stays at baseline.ChatPage.tsxchanges.scripts/lib/members-fixtures.mjsnow exportsrouteMembersApi(page, slotDetail, { members }), the gateway-free Members-page API stub;capture-members-steer-only.mjsand main'scapture-members-selection-quote-ask.mjs(which had copied the same route block) both use it, clearing the jscpd clone the merge ref reported.ChatPane.selectionActions.test.tsx(main's) gains the__resetPaneDraftsForTests()beforeEachthe other ChatPane suites use: every case mounts the same slot, and the pane now parks its composer on unmount, so one case's Quote text rode into the next.Draft / recovery hardening (from #8942)
ChatPane's composer is pane-local state, while its host can rebind the same instance to another slot (Members switchesslotKeyon member click, nokey) or unmount it with sends and uploads in flight. Anything that resolves late — a refused or unconfirmed send, a finished or failed upload, a steer the server demoted to the queue — used to land on whatever was on screen, or nowhere. Every late result is now routed to the slot it belongs to: its live composer, its parked draft, or its transcript.utils/chatPaneDrafts.ts(new) — the pane's per-slot draft store (createSlotDraftStoreon pane-owned sessionStorage keysmc-pane-drafts/mc-pane-file-drafts, 256 KiB cap, write-through in-memory mirror so a refused persist still hands the draft back for the tab's life).takePaneDraft(read + clear) andsubscribePaneDraftlet the pane showing a slot own the one live copy and receive late arrivals.doSteercarries the ordered non-image file list on the optimistic bubble's and the POST'smeta.files(the[attached_file N]index the transcript chip resolves through; the echo merges meta onto the bubble), so a filename containing spaces renders as a whole chip instead of the renderer's whitespace-bounded fallback. Pinned inChatPane.steerOnly.test.tsx.mainnow inlines every pane send's attachments viaprepareSendPayload([insider regression] Crew Members DM does not render attached images in the transcript #9433) and carriesmeta.filesthrough the busy-slot queue (fix(chat): carry attachment lists through the busy-slot queue #9486), so the sub-agents-only busy path (doSend(…, steerNow)) gets the same wire shape asdoSteerand ChatPage for free; this PR only pins it for the steer-flagged path (test below) and keeps the raw file list as the restore / cancel-stash payload.ChatPane— parks the outgoing slot's composer on rebind and unmount (in a layout effect, soslotKeyRefand the park/take move in the same commit as theslotKeyprop — a refusal resolving between commit and a passive effect would otherwise restore into the old slot's ref and be overwritten), takes the incoming slot's parked draft, subscribes to late arrivals;restoreIntoComposer(text, files, forSlot)merges a recovery for an off-screen slot into that slot's parked draft; a busy send with no optimistic bubble whose receipt never arrives restores the draft with the delivery-unconfirmed notice (only an echo carrying the send's ownsendIdcounts as delivered); uploads carry their originating slot — paths stage into that slot's live or parked composer, a failure shows as anErrorNoticebanner while that slot is on screen and otherwise lands in that slot's transcript as an error row; a demoted steer binds{ raw, files, sent }to itsqueue_idinqueuedSendStashso cancelling the card restores text and re-stages files.Tests (run in CI)
src/test/ChatInput.test.tsx—busyMode="steer-only"block: plain send button, no split/caret/Queue/Send-options; click and Enter callonSteernotonSend; persisted Queue preference ignored;soft_pendingstill falls back toonSend; idle sends normally; no steer path → queue button; default busyMode is the split button.src/test/ChatPane.steerOnly.test.tsx(new) — busy DM:steer-only-sendpresent, no split/queue, Enter callssendChat(…, steer=true)with{ sendId }, slot-scoped{ steer, optimistic }bubble, no queue card, composer cleared; idle DM sends with no steer flag; default pane (split view) keeps the Steer/Queue split and its Steer fires the same steer flag; refused steer drops the bubble, appends the framed error row, restores the text; a confirmed steer shows no badge in steer-only and keeps the badge in the default mode.src/pages/members/MembersPage.test.tsx— the ChatPane stub echoesbusyMode; the thread test assertssteer-only.src/test/ChatPane.dirSend.test.tsx— two assertions updated to the framed refusal copy.src/test/ChatPane.draftRecovery.test.tsx(new, 12 cases) +src/test/chatPaneDrafts.test.ts(new, 4 cases) — sub-agents-only busy + response-late restores and warns; sub-agents-only busy + attachment inlines[attached_file 1] pathinto the steer-flagged wire text and stashes the raw file for cancel-restore; an identical queue card does not stand in for the unconfirmed send; a demoted steer binds pre-send state to its queue card; rebinding parks the draft; a refusal after a member switch restores into the SENDING member; late upload success/failure after a switch lands on the member it was picked in; on-screen failure renders throughErrorNoticeand is dismissible; refusal after close + reopen reaches the new pane; upload failure after unmount lands in the transcript; park/take, sessionStorage not localStorage, mirror survives a refused write, subscriber scoping.Local gates:
tsc -b,eslint,i18n-check,jscpdclean.Screenshots
Capture harness:
website/scripts/capture-members-steer-only.mjs(asserts each frame's state before writing;--expect=beforephotographs the base commit). Entriescapture/members-page.tsx(?busy=1, runtime frame hooks) andcapture/chatpage-scroll-shell.tsx(?scene=busy) gained the busy scenes.After pressing Send while the member is working:
Steer failure states:
Server-parked message on the steer-only surface — queue card still shown and cancellable:
Draft / recovery frames (from #8942):
ErrorNoticebanner, draft intactPer-member draft parking (webm): 12-member-switch-draft-parking.webm — type for radar, switch to fixer (empty composer), type for fixer, back to radar (radar's text is back).
Recordings of the composer's idle → busy transition (webm; the capture container has no full ffmpeg, so no GIF — the script prints the
ffmpegcommand, per the repo's other recording scripts):Out of scope / follow-ups
doSendand ChatPagesend):queuedSendStashis bound after the HTTP receipt, so aqueue_pushthat arrives first exposes a cancel that restores text without attachments. Closing it needsqueue_pushto carry the send'ssendId(backend).ChatPage's two refusal sites keepsend_failed_with_error: they restore into the slot's draft store, so the pane's "back in the composer" sentence would be false after a session switch; own wording under the P5 pass.doSteerandChatPage.steerMutationare two copies of one receipt policy; folding them into a chat-core helper is a P5-adjacent refactor with the ChatPage side of the edit.