Repository navigation
fix(chat): carry dropped session references into a mid-turn steer - #24503
Conversation
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS Nothing blocks: the old pin's stated reason, that only text survives a failed steer, is answered directly, because the reference now travels inside that text. Notes
[DESIGN-REVIEWED] ba192d6 Description read[DESCRIPTION-READ] 80c2295a05113170ba95ed1f3722a3c9f8a3decb0a652afeb024ff360982e165 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 |
UX Review (Opus 5.5) — ✅ PASSUX-level review of UX-Verdict: PASS Nothing blocks: the PR adds no control or string. A steer now carries the session link and clears the chip the same way a send already does. Notes
[UX-REVIEWED] ba192d6 Description read[DESCRIPTION-READ] 1119d07d230d6931d5970c354d3a025c3606a9242ed1a1358820f2927b68f9eb That sha256 names everything this verdict read: the PR description, plus the 3 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 This fix reuses the send path's existing link appender and the existing chip-clear calls. The PR description quotes the old pin it reverses and answers it: the restore path now carries the links in the text. What this change shipsInventory (3 items) — 3 justifiedIntent: when a user steers a message into a running chat, the sessions they dragged into the composer reach the agent, the same as on a normal send. This is a FIX (#24471).
[FIRST-PRINCIPLES-REVIEWED] ba192d6 Description read[DESCRIPTION-READ] 6ba3880694133bbcf04fe37918c5fc1de48970909f20221b15a00133d49bda61 That sha256 names the PR description this verdict read. 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: |
|
CI note on head 0363783: the two red Windows shards are inherited from main, not from this diff, which only touches website/src/.
A re-run reuses the frozen merge ref, so it cannot clear either one. Holding the head (MERGEABLE, no conflict) until #24531 merges and a rebase is authorized. |
0363783 to
f372ca3
Compare
|
CI note for head f372ca3: Opus 5.5 Review and Screenshot Evidence failed at 23:05Z on GitHub API rate limit exceeded for installation (Opus: permission check before validation; Screenshot Evidence: could not read the PR description after 3 attempts). Neither is a finding about this diff. Re-ran each failed job once. Windows (6) is main-side #24612 (fix #24613). |
f372ca3 to
ba192d6
Compare
|
Rebased once onto main (operator-approved) for the Windows (6) fix #24609; scope unchanged. |
KiroCrewCaptain
left a comment
There was a problem hiding this comment.
Tier 1 auto-approve: fix (4 files). Criteria: no conflict, no requested changes, security path denylist clean, design-doc gate clean, security checklist all-NO, no reviewer-lane findings, readiness signal fresh for this head SHA, declared category matches the diff. Category: a mid-turn steer now carries staged session references as links, as a send does, with tests for both the link and the cleared chip.
Problem / Motivation
Goal: Steering a message into a running chat delivers the sessions dragged into the composer, the same way a normal send does.
Drag another chat session into the composer of a session whose turn is running, type a message, and steer it. Only the typed text reaches the agent. The attached session is silently dropped, and its chip is left behind in the otherwise-cleared composer.
Why it matters
The receiving agent acts on an incomplete instruction, with no error or warning that the attachment was not delivered. The leftover chip is the only cue, and it is easy to miss. Steer is the default action while a turn runs, so this hits the most common path for adding context mid-turn.
Not a goal
busySend.tsx), so such a chip still waits for the turn to end and rides the idle send.What changed (motivation → approach → change)
Symptom → cause. A normal send appends each staged session as its link (
buildOutgoingTurn,'send'mode). The steer path built its text in'steer'mode, which dropped session references on purpose, andsteer()inbusyTurnControls.tsneither passed them nor cleared them. The reason given was that a failed steer only hands back text, so a cleared chip could be lost.Why that reason no longer holds. A session reference is just a link in the message text. A refused or unconfirmed steer hands its whole text back to the composer, links included, so nothing is lost. A retry sends each link exactly once.
Change.
outgoingTurn.ts,'steer'modebusyTurnControls.ts,steer()Backwards compatibility
Compatible: a steer with no staged session is byte-identical to before; a steer with one now also carries its link.
Removes nothing: no key, field, row or capability is taken away; the steer just stops leaving the chip behind.
Tests
website/src/test/busyTurnControls.steerSessionRefs.test.ts(new): steering typed text with a dropped session sendstext + linkand clears the chip and its draft; with no typed text it sends nothing and leaves the chip staged.website/src/chat-core/composer/outgoingTurn.test.ts: the'steer'row now expects the session link on the one text.Proof: not provable -- frontend test (prove.py runs Python only). By hand: with
busyTurnControls.tsandoutgoingTurn.tsreverted toorigin/main,appends the session link to the steered text and clears the chip with the textfails; with the fix it passes.Determinism: both files pass 3 shuffled runs (
--sequence.shuffle). The 26 test files that touch session refs or steering pass (763 tests).tsc -p tsconfig.app.jsonand eslint are clean.Manual verification
N/A — unit coverage sufficient: the change is which text the existing steer POST carries and which staged state it clears, both asserted directly at
steer().Screenshots / video
Why no screenshot: no component, layout or string changes; the only visible effect is that the existing session chip is cleared on steer, the way it already is on send.
Related Issues
Closes #24471
Sibling sweep
Swept: git grep -nE "buildOutgoingTurn(.*'steer'" -- website/src/
Sibling: website/src/components/useChatPaneSend.ts -- not affected -- the pane composer has no session-chip staging
Sibling: website/src/pages/chat/page/busyTurnControls.ts -- changed here
Pattern harvest
Not generalizable: a single deliberate exclusion in one steer path, now removed; every composer payload already goes through
buildOutgoingTurn.Checklist