Skip to content

fix(ui): saved-message recovery counts cleared drafts as messages - #163717

Merged
roboclaw-bot merged 2 commits into
mainfrom
openclaw/understanding-a-notification
Oct 2, 2026
Merged

roboclaw-bot merged 2 commits into
mainfrom
openclaw/understanding-a-notification

Conversation

@roboclaw-bot

@roboclaw-bot roboclaw-bot commented Oct 2, 2026 •

Copy link
Copy Markdown
Collaborator

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

  • Reproduced the notice displaying 21 rows for one draft plus 20 clear markers; the regression now displays one draft.
  • Reproduced 80 empty recovery copies blocking real legacy input; the repair preserves the canonical fence and prevents source replay after deletion.
  • 146 focused tests passed. All 23 browser scenarios passed, including attachments, reconnects, Incognito, changed destinations, cancel/delete/reload, and explicit retry. The preview-first revision also verifies that the draft is visible before any action.
  • Changed-file gates passed; the subsequent presentation-only revision passed UI typecheck, lint, styles, and browser verification. Production Control UI builds succeeded in the browser lane.
  • Fresh AutoReview: no accepted P0/P1/P2 findings. Proof uses deterministic browser data and a mocked Gateway, not live account data.

Before

Before: 21 entries, mostly empty cleared drafts

After

After: saved draft text is visible before review or deletion

Mobile

Mobile: readable draft preview and explicit actions

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

Worked on by:
- @fuller-stack-dev

Co-authored-by: fuller-stack-dev <[email protected]>
OpenClaw-Publication: 01c98f69-1784-478e-b159-ec9f475ff21f
@clawsweeper

clawsweeper Bot commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation app: web-ui App: web-ui size: XL labels Oct 2, 2026
@roboclaw-bot
roboclaw-bot marked this pull request as ready for review October 2, 2026 18:51
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Oct 2, 2026
@clawsweeper

clawsweeper Bot commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed October 2, 2026, 3:09 PM ET / 19:09 UTC (Revision 2).

ClawSweeper review

What this changes

The 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
Reviewed head: 8e137653c0bc43383246dd8ef179ff51bb8eb045

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) Useful, focused recovery work with inspected visual proof, substantial storage regressions, and no blocking correctness finding.
Proof confidence 🦞 diamond lobster (5/6) ✨ media proof bonus Sufficient (screenshot): Inspected browser screenshots demonstrate the changed recovery notice showing one real draft with visible content and actions on desktop and mobile. The captured browser evidence reports cancel/delete/reload and legacy attachment recovery through the production UI with a mocked Gateway; supplemental storage regressions preserve existing shapes, receipts, and revision fences.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (screenshot): Inspected browser screenshots demonstrate the changed recovery notice showing one real draft with visible content and actions on desktop and mobile. The captured browser evidence reports cancel/delete/reload and legacy attachment recovery through the production UI with a mocked Gateway; supplemental storage regressions preserve existing shapes, receipts, and revision fences.
Evidence reviewed 8 items Introduced behavior: The pinned merge-base-to-head diff adds the useful-input filter, retires empty recovery copies, and routes confirmed deletion through existing storage owners. Endpoint drift was not attributed to this PR.
Current main still needs the fix: The current-main recovery reader filters payload ownership but does not exclude empty drafts; the corresponding UI still counts rows and lacks the new deletion action.
Latest release comparison: The v2026.9.7 recovery reader also has no useful-input filter or confirmed-discard operation; this is not an already-shipped implementation.
Findings None None.
Security None None.

How this fits together

Control 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]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Source +373, Tests +529, Docs +2. Total +904 across 15 files.

View PR surface stats
Area Files Added Removed Net
Source 8 663 290 +373
Tests 6 559 30 +529
Docs 1 2 0 +2
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 15 1224 320 +904

Review metrics

Metric Value Why it matters
Production versus regression coverage production net +373 lines; tests net +529 lines Production growth supports previews and confirmed deletion, while regression coverage targets storage failures, ownership changes, and legacy recovery.

Technical review

Best 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.

Labels

Label changes:

No label changes.

Label justifications:

  • P2: This fixes a bounded browser recovery defect that inflates counts and can obstruct meaningful legacy recovery.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (screenshot): Inspected browser screenshots demonstrate the changed recovery notice showing one real draft with visible content and actions on desktop and mobile. The captured browser evidence reports cancel/delete/reload and legacy attachment recovery through the production UI with a mocked Gateway; supplemental storage regressions preserve existing shapes, receipts, and revision fences.
  • proof: sufficient: Contributor real behavior proof is sufficient. Inspected browser screenshots demonstrate the changed recovery notice showing one real draft with visible content and actions on desktop and mobile. The captured browser evidence reports cancel/delete/reload and legacy attachment recovery through the production UI with a mocked Gateway; supplemental storage regressions preserve existing shapes, receipts, and revision fences.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence. Inspected browser screenshots demonstrate the changed recovery notice showing one real draft with visible content and actions on desktop and mobile. The captured browser evidence reports cancel/delete/reload and legacy attachment recovery through the production UI with a mocked Gateway; supplemental storage regressions preserve existing shapes, receipts, and revision fences.

Evidence

What I checked:

  • Introduced behavior: The pinned merge-base-to-head diff adds the useful-input filter, retires empty recovery copies, and routes confirmed deletion through existing storage owners. Endpoint drift was not attributed to this PR. (ui/src/lib/chat/outbox-recovery.ts:184, 8e137653c0bc)
  • Current main still needs the fix: The current-main recovery reader filters payload ownership but does not exclude empty drafts; the corresponding UI still counts rows and lacks the new deletion action. (ui/src/lib/chat/outbox-recovery.ts:176, 72471f93c711)
  • Latest release comparison: The v2026.9.7 recovery reader also has no useful-input filter or confirmed-discard operation; this is not an already-shipped implementation. (ui/src/lib/chat/outbox-recovery.ts:35, c074824a27c9)
  • Inspected browser proof: Inspected all three prepared images linked in the captured PR body. Before shows 21 entries with empty rows; after shows one draft with its text and explicit review/delete actions; mobile shows readable content and controls. The body identifies a production Control UI browser run with deterministic data and a mocked Gateway. (ui/src/pages/chat/chat-outbox-recovery.ts:352, 8e137653c0bc)
  • Stored-state compatibility and deletion safeguards: The existing IndexedDB schema and serialized version remain unchanged. Empty-copy cleanup preserves canonical sessions and migration receipts; durable deletion writes a higher tombstone revision. Inspected regressions cover legacy capacity, source replay, stale writers, changed owners/revisions, failed writes, and attachment retention. The captured body reports passing browser migration and delete/reload scenarios; tests were not executed during this read-only review. (ui/src/lib/chat/composer-draft-store.runtime.ts:332, 8e137653c0bc)
  • Re-review continuity: The previous completed review recorded no findings or published rank-up moves. GitHub's pinned comparison confirms the follow-up only moves durable draft types into chat-types, updates type imports, and preserves runtime-module type exports; validators and stored shapes are unchanged. (ui/src/lib/chat/chat-types.ts:64, 8e137653c0bc)

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • roboclaw-bot: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (1 earlier review cycle)
  • reviewed 2026-10-02T18:57:41.661Z sha 1b96161 :: needs maintainer review before merge. :: none

Worked on by:
- @fuller-stack-dev

Co-authored-by: fuller-stack-dev <[email protected]>
OpenClaw-Publication: be59fa88-3fe0-48e0-8bd0-b1eeaaf2b96b
@roboclaw-bot
roboclaw-bot merged commit c228e3a into main Oct 2, 2026
96 checks passed
@roboclaw-bot
roboclaw-bot deleted the openclaw/understanding-a-notification branch October 2, 2026 19:17
@roboclaw-bot

Copy link
Copy Markdown
Collaborator Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 3, 2026
…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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: web-ui App: web-ui docs Improvements or additions to documentation P2 Normal backlog priority with limited blast radius. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: XL status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant