Repository navigation
fix(ui): prevent queued double-clicks from removing the next message - #124150
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 15, 2026, 6:41 AM ET / 10:41 UTC. ClawSweeper reviewWhat this changesThe PR makes queued-message removal return a precise outcome, resumes delivery only after actual removal, and ignores a retargeted second Chromium click on the remove button. Regression provenancePossible regression — suspected (reviewed change). No predecessor PR is attributed. Merge readinessKeep open. Current main resumes the outbox after every remove attempt; this head records whether removal succeeded and blocks Chromium’s retargeted second click, with no blocking correctness finding. The maintainer label requires normal landing handling rather than cleanup automation. Priority: P2 Review scores
Verification
How this fits togetherThe Control UI stores queued composer messages in browser session storage and later drains them through the chat outbox. Queue-row controls mutate that stored queue, release attachment payloads when appropriate, and can resume queued delivery. flowchart LR
A[Operator queue row] --> B[Remove control]
B --> C[Queue storage owner]
C --> D{Removal outcome}
D -->|removed| E[Release attachments]
E --> F[Resume outbox]
D -->|rejected| G[Show recovery guidance]
D -->|absent| H[No-op]
Before merge
Agent review detailsSecurityNone. PR surfaceSource +14, Tests +232. Total +246 across 5 files. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep one removal outcome at the queue-storage boundary and let only a confirmed removal release payloads and restart delivery. Do we have a high-confidence way to reproduce the issue? Yes—at source level. The current handler resumes after an unsuccessful removal, and the added Chromium E2E specifies the storage-failure and retargeted-double-click sequence, although this read-only review did not execute it. Is this the best way to solve the issue? Yes. A closed result at the queue owner lets the existing caller distinguish removed, stale, and rejected states without debouncing, adding a timer, or creating a parallel delivery path. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 7e0941270d0d. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Merged via squash.
|
Related: #121667 (context only; this PR does not close the broader queue UX work)
What Problem This Solves
Fixes an issue where removing a queued Control UI message could wake delivery after the removal had actually failed, while a native Chromium double-click could retarget its second click onto the row that shifted underneath and remove that sibling too.
Why This Change Was Made
The queue removal owner now returns one closed result:
removed,absent, orrejected. Onlyremovedreleases attachment payloads and resumes the outbox;absentis a harmless stale no-op;rejectedretains the durable row and shows the existing browser-storage recovery guidance. The remove button accepts native single clicks plus keyboard/programmatic activation, but ignores Chromium's retargeted click 2 without adding a timer or broad inert state.The architectural owner remains the existing Control UI queue/session-storage boundary. This does not change delivery, replay, retry, idempotency, protocol, configuration, security, or persistence formats.
Production LOC: +18/-4 (net +14) | Tests: +237/-5 (net +232). The positive production delta is the explicit owner result and gesture-boundary guard; it replaces an ambiguous void outcome without adding a parallel path.
No changelog or docs change: this restores the existing remove/recovery contract and introduces no new user-facing control or configuration surface.
User Impact
Operators can remove queued messages without risking the adjacent row. A storage failure leaves the message recoverable and explains what to do; duplicate stale activation remains silent. Immediate single-click, keyboard, and programmatic removal still work.
Evidence
send last,send first, andedited before sendonce each, with unique idempotency keys and no removed or duplicate send.ci-fastprovider was ready: format, Control UI i18n, changed-file oxlint/stylelint, core-test types, UI types, and repository guards were clean.git diff --checkpassed.Rejected removal retains the row and shows recovery
Duplicate/retargeted click is a no-op for the shifted sibling
Surviving queue drains exactly once
Chromium flow recording
queue-removal-outcomes.webm