Repository navigation
fix(chat): keep follow-up chips across a say-nothing reply - #25636
Conversation
deriveFollowUpOptions walks back from the newest row and stops at the first assistant row. A quiet auto-nudge cycle answers with a bare U+200B, which the transcript does not draw, but the walk counted it as the agent speaking again, so the question's option chips vanished while the question was still the newest thing on screen. Skip a hidden invisible-only assistant row in the walk, the same rule the transcript and the assistant footer already use. Fixes #12934
First Principles Review (Opus 5.5) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS Nothing to check. It is a one-line fix at mechanism level. It reuses the existing What this change shipsInventory (2 items) — 2 justifiedIntent: keep a question's option chips in the composer when the only later reply is one the transcript does not draw. FIX (#12934).
[FIRST-PRINCIPLES-REVIEWED] d129a08 Description read[DESCRIPTION-READ] cc4de60a1149406af90a1422a7605cfdf7e3c458ffa19a97ac389e5d7113eae7 That sha256 names the PR description this verdict read. Recompute it with |
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS The fix is aimed at the real cause. The chip walk now skips a hidden row using the same predicate the transcript uses. An empty row was already skipped before this change, and now it is skipped explicitly. [DESIGN-REVIEWED] d129a08 Description read[DESCRIPTION-READ] da376a550357f88365ec3783e310d200ae5554cbebbb1cea5867fa192768cf39 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 The PR adds no control, label or string. Chips that already exist now stay up after a reply the transcript never draws, so the missing screenshots don't block. [UX-REVIEWED] d129a08 Description read[DESCRIPTION-READ] 8e4e24b2b182b7603e6b6813dba0ebd3c6f89835e0f29f848e46bc62c4fa3e59 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 |
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: |
bolichen97
left a comment
There was a problem hiding this comment.
Reviewed at d129a08.
The chip walk in deriveFollowUpOptions now skips a row for which isHiddenInvisibleAssistantRow is true, which is the same predicate the transcript renderer, the assistant footer walk and the crewmate bubble filter already use. So the walk and the screen agree on which reply is the newest one the user can see.
What I checked:
- The skip sits after the stop, error, queued, user and system notice checks, so none of those stop or licence rules change. A hidden row no longer reaches the assistant branch that returned no options.
- The predicate keeps a row that carries file change chips or a visible regeneration variant, so those still count as a reply and still clear the chips. The new test covers the file change case.
- A streaming row with empty content was already crossed before this change, so a stream that has only emitted a zero width character behaves the same as before.
- The user row above a silent reply still stops the walk, covered by the last new test.
- Nothing on main has moved in options.ts or invisibleText.ts since the base.
No findings. This looks good to ship. The remaining check is the readiness signal, which is still pending on this head; I will approve once it passes.
KiroCrewCaptain
left a comment
There was a problem hiding this comment.
Tier 1 auto-approve: fix (2 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: frontend bug fix that skips an invisible say-nothing assistant row when deriving follow-up option chips, with tests covering the new skip and its limits.
Problem / Motivation
Goal: a question's follow-up option chips stay in the composer when the only newer reply is one the transcript does not draw.
deriveFollowUpOptionswalks back from the newest row and stops at the first assistant row. A quiet auto-nudge patrol cycle answers with a bare U+200B. The transcript hides that row (isHiddenInvisibleAssistantRow), but the walk read it as "the agent spoke again" and returned no options, so the chips disappeared while the question was still the newest thing the user could see.Why it matters
On a crewmate's chat this is routine: the crewmate asks a question with chips, its next patrol wake answers silently, and the chips are gone. The user has to type the answer by hand.
Not a goal
Intended? / Repro
Intended? No. The transcript renderer (
website/src/app-sdk/messageRenderers.tsx:566) and the assistant footer walk (:578) both skip this row as "not drawn"; only the chip walk disagreed.Repro (read on current main
4efafcf60f):website/src/app-sdk/protocol/options.ts:201,if (m.role === 'assistant' && m.content)is true for content'\u200b', andparseOptionsfinds no marker, soreturn NONE. Transcript[user('go'), assistant('Pick one [OPTIONS: Alpha | Beta | Gamma]'), assistant('\u200b')]derives[]; without the last row it derives the three chips.What changed (motivation → approach → change)
Symptom: chips vanish after a silent reply. Cause: the walk counted a hidden row. Change: skip it with the same predicate the transcript uses.
website/src/app-sdk/protocol/options.ts:deriveFollowUpOptionscontinues past a row for whichisHiddenInvisibleAssistantRowis true. That predicate already keeps a row with file-change chips or a visible regeneration variant, so those still count as a reply.Backwards compatibility
Compatible: only transcripts whose newest assistant rows are invisible-only change, and those now show the chips the user last saw.
Removes nothing: no key, field or error path is removed.
Tests
website/src/test/deriveFollowUpOptions.test.ts, newdescribe('deriveFollowUpOptions across a say-nothing reply'):On main the first two fail.
Proof: not provable -- other: this host runs no local tests; CI runs the new tests
Manual verification
N/A: no rendered surface changes (the chips that show are the existing ones). Static gates run locally: eslint on both files,
tsc -p tsconfig.app.json --noEmit, and the Fast Gate scripts. Tests run in CI.Related Issues
Fixes #12934
Sibling sweep
Swept: git grep -n "isHiddenInvisibleAssistantRow" -- website/src
Sibling: website/src/app-sdk/messageRenderers.tsx -- not affected (already skips the row)
Sibling: website/src/components/chat/crewmateBubbles.ts -- not affected (already skips the row)
Pattern harvest
Not generalizable: one walk that missed an existing predicate.
Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)Contribution License Agreement
Contributed under the project's Apache-2.0 license.