Repository navigation
Write what the apps receive into a client cache (851-4468) - #1478
Merged
dylanplayer merged 5 commits intoNov 27, 2026
Merged
dylanplayer merged 5 commits into
dylanplayer merged 5 commits into
Conversation
dylanplayer
force-pushed
the
dylan/851-4468-client-database-cache-what-the-apps-have-seen
branch
from
November 26, 2026 02:07
f3e7713 to
e00dc01
Compare
dylanplayer
force-pushed
the
dylan/851-4468-client-database-cache-what-the-apps-have-seen
branch
from
November 26, 2026 21:29
e00dc01 to
c350948
Compare
The sidebar snapshot per machine, transcripts of opened chats, attachment metadata and opened files, and queued sends are written through to new cache_* tables in client.sqlite. Nothing reads them yet. The cache has its own schema version and is wiped and rebuilt on mismatch or a failed write, and old transcripts and files age out. Development builds audit every write against what the app holds and log the result. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Draft controllers, which carry every new chat through its first send, now get the client cache like existing chats do. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Every attachment the apps fetch goes through CodevisorServerClient, so the client writes the bytes into the client cache there, keyed by machine and file id. The lightbox, thumbnails and workspace media all fetch through it; recording only in the session controller missed the lightbox and inspector. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
dylanplayer
force-pushed
the
dylan/851-4468-client-database-cache-what-the-apps-have-seen
branch
from
November 26, 2026 21:51
c350948 to
b9923bd
Compare
dylanplayer
deleted the
dylan/851-4468-client-database-cache-what-the-apps-have-seen
branch
November 27, 2026 04:34
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.
Fixes 851-4468 (part 1 of 2)
The Mac and iOS apps now write what they receive from the machines into real tables in
client.sqlite. Nothing reads them yet, so nothing visible changes. PR 2 adds the read path, behind a setting.What's stored
New
cache_*tables in client.sqlite, underPersistence/ClientCache/:cache_machines,cache_projects,cache_workspaces,cache_chats,cache_panes,cache_checkoutsNavigationCacheStore)cache_transcripts,cache_transcript_itemscache_attachments(+ files under Caches/ClientCacheFiles)cache_queued_sendsOnly the app changes: no server or protocol changes. The client gained
transcriptPageReturningData(same endpoint, keeps the raw JSON) and a page receiver onServerSessionTransport.Disposable by design
client_cache.schema_versioninclient_metadata), separate from the numbered client.sqlite migrations. It is not migration 2: a numbered migration would make an older build refuse to open client.sqlite. On a version mismatch the app drops everycache_*table and recreates them. Preferences andclient_valuesare untouched (tested).Bounded size
Verifying the data matches what the app shows
Development builds audit every write and log the result under the
client-cachecategory:A mismatch logs a fault:
Client cache differs from …. The tables can also be read directly withsqlite3 <app support>/client.sqlite.Tophat
Real Mac dev app and iOS simulator (
bun run dev:ios), real Codex sign-in (GPT-6 models), no mocks.Client cache matches chat 36fb… on local: 4 shown items, 4 cachedandmatches sidebar of local: 1 workspaces, 1 chats. Incache_transcript_items, the four rows match the screen: prompt, fruit list, prompt, vegetable list.matches chat 150c… : 2 shown items, 2 cachedandmatches sidebar … 1 workspaces, 2 chats. Both transcripts are in the simulator's tables.cache_queued_sendswas empty after delivery, as expected. There were 0differslines on either platform.ClientCacheTests). PR 2's offline tophat will exercise queued sends.Tests
ClientCacheTestsandClientCacheTranscriptTestscover:NavigationStore(snapshot, then delta) reading back equal todelta.applying(to:)The neighbouring Session, Navigation, ClientDatabase, ClientStorage and Transcript suites pass.
🤖 Generated with Claude Code