Skip to content

fix(chat): give the crew window the local composer and bubble actions - #18801

Merged
chenmingwei23 merged 1 commit into
mainfrom
fix/crew-window-composer-parity
Oct 11, 2026
Merged

chenmingwei23 merged 1 commit into
mainfrom
fix/crew-window-composer-parity

Conversation

@iamwhatever

@iamwhatever iamwhatever commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

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

  • Attaching files, switching the agent, or changing the approval mode from the crew window. Each of these writes this machine's state, not the crew's, so they stay out (see the hidden-controls table).
  • Any change to the hub proxy or to the peer routes.

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.

Part Before After
Model + effort missing local chip and picker, set on the crew
User message actions loose "Rewind to here" local hover row: Quote, Copy, Edit & Resend
Reply actions floating "Regenerate" local hover row: Regenerate, Copy, Quote
Reply bare text local reply bubble
Send / Stop crew's own session unchanged; a quoted message rides the send

Hidden controls, and why:

Control Why hidden
Attach the file uploads to this machine; the crew cannot read it
Agent picker it lists and sets this machine's agents
Approval mode it sets this machine's mode, not the crew's
/ and $ menus, prompt optimizer already off: they act on this machine

Rewind 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.tsx records 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 by components/ModelEffortDropdown.tsx) takes writeEffort, so its write can go to the crew, and onWriteError, so a failed pick is reported by the host. renderAssistantBubble in app-sdk/messageRenderers.tsx passes onRegenerate through to the bubble. Regenerate sits on the newest reply, skipping a trailing compaction notice.

The crew window row in docs/feature-map/README.md says all of this. src/kiro_crew/docs/ui-index.generated.json is 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, onWriteError and onRegenerate options 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 to writeEffort when given, and to this machine's route when not; a refused writeEffort goes to onWriteError, 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 /api call 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.

before: main

After: the local composer with the model chip, and the reply's own hover row (Regenerate, Copy, More).

after: reply hover row

After: the model + effort picker, set on the crew.

after: model picker

After: rewind is Edit & Resend in the user message's More menu, then the bubble's own editor, as in the local chat.

after: user More menu

after: the bubble editor

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: effort options unavailable

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: refused model pick

After, local chat: the same shared editor in the local chat, with the new line.

after: local chat editor

After: Quote on a crew reply stages it in the composer, with its remove control, as locally.

after: quote staged

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.

after: rewind held, quote hidden

More frames (before and after, labelled)

After: user message hover row (Quote, Copy, More).

after: user hover row

Before (main): user message hover, with the loose "Rewind to here" button.

before: user hover

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

  • At most two commits (one is the norm), with a Conventional Commits title
  • Existing tests pass and new tests added for new functionality
  • Self-review completed; code follows project style guidelines
  • Documentation updated (if applicable)
  • No secrets, credentials, or internal references in the diff

@iamwhatever
iamwhatever requested review from a team and KiroCrewCaptain as code owners October 10, 2026 09:06
@github-actions github-actions Bot added the readiness: checking Automated validation is still running label Oct 10, 2026
@github-actions

github-actions Bot commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

Design Review (Opus 5.5) — ✅ PASS

Design-level review of 947f62cc5674ca08ca3d7b1a82222bd9cedc5886 — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS/CONCERNS are advisory.

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 .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

github-actions Bot commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

First Principles Review (Opus 5.5) — 🟡 CONCERNS

Premise-level review of 947f62cc5674ca08ca3d7b1a82222bd9cedc5886 — why this exists and whether the shipped surface is the smallest honest version. Updated in place on each push. A BLOCK verdict blocks PR readiness; PASS/CONCERNS are advisory.

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

  • Item 7 — rides along, inherited: the Goal is "A crew chat window looks and works like the local chat". But the PR also changes the local chat: <span …>{i18nT('pages.chat.userMessage.edit_replaces_below')}</span> in pages/chat/UserMessage.tsx, with a new key in 15 catalogs. The description gives no issue or report showing local users were surprised by Edit & Resend. Its only support is that the crew window's "Rewind to here" label is gone.
    Subtraction: delete the span and pages.chat.userMessage.edit_replaces_below from every catalog. The crew window's parity fix works without them.
    Clears when: the span and key are removed, or a linked report shows local Edit & Resend users losing replies without warning.

What this change ships

Inventory (10 items) — 9 justified

Intent: let a person chat with a remote crew through the same composer and per-message actions as local chat. This is a FIX.

  1. The crew window gains the model chip and the model + effort picker, which write the crew's own session — justified
  2. "Rewind to here" moved from a loose button into the user bubble's hover menu as Edit & Resend — justified
  3. "Regenerate" moved from a floating button into the reply's hover row — justified
  4. Crew replies draw as the local reply bubble instead of bare text — justified
  5. Quote is a new action in the crew window, and the quoted message goes out with the next send — justified
  6. Edit & Resend now posts the rewind at once (the composer staging step is gone), and a busy crew keeps the editor open — justified
  7. The local chat's bubble editor shows a new "Sending replaces the replies below" line — rides along, inherited
  8. A refused model or effort pick, or an effort-options read failure, shows a notice in the crew window — justified
  9. The shared effort slider takes optional writeEffort/onWriteError, used by one caller (the crew picker) — justified
  10. Crew rows lose their decision records and file changes before drawing, so no thumbs or file chips show — justified

[FIRST-PRINCIPLES-REVIEWED] 947f62c

Description read

[DESCRIPTION-READ] 092101a8839278f59ab89dbf281fd206fc3bf573be70179f5bff583a281a6f35

That sha256 names the PR description this verdict read. Recompute it with .github/scripts/pr-description-capture.sh; if it differs, the description changed after this verdict was formed and any finding drawn from the description is unproven.

@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention and removed readiness: checking Automated validation is still running labels Oct 10, 2026
@github-actions

github-actions Bot commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

UX Review (Opus 5.5) — 🟡 CONCERNS

UX-level review of 947f62cc5674ca08ca3d7b1a82222bd9cedc5886 — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS/CONCERNS are advisory.

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

  • The model-pick refusal is jargon and gives the wrong advice. The new picker.error notice reuses action_failed ("shizuka refused that action. Try again, or open the crew's own dashboard.") and adds the server's raw text after it: "slot is running; stop the turn before switching model" (shot-07). The blind reader said: "no idea what 'slot' or 'turn' means, how to 'stop the turn', or where the 'crew's own dashboard' is. Nothing on the screen opens it." The window already knows the crew's turn is running, so "Try again" fails again. This hits anyone who changes the model mid-reply, every time. Fix: give picks their own title, such as "Can't switch model while shizuka is replying — stop or wait, then pick again", and drop the raw server text.
  • A refused rewind moves the user's edit out of the bubble without saying which message it rewinds from. The edit was typed in the bubble's editor, but after a refusal it lands in the composer with "Rewinding: sending replaces the conversation from this message on." (shot-10). The reader was unsure "where 'this message' is (nothing in the chat is marked)" and would not send. It only happens on failure, but at that point the user is about to delete part of the conversation. Fix: highlight the message the rewind starts from, or keep the edit in its bubble editor with the error shown there.
  • The open picker hides the effort notice. In shot-06 the picker covers "Could not verify this session's reasoning effort options. The effort control i…", and the reader could not read it. The user sees it whenever the crew's effort options can't be read. Fix: show the notice inside the picker, where the effort slider would be.

Suggestions

  • In the quote header ("Quoting Kiro Crew · …", shot-09), use the crew's name so it matches "the agent on shizuka" everywhere else in the window.

[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 .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

github-actions Bot commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

Opus 5.5 Review — ✅ no blocking findings

Reviewed 947f62cc5674ca08ca3d7b1a82222bd9cedc5886 — this comment is updated in place on each push.

Review details

No findings.

[OPUS-REVIEWED] 947f62c

Verdict parsed from the review's SHA-scoped output markers for commit 947f62cc5674ca08ca3d7b1a82222bd9cedc5886.

False positive or not applicable? A repository writer can comment:
/ai-review override fable 947f62cc5674ca08ca3d7b1a82222bd9cedc5886: <one-sentence reason>

@github-actions

github-actions Bot commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

GPT 6.1 Review — ✅ no blocking findings

GPT 6.1 completed its review of 947f62cc5674ca08ca3d7b1a82222bd9cedc5886 and found no blocking issues.

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] 947f62c

False positive or not applicable? A repository writer can comment:
/ai-review override gpt 947f62cc5674ca08ca3d7b1a82222bd9cedc5886: <one-sentence reason>

@iamwhatever
iamwhatever force-pushed the fix/crew-window-composer-parity branch from 57a5aaa to 05aacc7 Compare October 10, 2026 09:31
@github-actions github-actions Bot added readiness: checking Automated validation is still running merge conflict Branch has merge conflicts with its base — author must resolve before merge and removed readiness: action required A blocking check or review needs attention labels Oct 10, 2026
@iamwhatever
iamwhatever force-pushed the fix/crew-window-composer-parity branch from 05aacc7 to 6919fdb Compare October 10, 2026 10:12
@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention and removed merge conflict Branch has merge conflicts with its base — author must resolve before merge readiness: checking Automated validation is still running labels Oct 10, 2026
@iamwhatever
iamwhatever force-pushed the fix/crew-window-composer-parity branch from 6919fdb to 79584f0 Compare October 10, 2026 11:02
@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: action required A blocking check or review needs attention and removed readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running labels Oct 10, 2026
@iamwhatever

Copy link
Copy Markdown
Contributor Author
  • rebutted: crew hover rows exceed the two-action cap span=382e37d5e4da

Not a new row: both bubbles are the shared UserMessage / AssistantMessage, drawn exactly as the local ChatPage draws them (seat + Copy + More).
AssistantMessage.tsx (main) records that shape as a deliberate product ruling: "one control over the max-two-buttons rule ... Copy is the most-used action and must stay one click away".
The goal of this PR is parity with the local chat; trimming the row here would make the crew window differ from it again.
The local review verifier on ec65b0e0dc confirmed the ruling covers this reuse.

@iamwhatever

Copy link
Copy Markdown
Contributor Author
  • rebutted: no undo after a rewind span=b978bc5577c8

Edit & Resend is the local chat's own control, unchanged: on a local session it rewinds at once with no confirm, and this window now does the same on the crew.
The asked-for outcome is parity with the local chat (issue #18765). A confirm or undo step would be a change to the local control, for both surfaces at once, outside this PR.
The bubble's own editor is the deliberate step: it opens, shows the text, and only its Send rewinds; Escape or Cancel leaves the session untouched.

@iamwhatever

iamwhatever commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor Author
  • fixed: a refused effort pick was reported twice span=78bb916e4a08

The window's effort write no longer raises the window notice; the slider's own notice is the one report (crewWindowModelPicker.tsx writeEffort), in 9d12124.

@iamwhatever

Copy link
Copy Markdown
Contributor Author
  • fixed: a cold-start known: false answer hid effort for good span=293f33c2ea1a

In 9d12124 the selection-capabilities read polls every 5 s while the peer answers known: false; test "asks the peer again while its session does not know its effort levels yet" fails without it.

@iamwhatever

Copy link
Copy Markdown
Contributor Author
  • rebutted: the open picker hides the effort notice span=9fdcef880497

The notice is readable whenever the picker is closed and appears as soon as the read fails, before any pick. Matching the local chat is this PR's goal (#18765); a change to this shared part belongs to both surfaces at once, in its own PR.

@iamwhatever

Copy link
Copy Markdown
Contributor Author
  • rebutted: Regenerate is an icon with no label span=94f934635f43

As the item says, it is the local chat's own part. Matching the local chat is this PR's goal (#18765); a change to this shared part belongs to both surfaces at once, in its own PR.

@iamwhatever

Copy link
Copy Markdown
Contributor Author
  • rebutted: two ways to rewind show side by side span=48a6536d0442

The composer's rewind mode appears only after a refused rewind, and main's crew window already used the same "Rewinding" line. Rewording it is a new behaviour beyond this PR's goal.

@iamwhatever

Copy link
Copy Markdown
Contributor Author
  • rebutted (out of goal): reword the rewind-mode row span=1e963322535b

The "Rewinding" wording is unchanged from main; a reword is a reasonable follow-up, outside this PR's frozen goal.

iamwhatever pushed a commit that referenced this pull request Oct 11, 2026
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
@github-actions github-actions Bot added readiness: passed Eligible automated validation passed for the current revision and removed readiness: action required A blocking check or review needs attention labels Oct 11, 2026
@iamwhatever
iamwhatever force-pushed the fix/crew-window-composer-parity branch from f10eb90 to 6a7b339 Compare October 11, 2026 02:19
@github-actions github-actions Bot added readiness: checking Automated validation is still running and removed readiness: passed Eligible automated validation passed for the current revision labels Oct 11, 2026
iamwhatever pushed a commit that referenced this pull request Oct 11, 2026
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
@iamwhatever
iamwhatever force-pushed the fix/crew-window-composer-parity branch from 6a7b339 to 947f62c Compare October 11, 2026 03:05
@iamwhatever

Copy link
Copy Markdown
Contributor Author
  • fixed: the reply fence relies on stripping meta span=af72627ef827

In 947f62c: Test "draws a peer reply carrying every hub record with only its own row actions" renders a crew reply with decisions_strip, file_changes, omitted files, turn_stats, blocked_links and redactions, and asserts every control is Regenerate, Copy or More.

@iamwhatever

Copy link
Copy Markdown
Contributor Author
  • fixed: a new AssistantMessage affordance would reach crew rows span=1447be8ec898

In 947f62c that test turns red the moment a new control appears on a crew reply.

@iamwhatever

Copy link
Copy Markdown
Contributor Author
  • fixed: no crew-window test would turn red span=7852e207244b

In 947f62c: Test "draws a peer reply carrying every hub record with only its own row actions" renders a crew reply with decisions_strip, file_changes, omitted files, turn_stats, blocked_links and redactions, and asserts every control is Regenerate, Copy or More.

@iamwhatever

Copy link
Copy Markdown
Contributor Author
  • fixed: clears-when, a test covering every meta field span=f69a3d2da743

In 947f62c: Test "draws a peer reply carrying every hub record with only its own row actions" renders a crew reply with decisions_strip, file_changes, omitted files, turn_stats, blocked_links and redactions, and asserts every control is Regenerate, Copy or More.

@iamwhatever

Copy link
Copy Markdown
Contributor Author
  • rebutted (disproportional): one shared place for both fences span=68f029d3b085

The two lists guard different things (row records vs composer props); one shared module would be a new abstraction with two unrelated readers. The new test pins the row fence instead.

@iamwhatever

Copy link
Copy Markdown
Contributor Author
  • rebutted: the editor line rides along span=f3249e948549

Added on an explicit maintainer ruling on this PR, after UX blocked every rewind as unpredictable; declared in the description with local and crew screenshots.

@iamwhatever

Copy link
Copy Markdown
Contributor Author
  • fixed: a failed capability read is never asked again span=293f33c2ea1a

In 947f62c the read retries every 5 s on error as well as on known: false; test "asks the peer again after a failed capability read" goes red without it.

@iamwhatever

Copy link
Copy Markdown
Contributor Author
  • rebutted: the editor line rides along span=003197c3c51e

Added on an explicit maintainer ruling on this PR, after UX blocked every rewind as unpredictable; declared in the description with local and crew screenshots.

@iamwhatever

Copy link
Copy Markdown
Contributor Author
  • rebutted: the model-pick refusal is jargon span=fe99ced5f4b0

The notice is dismissable, Stop sits in the same composer, and the peer's own words name the step; once idle the same pick succeeds. Rewording peer refusals is outside the parity goal.

@iamwhatever

Copy link
Copy Markdown
Contributor Author
  • rebutted: a refused rewind moves the edit into the composer span=530bd9ed8128

The composer's rewind mode and its "Rewinding" line are unchanged from main's crew window; it appears only after the peer refused the rewind, so the edit is kept rather than lost. Rewording it is beyond this PR's goal.

@iamwhatever

Copy link
Copy Markdown
Contributor Author
  • rebutted: the open picker hides the effort notice span=3f84d690b4b3

The notice is readable whenever the picker is closed and appears as soon as the read fails; the picker is the shared ModelEffortDropdown and covers composer notices the same way locally.

@iamwhatever

Copy link
Copy Markdown
Contributor Author
  • rebutted (out of goal): name the crew in the quote header span=9f2b0e527f0f

The quote card is the shared composer's, with the same author label as locally; a crew-specific author is new behaviour beyond matching the local chat.

iamwhatever pushed a commit that referenced this pull request Oct 11, 2026
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
@github-actions github-actions Bot removed the readiness: checking Automated validation is still running label Oct 11, 2026
@iamwhatever

Copy link
Copy Markdown
Contributor Author

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 (crewWindowModelPicker.tsx, plus the optional writeEffort/onWriteError in ReasoningEffortDropdown.tsx). I read the whole production diff and tried to get the #18095 fences past it. withoutHubRecords strips decisions_strip, file_changes and omitted files before drawing. renderAssistantBubble passes no slotKey, pin, share or fork, and the window's ChatMessageList wires no onFileOpen, onArtifactOpen or threads, so a crew reply has no Copy link, Pin, Share or local-file links. The attach, agent and approval-mode controls are not passed. The onEditResend === false keep-open change leaves the local chat as it was, because its handler returns void. Base is main, 92 checks pass, no reviews are open, Opus and GPT have no findings, Design is PASS, and every First Principles and UX CONCERNS item on 947f62c has its own disposition. Two notes for the author. First, the body says src/kiro_crew/docs/ui-index.generated.json "is regenerated for the editor line", but that file is not in the diff and has no copy of the new string, so either regenerate it (npm run gen:ui) or drop the sentence. Second, the new "Sending replaces the replies below" span in pages/chat/UserMessage.tsx changes the local chat too and rests on a maintainer ruling that I could not see on the PR, so the code owner should confirm that ruling and check the edit row at narrow bubble widths (the Design lane's punchline). — crew-pr-reviewer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Crew chat window: bare composer and misplaced message actions

2 participants