Repository navigation
Give a dev run its own data folder - #226
Merged
Merged
Conversation
An unpackaged run without DASH_USER_DATA_DIR now uses <appData>/Dash-dev
instead of the installed app's Dash folder, so it no longer shares app.db,
the control port and token files or the single-instance lock, and outside
dashctl calls keep reaching the installed app. DASH_USER_DATA_DIR still wins.
dashctl version now answers {"version": ..., "packaged": ...}.
Fixes #210
Claude goes brr.. via Dash
A plain copy while Dash runs can miss writes still in app.db-wal. Claude goes brr.. via Dash
Claude goes brr.. via Dash
With its own Dash-dev folder a fresh dev run wrote enabled: true, so dev copies sent usage statistics. A new config now defaults to app.isPackaged. Claude goes brr.. via Dash
packaged already says it is a dev run, so the version drops its (dev) suffix and stays parseable. version and packaged travel as one BuildInfo. Claude goes brr.. via Dash
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 was wrong
A dev run without
DASH_USER_DATA_DIRused the installed app's userData (~/Library/Application Support/Dash/). It sharedapp.db, the control port and token files and the single-instance lock, so every outsidedashctlcall went to the dev build without saying so. The version half of the issue was fixed in 23fb283.What changed
src/main/userDataDir.ts: a small pure function picks the folder.DASH_USER_DATA_DIRwins. Otherwise an unpackaged run gets<appData>/Dash-dev, and a packaged one keeps Electron's default.entry.tsapplies it before anything reads userData.dashctl versionnow prints JSON,{"version":"0.22.0","packaged":true}, like the other commands. A dev run says"packaged":false.Dash-dev/and starts with an empty DB (copyapp.dbover for real data).DASH_USER_DATA_DIRplusDASH_DEV_URLare only for an extra instance.The hook-port path, the dashctl script and the control files all come from
app.getPath('userData'), so they follow the new folder. Nothing else hard-codesApplication Support/Dash.Verification
pnpm type-checkandpnpm lintpass (0 errors).pnpm test: 1719 passed, 3 skipped. That includes new tests foruserDataDirand updateddashctl versiontests.Fixes #210
🤖 Generated with Claude Code