Conversation
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…db.ts Move overpasstiles/overpassdata to SharedDatabase (gpxstudio-shared). Refactor Database to accept name param, add createProjectDatabase() factory. Update overpass-layer.ts to use sharedDb.
Adds project-registry.ts with Dexie-backed registry DB, liveQuery store, CRUD helpers, and one-time migration from legacy Database IndexedDB.
Save liveQuery subscription handles and add disconnectFromDatabase() and reconnectToDatabase() methods to support database switching.
Adds active-project.ts with currentDb store, camera persistence helpers (saveMapCamera/restoreMapCamera), and switchToProject which orchestrates DB swapping across all state managers when the user changes tabs.
Horizontal tab strip for switching between projects with inline rename, right-click context menu, delete confirmation dialog, and + button.
…able hash
- Replace static db import with initializeProjects() + currentDb
- Add ProjectTabBar above Menu
- Pass hash={false} to Map component
- Save camera on destroy via saveMapCamera
- Add project.* i18n keys to en.json
- CRITICAL: reconnect fileActionManager on initial load (data loss fix) - CRITICAL: check correct project DB when deciding to show delete confirm - IMPORTANT: only switch active tab when deleting the active project - IMPORTANT: add re-entrancy guard to switchToProject - IMPORTANT: fix i18n key cancel → project.cancel in AlertDialog
This branch has not been deployed
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.
Summary
gpxstudio-{projectId})gpxstudio-registry) stores project metadata (name, createdAt, updatedAt)gpxstudio-sharedDB (preserved across projects)DatabaseIndexedDB togpxstudio-project-0on first runFileActionManagergainsreconnectToDatabase()/disconnectFromDatabase()for clean DB swappingTest plan
+→ "Project 2" created, empty file list