Repository navigation
feat(desktop): keep app.db in the CodeWork home under desktop/<channel> - #158
Merged
Merged
Conversation
The desktop's database moves from Electron's userData folder to <CodeWork home>/desktop/<channel>/app.db, beside the CLI's data: the home is CODEWORK_HOME_DIR, else ~/.codework, resolved the way the built-in server's already is. The app server works out the path and creates the folder; Electron main passes only CODEWORK_CHANNEL (latest, dev or canary from the packaged package.json, where electron.config.ts writes it, and `local` running from the repo). CODEWORK_DATABASE still names a file directly, for tests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
The desktop's database moves out of Electron's
userDatafolder into the CodeWork home, like the CLI's own data:<home>/desktop/local/app.db<home>/desktop/canary/app.db,…/dev/…,…/latest/…<home>isCODEWORK_HOME_DIR, else~/.codework.Servers.cliHome) and creates the folder.CODEWORK_DATABASEstill names a file directly (tests).CODEWORK_CHANNEL. A packaged build reads its channel frompackage.json, whereelectron.config.tsnow writes it; from the repo it islocal.manifest.tsreads that file for the channel and the Windows app id.Existing
app.dbfiles inuserDataare not moved: nothing is in production yet.Verified: the server run from source with a temp home and
CODEWORK_CHANNEL=localannounces ready and createsdesktop/local/app.dbwith its 16 tables;apps/serverschema, health and desk tests;vp check;vp run typecheck. Not run: the Electron app and a packaged build.🤖 Generated with Claude Code
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.