Repository navigation
fix(ui): saved-message recovery counts cleared drafts as messages - #163717
Conversation
Worked on by: - @fuller-stack-dev Co-authored-by: fuller-stack-dev <[email protected]> OpenClaw-Publication: 01c98f69-1784-478e-b159-ec9f475ff21f
|
🦞👀 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 October 2, 2026, 3:09 PM ET / 19:09 UTC (Revision 2). ClawSweeper reviewWhat this changesThe PR excludes cleared drafts from saved-message counts, previews saved content and attachments, and adds confirmed deletion while preserving recovery safeguards. Merge readiness✅ Ready for maintainer review This remains a useful fix: current main still admits empty recovery records and counts recovery rows. No blocking introduced defect was found, including in the follow-up type-import repair. Priority: P2 Review scores
Verification
How this fits togetherControl UI recovery reads browser-stored drafts and queued messages that lack a usable destination. It lets users restore them into an empty chat for review or delete saved copies without sending messages or deleting chat history. flowchart TD
A[Browser draft and queue storage] --> B[Account-scoped recovery]
B --> C[Filter empty records]
C --> D[Preview saved content]
D --> E{Confirmed action}
E --> F[Restore into empty chat]
E --> G[Delete saved copy]
G --> H[Preserve revision fences]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +373, Tests +529, Docs +2. Total +904 across 15 files. View PR surface stats
Review metrics
Technical reviewBest possible solution: Keep recovery under the existing browser-storage owners, with meaningful counts, visible previews, explicit deletion, and paused uncertain deliveries. Do we have a high-confidence way to reproduce the issue? Yes: current main offers empty records, and its UI counts recovery rows; the supplied before screenshot demonstrates the 21-row case. This review inspected source and evidence without executing the application. Is this the best way to solve the issue? Yes: filtering at the recovery owner and retaining canonical fences addresses the defect without duplicating storage policy; deletion reuses the existing transfer and tombstone mechanisms. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 72471f93c711. 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 (1 earlier review cycle)
|
Worked on by: - @fuller-stack-dev Co-authored-by: fuller-stack-dev <[email protected]> OpenClaw-Publication: be59fa88-3fe0-48e0-8bd0-b1eeaaf2b96b
|
Merged via squash.
|
…enclaw#163717) * fix(ui): saved-message recovery counts cleared drafts as messages Worked on by: - @fuller-stack-dev Co-authored-by: fuller-stack-dev <[email protected]> OpenClaw-Publication: 01c98f69-1784-478e-b159-ec9f475ff21f * fix(ui): saved-message recovery counts cleared drafts as messages Worked on by: - @fuller-stack-dev Co-authored-by: fuller-stack-dev <[email protected]> OpenClaw-Publication: be59fa88-3fe0-48e0-8bd0-b1eeaaf2b96b --------- Co-authored-by: fuller-stack-dev <[email protected]>
What Problem This Solves
Fixes a confusing saved-message notice that counts cleared drafts as recoverable messages and leaves people guessing what they would restore or delete.
User Impact
Saved drafts open with their actual text and attachment filenames visible before the actions. Empty records no longer inflate the count. People can review a saved copy without sending it, or explicitly delete it without deleting chat history. Messages with uncertain delivery remain paused and warn before retrying.
Why This Change Was Made
Recovery now distinguishes useful input from internal cleared-draft records. It preserves the canonical revision fences and migration receipts while removing empty recovery copies that could fill the bounded recovery list. Restore and confirmed deletion share the existing ownership and transfer checks; IndexedDB deletion retains a newer revision fence while releasing attachment bytes. No schema, permission, or retention-limit changes.
Evidence
Before
After
Mobile
CI repair
The first hosted run caught a static type-import cycle between the draft store and its extracted validator. Shared type declarations now live in the existing leaf contract, with the runtime type API preserved. Both cycle checks report zero cycles; 83 focused tests, UI typecheck, lint, and a fresh scoped AutoReview passed. This follow-up changes no stored shape or runtime/UI behavior.
Test cost: focused owner/UI tests completed in 4.93 seconds total; the three browser files completed in 96.75 seconds. The revised default-open checks passed across the full run plus the targeted corrected-fixture replay. Hosted CI timing will be available on the PR.
Worked on by
Work sessions
View the OpenClaw team session