Repository navigation
fix(dashboard): flash a requeued steer's own row once when it lands - #31058
Conversation
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: |
66c93d2 to
4224d2b
Compare
|
span=c874527267fe
The finding held. Hiding the pane with The same push also keys the one-shot guard on the drained card's
|
First Principles Review (Opus 5.5) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS Nothing blocks. The flash adds a second row-flash path next to the existing Notes
What this change shipsInventory (5 items) — 2 justifiedIntent: 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).
[FIRST-PRINCIPLES-REVIEWED] 1dfe3c2 Description read[DESCRIPTION-READ] 3e3b99d71dd12740ccd82e5c333714743c1cfd6a4ebda1e3b34a79e0fb4d5fe9 That sha256 names the PR description this verdict read. Recompute it with |
Design Review (Opus 5.5) — ✅ PASSDesign-level review of 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
[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 |
UX Review (Opus 5.5) — ✅ PASS (a BLOCK with no Trigger and no Outcome does not block)UX-level review of 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
Notes
[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 |
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: |
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.
4224d2b to
1dfe3c2
Compare
|
Rebased: main moved in UserMessage.tsx, tailwind-theme.css and test_steer_requeue.py. |
bolichen97
left a comment
There was a problem hiding this comment.
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.
…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)
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 newuserrow 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
What changed (motivation → approach → change)
The
queue_popreducer (removeQueuedMessageinwebsite/src/store/chat/queue.ts) rebuilds the drained text as a plainuserrow. 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_steersinsrc/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.appendQueuedMessagekeeps the flag on the card, and the drain marks a row only when the card it pops byqueue_idhas it. A cancel removes that card, so a later send of the same words drains its own card and is not marked.landsFromRequeuedSteerthen finds the nearest earlieruserrow with exactly the same text. If that row is a steer withsteerStaterequeuedorsuperseded, the reducer stamps the rebuilt row with the client-onlymeta.landedFromSteer, set to the drained card'squeue_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 thesendIdof its persisted steer row, and when the drain cannot reuse that row the pop carries the same id. The reducer'ssendIdlookup 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 thequeueEntry*readers, so a frame cannot set it, and the server never writes it.UserMessageplays the existingmsg-highlightaccent ring once on a marked row, for 1.2 s, through the new--animate-steer-landedtoken intailwind-theme.css. No new keyframes are added. A module-level set keyed on thatqueue_idrecords each row that has flashed. The card id is unique, so two steers requeued in the same clock tick, whose cards share onets, still flash once each. A virtualized remount finds the key and draws nothing. The class drops onanimationend, 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 noanimationend: hiding the pane withdisplay: nonewhen another instance is selected cancels it, and without the timer the flash would replay when the pane shows again. Underprefers-reduced-motion: reducethe 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.htmlpage andwebsite/scripts/capture-steer-landed-highlight.mjsdraw the moment with the real components for the stills below, following the existing capture fixtures.Backwards compatibility
Compatible:
queue_pushframes of a requeued steer gain one key,meta.requeuedSteer, which an older client ignores.test_queue_drain_preserve_attachments.pyandtest_queue_quote_meta.pypin the new frame meta, andtest_steer_requeue.pychecks 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_popframe. 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:requeuedsteer, and when the drain already marked itsuperseded.writtenor was taken back, or when the slot has no steer row.sendIdis still rebuilt and marked.website/src/test/UserMessage.test.tsx, eight tests:ts, each flash.prefers-reduced-motion: reduce.Ten of the new tests failed with
queue.tsandUserMessage.tsxreverted. 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.
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
Contribution License Agreement
Contributions are accepted under the project's Apache-2.0 license.
Fixes #31057