Skip to content

feat(chat): open crew sessions as a window onto the peer's own slot - #16757

Merged
iamwhatever merged 1 commit into
mainfrom
feat/crew-chat-window
Oct 5, 2026
Merged

iamwhatever merged 1 commit into
mainfrom
feat/crew-chat-window

Conversation

@iamwhatever

@iamwhatever iamwhatever commented Oct 4, 2026 •

Copy link
Copy Markdown
Contributor

Problem / Motivation

Goal: A chat on a connected crew is the crew's own session: opening it shows the crew's live transcript, and every action (send, stop, approve, continue, regenerate, rewind) reaches the crew.

Today a crew chat is a local copy of the crew's session. The two copies disagree:

Why it matters

Anyone running sessions on a remote crew hits all three. An approval that never arrives stalls the turn. A false "Turn interrupted" invites a resend that runs the work twice.

Not a goal

  • Removing the relay path (remote_relay.py, remote_bound_refusal, adopt backfill). That is wave 4 of the RFC; existing relay slots keep working.
  • The per-machine sidebar groups (RFC wave 2, a separate PR).
  • Browsing a crew's older sessions (RFC wave 5).
  • A new proxy prefix: every call stays inside _PROXY_ALLOWED_PREFIXES (api/chat, api/stream), owner-only.

What changed (motivation → approach → change)

Implements wave 3 of the RFC docs/request-for-change/rfc-remote-crew-sidebar.md ("Window view"), accepted in #16699.

  • Crew window. A crew row opens a window over the chat pane, covering the page header. It reads the crew's slot, transcript and pending approval through /api/instances/{id}/proxy/api/chat/..., and send, stop, approve, continue, regenerate and rewind call the crew's own routes. Running state is the crew's own flag, so a reload mid-turn shows it running. The crew's api/stream is held only while the window is open; finished rows trigger one throttled re-read, and a lost feed shows a notice with Retry. A crew failing the version_match check gets a notice and no reads or actions. Session shortcuts act on the shown window, never the hidden local session (website/src/hooks/useKeyboardShortcuts.ts). The header reads "On " and says in plain view that closing does not stop the crew. The transcript scrolls under the composer, a <Glass thickness="thin"> dock, per the recorded layout and glass decisions.
  • Composer. Drafts are kept per crew session for the tab. A send clears the box at once; a failure merges the text back with the shared draft-recovery rule, even if the window closed meanwhile, and a reopened composer shows it, and a failed rewind keeps its target. A redacted message offers no rewind.
  • Approvals. The card shows the tool's purpose and what each answer does. Decisions call the crew's approve route with origin: native, request_id and the row's request_mid, so a stale or reused id is refused; an approval without a row id gets no buttons and a notice that it is waiting, to be answered on the crew's own dashboard.
  • New chat on crew. Checks version_match, then creates the session on the crew through the proxy and opens the window. No local slot is created, and a user who moved during the create is not pulled onto it. The memory-mode default rides the create; no agent is sent.
  • Read-path redaction. The proxy redacts every crew reply with the relay's redact_peer_text chain: a JSON body as one decoded document, an SSE event with its line ends normalised and its data: lines joined first; a leading BOM is dropped before either is read. A reply or event over PROXY_REDACT_BUFFER_MAX_BYTES, or nested too deep to walk, is refused, never forwarded raw.
  • Not yet. The window is feat: chat with a remote crew natively — lean local view over a tunnel proxy, no iframe #6180's lean view: non-chat rows render as one line; no attachments, voice, split view or pickers. Reusing the main components is Crew chat window: reuse the shared transcript and composer components #16774.
  • Embedded Sessions list. A crew row, and New chat on crew, open the window in /embed/chat?crew=&key=; an embedded chat frame shows one only when its URL names it.
  • Wiring. crewPeerGet / crewPeerPost in website/src/api/client/instances.ts; the cap in src/kiro_crew/instances/constants.py; pages.chat.crewWindow.* keys in every catalog under website/src/i18n/locales/; the feature map rows in docs/feature-map/README.md and the proxy row in docs/system-specs/modules/instances.md; website/src/store/switchSlotCallsiteClassification.test.ts drops the adopt call site.
  • Removed. The sidebar's adopt click (row lines, adoptFailureText, three i18n keys) and website/scripts/capture-adopt-error-reason.mjs. The backend adopt route stays for wave 4.

Backwards compatibility

Compatible: relay slots created before this change still run through the relay. A crew on an older version is refused at create time with a message naming both versions.

Breaking: a crew row and "New chat on crew" now open the crew window, not a relay slot in the full chat page. That window has no attachments, voice, split view, pickers or rich tool rows yet. Remedy: #16774 reuses the main composer and row renderers.

Reader: website/src/pages/ChatSidebar.tsx:SessionRow peer-row click -- chat -- now opens the crew window instead of adopting; ChatSidebar.instanceSessionsMerge.test.tsx "opens the peer session as a window, creating no local slot"
Reader: website/src/pages/chat-sidebar/create.ts:createRemoteChatMutation -- chat -- mints on the crew; ChatSidebar.createMenu.test.tsx "lists each connected crew and creates the session on the one picked"
Reader: website/scripts/capture-adopt-error-reason.mjs -- release (dev capture) -- deleted with the surface it shot
Reader: src/kiro_crew/dashboard/handlers_instances.py:api_instances_proxy -- chat -- JSON and SSE bodies are redacted, shape kept; TestProxyRedactsPeerReplies

Tests

  • test/test_instances.py::TestRedactSseEvent: a key split across two data: lines behind a \u escape is redacted, and CR line ends split across chunks are framed before redaction.
  • test/test_instances.py::TestProxyRedactsPeerReplies: a planted AWS key is gone from a JSON body split across chunks, from a key hidden behind a JSON \u escape, and from SSE frames cut mid-secret, with event framing intact; an oversized JSON reply is refused with proxy_reply_too_large.
  • website/src/test/CrewChatWindow.test.tsx: approve sends request_id + request_mid + origin: native to the crew route; no card for a coordinator approval with no row id; after a reload the crew's running turn shows "Running on…", not "Turn interrupted"; continue / regenerate / rewind / send / stop call the crew routes and never the local ones, and continue renders the crew's answer; the crew feed is opened only while the window is open; a lost feed is shown with Retry; text typed during an in-flight send survives its success, a failed send merges back beside newer text, a draft survives switching sessions, and a failed rewind retries as a rewind; a version-mismatched crew gets no reads, feed or actions.
  • ChatSidebar.instanceSessionsMerge.test.tsx: a host with no chat pane receives the crew row instead of the store.
  • test/test_instances.py::TestRedactSseEvent: a completed event over the cap is dropped, not forwarded.
  • test/test_instances.py::TestProxyRedactsPeerReplies: the forwarded content types are pinned to exactly the two with a redaction path.
  • Follow-up for reusing the main chat components: Crew chat window: reuse the shared transcript and composer components #16774.
  • ChatSidebar.createMenu.test.tsx: New chat on crew mints on the crew and opens the window; a version mismatch is refused before any create; no agent is sent.
  • ChatSidebar.instanceSessionsMerge.test.tsx: a crew row click opens the window, creates no local slot, and marks that row active.

Manual verification

Ran the built SPA against fixtures with website/scripts/capture-crew-chat-window.mjs. It asserts that opening the crew row creates no local slot, that the window shows the crew's running turn, its pending approval and the redacted text, and that Approve reaches the crew route with request_mid. Not run against a live crew over a real tunnel.

Screenshots / video

Crew window: the crew's running turn, its pending approval, and a planted key rendered redacted.

Crew chat window

Related Issues

Closes #10618
Closes #14585
Part of #6180

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 a review from a team October 4, 2026 11:31
@iamwhatever
iamwhatever requested a review from a team as a code owner October 4, 2026 11:31
@iamwhatever
iamwhatever requested a review from CrysisDeu October 4, 2026 11:31
@github-actions github-actions Bot added the readiness: checking Automated validation is still running label Oct 4, 2026
@github-actions

github-actions Bot commented Oct 4, 2026 •

Copy link
Copy Markdown
Contributor

First Principles Review (Opus 5.5) — ✅ PASS

Premise-level review of d20a0d6fe758e401bf30eb02c7d187b62ac03220 — 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: PASS

Check: the only callers of adoptRemoteSlot (in store/chat/lifecycle.ts and api/client/chat.ts) are now gone. Delete those options or tie them to wave 4.

What this change ships

Inventory (10 items) — 10 justified

Intent: let someone driving a remote crew see and act on the crew's real session (approvals, running state, continue/regenerate/rewind) instead of a stale local copy. ADDITION (RFC wave 3, rfc-remote-crew-sidebar.md, accepted on base).

  1. Clicking a crew row opens a window onto the crew's own session instead of adopting it into a local slot — justified
  2. "New chat on crew" creates the session on the crew and opens the window; no local slot — justified
  3. Approve/stop/send/continue/regenerate/rewind go to the crew's own routes; a reload mid-turn shows "Running" — justified
  4. Approvals with no row id show a notice and no buttons — justified
  5. Proxy replies (JSON and SSE) are redacted; oversized or too-deeply-nested replies are refused (new cap PROXY_REDACT_BUFFER_MAX_BYTES) — justified
  6. Crew stream is held only while the window is open; a lost stream shows a Retry notice — justified
  7. Composer drafts are kept per crew session for the tab; a failed send restores its text — justified
  8. Session keyboard shortcuts and Cmd+D split act on the window, not the hidden local session — justified
  9. Embedded Sessions list opens the window through /embed/chat?crew=&key= — justified
  10. Sidebar adopt click, its error text and capture-adopt-error-reason.mjs removed — justified

[FIRST-PRINCIPLES-REVIEWED] d20a0d6

Description read

[DESCRIPTION-READ] 65b437e5e7ac52a098f561577da6a108bb06166853d79c5a9cfeac5b0b3c8466

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 commented Oct 4, 2026 •

Copy link
Copy Markdown
Contributor

Design Review (Opus 5.5) — 🟡 CONCERNS

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

Design-Verdict: CONCERNS

Crew rows now open a second, cut-down chat surface, so crew sessions lose attachments, voice, split view and pickers until #16774 lands.

Watch

  • A second chat implementation. "A crew row and 'New chat on crew' now open the crew window, not a relay slot in the full chat page." CrewChatWindow.tsx and crewWindowStore.ts reimplement the composer, drafts, approvals and running state outside the main chat path. Until Crew chat window: reuse the shared transcript and composer components #16774 lands, any change to the main chat (draft recovery, approval wording, shortcuts) has to be made in two places, and the two will drift. A user who used crew rows with attachments now loses that. The author lists and accepts this break, and a revert undoes it cleanly.
    Clears when: #16774 is tracked as the next wave, with a stated plan to delete the window's own composer and row renderers, or a test pins that the window shares the main draft and approval helpers.
  • A stream that fails redaction cuts off with no reason. When an SSE event is over the cap or can't be redacted, the proxy just return resp and ends the stream. The client sees "lost feed" and offers Retry. Retry hits the same event and fails the same way, so the user is stuck retrying with no explanation.
    Clears when: the proxy sends a terminal event with a code the window shows (for example "a crew reply was too large to show safely") before it closes, or the window stops offering Retry after repeated identical failures.

[DESIGN-REVIEWED] d20a0d6

Description read

[DESCRIPTION-READ] 4eb3c8576745865cb133f4e7dc49c35bab89c9aa7bab7d4dd2c65ee6d5423ab8

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 4, 2026 •

Copy link
Copy Markdown
Contributor

UX Review (Opus 5.5) — ✅ human override accepted

@iamwhatever overrode this lane for d20a0d6fe758e401bf30eb02c7d187b62ac03220 via /ai-review override (this commit only).

@github-actions

github-actions Bot commented Oct 4, 2026 •

Copy link
Copy Markdown
Contributor

Opus 5.5 Review — ✅ no blocking findings

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

Review details

Blocks nothing; one advisory finding: a failed rewind can lose the user's edited text.

FINDING — website/src/pages/chat/crew-window/CrewChatWindow.tsx:448 — Suppose a rewind fails after its window has closed or switched to another session. The mutation-level onError still runs (TanStack v5 keeps hook-level callbacks on the mutation), but setRewindText(vars.message) then targets an unmounted component. send() already cleared rewindText, and the text was never written to the crew draft store, so the edit is lost. That breaks the comment's "the text is never lost" promise. → Fix: in the vars.rewindTs branch, also save the text to a store that outlives the window, for example writeCrewDraft(target, mergeRecoveredDraft(readCrewDraft(target), vars.message)), as the non-rewind branch does.

[OPUS-REVIEWED] d20a0d6

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

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

@iamwhatever
iamwhatever force-pushed the feat/crew-chat-window branch from b1d9f1a to 0c59c00 Compare October 4, 2026 11:43
@iamwhatever

Copy link
Copy Markdown
Contributor Author
  • Replaces adopt-on-click without an accepted RFC span=93a49fe4842f

outcome: needs-a-decision
needs-a-decision: the RFC this implements is approved for wave 3 by its author, but its status flip to accepted is its own docs PR, #16699, still open.
Clears when #16699 merges (then a rebase/push re-reads the base), or a maintainer posts /ai-review override first-principles <head>: <decision>.

@iamwhatever

Copy link
Copy Markdown
Contributor Author
  • New chat on crew stops creating a local slot span=2cd1cbfb25ee

outcome: needs-a-decision
needs-a-decision: the RFC this implements is approved for wave 3 by its author, but its status flip to accepted is its own docs PR, #16699, still open.
Clears when #16699 merges (then a rebase/push re-reads the base), or a maintainer posts /ai-review override first-principles <head>: <decision>.

@iamwhatever

Copy link
Copy Markdown
Contributor Author
  • Adopt capture script and i18n keys removed span=eb50b59cb3cd

outcome: needs-a-decision
Rides with item 1: these exist only for the adopt click; same decision as #16699.

@iamwhatever

Copy link
Copy Markdown
Contributor Author
  • Product-shape change without accepted RFC span=175d79ed3aa3

outcome: needs-a-decision
needs-a-decision: the RFC this implements is approved for wave 3 by its author, but its status flip to accepted is its own docs PR, #16699, still open.
Clears when #16699 merges (then a rebase/push re-reads the base), or a maintainer posts /ai-review override first-principles <head>: <decision>.

@iamwhatever

Copy link
Copy Markdown
Contributor Author
  • Two chat surfaces will drift apart span=0d90fb003f7b

outcome: fixed
fixed in 0c59c00: the body now names what the window drops (non-chat rows as one line, no attachments, voice, split, folders or pickers) and states it is accepted as #6180's lean view until a follow-up reuses the main transcript and composer components.

@iamwhatever

Copy link
Copy Markdown
Contributor Author
  • Streaming re-reads the whole transcript span=79daa61b38f7

outcome: fixed
fixed in 0c59c00: a chunk frame is appended to the cached transcript; only non-chunk frames trigger the throttled re-read. Test: 'appends streamed chunks without re-reading the transcript'.

@iamwhatever

Copy link
Copy Markdown
Contributor Author
  • Rewind resends redacted text span=ab75c3333091

outcome: fixed
fixed in 0c59c00: a message containing a redaction marker offers no rewind. Test: 'offers no rewind on a message the hub redacted'.

@iamwhatever

Copy link
Copy Markdown
Contributor Author
  • Crew window header hidden span=860b4bfa4ab8

outcome: fixed
fixed in 0c59c00: the window now sits at z-[48], above the page header (z-[45]/[47]), so its own header (crew title, crew name, close) is the only one shown; the capture script asserts the window header is the topmost element and shot-01 was re-shot.

@iamwhatever

Copy link
Copy Markdown
Contributor Author
  • Page header shows the local session span=399a19b142a7

outcome: fixed
fixed in 0c59c00: the window now sits at z-[48], above the page header (z-[45]/[47]), so its own header (crew title, crew name, close) is the only one shown; the capture script asserts the window header is the topmost element and shot-01 was re-shot.

@iamwhatever

Copy link
Copy Markdown
Contributor Author
  • Reader cannot tell which conversation is open span=4720e79f7269

outcome: fixed
fixed in 0c59c00: the window now sits at z-[48], above the page header (z-[45]/[47]), so its own header (crew title, crew name, close) is the only one shown; the capture script asserts the window header is the topmost element and shot-01 was re-shot.

@iamwhatever

Copy link
Copy Markdown
Contributor Author
  • Wrong title on the approval path span=1f0fdf80de66

outcome: fixed
fixed in 0c59c00: the window now sits at z-[48], above the page header (z-[45]/[47]), so its own header (crew title, crew name, close) is the only one shown; the capture script asserts the window header is the topmost element and shot-01 was re-shot.

@iamwhatever

Copy link
Copy Markdown
Contributor Author
  • Window must cover the page header span=7ba09175544b

outcome: fixed
fixed in 0c59c00: the window now sits at z-[48], above the page header (z-[45]/[47]), so its own header (crew title, crew name, close) is the only one shown; the capture script asserts the window header is the topmost element and shot-01 was re-shot.

@iamwhatever

Copy link
Copy Markdown
Contributor Author
  • The crew name means three things span=2a674007e0c9

outcome: fixed
fixed in 0c59c00: the crew name now names only the machine: 'The agent on {name} wants to run a tool', 'Message the agent on {name}…', 'Waiting on {name}…'.

@iamwhatever

Copy link
Copy Markdown
Contributor Author
  • One state has two labels span=489fed8419bf

outcome: fixed
fixed in 0c59c00: while an approval is pending the approval card is the only status line; the running line is hidden. Test: 'shows the approval, not a second running label, while one is pending'.

@iamwhatever

Copy link
Copy Markdown
Contributor Author
  • Refusal copy gives no next step span=021595ee1ecf

outcome: fixed
fixed in 0c59c00: '{name} refused that action. Try again, or open the crew's own dashboard.'

@github-actions

github-actions Bot commented Oct 4, 2026 •

Copy link
Copy Markdown
Contributor

GPT 6.1 Review — ✅ no blocking findings

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

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] d20a0d6

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

@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 4, 2026
@iamwhatever
iamwhatever force-pushed the feat/crew-chat-window branch from 0c59c00 to 21c0922 Compare October 4, 2026 12:33
@github-actions github-actions Bot added readiness: checking Automated validation is still running and removed readiness: action required A blocking check or review needs attention labels Oct 4, 2026
@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 5, 2026

@buluoray buluoray left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict: APPROVE

Reviewed at d20a0d6.

Nothing blocking survived verification. I read the decisive lines at head and mutated each new guard against its directly related test file. I did not run the full suite. CI at this head: 90 pass, 8 skipped, 0 failing. All six AI review lanes are green; UX passes on the author's recorded override. Auto-merge is off, and no human review has been posted yet.

What I verified

Isolation: a window reaches nothing the owner could not already reach.

  • This PR adds no backend route. Every call the window makes goes through the existing ANY /api/instances/{id}/proxy/{path}. That route still requires a positively identified owner (src/kiro_crew/dashboard/handlers_instances.py:2512, is_owner_dashboard_request after _guard). The path is still rebuilt from vetted segments and checked against _PROXY_ALLOWED_PREFIXES (api/chat, api/stream), and the PR does not touch either. Result: a crew window cannot read or write any peer slot or memory store beyond what the hub owner's manager-held credential already grants. The new embedded /embed/chat?crew=&key= entry is a non-owner surface, but it still hits the same server gate, so an app or Slack-invited embed gets a 403. This is fail-closed.
  • No local slot or memory store is created. createRemoteChatMutation (website/src/pages/chat-sidebar/create.ts:254) POSTs api/chat/slots on the peer with only memory_mode. It sends no agent, so this hub's roster name (possibly a private crewmate) is never bound on the peer. The send body is {message, slot} (CrewChatWindow.tsx:166) and carries no agent or member either. memory_mode comes from resolveDefaultMemoryMode, which falls back to temporary when the config read fails (website/src/api/queryClient.ts:202-209). That is fail-closed on the privacy boundary.
  • Every peer reply is redacted before it reaches the browser (the new behaviour):
    • JSON is buffered and decoded, then every string, keys included, goes through redact_peer_text (handlers_instances.py:2424-2449, 2594-2625).
    • SSE events are framed with CR/CRLF normalised, a held CR at a chunk edge, and a split BOM. data: lines are joined before redaction, the way the browser joins them (2468, 2647-2681).
    • Anything the redactor cannot walk is refused, never forwarded raw: RecursionError and ValueError (2437, 2449), a JSON reply over the cap (2600), and an SSE event over the cap (2655, 2669). All of these are fail-closed.
    • I also checked the SSE field reordering. Non-data lines are emitted before the joined data line. A bare data line (no colon) can change only where whitespace newlines fall. A JSON string cannot span a raw newline, so the reorder cannot hide a secret from the redactor.

No double dispatch of a turn.

  • The window sends exactly one POST api/chat?ws=1 per send. On the peer, ws=1 returns JSON at once (chat_handlers.py:1406, 1735), and a busy slot takes the existing queue branch. Nothing here calls a local /api/chat, and the relay path is untouched.
  • send() returns early on action.isPending, the draft is cleared at dispatch, and the Send button is disabled while pending (CrewChatWindow.tsx:161-173, 301).
  • A failed send merges back into the draft through mergeRecoveredDraft and is not re-sent automatically.
  • Approvals carry request_id, request_mid and origin: native (:180-186), so the peer's strict check rejects a stale card.
  • Session shortcuts act on the shown window only (website/src/hooks/useKeyboardShortcuts.ts:1058), and Cmd+D split is refused while a window is shown (ChatPage.tsx split handler). The local pane under the window is made inert (crewWindowStore.ts:126-144), so a hidden local approval cannot be reached.

Removed code has no remaining callers. I grepped website/src, website/scripts and docs for adoptFailureText, adoptPeerSession, onAdoptPeerSession, capture-adopt-error-reason, and the removed i18n keys adopt_failed, adopt_target_unknown and opening_session_locally. None is referenced outside the locale catalogs, which drop them too. The only hit is a stale comment (see follow-ups). The backend adopt route is intentionally kept for wave 4.

Mutation results. Each mutation was restored afterwards, and the tree was confirmed clean.

Guard Named test that went red
RecursionError changed to pass the reply through 1 test in TestProxyRedactsPeerReplies (test_too_deeply_nested_json_is_refused_not_forwarded)
ValueError changed to pass the reply through test_json_python_cannot_decode_is_refused_not_forwarded
JSON BOM strip removed test_a_leading_bom_cannot_hide_an_escaped_secret
JSON size cap disabled test_oversized_json_is_refused_not_forwarded
SSE event cap disabled test_a_completed_event_over_the_cap_is_dropped
SSE BOM strip removed 1 test in TestRedactSseEvent
SSE data: join changed to per-line redaction 2 tests, including test_secret_split_over_data_lines_behind_an_escape_is_redacted
SSE CR/CRLF normalisation in the chunk loop removed none (the EOF tail normalisation masks it)
Keyboard crew-window guard Alt+Shift+W closes an open crew window, never the local session under it (+1)
coverSiblings makes the covered local pane inert, so an unseen local approval is unreachable
versionOk read gate reads and drives nothing on a peer a release apart (+1)
Failed-send recovery restores a failed send into an empty composer (+3)
Rewind withheld on redacted text offers no rewind on a message the hub redacted
Create: moved check does not yank the view onto the new crew session when the user moved meanwhile
Create: version check refuses a crew create across a version mismatch before minting anything
Approval requires request_mid none
send() isPending early return none (the disabled button and the cleared draft also cover it)
Embedded frame reads its own URL, not the tab's store none

Non-blocking follow-ups

  1. Test gaps on four guards. Each of these survived its mutation:

    • The in-loop CR normalisation: add a test where CR-framed events must be emitted before EOF.
    • The request_mid requirement for showing approval buttons.
    • The isPending early return on Enter.
    • The embedded-frame scope in ChatPage.tsx:771.

    The code itself is correct on all four.

  2. Stale comment. website/src/pages/chat-sidebar/sessionSources.ts:161 still says live peer rows "adopt (see adoptPeerSession in ChatSidebar)". That function is gone; the rows now open a crew window.

  3. Dead frontend options. The instanceId and adoptRemoteSlot options on createSlot (website/src/store/chat/lifecycle.ts:43,68,76,94), and the matching createChatSlot params, no longer have a frontend caller. Remove them with wave 4, or note that they are kept on purpose.

  4. Stale row copy. pages.chatSidebar.not_open_here_yet ("On {{name}} — click to open here") still describes the adopt model. A click now opens a window onto the peer and nothing is opened "here".

  5. Rewind edit can be lost. If a rewind fails after its window has been unmounted, the user's edit is lost (opus advisory). The peer transcript is unaffected. This is tracked in #16774.

Bot concern dispositions

  • Design: CONCERNS (second chat implementation; a stream cut off past the cap with no reason given). I checked both: the duplication is the RFC's accepted interim step and is tracked in #16774, and the cut-off is fail-closed by design (feed-lost notice plus Retry). Neither gates this PR.
  • Opus advisory: a failed rewind loses the edit. Confirmed. It only loses the user's unsent edit, never peer state, so it is a follow-up (item 5), not a gate.
  • Opus advisory (earlier head): SSE pending buffer rescanned per chunk. Confirmed the cost is bounded by PROXY_REDACT_BUFFER_MAX_BYTES. Performance only, so not a gate.
  • GPT (earlier head): drafts not saved to sessionStorage. Confirmed fixed at head: writeCrewDraft calls draftStore.save (crewWindowStore.ts:110).
  • UX: copy and label nits, human override recorded for this SHA. These are wording only, with no behaviour defect, so they do not gate.
  • First Principles, Security Scope, GPT, Opus: PASS. These agree with my own reading of the owner gate and the redaction paths.

@iamwhatever
iamwhatever merged commit c6bfd72 into main Oct 5, 2026
98 of 99 checks passed
@iamwhatever
iamwhatever deleted the feat/crew-chat-window branch October 5, 2026 18:16
@github-actions github-actions Bot removed the readiness: passed Eligible automated validation passed for the current revision label Oct 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants