Repository navigation
fix(chat): give the crew window the local composer and bubble actions - #18801
Conversation
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS Check that the new "Sending replaces the replies below" caption fits the local chat's edit row, which every user sees, at narrow bubble widths. [DESIGN-REVIEWED] 947f62c Description read[DESCRIPTION-READ] 9a41367473cd979128b2e5046d93dd339391457be97eca3a40b531cddb62eed0 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) — 🟡 CONCERNSPremise-level review of First-Principles-Verdict: CONCERNS The local-chat editor hint "Sending replaces the replies below" is a rider outside the crew-window Goal, and no reported defect backs it. Not justified as shipped
What this change shipsInventory (10 items) — 9 justifiedIntent: let a person chat with a remote crew through the same composer and per-message actions as local chat. This is a FIX.
[FIRST-PRINCIPLES-REVIEWED] 947f62c Description read[DESCRIPTION-READ] 092101a8839278f59ab89dbf281fd206fc3bf573be70179f5bff583a281a6f35 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 new model-pick refusal notice tells the user to "Try again" even when the crew is busy and a retry will fail, and the open picker covers the effort notice. Watch
Suggestions
[UX-REVIEWED] 947f62c Description read[DESCRIPTION-READ] bfe8702bb476588eb12a24835bd65d09f3c58a3de6718dd3c36af94d4dca53a9 That sha256 names everything this verdict read: the PR description, plus the 15 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 |
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: |
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: |
57a5aaa to
05aacc7
Compare
05aacc7 to
6919fdb
Compare
6919fdb to
79584f0
Compare
|
|
|
79584f0 to
9d12124
Compare
|
|
|
|
|
The crew chat window had no agent picker and no approval-mode picker: #18801 hid both because they wrote this machine's state, not the crew's. Both now read and set the crew's own session. - The composer's agent chip shows the crew session's agent, and its list is the crew's roster (the capability read the window already makes). A pick posts the crew's own `api/chat/slots/<key>/agent` through the hub proxy. - The approval-mode picker shows the crew session's mode: its own trust flags plus the crew's machine-wide YOLO. A pick posts the crew's own `api/chat/mode` with the session named. Only Normal, Reads and Trust are offered; while the crew is in YOLO no row is offered, and the menu says YOLO is changed on the crew's own dashboard. The rows the crew's policy denies are hidden, as its own picker hides them. With the crew's YOLO state unknown, no picker is drawn and a notice says why. - A policy refusal of a mode reopens the menu with the reason, as the local picker does. Any other refusal (an unknown agent, a 409) shows on the window's own notice, and so does a roster that could not be read. ApprovalModePicker gains an optional `remote` seam; every other caller is unchanged. - The capability read (`GET /api/instances/{id}/capabilities`) reads the crew's `/api/status` too and forwards two fields only: `yolo` and `disabled_approval_modes` (filtered to known modes). The window re-reads it every 30 s while open, so YOLO turning on or expiring shows. No proxy change: both writes are under the `api/chat` prefix the proxy already admits, and the crew runs its own owner and policy checks. Closes #18936
f10eb90 to
6a7b339
Compare
The crew chat window had no agent picker and no approval-mode picker: #18801 hid both because they wrote this machine's state, not the crew's. Both now read and set the crew's own session. - The composer's agent chip shows the crew session's agent, and its list is the crew's roster (the capability read the window already makes). A pick posts the crew's own `api/chat/slots/<key>/agent` through the hub proxy. - The approval-mode picker shows the crew session's mode: its own trust flags plus the crew's machine-wide YOLO. A pick posts the crew's own `api/chat/mode` with the session named. Only Normal, Reads and Trust are offered; while the crew is in YOLO no row is offered, and the menu says YOLO is changed on the crew's own dashboard. The rows the crew's policy denies are hidden, as its own picker hides them. With the crew's YOLO state unknown, no picker is drawn and a notice says why. - A policy refusal of a mode reopens the menu with the reason, as the local picker does. Any other refusal (an unknown agent, a 409) shows on the window's own notice, and so does a roster that could not be read. ApprovalModePicker gains an optional `remote` seam; every other caller is unchanged. - A new owner-only route, `GET /api/instances/{id}/approval-state`, reads the crew's `/api/status` through the closed capability carrier and forwards two fields only: `yolo` and `disabled_approval_modes` (filtered to known modes). The window polls it every 30 s while open, so YOLO turning on or expiring shows; the roster is not re-read. No proxy change: both writes are under the `api/chat` prefix the proxy already admits, and the crew runs its own owner and policy checks. Closes #18936
The crew chat window passed the shared composer none of its model, effort or agent props, and drew its own reply row plus loose "Rewind to here" / "Regenerate" buttons. In a two-machine test it showed a bare message box, misplaced actions and a reply row unlike the local chat. - The composer's model chip and model + effort picker (the shared ModelEffortDropdown) now read the peer's roster and write the PEER slot's model and effort through the hub proxy. ReasoningEffortDropdown gains an optional writeEffort seam for that write. - Attach, the agent picker and the approval-mode picker would write this machine's state, not the peer's, so the window does not draw them. - User and reply rows are the local UserMessage / AssistantMessage bubbles with the same hover rows: Quote stages a message for the next send, Edit & Resend rewinds on the peer, Regenerate sits on the newest reply's row. Peer rows keep the #18095 fences: decision records are stripped before drawing (no verdict thumbs) and the reply draws no file-change chips; code stays copy-only. Closes #18765
6a7b339 to
947f62c
Compare
|
|
|
|
|
|
|
|
|
|
|
|
The crew chat window had no agent picker and no approval-mode picker: #18801 hid both because they wrote this machine's state, not the crew's. Both now read and set the crew's own session. - The composer's agent chip shows the crew session's agent, and its list is the crew's roster (the capability read the window already makes). A pick posts the crew's own `api/chat/slots/<key>/agent` through the hub proxy. - The approval-mode picker shows the crew session's mode: its own trust flags plus the crew's machine-wide YOLO. A pick posts the crew's own `api/chat/mode` with the session named. Only Normal, Reads and Trust are offered; while the crew is in YOLO no row is offered, and the menu says YOLO is changed on the crew's own dashboard. The rows the crew's policy denies are hidden, as its own picker hides them. With the crew's YOLO state unknown, no picker is drawn and a notice says why. - A policy refusal of a mode reopens the menu with the reason, as the local picker does. Any other refusal (an unknown agent, a 409) shows on the window's own notice, and so does a roster that could not be read. ApprovalModePicker gains an optional `remote` seam; every other caller is unchanged. - A new owner-only route, `GET /api/instances/{id}/approval-state`, reads the crew's `/api/status` through the closed capability carrier and forwards two fields only: `yolo` and `disabled_approval_modes` (filtered to known modes). The window polls it every 30 s while open, so YOLO turning on or expiring shows; the roster is not re-read. No proxy change: both writes are under the `api/chat` prefix the proxy already admits, and the crew runs its own owner and policy checks. Closes #18936
|
Self-review (crew-pr-reviewer, read-only): RECOMMEND APPROVE RECOMMEND APPROVE. The crew window drew its own composer, reply row and loose Rewind/Regenerate buttons, and this PR fixes that at the root: it reuses the local chat's own UserMessage, renderAssistantBubble and ModelEffortDropdown, and sends the model and effort writes to the peer's slot through the hub proxy ( |
Problem / Motivation
Goal: A crew chat window looks and works like the local chat: the same composer (model and effort set on the crew's own session) and the same hover actions on each message.
In a two-machine test the crew window showed a bare message box with a send button. "Rewind to here" was a loose bordered button under the user message, and "Regenerate" floated at the far left under the reply. The reply was bare text, not the local reply bubble.
Why it matters
Chat on a crew is meant to feel like chatting locally. A composer with no model picker means the user cannot change the model the crew runs, and actions that sit away from their message read as broken.
Not a goal
What changed (motivation → approach → change)
The window used the shared composer but passed it none of its model props, and drew its own reply row and its own two buttons. Now it uses the same parts the local chat uses.
Hidden controls, and why:
/and$menus, prompt optimizerRewind now works the way the local chat's does. Before, "Rewind to here" first put the old text in the composer, and Send posted the rewind. Now Edit & Resend opens the bubble's own editor, and submitting it posts the rewind at once. An edit submitted while the crew is busy is not sent, as locally, but its editor stays open with the text (the shared editor now keeps itself open when the host declines the edit), so nothing typed is lost. The composer's rewind mode stays only for a refused rewind: it lands there with its row, so Send retries it.
Local chat change too: the shared bubble editor (
pages/chat/UserMessage.tsx) now says "Sending replaces the replies below" beside Cancel and Send. It is one new string,pages.chat.userMessage.edit_replaces_below, in every catalog. The local chat and the crew window both show it.The Regenerate icon (named "Regenerate response" on hover and to screen readers) and the "High" effort label on the model chip are the local chat's own parts, unchanged. The goal is that the crew window matches the local chat, so any rewording belongs in the local chat, for both at once. The same holds for two more things the local chat does on purpose. Each hover row is the shared seat + Copy + More row, which is one control over the two-button rule;
pages/chat/AssistantMessage.tsxrecords that as a product ruling. And Edit & Resend rewinds at once with no undo step, as it does locally.The model list comes from the crew's own capability read. A refused model or effort pick, or an effort pick the crew never confirms, shows on the window's own notice, so an embedded window reports it too. If the crew's effort options cannot be read, an inline notice says so (the split pane's own wording), instead of the effort control just vanishing. The window's notices now sit in the composer's own column, right above the box and the model chip they are about. The picks go to the crew's own session through the hub proxy. Two shared parts get one small option each.
components/ReasoningEffortDropdown.tsx(passed through bycomponents/ModelEffortDropdown.tsx) takeswriteEffort, so its write can go to the crew, andonWriteError, so a failed pick is reported by the host.renderAssistantBubbleinapp-sdk/messageRenderers.tsxpassesonRegeneratethrough to the bubble. Regenerate sits on the newest reply, skipping a trailing compaction notice.The crew window row in
docs/feature-map/README.mdsays all of this.src/kiro_crew/docs/ui-index.generated.jsonis regenerated for the editor line.The #18095 safety fences stay. Crew rows lose their decision record and file changes before drawing, so no verdict thumbs and no file chips show. Code stays copy-only.
Backwards compatibility
Compatible: the new
writeEffort,onWriteErrorandonRegenerateoptions are optional; every other caller is unchanged.Reader: website/src/pages/chat/crew-window/crewWindowRenderers.tsx:createCrewWindowRenderers -- chat -- its only caller, CrewChatWindow, is updated in this diff; CrewChatWindow.test.tsx covers it
Reader: website/src/i18n/locales/*.json:pages.chat.crewWindow.rewind / .regenerate -- chat -- the window was their only user; the bubbles use the local chat's own strings (deadKeys test passes)
Tests
CrewChatWindow.test.tsx: rewind, regenerate and their failure paths now go through the bubbles' hover actions. New: Quote puts the quoted reply in the next send; an edit submitted while another action is in flight is not sent, and stays in its open editor; a rewind refused after the window closed lands in the saved draft; a second refused rewind retries from its own row; a session that does not know its effort levels yet, or whose read failed, is asked again until it answers; a peer reply carrying every hub record draws only Regenerate, Copy and More; no rewind is offered on a row whose paste the hub redacted; a refused rewind held in the composer is not sent while the crew's turn runs, and is sent once it is idle; a refused quoted send puts its quote back on the stage, or into the saved draft when the window closed meanwhile; the reply is the local bubble with Regenerate on its own row; the model picker writes the crew's slot, never this machine's; attach, agent and approval-mode controls are not drawn; a crew reply draws no decision strip and no file chips; Regenerate stays on the reply when a compaction notice follows; a refused effort pick shows on the window. Each new guard was removed once to check its test goes red.ReasoningEffortDropdown.writeEffort.test.tsx: an effort pick goes towriteEffortwhen given, and to this machine's route when not; a refusedwriteEffortgoes toonWriteError, with no dashboard switch notice.Determinism: both files ran 3 times in shuffled order (
--sequence.shuffle, seeds 11, 22, 33), 58/58 each. Peer-row waits use an explicit deadline.Manual verification
Rendered the real window in a Vite capture page with every
/apicall stubbed, before (main) and after. The reply and composer share the same left and right edges in both.Screenshots / video
Before (main): bare message box, loose "Rewind to here" and "Regenerate" buttons, no model chip.
After: the local composer with the model chip, and the reply's own hover row (Regenerate, Copy, More).
After: the model + effort picker, set on the crew.
After: rewind is Edit & Resend in the user message's More menu, then the bubble's own editor, as in the local chat.
After, failure: the crew's effort options could not be read. The open picker shows no effort slider, and the inline notice sits right above the message box.
After, failure: the crew refused a model pick (409). The window's own notice lands above the message box, in the composer's column, over the chip.
After, local chat: the same shared editor in the local chat, with the new line.
After: Quote on a crew reply stages it in the composer, with its remove control, as locally.
After: a refused rewind held in the composer ("Rewinding" line) with a quote staged. The quote card is hidden there, because a rewind sends no quote; it comes back on Cancel.
More frames (before and after, labelled)
After: user message hover row (Quote, Copy, More).
Before (main): user message hover, with the loose "Rewind to here" button.
Related Issues
Closes #18765
Pattern harvest
Not generalizable: the window re-drew rows and buttons the shared list already has; the fix is to use the shared parts.
Checklist