Repository navigation
fix(chat): hide explicitly removed queued messages - #159503
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. |
|
Codex review: needs maintainer review before merge. Reviewed September 27, 2026, 10:13 PM ET / September 28, 2026, 02:13 UTC (Revision 15). ClawSweeper reviewWhat this changesThe branch makes Control UI Remove withdraw an accepted queued chat input and hide its prompt and attachments after reconnect, with Gateway, SQLite receipt, protocol, documentation, and regression-test changes. Merge readiness✅ Ready for maintainer review Keep open. Current main still leaves removed queued prompts visible, and this PR is the active, proof-backed fix. Review of the pinned patch found no concrete blocking defect. Priority: P2 Review scores
Verification
How this fits togetherControl UI sends queued-message actions to the Gateway. The Gateway updates SQLite-backed pending input custody and returns history and receipt facts that the UI uses to render the conversation after reconnect. flowchart LR
A[Control UI action] --> B[Gateway chat abort]
B --> C{Explicit queued Remove?}
C -->|Yes| D[SQLite withdrawal worker]
C -->|No| E[Ordinary cancellation]
D --> F[History and receipts]
E --> F
F --> G[Control UI conversation]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +632, Tests +777, Docs +11, Other +4. Total +1424 across 41 files. View PR surface stats
Review metrics
Technical reviewBest possible solution: Keep the SQLite cancellation receipt as the durable owner of Remove, while preserving visible recovery for Stop, timeout, and failed sends. Do we have a high-confidence way to reproduce the issue? Yes, from source and the captured before image: current main sends ordinary Stop for Remove and projects the cancelled prompt back into history. This read-only review did not execute current main. Is this the best way to solve the issue? Yes. The worker-owned withdrawal survives reload and distinguishes explicit Remove from ordinary cancellation; a UI-only hide would not preserve that distinction after reconnect. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 66679bfa3ec1. LabelsLabel changes: No label changes. Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (14 earlier review cycles; latest 8 shown)
|
b7db2a9 to
6a860fc
Compare
|
@clawsweeper re-review Final head d16fc51 uses explicit queue withdrawal. Ordinary Stop and timeout recovery remain visible. Removal holds the captured queued owner through durable withdrawal, settles only that original controller after commit, and leaves already-admitted or replacement runs alone. Hidden cancellation receipts also retire browser outbox copies outside the loaded history page. The rebased build, 134-test focused regression selection, six storage-worker tests, and browser Remove/reload/Stop flow passed. Independent review is clear through P2. The final commit adapts the fixtures to current worker helper signatures; hosted CI and the full changed checks are running. |
|
🦞👀 Re-review progress:
|
|
Reviewed the exact-head P2 “Preserve off-page Stop recovery copies” against both main and this implementation; no recovery-content loss is established. On main, The server still retains and pages ordinary Stop/timeout cancellation records. A second independent source review confirmed these ownership and pagination distinctions. Keeping the exact cancellation receipt; the existing browser Stop regression and pending-input display tests protect recovery presentation. The CI test failure is being investigated separately. |
|
@clawsweeper re-review Final head 26706af adds only the Doctor fixture teardown correction since the previous completed review. It awaits the existing plugin-cache retirement completion before removing temporary SQLite state. The focused 10-case file, exact 37-file/610-test shard, affected typecheck, and independent review passed. The CI timing failure did not reproduce in the local baseline replay; the source-established teardown race is documented in the PR body. The queued-message implementation is unchanged. The previous off-page Stop finding was assessed against both main and the current owner contracts in #159503 (comment): browser retry-payload retirement does not remove canonical Stop recovery content. |
|
🦞👀 Re-review progress:
|
|
@clawsweeper re-review Head 8b5ad0ce700fb29a3c4f0051c1555a30ad02220b preserves main 6652f7e’s Tasks removal. Conflict resolution retained its deleted Task-detail import while preserving the queue-removal incognito guard; protocol generation stayed unchanged and Workboard assets no longer differ from main. The only additional fix awaits canonical async database shutdown before the plugin-migration fixture deletes its roots, and prints its receipt on future assertion failures. Production worker code and the completed expectation are unchanged. The original CI refusal was NOT reproduced: actual Linux Node24.19.0 ran the exact62-file group green before and after (1119pass/1skip). A separate local Git-preflight timeout is documented with its unchanged focused replay. Current integrated source passed all229 focused tests across9 files, fresh production UI Remove/reload/Stop E2E, core/infra-test/UI types and independent P2 review. Prior scope-fencing causal proof and synthetic copied-store proof remain in the updated body. No schema/retention or new permission change is introduced; the requested maintainer implementation decision is already recorded in the linked review response. Exact-head hosted CI is pending. |
|
🦞👀 Re-review progress:
|
8b5ad0c to
fb49ef6
Compare
fe6076c to
274bd46
Compare
|
@clawsweeper re-review Please review current head 274bd465340c147ff7b280fa9d9013a71be8914f. The queue withdrawal feature patches remain unchanged across the required rebases. Duplicate CI fixture repairs were dropped in favor of their owning main fixes, and the PR now contains only the queue removal implementation and its regression coverage. The updated body records browser, worker, authorization, copied-store compatibility and independent review evidence, plus the limits of the unrelated Linux fixture replays. The prior implementation decision and schema/rollback explanation still apply: this existing-format bug fix adds no schema, retention or permission change. Exact-head CI is running. |
|
🦞👀 Re-review progress:
|
274bd46 to
5d39d0c
Compare
5d39d0c to
4356136
Compare
4356136 to
f3becee
Compare
|
@clawsweeper re-review Please review head f3becee. Actual conflicts were resolved against main cc70f93: preserve worker-prepared history rendering and guarded-write operation labels, remove the superseded receipt helper, and retain the existing readonly-worker receipt path with cancellation metadata. Fresh proof passed: 189 backend cases, 34 targeted UI cases, production browser Remove/reconnect/reload/no-resend/Stop, and independent P2 review of the complete integrated patch. After restoring the locked dependency patches, the six real-worker withdrawal cases and six outbox loading cases passed again. Core typechecking passed; the remaining local checks and exact-head CI are running. The updated body records the earlier hover timeout and matching Linux replay without claiming a causal fix. Existing-format storage, rollback, incognito and prior-record behavior remain as documented in the accepted maintainer decision. There is no schema or retention migration. |
|
🦞👀 Re-review progress:
|
|
Merged via squash.
|
* fix(ui): hide removed queued messages from chat * fix(chat): distinguish queued removal from stopping a turn * test: align queued withdrawal fixtures with worker APIs * test: assert cancellation metadata after resume rejection
What Problem This Solves
Removing an accepted queued prompt left its text, attachments and cancellation notice visible in the conversation.
User Impact
Confirmed Remove hides the queued prompt and its attachments, including after reconnect or reload. A stale Remove leaves an already-started run alone. Ordinary Stop, timeout and failed-send cancellations retain their recovery messages.
Incognito keeps its existing cancellation notice. Previously cancelled records are not reinterpreted. No schema or retention migration is introduced; the live Gateway has not been deployed.
Why This Change Was Made
Remove now carries explicit withdrawal intent. The existing SQLite worker marks the exact unconsumed input cancelled and hidden while retaining its receipt and replay protection. Queue adoption waits for settlement, and a committed withdrawal cancels only its captured original owner, including after registration handoff or requester revocation. Native commit receipts recover successful writes whose reply delivery fails.
Content-free hidden history records and exact cancellation receipts retire browser retry copies outside the loaded page. Receipt reads use the existing readonly worker. The integration preserves main's worker-prepared history rendering and guarded-write labels, and removes the superseded receipt helper.
Rollback retains readable cancelled records and cannot requeue them; older UI versions are not promised the new display behavior. The maintainer decision and copied-store evidence cover existing data, rollback and the incognito boundary.
Evidence
The original browser regression failed because removed content stayed visible. Negative controls also reproduced premature adoption, missed postcommit settlement, and stale Remove interrupting active work.
36364874158, attempt 3, succeeded on this exact head: 172 successful jobs and 12 skipped. Earlier failures and their investigation remain recorded below.CI investigation and remaining proof limits
Required rebases incorporated main-owned repairs for the Windows PNG fixture, Doctor retirement, startup scope handling, native terminal cleanup, migration fixture closure, Knip entry registration and restart-status expectations. Duplicate local repairs were dropped. The restart assertion's original four failures reproduced; the executable correction now on main in
b459eb600f238passed 27 owning cases and the exact 72-file PR selection (965 tests). The recent actual conflicts were resolved againstcc70f934a15ad, preserving the new history-rendering owner and eliminating the duplicate receipt helper.CI run
36352380379, UI shard 2/3, failed one unchanged sidebar hover-marquee reconnect test: computed transform stayed zero during its one-second poll. The cause remains unproven. The recorded shard on the exact tested merge was replayed on Linux with matching Node 24.21.0, Bun revision, Playwright 1.63.0 and Chromium 153.0.8010.12: 512 files / 7,927 tests passed, three skipped, 120.85s (Testbox run). Observed logical CPUs matched CI at four; underlying host scheduling remained uncontrolled. This passing replay is not claimed as a fix. An earlier Mac replay used different runtime versions and lacked one main commit; hover passed, but one outbox module-loading case failed. The current focused six-case replay passed without a causal fix claim.CI run
36364874158passed 162 jobs, including dependency checks and production/test types, before one browser E2E failure cancelled eight jobs.chat-composer-input-measurement.e2e.test.tsobserved four transcript geometry reads during its typing interval. Its test and rail implementation are byte-identical on the tested main and PR; the feature’s transcript-empty branch is unreachable with this fixture’s 50 messages. Main commitf651a47ed73ddalready records this intermittent assertion. One unchanged focused test on exact main5cda19987e98passed with Node 24.21.0 and a fresh production UI build (16.02s wrapper time). The triggering scheduled render remains unproven. The single CI reproduction (attempt 2, job108756342272) passed on the same merge and platform with the unchanged assertion. This is non-reproduction, not a repair. No independent failed test job remained. Attempt 3 completed the checks cancelled by fail-fast and the aggregate gate successfully, reusing the prior successful jobs.The earlier plugin-index refusal was likewise not reproduced in its Linux replays. A local Git-preflight timeout passed one unchanged replay. These investigations are recorded as unresolved observations, not repaired defects. One earlier full local check stopped at inherited Swift complexity limits; its remaining selected gates passed separately. Browser proof uses the existing mock-Gateway harness, with real SQLite-worker proof separately.
Inspected synthetic screenshots, also delivered in the originating chat:
Before:
After Remove:
Ordinary Stop retains recovery: