Skip to content

Keep several open tabs from overwriting each other's saves - #63

Merged
ToothyDev merged 1 commit into
mainfrom
claude/22-multi-tab-saves
Oct 15, 2026
Merged

ToothyDev merged 1 commit into
mainfrom
claude/22-multi-tab-saves

Conversation

@ToothyDev

Copy link
Copy Markdown
Owner

What this does

When another LSOS tab saves, every other open tab picks up that state through the browser's storage event and drops its own pending save, so an older copy can't overwrite the new one. Only one tab counts play time at a time: when a tab starts counting, it tells the others over a BroadcastChannel and they pause their clocks. Recorded as decision 024.

Closes #22

How to check it

  • Open LSOS in two tabs. Change something in tab A (e.g. mark a property owned), switch to tab B: the change is there, and it stays after B saves.
  • Start the play clock in tab A, then start it in tab B: tab A's clock pauses.

Checklist

  • npm run verify passes
  • Game data added or changed here has a source (see docs/decisions/004-game-data.md) (no game data changed)
  • README / CLAUDE.md updated if usage or workflow changed (no changes needed)

🤖 Generated with Claude Code


Generated by Claude Code

A tab takes the state another tab saves (storage event) and drops its own
pending save. Only the tab that last started counting counts play time; it
pauses the others over a BroadcastChannel. Decision 024.

Closes #22

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying lsos with  Cloudflare Pages  Cloudflare Pages

Latest commit: a2ef26a
Status: ✅  Deploy successful!
Preview URL: https://1d609143.lsos-2qs.pages.dev
Branch Preview URL: https://claude-22-multi-tab-saves.lsos-2qs.pages.dev

View logs

@ToothyDev
ToothyDev merged commit 4213e92 into main Oct 15, 2026
4 checks passed
@ToothyDev
ToothyDev deleted the claude/22-multi-tab-saves branch October 15, 2026 13:20
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.

Core: two LSOS tabs open at once overwrite each other's saves

2 participants