Repository navigation
fix(crew): crewmate status line names a running tool while it streams - #19863
Conversation
…le it streams output (#19861)
UX Review (Opus 5.5) — ✅ PASSUX-level review of UX-Verdict: PASS Watch a crewmate DM during a long shell build: the line should keep naming the command, then switch to "Thinking" only when the command finishes. [UX-REVIEWED] 0ef485e Description read[DESCRIPTION-READ] e24e743c385f5609aa81ea634df8da8cdd704e9d139ae56301ea3e81cf233baa That sha256 names everything this verdict read: the PR description, plus the 16 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) — 🟡 CONCERNSPremise-level review of First-Principles-Verdict: CONCERNS The Not justified as shipped
What this change shipsInventory (4 items) — 3 justifiedIntent: let a crewmate chat show which tool is running for as long as it runs. This is a FIX.
[FIRST-PRINCIPLES-REVIEWED] 0ef485e Description read[DESCRIPTION-READ] 30decda1045f27d8899dc25fe74d513278413ecd252b203367ffe3e18fe4dc1a That sha256 names the PR description this verdict read. Recompute it with |
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS Check that a cancelled or interrupted turn, where no final frame ever arrives, still drops the tool label once [DESIGN-REVIEWED] 0ef485e Description read[DESCRIPTION-READ] 9e7a6cff8629b0c911e382ed7e56cbd2a5d0e750bac3cf73b9c765ca371ad2e4 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 |
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: |
Problem / Motivation
Goal: A crewmate chat names the tool its crewmate is running for as long as that tool runs, instead of saying "Thinking".
In a crewmate (mate) DM, the status line above the working indicator says "Thinking" while a shell command is still running. The user sees no sign of what the crewmate is doing and thinks it is stuck. Ordinary chats draw a tool row, so they do not show this.
Why it matters
Crewmates run long builds and test suites. For all of that time the chat looks frozen, and users stop or re-ask a crewmate that is working fine.
Not a goal
What changed (motivation → approach → change)
Symptom: the line names a shell command, then says "Thinking" at its first line of output.
Root cause: a shell streams stdout as mid-stream
tool_resultframes (a status-lesstool_call_updatewith content). The status line reads "the call has output" as "the call returned, the model is thinking again". The frame did not say whether it was the final one, so the client could not tell.Change: the server now puts
finalon everytool_resultframe (true for any terminal status, and for the text-after-tools sweep). The client marks a non-final frame's output as partial, and the status line counts a call as returned only after a final frame. A frame with nofinalfield (an older server) reads as before.src/kiro_crew/dashboard/chat_runner.py:finalon bothtool_resultbroadcasts.website/src/hooks/useWebSocket.ts: passesfinalto the reducer.website/src/store/chat/activity.ts+website/src/types/index.ts:sseToolResultsetsoutput_partialon the tool-log entry.website/src/pages/members/useSlotActivity.ts: a partial output is not a return.Backwards compatibility
Compatible:
finalis a new optional field; a client that ignores it, or a frame that lacks it, behaves as today.Removes nothing: the change only adds a field to a WS frame and a flag on the client tool log.
Tests
website/src/pages/members/useSlotActivity.test.tsx: a running shell keeps its label through streamed (final: false) frames, flips to thinking on the final frame, and a late partial frame does not reopen it. Red without the selector change.test/test_tool_result_frame_final.py: through the real_run_chat, a streamed frame goes outfinal: false, a completed or failed onefinal: true, and the text-after-tools sweepfinal: true.Determinism: both are pure state/event-driven (no clocks, no sleeps); run 3 times each with the same result.
Manual verification
N/A — unit coverage drives the real reducer, selector and runner; no browser on the authoring host.
Screenshots / video
Why no screenshot: No layout or style changes; the existing status line keeps its look and only stays on the tool label for longer, which a still image cannot show.
Related Issues
Closes #19861
Pattern harvest
Rule candidate: review-prompt
Pattern: a streamed partial event treated as the terminal one because the wire frame carries no "final" bit.
Checklist