Repository navigation
fix(ui): show reconnecting messages only once - #146466
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
9866bed to
45d41fa
Compare
|
Codex review: needs maintainer review before merge. Reviewed September 12, 2026, 7:23 PM ET / 23:23 UTC (Revision 4). ClawSweeper reviewWhat this changesThe Control UI displays reconnecting messages once, keeps unattempted messages in the composer queue, and preserves delivery order when users reorder visible queued messages. Merge readiness✅ Ready for maintainer review This remains a useful fix for behavior still present on main. The earlier reorder finding is resolved, the reviewed head passes the previously blocking performance check, and no actionable patch defects remain. Priority: P2 Review scores
Verification
How this fits togetherThe Control UI combines local pending messages with Gateway acknowledgments and transcript history. Its display projection decides where each message appears, while the existing outbox owns delivery and retry state. flowchart TD
A[User submits message] --> B[Local outbox]
C[Gateway acknowledgments and history] --> D[Message display selection]
B --> D
D --> E[Transcript with delivery status]
D --> F[Unattempted composer queue]
F --> G[Reorder by message identity]
G --> B
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +13, Tests +161, Docs +1. Total +175 across 27 files. View PR surface stats
Review metricsNone. Technical reviewBest possible solution: Keep one identity-based display projection while preserving the existing outbox’s retry payloads, delivery barriers, and local-only discard behavior. Do we have a high-confidence way to reproduce the issue? Yes, from source: disconnecting after a send attempt makes main render the pending message in both the transcript and queue. Supplied before/after captures support this mechanism; no tests were executed during this read-only review. Is this the best way to solve the issue? Yes. The patch extends existing display and ordering owners, preserves submission identity, and addresses the filtering-induced reorder regression without changing persisted formats or delivery authority. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against d569fcdba8bd. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (3 earlier review cycles)
|
|
Fixed the reorder finding in 9cae2da. Reorder callbacks now carry a stable target message ID. Attempted sends remain nonmovable, and the composer keeps the full outbox for barrier segmentation while deriving its display subset separately. The keyboard regression reproduced the reported C/A/B persisted order before the repair. Keyboard and drag regressions now preserve A/C/B with exactly one chat.send; hidden accepted-input barriers and peer edit conflicts are covered too. The final follow-up passed 838 focused tests, 12 browser scenarios, changed-file checks and a fresh independent review. @clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
The reorder review is now clear. Commit 157c47e additionally removes a redundant queue scan: check the crossed rows for edit conflicts, then reuse the already identified movable segment. This preserves the existing ordering and edit barriers. The local comparison build passes the unchanged startup budget at 355,025 gzip bytes versus the 355,116-byte enforcement limit; 37 focused reorder/edit tests, changed-file checks and independent review pass. Fresh CI is running for this final commit. |
|
The remaining startup-size failure was reproduced on the exact CI base without this PR: a9d273d builds to 355,138 gzip bytes against the former 355,116-byte limit. The PR merge snapshot was slightly smaller at 355,134 bytes. None of the changed source files is in the eight startup assets; deferred chunk hashes account for the small compressed-size difference. Main's baseline repair #146526 has now merged. The separate plugins-platform test inventory overflow is being repaired by #146538. This PR will consume those completed prerequisites and rerun exact-head CI before landing; its reconnect and reorder reviews are clear. |
Keep attempted reconnect sends in the transcript with delivery status and local discard. Preserve unattempted offline sends in the composer queue, and filter retained custody by submission identity without collapsing intentional identical sends.
Use stable message IDs for reorder targets, retain hidden rows as delivery barriers, and keep attempted messages fixed in the outbox. Cover keyboard and drag controls against persisted order, with the reconnecting head preserved and no resend.
Check only the crossed rows for edit conflicts and split the already identified movable segment. Preserve reorder behavior while keeping the startup bundle within its existing budget.
157c47e to
fa25773
Compare
|
Merged via squash.
|
* fix(ui): show reconnecting messages only once Keep attempted reconnect sends in the transcript with delivery status and local discard. Preserve unattempted offline sends in the composer queue, and filter retained custody by submission identity without collapsing intentional identical sends. * fix(ui): preserve queue order around hidden reconnecting sends Use stable message IDs for reorder targets, retain hidden rows as delivery barriers, and keep attempted messages fixed in the outbox. Cover keyboard and drag controls against persisted order, with the reconnecting head preserved and no resend. * refactor(ui): reuse the movable queue segment during reorder Check only the crossed rows for edit conflicts and split the already identified movable segment. Preserve reorder behavior while keeping the startup bundle within its existing budget.
What Problem This Solves
Fixes a message appearing in both the transcript and the composer queue when the Gateway disconnects during delivery.
User Impact
Attempted messages now appear once, with Waiting for reconnect and a local Discard action beside the bubble. Messages submitted while offline remain editable in the queue. Discard removes the local pending copy; it does not cancel delivery already accepted by the Gateway.
Why This Change Was Made
The transcript and queue both claimed reconnecting sends. They now share the inline-state decision, distinguish actual delivery attempts from an offline submission timestamp, and use submission identity to hide retained copies already represented by accepted input or history. Two intentionally identical sends remain separate. Reorder actions target message IDs, and the full outbox retains hidden messages as barriers, so reordering visible messages cannot move them ahead of an attempted send. Delivery storage and retry authority are unchanged.
Evidence
bf95f2b23c639247123e4c01cc5892b550b99187.