Skip to content

Fix board changes lost on page refresh#20

Merged
snktshrma merged 1 commit into
mainfrom
cursor/fix-board-persistence-7dfd
Jun 23, 2026
Merged

Fix board changes lost on page refresh#20
snktshrma merged 1 commit into
mainfrom
cursor/fix-board-persistence-7dfd

Conversation

@Tanops

@Tanops Tanops commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes changes disappearing after a page refresh.

Root causes

  1. Reload rejected valid savesapplyBoard required 30% of leaf tasks to have due dates, so boards saved to SQLite were discarded on reload and replaced with sample data.
  2. Edits during load never saved — changes made while the board was still fetching were kept on screen but not flushed to storage once sync became ready.
  3. No persistence on static hosting — GitHub Pages has no /api/board backend; saves failed silently and every refresh reloaded sample data.

Fix

  • Remove the due-date quota check when loading a saved board (still reject unknown owners).
  • After sync is ready, immediately save if there are local edits.
  • Always mirror the board to localStorage; use the API when it returns JSON.
  • Flush a final save on pagehide to survive quick refreshes.

Test plan

  • npm run ci (45 tests)
  • Run with python server.py, add a project, refresh — project remains
  • On GitHub Pages / static hosting, add a project, refresh — project remains via localStorage
  • Add tasks without due dates, refresh — data still loads
Open in Web Open in Cursor 

@github-actions

github-actions Bot commented Jun 23, 2026

Copy link
Copy Markdown
PR Preview Action v1.8.1
Preview removed because the pull request was closed.
2026-06-23 15:27 UTC

@snktshrma snktshrma marked this pull request as ready for review June 23, 2026 15:10
@cursor cursor Bot force-pushed the cursor/fix-board-persistence-7dfd branch 2 times, most recently from 7d4a256 to d2c10aa Compare June 23, 2026 15:22
Reject reload only when tasks have invalid owners, not missing due dates.
Flush edits made during load once sync is ready. Persist to localStorage
when API is unavailable. Save on page unload. Rebased onto main.

Co-authored-by: Sanket Sharma <sharma.sanket272@gmail.com>
@cursor cursor Bot force-pushed the cursor/fix-board-persistence-7dfd branch from d2c10aa to 14068ed Compare June 23, 2026 15:25
@snktshrma snktshrma merged commit 0c79d39 into main Jun 23, 2026
2 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.

3 participants