Repository navigation
fix(dashboard): a second Dashboard card reply sends after the first one was sent - #34258
Conversation
c284e1d to
fe8e69d
Compare
UX Review (Opus 5.5) — ✅ PASSUX-level review of UX-Verdict: PASS Nothing to check. The diff only moves focus before the Dashboard frame is swapped, and adds or changes no visible control, string or state, so the missing blind read leaves no evidence gap. [UX-REVIEWED] fe8e69d Description read[DESCRIPTION-READ] 538efbc04a84d9eac0e8429e3b95196fc1e5df23935b6e89906f7ce11474f219 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 |
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS The fix is aimed at the real cause, which is focus left on nothing after the swap. The send gates stay as they are, and the change draws nothing new on screen. Notes
[DESIGN-REVIEWED] fe8e69d Description read[DESCRIPTION-READ] 7636262486e284a0d3c91b9c43e1214061787cd4b10616b411225d2ea7a2c82c 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 |
First Principles Review (Opus 5.5) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS Nothing blocks. A single focus handoff at the one point where a focused frame gets removed. It reuses the existing helper and changes no default. What this change shipsInventory (3 items) — 3 justifiedIntent: with one-click card send on, a person can answer several Dashboard cards in a row and each reply sends. This is a FIX.
[FIRST-PRINCIPLES-REVIEWED] fe8e69d Description read[DESCRIPTION-READ] 1ba3cb201ce1be11686220d5432d8b79a8430da3dcb4f190e066b677436551e8 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: |
KiroCrewCaptain
left a comment
There was a problem hiding this comment.
Approving. On this head, the review checked that the two-line focus handoff in promote() fixes the cause the body names: once the focused frame is removed, the next click into the new frame fires no window blur, so the tie never records. The review also checked that hasGesture, tiedToFrame, the 3 s hold and the gateway checks are unchanged, and that the change is not on main and not a duplicate. The new test passes on this head and fails with only CrewDynamicDashboard.tsx put back to the merge-base. It also passed five shuffled runs. The linked issue is T3, and a maintainer signed off the design.
Well done: the fix reuses focusHostOf instead of loosening any send gate, and the test runs the real tie bookkeeping instead of mocking it.
Optional:
- A second click 3 to 5 s after the first can still fill the composer. The removed frame's own reported input still counts as foreign input to the new frame (
useFrameLinkBridge.tsforeignInputAt). Dropping the old frame'sframeInputsentry on promote, plus a test that posts an input message from the old frame, would close that gap. - The test comments at lines 10, 52 and 61 say jsdom, but the suite runs under happy-dom.
- If you have the focus trace or clip from the manual check, attaching it would let others confirm the Chromium focus model the test stand-in assumes.
Problem / Motivation
Goal: With "Send replies in one click" on, every Dashboard card click sends its reply, not only the first one.
After one card reply is sent, the next card click on the Bot's Dashboard only puts the reply in the chat box. It sends again only after the person clicks somewhere in the dashboard and waits about 5 seconds. Found while recording the end-to-end demo of #33203.
Why it matters
The preview
dashboard_card_sendexists so a card answers in one click. A person who answers two cards in a row gets one sent reply and one stuck in the chat box, with nothing saying why. That looks like the feature is broken.Not a goal
hasGesture,tiedToFrame, the 3 second hold, the gateway checks).What changed (motivation -> approach -> change)
Symptom, cause, fix:
CrewDynamicDashboard.tsxpromote()swaps in the new document and removes the frame the person just clicked in. That frame held focus, so the dashboard window is left with no focus at all. The next click into the new frame then fires no windowblur, sofocusEntryinuseFrameLinkBridge.tsnever records it,tiedToFrameis false, and the send falls back to filling the chat box.promote()removes the visible frame, if that frame holds focus, it hands focus to the frame's holder withfocusHostOf(now exported fromuseFrameLinkBridge.ts). The window keeps focus, so the next click into the new frame is seen coming from the dashboard and the send goes through.The send gates are unchanged. A click outside the page in the last 5 seconds still blocks a send, and a fast second click on the same reply is still held back.
Backwards compatibility
Compatible: nothing new is required or refused; the only change is where focus sits when a focused Dashboard frame is replaced.
Removes nothing: no path, record, key or function is removed;
focusHostOfis only exported.Tests
New
website/src/test/CrewDynamicDashboard.cardSendRepeat.test.tsxruns the real link-bridge bookkeeping (nothing about the tie is mocked):sends again after the page is re-minted, without a click in the dashboard first: send one reply, re-mint and promote the page, click the new frame, expect a second send and no chat-box fill.still holds back a fast second click on the same reply: two quick sends of the same reply give one send.Proof: not provable -- frontend test (prove.py runs Python only)
Checked by hand instead: with the two production files reverted to
origin/main, the first test fails (1 send, not 2) and the second passes; with the fix both pass. Five runs with--sequence.shuffleall pass. Related files also pass:CrewDynamicDashboard.test.tsx(62) anduseFrameLinkBridge.test.tsx(28).Manual verification
Run in an isolated pod built from this branch, with a real Bot whose Dashboard page has reply buttons and "Send replies in one click" on:
bluron the next click.bluron the next click.Screenshots / video
Why no screenshot: the change moves focus between elements and draws nothing new; the page looks the same before and after.
Related Issues
Part of #22367
Refs #33203
Sibling sweep
Swept: git grep -nE "tiedToFrame(|useFrameLinkBridge(|stageUrl" -- website/src
Sibling: website/src/pages/members/CrewDynamicDashboard.tsx -- changed here
Sibling: website/src/components/WidgetFrame.tsx -- not affected -- no off-screen swap removes its focused frame, and a missed tie only shows the Open button
Sibling: website/src/components/ArtifactBody.tsx -- not affected -- no off-screen swap removes its focused frame, and a missed tie only shows the Open button
Pattern harvest
Not generalizable: the off-screen swap that removes a focused frame exists only in the Dashboard tab, and its one promotion path now hands focus back.
Checklist