Repository navigation
fix: keep New Tab drafts through update and quit - #26753
teamleaderleo wants to merge 8 commits into
Conversation
|
cmux status (one comment, edited in place; each line is updated by the job that owns it) Review App of this head (app.zip, kept 1 day)
Unclear: CI failed on
Failures:
Matched log linesNot re-run automatically: Written by red: cmux-next checks (god files, concurrency, crash safety, l10n); NEW:
Agents: |
Bugbot needs on-demand usage enabledBugbot uses usage-based billing for this team and requires on-demand usage to be enabled. A team admin can enable on-demand usage in the Cursor dashboard. |
51eaaef to
06ab833
Compare
|
Found 141 test failures on Blacksmith runners: Failures
...and 131 more test failures. View all on Blacksmith: run 40671505397, run 40648422062
|
b9535ed to
31f83e5
Compare
31f83e5 to
29e6697
Compare
29e6697 to
ca77c3f
Compare
![Fix with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/fix-with-codesmith-light-3x.png)
Fixes the New Tab draft loss Leo reported after an update/relaunch: "Also, when I updated, it removed my draft in one of the composer things."
New Tab drafts were only sent to the native unsent store from the replacement/unmount callback. A normal quit/update could close the WebView without that callback, and the store only carried text. This adds ordinary edit writes plus a pagehide fallback, stores text and attachment metadata together, and restores both through the native seed/handshake. Existing non-empty records are never replaced by an empty seed.
The red regression covers an ordinary New Tab edit before quit, then a build-A to build-B relaunch restoring text and attachment order and a later B write surviving another relaunch. Swift coverage also keeps the legacy text-only file format readable.
Non-goals: QuickComposer standalone drafts and local queued-message edits remain separate follow-ups.
Verification: git diff --check (pass). Fleet Swift and browser tests should run in CI; this GCP lane has no Swift or Bun toolchain.
agent-identity footer
Need help on this PR? Tag
@codesmith-botwith what you need.Summary by cubic
Fixes New Tab drafts being lost after an app update or quit, attachments included, for both the current and Classic New Tab. Drafts are now persisted on every edit and flushed on
pagehide— reading the field's latest DOM value so a final keystroke and a cleared draft are captured — giving native quit a durable record even when the WebView closes without unmounting, and text and attachment metadata restore together through the native handshake.composerDraftfields without overwriting newer state.Written for commit ca77c3f. Summary will update on new commits.