Server-only storage: remove IndexedDB entirely#68
Merged
Conversation
"C'est soit sur le serveur soit ça ne l'est pas du tout": projects now live exclusively on the MCP server's disk. The browser holds the open project in memory and pushes every change; nothing project-related persists browser-side anymore (only the current-project id, in localStorage). Net: -225 lines. - Deleted: openDatabase, the projects/meta IndexedDB stores, idbGet/Put/Delete helpers, refifyForIdb (records no longer stored locally), persistCommittedRev (rev lives in memory: currentProjectRev/remoteRev). The legacy database is deleted at startup (one-time cleanup). - loadState(injectedRecord?) fetches the open project from the server (or uses the record reloadProjectFromServer already fetched — no double download). The stale-token guard is preserved. - syncWithRemote() is now just "load the list from the only store": server list replaces the in-memory list; session-only projects are kept only while the editor holds content for them or work is queued (their next save creates them server-side). Client-side tombstone handling is gone — without a cache there is nothing to resurrect (the server endpoint stays). - Push-retry rebuilds from the live editor state (saveState) for the open project, or re-uses the snapshot for background pushes. - duplicateProject / backup export / backup import all go through the server (duplicate shares content-addressed blobs — no image bytes travel). Legacy full-IndexedDB dumps import each project record to the server. - SSE "deleted" now removes the project from the list live, switching away if it was open (server truth, applied instantly). - Pending-upload ledger is in-memory (the blocking upload overlay + beforeunload warning cover the tab-close window). - No server configured → explicit "Aucun serveur configuré — rien ne sera enregistré" (the editor still works for the session, exports stay possible). - CLAUDE.md updated to describe the server-only architecture. https://claude.ai/code/session_01Q5Cd4M127ug84nhGjkiyLe
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.
Policy (user requirement)
"C'est soit sur le serveur soit ça ne l'est pas du tout." IndexedDB is removed entirely: the MCP server's disk is the one and only project store. The browser keeps the open project in memory, pushes every change, and persists nothing project-related (only the current-project id in localStorage). Net −225 lines.
What changed
openDatabase, theprojects/metaIndexedDB stores,idbGet/Put/DeleteProject,idbGet/PutMeta,refifyForIdb(no local records to compact),persistCommittedRev(revisions live in memory). The legacy database is deleted at startup (one-time cleanup of existing browsers).loadState(injectedRecord?): fetches the open project from the server — or uses the recordreloadProjectFromServeralready fetched (no double download). Stale-token guard preserved.syncWithRemote()= "load the list from the only store": the server list replaces the in-memory list. Session-only projects survive only while the editor holds content or work is queued (their next save creates them server-side). Client tombstone handling is gone — with no cache there is nothing to resurrect (server endpoint stays).deleted: the project disappears from the list live; if it was open, the editor switches away (server truth, applied instantly).Verified
Syntax checks on all JS, zero remaining references to any removed identifier or bare
db, critical flows walked (init / switch / create / duplicate / delete / SSE deleted / retry baseRev after switch), assets serve.https://claude.ai/code/session_01Q5Cd4M127ug84nhGjkiyLe
Generated by Claude Code