Skip to content

fix: surface save failures — indicator, retry, beforeunload - #55

Merged
chasehuh merged 2 commits into
mainfrom
issue-53-save-failure-ux
Jul 30, 2026
Merged

fix: surface save failures — indicator, retry, beforeunload#55
chasehuh merged 2 commits into
mainfrom
issue-53-save-failure-ux

Conversation

@chasehuh

Copy link
Copy Markdown
Member

Summary

  • Show a persistent titlebar Not saved / Sign in to save indicator when saveState === "error", with manual Retry or login link.
  • Retry failed saves with capped backoff (1s/2s/4s/8s); stop on 401; drop stale attempts via monotonic save sequence so an older body cannot land after a newer save.
  • Register beforeunload while dirty/saving/error; Reload-to-Update flushes pending save or confirms before discard.
  • Treat error as unsafe for remote apply in canApplyRemoteBody (keeps forceBody bypass for coordination with conflict-resolution work).

Closes #53

Test plan

  • pnpm test (retry helpers + remote-apply-guard)
  • pnpm build
  • Offline: DevTools → Offline, type → indicator appears; go online → retry succeeds
  • Clear Clerk session, type → Sign in to save (no infinite retry)
  • Type then Reload to Update → flush or confirm; no silent discard
  • Close tab while dirty/error → browser warns; clean tab closes freely

Made with Cursor

… guard

Make failed saves visible and recoverable so a network blip or expired
session cannot silently erase the editor buffer, and keep error state
from being overwritten by remote poll apply.

Co-authored-by: Cursor <cursoragent@cursor.com>
@vercel

vercel Bot commented Jul 30, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
memo Ready Ready Preview Jul 30, 2026 4:39am

Request Review

Resolve remote-apply-guard conflicts by keeping #56 forceBody semantics
(no bypass of dirty/saving/error) while retaining #55 error save-state UX.

Co-authored-by: Cursor <cursoragent@cursor.com>
@chasehuh
chasehuh merged commit c63780e into main Jul 30, 2026
2 checks passed
@chasehuh
chasehuh deleted the issue-53-save-failure-ux branch July 30, 2026 04:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Surface save failures: error indicator, retry with backoff, and unsaved-work guard on reload

1 participant