Skip to content

fix(dashboard): flash a requeued steer's own row once when it lands - #31058

Merged
bolichen97 merged 1 commit into
mainfrom
pearcekieser/steer-landed-highlight
Nov 7, 2026
Merged

bolichen97 merged 1 commit into
mainfrom
pearcekieser/steer-landed-highlight

Conversation

@Pearcekieser

@Pearcekieser Pearcekieser commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Problem / Motivation

Goal: When a requeued steer's text runs as its own message, the new row flashes once so the reader sees that it is the same message.

A steer that the user sends while a turn runs can arrive after the turn stops reading. The steer row is then marked requeued, with the label "Turn ended before this applied, runs as its own message", and the text is queued. When the queue drains, the client rebuilds the text as a new user row below the Stop card. That row appears with no transition and nothing connects it to the steer row above it. After #18517, the old row is also hidden at that moment, so the bubble seems to jump.

Why it matters

The reader sees a message that they sent once appear again in a new position, and has to work out that it is the same message. This was deferred from the #18517 UX review, span eb600d02dee5.

Not a goal

  • Changing when a steer is requeued, or hiding the old row. fix(dashboard): run a requeued steer on its own row instead of a duplicate #18517 owns both.
  • A shared-layout transition between the two rows. The transcript is virtualized, and either row can be unmounted off screen.
  • Any highlight after a reload, a slot switch or a refresh while the card waits. The mark and the card flag are client-only, and a card rebuilt from a snapshot does not carry the flag.

What changed (motivation → approach → change)

The queue_pop reducer (removeQueuedMessage in website/src/store/chat/queue.ts) rebuilds the drained text as a plain user row. It knew nothing about the steer row with the same text, so the bubble could not show any relation to it.

The requeue's queue_push (_requeue_unconsumed_steers in src/kiro_crew/dashboard/chat_turn/steer_queue.py) now says the card is a requeued steer, meta.requeuedSteer: true. Only the card carries it. The queue entry and the row it drains into do not. appendQueuedMessage keeps the flag on the card, and the drain marks a row only when the card it pops by queue_id has it. A cancel removes that card, so a later send of the same words drains its own card and is not marked. landsFromRequeuedSteer then finds the nearest earlier user row with exactly the same text. If that row is a steer with steerState requeued or superseded, the reducer stamps the rebuilt row with the client-only meta.landedFromSteer, set to the drained card's queue_id. Only the nearest row counts, so a later send of the same words, after the steer already has its own row, is not marked. A crewmate steer's requeued entry keeps the sendId of its persisted steer row, and when the drain cannot reuse that row the pop carries the same id. The reducer's sendId lookup used to match the persisted steer row and return before any rebuild, so the mark could not be set. The lookup now skips a persisted steer row, and an optimistic steer bubble is still matched and replaced. The reducer mints the mark itself. The frame reaches the row meta only through the queueEntry* readers, so a frame cannot set it, and the server never writes it.

UserMessage plays the existing msg-highlight accent ring once on a marked row, for 1.2 s, through the new --animate-steer-landed token in tailwind-theme.css. No new keyframes are added. A module-level set keyed on that queue_id records each row that has flashed. The card id is unique, so two steers requeued in the same clock tick, whose cards share one ts, still flash once each. A virtualized remount finds the key and draws nothing. The class drops on animationend, so a later re-render does not run it again. A timer the length of the flash, 1.2 s, also clears it, because a cancelled animation fires no animationend: hiding the pane with display: none when another instance is selected cancels it, and without the timer the flash would replay when the pane shows again. Under prefers-reduced-motion: reduce the row still claims its key and draws nothing. A surface that hides the steer mechanics (hideSteerBadge) draws nothing either.

The change works on main alone: there the requeued steer row stays visible and the flash ties the new row to it. With #18517 the old row is hidden at the same moment, and the flash marks where the message went. Either PR can merge first.

website/capture/steer-landed-highlight.tsx, its .html page and website/scripts/capture-steer-landed-highlight.mjs draw the moment with the real components for the stills below, following the existing capture fixtures.

Backwards compatibility

Compatible: queue_push frames of a requeued steer gain one key, meta.requeuedSteer, which an older client ignores. test_queue_drain_preserve_attachments.py and test_queue_quote_meta.py pin the new frame meta, and test_steer_requeue.py checks that the queue entries do not carry the flag.

Also compatible: the new meta key exists only on rows that this tab rebuilt from a queue_pop frame. Rows on disk and rows from the server do not have it, so they render as before.

Removes nothing: the change adds one client-only meta key, one animation token and one data attribute, and keeps every existing row, key and class.

Tests

website/src/store/chat/queue.steerLanded.test.ts, thirteen tests:

  • The rebuilt row gets the mark when the nearest earlier row with the same text is a requeued steer, and when the drain already marked it superseded.
  • The steer row itself stays unmarked.
  • No mark when the steer text differs, when the steer was consumed, when it is still written or was taken back, or when the slot has no steer row.
  • No mark when the requeued steer already has its own row, so a later send of the same text is not tied to it.
  • No mark when only the pop frame claims it.
  • A requeued steer row whose pop shares its sendId is still rebuilt and marked.
  • No mark when the card is an ordinary queued send of the same words, or when the requeued card was cancelled and the same words were sent again.
  • Two steers requeued in the same tick are each marked with their own card id.

website/src/test/UserMessage.test.tsx, eight tests:

  • The bubble flashes when the row carries the mark.
  • No highlight on a row without the mark, the requeued steer row included.
  • No replay when a virtualized row remounts.
  • The class drops when the animation ends, so a later re-render does not run it again.
  • The class drops after 1.2 s when the animation is cancelled, so a hidden pane does not replay it.
  • Two rows requeued in the same tick, with one shared ts, each flash.
  • No flash under prefers-reduced-motion: reduce.
  • No flash on a surface that hides the steer mechanics.

Ten of the new tests failed with queue.ts and UserMessage.tsx reverted. The others pin behaviour that does not change.

Proof: not provable -- frontend test (prove.py runs Python only)

Manual verification

N/A. Unit coverage is sufficient, and the capture runner checks the flash in the real components: the mark drops when the flash ends, a remount of every row draws no flash, and reduced motion draws none.

Screenshots / video

The stills show the requeued steer row above the Stop card and the new row below it, captured during the flash.

The new row flashes once when a requeued steer runs as its own message, dark theme

The new row flashes once when a requeued steer runs as its own message, light theme

Related Issues

Deferred from the #18517 UX review. Tracked first as Pearcekieser#47.

Sibling sweep

Swept: git grep -n "removeQueuedMessage|role: 'user', content, cls: 'msg msg-u'" -- website/src/store
Siblings: none -- the queue_pop rebuild is the only place the client writes a drained user row

Pattern harvest

Not generalizable: this is the one place where the client rebuilds a row that the reader already saw at another position, and the mark is local to that rebuild.

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

Contribution License Agreement

Contributions are accepted under the project's Apache-2.0 license.

Fixes #31057

@Pearcekieser
Pearcekieser requested review from a team and KiroCrewCaptain as code owners November 6, 2026 03:58
@Pearcekieser
Pearcekieser requested a review from Zedmor November 6, 2026 03:58
@github-actions github-actions Bot added the readiness: action required A blocking check or review needs attention label Nov 6, 2026
@github-actions

github-actions Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

GPT 6.1 Review — ✅ no blocking findings

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

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] 1dfe3c2

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

@Pearcekieser
Pearcekieser force-pushed the pearcekieser/steer-landed-highlight branch from 66c93d2 to 4224d2b Compare November 6, 2026 05:58
@Pearcekieser

Pearcekieser commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor Author

span=c874527267fe
issue (blocking): a cancelled flash no longer replays when the pane shows again

Outcome: fixed in 4224d2b.

The finding held. Hiding the pane with display: none cancels the CSS animation, and a cancelled animation fires no animationend, so playLanded stayed true and the flash ran again on the next show. React has no handler for animationcancel, so UserMessage now starts a timer the length of the flash, 1.2 s, when playLanded turns true. The timer clears the flag whether or not the pane is drawn. onAnimationEnd still clears it early.

The same push also keys the one-shot guard on the drained card's queue_id, which the reducer now writes as the mark. Before, two steers requeued in one clock tick shared one ts key and only the first flashed.

UserMessage.test.tsx adds a test that the class drops after 1.2 s with no animationend and does not come back on rerender, and one for two rows in the same tick. queue.steerLanded.test.ts adds the two-card drain. Each failed before its change. The other red lanes on 66c93d2, Dependency License Gate, Design, First Principles, Opus and UX, failed on the CI rate limit at about 04:00 UTC, and this push reruns them.

@github-actions

github-actions Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

First Principles Review (Opus 5.5) — ✅ PASS

Premise-level review of 1dfe3c27bdae521a615b342346831f0aabc6f563 — 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 blocks. The flash adds a second row-flash path next to the existing highlightTs jump highlight, and the crewmate sendId change now adds a row to the transcript, not just a mark.

Notes

  • Item 1 — duplicate of highlightTs: transcriptRendering.tsx:349 already flashes a row with animate-msg-highlight, driven by setHighlightTs plus a timer in useTurnStepper.ts:121. That makes two flash consumers (grepped msg-highlight). The PR adds a third path: the landedSteerFlashes set, LANDED_FLASH_MS, a timer and --animate-steer-landed. Subtraction: drive the flash through setHighlightTs, and delete the module set, the timer effect and the new token. Being keyed on ts is only a problem in the same-tick collision the description names.
  • Item 3 — rides along: !(m.meta?.steer && !m.meta?.optimistic) stops an early return. A crewmate requeued steer that used to drain into no new row now gets a second user row on main. The diff's own reason for this is the mark: "Matching it here would skip the rebuild, and with it the landed mark below."
  • Item 1 — framing: titled fix(dashboard), but the Goal ("the new row flashes once") adds a behaviour that did not exist. It is a feature.

What this change ships

Inventory (5 items) — 2 justified

Intent: show the reader that a requeued steer's text, now running as its own message, is the same message they already sent. ADDITION (titled fix).

  1. The rebuilt row flashes the accent ring once, for 1.2 s — duplicate of highlightTs row flash
  2. queue_push frames of a requeued steer carry meta.requeuedSteer — justified
  3. A crewmate requeued steer now drains into a new row instead of reusing the persisted steer row — rides along
  4. No flash under reduced motion or on hideSteerBadge surfaces — justified
  5. New capture page and script for the stills — rides along

[FIRST-PRINCIPLES-REVIEWED] 1dfe3c2

Description read

[DESCRIPTION-READ] 3e3b99d71dd12740ccd82e5c333714743c1cfd6a4ebda1e3b34a79e0fb4d5fe9

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 Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Design Review (Opus 5.5) — ✅ PASS

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

Design-Verdict: PASS

Nothing blocks: the mark is created on the client from a flag carried only by the card, the flash runs once and degrades safely, and the evidence shows the moment.

Notes

  • The sendId lookup change is more than a flash. Before, a crewmate's requeued steer drained without a new row. Now it gets a rebuilt user row, so on main that text shows twice (steer row plus new row) until fix(dashboard): run a requeued steer on its own row instead of a duplicate #18517 lands. The description mentions this change, but it should be stated as a user-visible behaviour change in its own right.

[DESIGN-REVIEWED] 1dfe3c2

Description read

[DESCRIPTION-READ] 8f50afe503df625f0679a2436a114f51b09cddbece324fb5c95a8554ec38e5d6

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 Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

UX Review (Opus 5.5) — ✅ PASS (a BLOCK with no Trigger and no Outcome does not block)

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

UX-Verdict: PASS

cannot evaluate: missing a recording of the 1.2 s flash on the requeued steer's new row. This PR's only job is a cue in motion, and the two stills can't show motion. The blind reader read the frozen ring as "selected, highlighted, or 'in progress'", not as the same message.

Evidence gaps

  • The animate-steer-landed flash in UserMessage.tsx has no recording. The flash appears as the drained row mounts below the [Stopped] card, and it is meant to show that this row is the steer above it, moved. The recording list is empty. shot-01 and shot-02 are the same moment, frozen mid-flash, in dark and light themes. A frozen ring can't show what the PR promises: a flash that plays once, ends, and links the two rows. To close the gap, attach a short GIF or WebM (the capture fixture website/scripts/capture-steer-landed-highlight.mjs already renders this moment). It should show the queue draining, the row landing, the ring playing once and clearing, and the steer row above, both on main and with fix(dashboard): run a requeued steer on its own row instead of a duplicate #18517 hiding it.

Notes

  • The still did not show the reader that it is the same message. They wrote "I can't tell if it's a duplicate that will make the assistant do the work twice" and "nothing on the lower bubble says 'this is the same one as above'". A flash that stays this ambiguous on video would leave the goal unmet. A quiet one-time caption on the landed row, such as "Moved from above", would carry the link without depending on motion. Users with reduced motion currently get no cue at all.
  • The notice "Turn ended before this applied — runs as its own message." sits above the upper bubble, but the reader thought it described the lower one ("I can't tell which one 'this' means"). They also didn't know what "turn" or "applied" mean.

[UX-REVIEWED] 1dfe3c2

Description read

[DESCRIPTION-READ] cf6f84aa9c0b776a0e8583124acd5cc73ac4ea31de963c4510db1fc3f88f785d

That sha256 names everything this verdict read: the PR description, plus the 5 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 Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Opus 5.5 Review — ✅ no blocking findings

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

Review details

No findings.

[OPUS-REVIEWED] 1dfe3c2

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

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

@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 Nov 7, 2026
When a steer is requeued and the queue drains, the queue_pop reducer rebuilds its text as a new user row. The reducer now stamps the client-only meta.landedFromSteer on that row when the nearest earlier user row with the same text is a requeued or superseded steer. UserMessage plays the existing msg-highlight accent ring once for 1.2 s on it, none under reduced motion. A module-level guard keyed on the row identity keeps a virtualized remount from replaying it.
@Pearcekieser
Pearcekieser force-pushed the pearcekieser/steer-landed-highlight branch from 4224d2b to 1dfe3c2 Compare November 7, 2026 03:47
@Pearcekieser

Copy link
Copy Markdown
Contributor Author

Rebased: main moved in UserMessage.tsx, tailwind-theme.css and test_steer_requeue.py.

@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: action required A blocking check or review needs attention readiness: passed Eligible automated validation passed for the current revision and removed readiness: passed Eligible automated validation passed for the current revision readiness: checking Automated validation is still running readiness: action required A blocking check or review needs attention labels Nov 7, 2026

@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 1dfe3c2. Thank you, a small and well-scoped change. The requeue now marks its card with requeuedSteer, the drain of that exact card (matched by queue_id) ties the new row to the nearest requeued or superseded steer with the same text, and the row flashes the existing accent ring once. The one-shot guard is keyed on the card's queue_id, so two steers requeued in the same tick each flash once, a remount draws nothing, reduced motion draws nothing, and the timer clears the flag if the animation is cancelled by a hidden pane. The mark is client-only and the server never writes it, so a reload drops it.

Gates at this head: all 97 checks pass with none red or pending, there is no regex in product code, and no change request is open.

@bolichen97
bolichen97 merged commit 6add8f6 into main Nov 7, 2026
97 of 103 checks passed
@bolichen97
bolichen97 deleted the pearcekieser/steer-landed-highlight branch November 7, 2026 06:26
@github-actions github-actions Bot removed the readiness: passed Eligible automated validation passed for the current revision label Nov 7, 2026
buluoray pushed a commit that referenced this pull request Nov 9, 2026
…31058)

When a steer is requeued and the queue drains, the queue_pop reducer rebuilds its text as a new user row. The reducer now stamps the client-only meta.landedFromSteer on that row when the nearest earlier user row with the same text is a requeued or superseded steer. UserMessage plays the existing msg-highlight accent ring once for 1.2 s on it, none under reduced motion. A module-level guard keyed on the row identity keeps a virtualized remount from replaying it.

(cherry picked from commit 6add8f6)
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.

Requeued steer bubble moves by cut, with no transition, when its own turn starts

2 participants