Skip to content

fix(chat): keep follow-up chips across a say-nothing reply - #25636

Merged
KiroCrewCaptain merged 1 commit into
mainfrom
fix/followup-chips-skip-silent-row-12934
Oct 29, 2026
Merged

KiroCrewCaptain merged 1 commit into
mainfrom
fix/followup-chips-skip-silent-row-12934

Conversation

@CrysisDeu

Copy link
Copy Markdown
Contributor

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.

deriveFollowUpOptions walks 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', and parseOptions finds no marker, so return 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: deriveFollowUpOptions continues past a row for which isHiddenInvisibleAssistantRow is 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, new describe('deriveFollowUpOptions across a say-nothing reply'):

  • keeps the chips of the question above an invisible-only reply (same source key)
  • crosses a run of them, whitespace and other format characters included
  • still clears the chips when a later reply has words
  • does not cross an invisible reply that carries file changes, which is drawn
  • does not reach past the user turn the silent reply answered

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

  • At most two commits (one is the norm), with a Conventional Commits title (feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)
  • 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

Contribution License Agreement

Contributed under the project's Apache-2.0 license.

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
@CrysisDeu
CrysisDeu requested review from a team and KiroCrewCaptain as code owners October 29, 2026 04:06
@CrysisDeu
CrysisDeu requested a review from bolichen97 October 29, 2026 04:06
@github-actions github-actions Bot added the readiness: checking Automated validation is still running label Oct 29, 2026
@github-actions

Copy link
Copy Markdown
Contributor

First Principles Review (Opus 5.5) — ✅ PASS

Premise-level review of d129a085eefa6e68c555de504e460adc5db32bc0 — 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 does not.

First-Principles-Verdict: PASS

Nothing to check. It is a one-line fix at mechanism level. It reuses the existing isHiddenInvisibleAssistantRow predicate, which six other drawn-row scans already apply.

What this change ships

Inventory (2 items) — 2 justified

Intent: keep a question's option chips in the composer when the only later reply is one the transcript does not draw. FIX (#12934).

  1. A question's chips stay when the only reply after it is invisible (bare U+200B or whitespace) — justified
  2. New tests pin chips staying across silent replies and clearing on a reply with words or file changes — justified

[FIRST-PRINCIPLES-REVIEWED] d129a08

Description read

[DESCRIPTION-READ] cc4de60a1149406af90a1422a7605cfdf7e3c458ffa19a97ac389e5d7113eae7

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

Copy link
Copy Markdown
Contributor

Design Review (Opus 5.5) — ✅ PASS

Design-level review of d129a085eefa6e68c555de504e460adc5db32bc0 — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

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 .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

Copy link
Copy Markdown
Contributor

UX Review (Opus 5.5) — ✅ PASS

UX-level review of d129a085eefa6e68c555de504e460adc5db32bc0 — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

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 .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

Copy link
Copy Markdown
Contributor

Opus 5.5 Review — ✅ no blocking findings

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

Review details

No findings.

[OPUS-REVIEWED] d129a08

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

False positive or not applicable? A repository writer can comment:
/ai-review override fable d129a085eefa6e68c555de504e460adc5db32bc0 false-positive: <reason, 20 to 500 characters>

@github-actions

Copy link
Copy Markdown
Contributor

GPT 6.1 Review — ✅ no blocking findings

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

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] d129a08

False positive or not applicable? A repository writer can comment:
/ai-review override gpt d129a085eefa6e68c555de504e460adc5db32bc0 false-positive: <reason, 20 to 500 characters>

@bolichen97 bolichen97 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.

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.

@github-actions github-actions Bot added readiness: passed Eligible automated validation passed for the current revision and removed readiness: checking Automated validation is still running labels Oct 29, 2026
@KiroCrewCaptain
KiroCrewCaptain enabled auto-merge (squash) October 29, 2026 06:04

@KiroCrewCaptain KiroCrewCaptain left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

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.

@KiroCrewCaptain
KiroCrewCaptain merged commit 88c4cab into main Oct 29, 2026
106 of 107 checks passed
@KiroCrewCaptain
KiroCrewCaptain deleted the fix/followup-chips-skip-silent-row-12934 branch October 29, 2026 06:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

readiness: passed Eligible automated validation passed for the current revision

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Quiet auto-nudge reply clears the previous question's option chips

3 participants