Conversation
…licts, cross-tab sync, logout, db upgrades) Lost edits, lost preferences, logout that doesn't stick, stale lists and the IndexedDB upgrade hang when several tabs are open. - Plans, empires and CXs send the version they were loaded with (base_modified_at); a save over another tab's newer one opens a dialog listing both sides' changes (save as new plan, overwrite, reload), a deleted one offers save as new or a notice - Planning mutations broadcast on a BroadcastChannel; other tabs refetch lists and reload open editors, or keep unsaved edits with a notice - One login state across tabs through the storage event; an account switch stops the old tab's persisted stores from writing - Preference PATCH sends only changed keys and per-uuid overrides; preferences are fetched on every start, the frontend override cleanup is gone - IndexedDB blocking/blocked handlers: old tabs release the DB and show the update notification - Analytics: save_conflict, app:remote_change, app:session_change, app:db_blocked Spec: specs/2026-10-03-multitab-02-frontend.md Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
✅ Deploy Preview for prunplanner-preview ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
jplacht
added a commit
that referenced
this pull request
Oct 3, 2026
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 309 |
| Duplication | 1 |
🟢 Coverage 97.95% diff coverage · +0.03% coverage variation
Metric Results Coverage variation ✅ +0.03% coverage variation (-1.00%) Diff coverage ✅ 97.95% diff coverage Coverage variation details
Coverable lines Covered lines Coverage Common ancestor commit (c165a93) 3715 3628 97.66% Head commit (c48a89d) 4020 (+305) 3927 (+299) 97.69% (+0.03%) Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch:
<coverage of head commit> - <coverage of common ancestor commit>Diff coverage details
Coverable lines Covered lines Diff coverage Pull request (#569) 341 334 97.95% Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified:
<covered lines added or modified>/<coverable lines added or modified> * 100%
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What and why
People plan with several tabs side by side, but each tab kept its own copy of the persisted stores: a save in one tab silently overwrote another tab's, preference changes reset other tabs' keys, logout didn't stick, lists went stale, and after a deploy a new tab could hang on the IndexedDB upgrade until every old tab was closed. Now several tabs work side by side without silently losing data, see each other's saved changes, share one login state and never block each other after a deploy.
Changes
base_modified_at); a save over another tab's newer one opens a dialog listing both sides' changes (Save as new plan / Overwrite / Reload), a deleted one offers Save as new plan or a noticeBroadcastChannel; other tabs refetch their lists and reload open editors, or keep unsaved edits with a "Saved in another tab" noticestorageevent; an account switch stops the old tab's persisted stores from writing, so it can't put the old login backnullremoves one); preferences are fetched on every app start; the frontend override cleanup is gone (the backend drops a deleted plan's)blocking/blockedhandlers: old tabs release the DB and show the update notificationplan:save_conflict,empire:save_conflict,exchange:save_conflict,app:remote_change,app:session_change,app:db_blockedHow it was verified
pnpm test && pnpm test:components,pnpm tsc,pnpm lint,pnpm knipall pass.main), incl. every dialog option, deleted objects, live refresh with and without unsaved edits, preferences from both tabs, logout/account switch (with a forced old-token refresh in the abandoned tab), and a DB upgrade at version+1.specs/2026-10-03-multitab-02-frontend.md(workspace repo).Screenshots
Two tabs staged with Playwright (two pages in one browser context).
Desktop (1440)
Mobile (375)
Deploy order
Needs PRUNplanner/backend#77 (merged) deployed first; it is backward compatible. This PR can deploy any time after it. The first release with the
blockinghandler can still hit one blocked upgrade from tabs of the previous release.🤖 Generated with Claude Code