Repository navigation
fix(crew): one status line for a crewmate's current step, still indicator - #18256
Conversation
65da1b0 to
dae8182
Compare
UX Review (Opus 5.5) — 🟡 CONCERNSUX-level review of UX-Verdict: CONCERNS When a quiet turn ends, the status line just disappears, and nothing says whether the crewmate finished, stopped or failed. "Working" and "Thinking…" also read as the same state. Watch
Suggestions
[UX-REVIEWED] b36bedc Description read[DESCRIPTION-READ] d05862b36c13f4888589985cbe0f970b87fe9523ef54a40187b03f6d9c352846 That sha256 names everything this verdict read: the PR description, plus the 9 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS Check that the header pill now reading an in-flight [DESIGN-REVIEWED] b36bedc Description read[DESCRIPTION-READ] 310f5bd8325da24aa3007c5fb4c28e4f672898261ca4d4e233ec8381d09ce2aa That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
First Principles Review (Opus 5.5) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS Check that the owner's ruling on #18238 reverses #17794's "the running turn's tool calls show" for crewmate chats; the deleted live-row tests depend on that ruling. What this change shipsInventory (9 items) — 9 justifiedIntent: while a crewmate is working, its chat should show only the one step it is on now, and the working indicator under it should hold still. This is a FIX.
[FIRST-PRINCIPLES-REVIEWED] b36bedc Description read[DESCRIPTION-READ] 3bb2728c2f743d7c76501bee133e3f6e5e570bfc18f63d4025bafe3329fe7563 That sha256 names the PR description this verdict read. Recompute it with |
GPT 6.1 Review — ✅ no blocking findingsGPT 6.1 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 5.5 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: |
dae8182 to
5526700
Compare
|
|
|
|
5526700 to
060fc2c
Compare
|
|
|
|
|
060fc2c to
223ff8f
Compare
|
c674cc8 to
1fcc349
Compare
|
|
|
…ator Since #17794 a crewmate DM kept every tool call and thinking row of the running turn, so a long patrol stacked a dozen 🔧 lines between the crewmate's bubbles. The owner's rule: the chat answers "what is the crewmate doing now", never "what has it done" -- and the working indicator must not hop while it does. The turn in flight is now filtered like any other; the current step is ONE status line directly above the working indicator (`CrewmateLiveActivity`, from `crewmateLiveActivity(messages, live)`): the newest tool call of the running turn, labelled as the transcript's pill would label it. Each new call swaps the text in place, a thinking burst after the call dims the line, and the line goes with the turn. A fixed-height line whose text changes is what keeps the indicator still: transcript rows mounting and unmounting above it moved the ghost by a row on every step. The "hasn't said anything yet" hint stays hidden while the crewmate is live. A `nothing_to_do` call (#16429) shows nothing even in flight: matched on the row's trusted identity (`meta.tool_name` + `meta.mcp_server`, the `QUIET_END_*` constants), not on `meta.ends_turn`, which the runner stamps only after the applier ran. Spec paragraph in crew-mode.md and the feature-map row updated in the same commit. Fixes #18238
1fcc349 to
b36bedc
Compare
|
|
|
|
|
|
|
|
buluoray
left a comment
There was a problem hiding this comment.
Approving b36bedc.
What this brings users: a crewmate's DM no longer turns into a tool-call log while it works. During a running turn the chat shows one status line, the step the crewmate is on right now, directly above the working indicator. The indicator no longer jumps on every step. When the turn ends the line goes away and only the crewmate's own messages are left. The header identity pill and the chat line now get their text from the same useSlotActivity hook, so they can't name the same moment differently.
Logic checked against source:
- The line is mounted only while
crewmate && crewmateLive, the same livenessChatFooteruses. After the turn ends, is stopped or errors, it unmounts together with the indicator. Stale status cannot show on a resting slot becauseresolvePillActivityreturnsidlewhen the slot isn't busy. - A tool call counts as finished by
tool_call_idagainst the tool log'soutput, so parallel calls can't be mixed up. An approved call keeps its name until its result arrives.nothing_to_dois recognised bytool_name+mcp_server, not by its title, so a shell command whose title mentions it is still drawn as an ordinary step. - The step rows are filtered out only when the chat renders. Nothing is removed from the transcript, so the Sessions page and the Work log draw what they did before.
isCrewmateChatRowis unchanged, so error rows, stop cards and empty-turn notices still appear. - Stopping and compacting leave the line empty but keep its height, so the footer's own wording isn't repeated and the indicator doesn't move.
- No new user-facing strings: the phase words reuse the existing
PILL_ACTIVITY_KEYcatalog entries, and the line is styled withtext-mutedonly.
Upgrade and audience fit: the ordinary (non-crewmate) chat is unaffected. filterCrewmateChat and the status line are reached only with the crewmate prop. A non-crewmate pane calls useSlotActivity(''), which reads nothing and is never rendered; its empty-hint condition still works out to !running, and wrapping the footer in a fragment changes nothing in the output. The one change outside the crewmate chat is intended and noted in the PR: the header pill now reads an in-flight nothing_to_do call as "Thinking…".
Verification: reverting the quiet-end check, reverting the empty line for stopping/compacting, and keeping step rows in the filter each made a named test fail; using the clamped text instead of the full label made the long-label test fail. CI is green on this head: 92 passed, 9 skipped, 0 failed.
Non-blocking follow-ups:
- No test checks that the line is gone after the turn ends. Removing
crewmateLivefrom the gate inChatPane({crewmate && crewmateLive && <CrewmateLiveActivity …/>}) keeps every test green, and without the gate the pane would show a permanent "Idle" line. Please add a ChatPane case that ends the turn and assertscrewmate-live-activityis absent — that is the "nothing after the turn" half of #18238. - The quiet-hint gate change (
!(crewmate ? crewmateLive : running)) isn't pinned for the case where onlypaneSlot.runningis set (a patrol turn started by the server while the pane's stream is still idle). Putting the gate back to!runningkeeps the suite green; a test with that slot state would cover it. slotStatusDetailisn't cleared when a turn ends. If a new turn starts before its first status frame arrives, the line (and the header pill, as before this PR) can briefly show the previous turn's last phase, for example "Writing…". Not new, but the chat line makes it more visible; consider resetting the detail when a turn starts.
…ckering Builds on #18256. The live reading flips to Thinking the moment a tool call returns, so fast calls flashed past a line that mostly said Thinking. The chat status line now holds each step for 600ms and a finished tool's title for 1.5s before Thinking. The newest step wins when a hold ends, and a tool that ran inside a hold still gets its turn; stopping/compacting swap at once. The line is keyed by slot: the Members page rebinds one ChatPane to another crewmate without remounting it, so a rebind starts from that crewmate's own reading, never from the previous one's held step. The header pill is unchanged. The crew-mode spec and feature map describe the hold.
…ckering Builds on #18256. The live reading flips to Thinking the moment a tool call returns, so fast calls flashed past a line that mostly said Thinking. The chat status line now holds each step for 600ms and a finished tool's title for 1.5s before Thinking. The newest step wins when a hold ends, and a tool that ran inside a hold still gets its turn; stopping/compacting swap at once. The line is keyed by slot: the Members page rebinds one ChatPane to another crewmate without remounting it, so a rebind starts from that crewmate's own reading, never from the previous one's held step. The header pill is unchanged. The crew-mode spec and feature map describe the hold.
…ckering (#18528) Builds on #18256. The live reading flips to Thinking the moment a tool call returns, so fast calls flashed past a line that mostly said Thinking. The chat status line now holds each step for 600ms and a finished tool's title for 1.5s before Thinking. The newest step wins when a hold ends, and a tool that ran inside a hold still gets its turn; stopping/compacting swap at once. The line is keyed by slot: the Members page rebinds one ChatPane to another crewmate without remounting it, so a rebind starts from that crewmate's own reading, never from the previous one's held step. The header pill is unchanged. The crew-mode spec and feature map describe the hold. Co-authored-by: Joe Guo <zejiangg@amazon.com>
Problem / Motivation
Goal: a crewmate's chat shows the one step the crewmate is on right now, above a working indicator that never moves, and nothing of the steps once the turn is over.
Since #17794 a crewmate DM keeps every tool call and thinking row of the running turn, so a long patrol stacks a dozen
🔧lines between the crewmate's bubbles (#18238, screenshot on the issue). The owner's rule for the live turn (#18238): the chat answers "what is the crewmate doing now", never "what has it done" — and (owner, on round 1 of this PR) the ghost-pose working indicator must not hop up and down while it does.Why it matters
Every patrol cycle a crewmate runs today turns its DM into a tool-call log the Work log already holds, burying the few bubbles the user is meant to read; the reader has to scroll past the machinery to find them. With round 1's transcript-row approach the indicator hopped a row on every step, which reads as jitter for the whole turn. Members whose job is to patrol quietly cannot have a readable chat without both fixed.
Not a goal
filterCrewmateChatand the new line are reached only underChatPane'screwmateprop.What changed (motivation → approach → change)
Observed: the live turn's progress rows were kept in the crewmate chat (
filterCrewmateChat(messages, live)), so a long turn rendered as a list, and any per-step mount/unmount above the footer moved the indicator. Root cause: "what the crewmate is doing" was modelled as transcript rows. Change: it is a status line, and the status is the one the DM header pill already computes.The turn in flight is filtered like any other turn (
filterCrewmateChatis back to "what the crewmate says"; theliveparameter and theopensTurnscan are gone). The current step is one fixed-height status line directly above the working indicator (the ghost-pose carousel inChatFooter), mounted for the whole live turn, words only:data-activitytooltoolStatusLabel: purpose / derived title / raw title, same preference and language guard as the sidebar row and the header pill)thinkingnothing_to_do(#16429; the header pill reads the same)writing/working/delegated/compacting/stoppingPILL_ACTIVITY_KEY)pages/members/useSlotActivity.ts(new): the ONE reading of "what the crewmate is doing right now" — the slot's live status record (slotStatusDetail), stream state and the tool log's returned flag folded by the existing pureresolvePillActivity. Extracted fromMembersPage's identity-pill selectors, which now call it; the chat line calls it too, so the header and the chat can never name one moment differently (First Principles R5). Thenothing_to_docall reads as thinking on BOTH surfaces (no per-caller option — First Principles R6), matched on the tool log entry's trusted identity (tool_name+mcp_server, theQUIET_END_*constants), never on its title. Both callers pass the samedelegatedOnly(Design R6).pages/members/pillActivity.ts:PILL_ACTIVITY_KEYmoved here (exported) fromMembersPageso both renderers share the phase words; atoolactivity also carriesfullText(the label before the 40-char clamp the pill needs).components/chat/CrewmateLiveActivity.tsx(new): oneh-5, truncating row in the footer column; text from the hook'sPillActivity— the FULL label where the pill clamps (this column has the room; CSStruncateis the only cut,titlecarries the whole text — UX R6); fades in on each change (reduced-motion respected). No spinner — the ghost under it carries the motion (UX R5). Therole="status"/aria-live="polite"region is the stable wrapper, not the keyed span.role="status",data-testid="crewmate-live-activity".components/ChatPane.tsx: renders the line inbelowRowsaboveChatFooterwhenever the crewmate is live; the "hasn't said anything yet" hint is hidden while the crewmate is live (crewmateLive), since its current step is on screen.store/chatSlice.ts: re-exportsQUIET_END_SERVER/QUIET_END_TOOLfromchat/selectors(the facade is the only way out ofsrc/store;chatSlice.ownership.testandchatSlice.publicSurface.testpin it).Why a status line and not the transcript's own tool row. Round 1 kept one live transcript row and swapped it per step; the ghost under it hopped −25px/+25px on every swap (old row unmounts instantly, new row slides in), and a tool→thinking swap jumped it another 23px. Sampled with the harness below:
swap1 [289,292,301,310,313,314 …]from a 314 baseline. A fixed-height line mounted for the whole turn holds the ghost still:391on every sample through two calls, a return, thinking, thenothing_to_docall, up to the turn's end.Why the pill's seam and not the transcript. R2–R5 derived the step from transcript rows plus the tool log, which was a second spelling of what
MembersPage's header pill already computes fromslotStatusDetail(First Principles R5). Reading one seam removes the duplicate completion logic (meta.done, ✅/🚫 siblings,completedToolIds) entirely: the status record already knows the open call, and the tool log already knows it returned.Spec: the "While a turn runs" paragraph of
docs/system-specs/modules/crew-mode.md, and the Crew Members + Crewmate chat rows ofdocs/feature-map/README.md, rewritten in the same commit. No product default changes hands: the decision that the crewmate chat shows only what the crewmate says is the existing crew-mode spec; this PR changes how the running turn's single live step is drawn, recorded on #18238 by the owner.Backwards compatibility
Compatible:
filterCrewmateChatdrops an optional parameter its one caller (ChatPane) stops passing; the header pill renders the sameresolvePillActivityresult through the extracted hook (its tests are unchanged and green); every transcript row is still persisted and still drawn on the Sessions page and the Work log; the facade re-exports are additive.Tests
pages/members/useSlotActivity.test.tsx(new): idle when not running; names the open call by the shared label; thinking once the call returned (tool log output);nothing_to_doreads as thinking by identity on every surface, and a shell whose title saysnothing_to_dois an ordinary step; a tool step carriesfullTextbeside the clampedtext.crewmateBubbles.test.ts: the transcript never draws progress rows during a running turn; a live tool row between two replies does not reshape the run.ChatPane.crewmate.test.tsx: the line shows the open call's label (data-activity=tool), one line, no wake text, no quiet hint; a returned call →thinking/ "Thinking…", label gone;nothing_to_doin flight → "Thinking…", no hint; the line carries no SVG (words only); a long step shows its full label and carries it astitle.chatSlice.ownership.test.ts+chatSlice.publicSurface.test.ts: the two facade re-exports registered.MembersPage.test.tsx/MembersPage.sideChat.test.tsx(205 tests, unchanged) pass against the extracted hook.tsc --noEmit,eslinton touched files,scripts/docs-lint.shclean. Full suites are CI's.Manual verification
Recorded from the real
MembersPagemounted by thecapture/members-page.tsxharness (gateway-free,/api/**from fixtures), status frames arriving through the samesetSlotStatusDetail/sseToolActivity/sseToolResultreducers the WebSocket layer dispatches. The ghost carousel'sywas read at every step:391throughout. The fifth still shows the header pill and the chat line naming the same step from the one seam. A live-gateway run is not needed for this surface: the line reads only the persisted rows the fixtures reproduce byte-for-byte.Screenshots / video
Light theme, crewmate DM pane, 646×560 crop. The recording: a running turn ("Working" → "Thinking…") → a tool call fills the line → the next call swaps the text in place → its return turns the line to "Thinking…" → another call → thinking → a
nothing_to_docall ("Thinking…", same height) → the turn ends and line and indicator leave together. Stills: the open call, "Thinking…" after a return, "Thinking…" duringnothing_to_do, after the turn, and a full frame with the header pill and the line agreeing.Attached below as github.com/user-attachments assets (one GIF, five PNGs).
Related Issues
Fixes #18238. Follows #17794 (introduced the live rows) and #16429 (
nothing_to_do).Pattern harvest
Rule candidate: review-prompt
Pattern: "a live status drawn as transcript rows — anything mounted/unmounted above a pinned indicator moves it; model a changing status as one fixed-height element whose content changes".
Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)