Skip to content

feat(desktop): optional directory for the desktop app's own files - #3

Open
colonelpanic8 wants to merge 1 commit into
t3code/main/desktop-window-statefrom
t3code/main/desktop-client-location
Open

colonelpanic8 wants to merge 1 commit into
t3code/main/desktop-window-statefrom
t3code/main/desktop-client-location

Conversation

@colonelpanic8

Copy link
Copy Markdown
Owner

Stacked on #2. Implements step 2 of pingdotgg#19591.

Problem

The desktop app keeps its own files in the server's state directory (<T3 home>/userdata), even when it only connects to remote environments. There is no way to put them somewhere else without moving the server's files too.

Change

--client-dir=<path> or T3CODE_CLIENT_DIR picks a directory for the desktop app's own files:

The flag wins over the environment variable. ~ and relative paths are expanded. With neither set, every path is the same as before. Nothing is migrated automatically.

One resolver, resolveDesktopClientPaths in apps/desktop/src/app/DesktopStatePaths.ts, is used both before Electron is ready and after. The early read of desktop-settings.json, which selects the Linux password store, cannot disagree with the settings service.

Not moved by this PR: the server's files, Electron's profile and caches, CLI installation artifacts, and clerk-tokens.json. The docs say so.

If --client-dir is passed with a space instead of =, Chromium gives it an empty value. The app logs a warning and uses the default location.

Verification

  • With T3CODE_HOME and T3CODE_CLIENT_DIR pointing at different temp roots, the real settings, window-state, and catalog stores write only to the client dir, and the server home stays empty. The early password-store read uses the same desktop-settings.json.
  • Literal-path tests cover flag over env, ~ expansion, relative paths, and the unset case.
  • vp test run src/app src/window src/settings passes, 307 tests. tsc-rs --noEmit, vp lint, and vp fmt --check pass for apps/desktop.
  • Not checked by launching Electron.

🤖 Generated with Claude Code

@github-actions github-actions Bot added vouch:trusted Author is trusted by repo permissions or the VOUCHED list. size:L labels Oct 14, 2026
@colonelpanic8
colonelpanic8 force-pushed the t3code/main/desktop-client-location branch from 45e1e62 to e1023f8 Compare October 14, 2026 22:43
@colonelpanic8
colonelpanic8 force-pushed the t3code/main/desktop-window-state branch from 37bf6c8 to e50ec6d Compare October 16, 2026 17:45
@colonelpanic8
colonelpanic8 force-pushed the t3code/main/desktop-client-location branch from e1023f8 to a333335 Compare October 16, 2026 17:45
@colonelpanic8
colonelpanic8 force-pushed the t3code/main/desktop-window-state branch from e50ec6d to b883fa9 Compare October 18, 2026 17:16
@colonelpanic8
colonelpanic8 force-pushed the t3code/main/desktop-client-location branch from a333335 to b735eb1 Compare October 18, 2026 17:16
@colonelpanic8
colonelpanic8 force-pushed the t3code/main/desktop-window-state branch from b883fa9 to a690378 Compare October 19, 2026 03:14
@colonelpanic8
colonelpanic8 force-pushed the t3code/main/desktop-client-location branch from b735eb1 to 70d8455 Compare October 19, 2026 03:14
@colonelpanic8
colonelpanic8 force-pushed the t3code/main/desktop-window-state branch from a690378 to 984a34f Compare October 20, 2026 19:07
@colonelpanic8
colonelpanic8 force-pushed the t3code/main/desktop-client-location branch from 70d8455 to 8ee8c74 Compare October 20, 2026 19:07
@github-actions github-actions Bot added size:XXL and removed size:L labels Oct 21, 2026
@colonelpanic8
colonelpanic8 force-pushed the t3code/main/desktop-client-location branch from 4b93200 to 4e14a4d Compare October 26, 2026 04:03
@colonelpanic8
colonelpanic8 force-pushed the t3code/main/desktop-window-state branch from a98e25c to e792e49 Compare October 26, 2026 20:31
@colonelpanic8
colonelpanic8 force-pushed the t3code/main/desktop-client-location branch from 4e14a4d to fa5b5b2 Compare October 26, 2026 20:31
@github-actions github-actions Bot added size:L and removed size:XXL labels Oct 26, 2026
@github-actions

github-actions Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Thread transfer impact

⚠️ The latest CI run did not produce a thread transfer result for 25bc5c9.

This comment will update automatically after the next completed run.

@github-actions github-actions Bot added size:XXL and removed size:L labels Nov 1, 2026
@colonelpanic8
colonelpanic8 force-pushed the t3code/main/desktop-window-state branch from b6b8afc to 69632cc Compare November 7, 2026 20:43
@colonelpanic8
colonelpanic8 force-pushed the t3code/main/desktop-client-location branch from 095c1ef to d97b241 Compare November 7, 2026 20:43
@github-actions github-actions Bot added size:L and removed size:XXL labels Nov 7, 2026
@colonelpanic8
colonelpanic8 force-pushed the t3code/main/desktop-client-location branch from 9c5bdcc to d89e564 Compare November 22, 2026 21:38
@colonelpanic8
colonelpanic8 force-pushed the t3code/main/desktop-window-state branch 2 times, most recently from 84ce464 to f8b33e5 Compare November 22, 2026 22:04
@colonelpanic8
colonelpanic8 force-pushed the t3code/main/desktop-client-location branch from d89e564 to e475a7c Compare November 22, 2026 22:04
@colonelpanic8
colonelpanic8 force-pushed the t3code/main/desktop-window-state branch from f8b33e5 to 5f4d6d9 Compare November 25, 2026 01:38
@colonelpanic8
colonelpanic8 force-pushed the t3code/main/desktop-client-location branch from e475a7c to 25bc5c9 Compare November 25, 2026 01:38
Original topic head: 9c5bdcc
feat(desktop): optional directory for the desktop client's own files
fix(desktop): expand ~ and resolve relative client directories
fix(desktop): restore scale from the selected client storage directory
@colonelpanic8
colonelpanic8 force-pushed the t3code/main/desktop-window-state branch from 5f4d6d9 to 274a222 Compare November 30, 2026 06:12
@colonelpanic8
colonelpanic8 force-pushed the t3code/main/desktop-client-location branch from 25bc5c9 to c9ac114 Compare November 30, 2026 06:12

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L vouch:trusted Author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant