Skip to content

Keep workspace saves recoverable and correct routing - #1

Merged
tanRdev merged 1 commit into
mainfrom
cursor/fix-persistence-and-routing-3248
Nov 8, 2026
Merged

tanRdev merged 1 commit into
mainfrom
cursor/fix-persistence-and-routing-3248

Conversation

@tanRdev

@tanRdev tanRdev commented Nov 8, 2026

Copy link
Copy Markdown
Owner

Summary

  • Autosave and board download keep usable work when a name, route, topic, or exercise draft is temporarily invalid. Those fields fall back to the last valid value; other edits are still written.
  • An unreadable liveboard-v1 document is copied to a recovery key and is not replaced until that copy exists. The notice can download it, start fresh, or discard it after download.
  • A tab reads the stored revision before writing. A newer copy from another tab is kept, and this tab can load it or explicitly keep its own board. Node movement alone does not bounce saves between tabs.
  • A client connected to several backends round-robins across the healthy ones. Least-connections stays a load-balancer policy.
  • A DynamoDB throttle is a failed circuit attempt and is not retried. A missing record is still a successful lookup.

Older workspace files without revision still open. The saved format remains liveboard-workspace-v1.

Tests

  • npx tsc --noEmit
  • npx vitest run — 13 files, 172 tests, all passed
  • npm run build — Next.js production build succeeded
  • Browser checks against the dev server: an unreadable document stays in place until Start fresh, a blank component name does not block a title save, an interview preset leaves the active challenge, and the losing tab shows a conflict instead of replacing the newer title

Remaining risk

Two tabs that both read the same revision and write in the same moment can still race; localStorage has no compare-and-swap. The recovery banner stays until the copy is downloaded and discarded.

Open in Web Open in Cursor 

Autosave repairs unfinished names, routes, and exercise drafts instead of dropping the rest of the board. Unreadable local documents are copied aside and are not replaced until that copy exists. A tab will not overwrite a newer revision from another tab. Direct client links round-robin across healthy backends, and a throttled database read is a circuit failure without a retry.

Co-authored-by: Tan <[email protected]>
@vercel

vercel Bot commented Nov 8, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
liveboard Ready Ready Preview Nov 8, 2026 2:46pm UTC

@tanRdev
tanRdev merged commit 415eb29 into main Nov 8, 2026
3 checks passed
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.

2 participants