Repository navigation
feat: crewmate chat shows a typing bubble while the crewmate works - #20032
Conversation
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS Check that dropping the theme-pack loader art from crewmate DMs is fine with whoever owns themes, since theme packs no longer reach that surface. [DESIGN-REVIEWED] 7aa24c0 Description read[DESCRIPTION-READ] 0d200442e95e8738c7844d4526f4d2a0ff51d053d0cc889ff18381b2d90f983d 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 Before merge, a maintainer should confirm the claimed ruling that lets What this change shipsInventory (7 items) — 7 justifiedIntent: a user watching a crewmate work in its DM sees a "reply is being typed" bubble instead of a loading carousel. This is an ADDITION (a visual replacement on one surface).
[FIRST-PRINCIPLES-REVIEWED] 7aa24c0 Description read[DESCRIPTION-READ] 8fa51ac0d7b70aa8f0835dad7fd812fdd206fce62e858f4d83bf76040f4dcdeb That sha256 names the PR description this verdict read. Recompute it with |
UX Review (Opus 5.5) — 🟡 CONCERNSUX-level review of UX-Verdict: CONCERNS The chat shows three different "working" signs: bouncing dots, a bare "Writing…" line, and a pulsing caption. The blind reader could not tell whether they meant the same thing. Watch
Suggestions
[UX-REVIEWED] 7aa24c0 Description read[DESCRIPTION-READ] aca8be4bd5771a4283b0e9b8e63032a2c56f2c281c6d94d9e1252f3fade1567a That sha256 names everything this verdict read: the PR description, plus the 10 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: |
07f1874 to
eb6bfdd
Compare
|
|
|
|
eb6bfdd to
ebfc240
Compare
|
|
|
|
ebfc240 to
2459ff3
Compare
|
|
|
|
|
|
|
|
|
f3aed3d to
3f009af
Compare
|
|
|
|
A crewmate's DM thread used to draw two things under the last message while its turn ran: a grey one-line step label and the main chat's ghost-pose working carousel. Together they read as a loading indicator, not as a conversation. The crewmate chat now draws an iMessage-style typing bubble instead: three bouncing dots in the crewmate's own grey message bubble, with the current step as a small caption under it. The bubble is built from the same classes and DOM shape a one-line reply renders, so it is exactly one reply tall and follows the message font setting; the dots are the theme's muted colour. ChatPane mounts this OR the ghost carousel, never both, so only one thing moves. The bubble folds (by height, staying mounted) while reply text is actively streaming and returns when the stream pauses, reusing ChatFooter's useStreamIdle. The caption now also spells "Stopping…" and "Compacting…" itself, since no footer is mounted beside it to say them. Closes #19997
3f009af to
7aa24c0
Compare
|
|
|
|
|
|
iamwhatever
left a comment
There was a problem hiding this comment.
APPROVE at 7aa24c0.
The checks behind my r99 HOLD (Frontend Tests (2), Frontend Coverage Merge, Coverage Gate) are green on this head after the rebase onto #20212.
The change is sound. A crewmate pane now mounts either the typing bubble or the chat page's footer, never both (ChatPane.tsx#L2027-L2053). The dots fold only while streamed text is actually arriving, or during stopping/compacting. The slots-frame stopping flag flows through the shared resolvePillActivity seam, so the header pill and the caption agree. The backend resets that flag to idle when the queue cycle ends, so it cannot linger on a resting slot. The dots are aria-hidden and the caption keeps the role="status" live region.
Every UX Watch and Suggestion item at this head has its own disposition with code evidence. The Design and First Principles punchlines (theme loader art, the separate ThreadPanel dots) carry the repository admin's recorded rulings. Opus and GPT 6.1 report no findings. There are no open change requests or conflicts, and the base is main.
I read the code and tests but did not run them locally.
— crew-pr-reviewer (r100)
Problem / Motivation
Goal: While a crewmate works, its DM thread shows a typing bubble — the way a messaging app shows a reply being typed — instead of a loading indicator.
Today a crewmate's DM thread (Members page,
ChatPane) shows two things under the last message while the crewmate's turn runs: a grey one-line step label (CrewmateLiveActivity) and the main chat page's ghost-pose working carousel (ChatFooter). Together they read as loading, not as a conversation. The product frames a crewmate DM as messaging a teammate; the reply-in-progress should look like one.Why it matters
The crewmate DM is the surface where a user watches a crewmate work in real time. A spinner-shaped indicator makes it feel like a tool, and two moving things (carousel + swapping text) compete for attention. A typing bubble is the pattern every messaging user already knows and reads at zero context.
Not a goal
useSlotActivity,toolStatusLabel); rewording tool titles or "Compacting…" is a separate change to that shared seam.useHeldActivity).What changed (motivation → approach → change)
Goal → a bubble in the crewmate's column that reads as "a reply is being typed" → three mockups were reviewed (dots only / dots + caption below / dots + caption inside one bubble); "dots + caption below" was chosen because it keeps the what-is-it-doing signal without letting the bubble change size on every step.
website/src/components/chat/CrewmateLiveActivity.tsx— now renders the typing bubble (three bouncing dots) with the step caption under it. The bubble is built from the same classes and DOM shape a one-line crewmate reply renders (.message-bubble.crewmate-bubble+mc-message-font-scope msg-content,.group > div > p.my-1), around one invisible zero-width character, so it is exactly one reply tall by construction (measured 43px = 43px in the pod) and follows the message font setting and every theme. The bubble folds by height (staying mounted) while the reply's text is actively streaming — that bubble already carries the caret — and while the caption readsstopping/compacting(nothing is being typed; the caption then pulses, with the footer's hourglass for compacting, so the chat still visibly works), and returns when the stream pauses, reusingChatFooter's exporteduseStreamIdle. The caption now spellsstopping/compactingitself, since no footer is mounted beside it to say them. Dots arearia-hidden; the caption stays therole="status"live region.website/src/components/chat/TypingDots.tsx(new) — the three-dot "a reply is being typed" glyph the bubble draws (currentColor, 8px, bounce). The thread panel's " is replying" row keeps its own smaller pulsing dots: a status row on a different surface, outside this PR's goal (maintainer ruling after rounds 1–3).website/src/components/ChatPane.tsx—belowRowsmountsCrewmateLiveActivityfor a crewmate chat ORChatFooterfor any other pane, never both, so only one thing moves. The slots frame'sstoppingflag (a Stop pressed in another tab or on a background slot, which the footer it replaces also read) is passed as a seam input rather than patched locally (Opus / Design / First Principles findings).website/src/pages/members/pillActivity.ts,useSlotActivity.ts,MembersPage.tsx—resolvePillActivitytakes an optionalstoppinginput and folds it withstreamState === 'stopping'; both the DM header pill and the pane pass their slot's flag, so the two surfaces keep resolving one moment from one seam.website/src/index.css—.typing-dotsand@keyframes typing-dot(1.3s, 180ms stagger,currentColor). The existing global reduced-motion rule ends the animation on its first frame, which is the resting style.docs/system-specs/modules/crew-mode.md,docs/feature-map/README.md— the "while a turn runs" contract rewritten for the bubble.Backwards compatibility
Compatible: no API, config or persisted shape changes;
ChatFooter's props and the main chat page are untouched.Removes nothing: the crewmate chat's step text, hold timings and live-region semantics are all kept; only the visual indicator around them changes (the ghost carousel is no longer mounted in a crewmate chat, but it is not a documented capability of that surface and remains on every other pane).
Tests
website/src/components/chat/CrewmateLiveActivity.test.tsxaria-hidden), caption is the live region.streamingTextand comes back onceSTREAM_IDLE_MSpasses without a newstreamTick; the caption stays mounted throughout.stoppingorcompacting(nothing is being typed; bouncing dots under "Stopping…" would contradict it), and the caption then carriesanimate-pulse(plus the hourglass for compacting).website/src/test/ChatPane.crewmate.test.tsxchat-footernorloader-carouselis mounted in a crewmate chat.stopping: truemakes the caption readstopping/ "Stopping…" (the signal the old footer read).website/src/pages/members/pillActivity.test.ts— new: thestoppinginput resolves tostopping;compactingstill outranks it.Determinism proof: the two files (plus
ThreadPanel.test.tsx, untouched) run repeatedly with--sequence.shuffle, 39/39 green each time; all timing goes throughvi.useFakeTimers/advanceTimersByTime, no sleeps, no real clock.Manual verification
Isolated pod (
kirocrew pod) of this worktree, dark theme, a real crewmate turn driven through the Members DM with headless Playwright. Measured in the live DOM every 500ms:data-activitygoes thinking → tool (two shell steps, titles held) → thinking → writing (bubble folded,h=0) → indicator unmounts when the reply lands;chat-footercount stays 0; typing bubble height 43px, one-line reply bubbles 43px; zero[role="dialog"]open during capture. Full chat-page split panes still renderChatFooter(unchanged code path, pinned by existing tests).New-user (non-technical) review by a separate sub-agent: PASS. Its one in-scope finding (caption too faint at 12px) was fixed (13px). Its other findings concern the shared caption wording and hold timings — see Not a goal.
Screenshots / video
Typing bubble while the crewmate runs a shell step (dark theme, pod):
Full lifecycle — Thinking → tool steps → Writing (bubble folds) → reply lands:
Writing (live, not staged): the streamed reply is landing in its gray bubble with the caret; under it the typing bubble has folded to zero height and the caption reads "Writing…" (DOM at capture:
writing shown=false h=0 caret).A live turn for reference (not staged): the typing bubble with a tool-step caption, the composer in Stop mode, no landed reply under it. This is the only context in which the Stopping / Compacting captions below can appear; the two staged frames under it replay their state onto an already-idle thread, which is why their surrounding chrome (landed reply, Send button) looks wrong — that is the staging, not the feature.
Stopping and Compacting (dots folded, caption spells the phase). These two phases last well under 100 ms against this stack (a Stop on a
sleepends the turn in one frame; the capture log never caught either), so they are staged on the real built dashboard talking to the real pod: the gateway's own lastslotsframe re-sent over the same WebSocket with the member slot markedrunning: true, stopping: true(the signal a Stop from another tab delivers), and achat_messageframe withrole: 'compacting'(what the gateway emits when compaction starts). Reducers, components and CSS are the production path; only the two frames are replayed.Reply landed, indicator gone
Related Issues
Closes #19997
Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)Contribution License Agreement
Contributions are accepted under the project's Apache-2.0 license; see the Licensing section of CONTRIBUTING.md.