Repository navigation
fix(ui): keep acknowledged sends pending on current connection - #131266
Conversation
Prevent elapsed time alone from turning an acknowledged send on the current Gateway connection into delivery uncertainty. Genuine reconnect ambiguity remains unchanged.
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 27, 2026, 7:31 PM ET / 23:31 UTC. ClawSweeper reviewWhat this changesThe PR removes the five-second confirmation deadline so an acknowledged Control UI chat send stays pending while its Gateway connection remains current. Merge readinessKeep this maintainer PR open for normal exact-head CI and live-proof review. The introduced change correctly removes the timer-only transition while retaining the existing reconnect path; current main still contains the five-second deadline, so the work remains necessary. Priority: P2 Review scores
Verification
Live VerificationEntry: Result: FAIL (partial) — step 3 Steps:
How this fits togetherThe Control UI keeps attempted messages in a durable outbox and reconciles them with Gateway history, session-run metadata, and connection state. It retires proven sends, keeps current sends pending, and shows an inline retry state only after genuine reconnect ambiguity. flowchart LR
Composer[Control UI composer] --> Outbox[Durable chat outbox]
Outbox --> Reconcile[Delivery reconciliation]
Gateway[Gateway history and run state] --> Reconcile
Connection[Connection lifecycle] --> Reconcile
Reconcile --> Delivered[Retire proven send]
Reconcile --> Pending[Keep current send pending]
Reconcile --> Uncertain[Show reconnect uncertainty]
Before merge
Agent review detailsSecurityNone. PR surfaceSource -59, Tests -56. Total -115 across 3 files. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Land the timer removal after exact-head CI and a redacted mocked-Gateway Control UI proof, or document why that isolated visual proof cannot exercise the timing path. Do we have a high-confidence way to reproduce the issue? Yes, from source: current main's reconciliation starts a five-second deadline for a matching live send, and the focused test drives the stale-history/clock sequence past that deadline. Is this the best way to solve the issue? Yes. The patch removes only the elapsed-time classifier; current lifecycle code still changes sending rows on a real connection transition, and Gateway event paths continue to reload and flush delivery state. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 0fdae639d1fd. 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
|
Related: #125425
Related: #125426
Related: #131171
AI-assisted: yes.
What Problem This Solves
Fixes an issue where users sending a message from the Control UI Home chat could see a delivery-uncertain warning after five seconds when transcript history stayed stale, even though
chat.sendwas acknowledged and the Gateway connection never changed.#125426 reduced the race by adding a confirmation grace period. #131171 added stronger run-ID delivery proof and a calmer inline presentation for genuine reconnect uncertainty. The remaining gap was the timer itself: elapsed time could still turn a current-connection send into reconnect uncertainty without any reconnect evidence.
Why This Change Was Made
While the exact current connection still owns a matching live
sendingprojection, reconciliation now keeps the send pending until authoritative transcript/run proof retires it or a real connection transition removes the live fact. The obsolete five-second confirmation deadline, retry timer, and owner bookkeeping are removed.Actual reconnect ambiguity keeps the existing conservative
unconfirmedpath and the inline presentation added by #131171. This adds no config, storage, protocol, or API surface.User Impact
Acknowledged Home-chat sends no longer become “Delivery unconfirmed” merely because history takes longer than five seconds to catch up. Users still receive the existing review-and-retry outcome when a real reconnect leaves delivery ambiguous.
Evidence
sendingtounconfirmed.node scripts/run-vitest.mjs ui/src/pages/chat/chat-send.test.ts— 283 passed on the current-main rebase.pnpm tsgo:ui— passed.git diff --check origin/main...HEAD— passed.origin/main— no actionable findings; patch correct, confidence 0.98.Changed-gate limitation:
node scripts/check-changed.mjspassed conflict-marker, ratchet, dependency, formatting, dead-export, temp-directory, and UI i18n checks, then stopped in core-test typechecking on pre-existing implicit-anyerrors inui/src/test-helpers/control-ui-e2e*.test.tsandmock-gateway-page.test.ts, introduced on current main by #131052. The touched UI typecheck/lint/style lanes pass independently.Visual proof is not attached yet. The deterministic owner-boundary regression covers the five-second state transition; before landing, the PR should also capture the real Control UI surface or state why isolated visual proof is infeasible.