Repository navigation
feat(server): optional server config, data, and cache locations - #4
Open
colonelpanic8 wants to merge 10000 commits into
Open
colonelpanic8 wants to merge 10000 commits into
colonelpanic8 wants to merge 10000 commits into
Conversation
colonelpanic8
force-pushed
the
t3code/main/server-location-overrides
branch
from
October 16, 2026 17:45
f46b681 to
458c353
Compare
colonelpanic8
force-pushed
the
t3code/main/server-location-overrides
branch
4 times, most recently
from
October 23, 2026 17:49
e22662f to
c9de20d
Compare
colonelpanic8
force-pushed
the
t3code/main/server-location-overrides
branch
2 times, most recently
from
October 28, 2026 13:09
395c0ba to
2018598
Compare
Thread transfer impact
This comment will update automatically after the next completed run. |
colonelpanic8
force-pushed
the
t3code/main/server-location-overrides
branch
4 times, most recently
from
November 23, 2026 03:26
5e0640d to
ce02c08
Compare
colonelpanic8
force-pushed
the
t3code/main/server-location-overrides
branch
4 times, most recently
from
December 1, 2026 02:05
321bc0e to
50660c4
Compare
…ization labels (pingdotgg#46497) Co-authored-by: Julius Marminge <[email protected]>
…ed http (pingdotgg#46502) Co-authored-by: SAPHID <[email protected]> Co-authored-by: Julius Marminge <[email protected]>
…ingdotgg#46501) Co-authored-by: SAPHID <[email protected]> Co-authored-by: Julius Marminge <[email protected]>
…ing or trailing spaces (pingdotgg#46500) Co-authored-by: SAPHID <[email protected]> Co-authored-by: Julius Marminge <[email protected]>
…46505) Co-authored-by: Julius Marminge <[email protected]>
…Display P3 (pingdotgg#46507) Co-authored-by: SAPHID <[email protected]> Co-authored-by: Julius Marminge <[email protected]>
…otgg#46506) Co-authored-by: Julius Marminge <[email protected]>
…poser (pingdotgg#46513) Co-authored-by: Julius Marminge <[email protected]>
…rget is edited (pingdotgg#46521) Co-authored-by: Julius Marminge <[email protected]>
…ingdotgg#46905) Co-authored-by: Claude Opus 5.5 <[email protected]>
… when opened from the keyboard (pingdotgg#46974) Co-authored-by: Julius Marminge <[email protected]>
…ingdotgg#46962) Co-authored-by: Julius Marminge <[email protected]>
…d a tab out of the footnotes (pingdotgg#46987) Co-authored-by: Julius Marminge <[email protected]>
…tgg#46972) Co-authored-by: Julius Marminge <[email protected]>
…pingdotgg#46993) Co-authored-by: Julius Marminge <[email protected]>
…re (pingdotgg#46975) Co-authored-by: Julius Marminge <[email protected]>
…ialog is open (pingdotgg#47026) Co-authored-by: Julius Marminge <[email protected]>
…#47038) Co-authored-by: Julius Marminge <[email protected]>
…gg#47037) Co-authored-by: Julius Marminge <[email protected]>
…closes (pingdotgg#47034) Co-authored-by: Julius Marminge <[email protected]>
…7036) Co-authored-by: Julius Marminge <[email protected]>
…ingdotgg#47022) Co-authored-by: Julius Marminge <[email protected]>
…t scrolls (pingdotgg#47040) Co-authored-by: Julius Marminge <[email protected]>
…ingdotgg#46857) Co-authored-by: Claude Opus 5.5 <[email protected]>
…dotgg#47046) Co-authored-by: Julius Marminge <[email protected]>
… styles (pingdotgg#47053) Co-authored-by: Julius Marminge <[email protected]>
…json (pingdotgg#47044) Co-authored-by: Julius Marminge <[email protected]>
…ingdotgg#46901) Co-authored-by: Claude Opus 5.5 <[email protected]>
…gg#47013) Co-authored-by: Julius Marminge <[email protected]>
…oined emoji (pingdotgg#47027) Co-authored-by: Julius Marminge <[email protected]>
Original commit: 7fd3070 Includes the cumulative changes through these earlier commits: - 67ac8d2 feat(server): preserve server location overrides on current upstream - f8763e9 test(ssh): fake t3 writes its runtime record in the launch override test Includes compatibility fixes for the current upstream interfaces. Replayed onto upstream 8634955 from 5e0640d.
Upstream's new `t3 workflow` withdraw command (pingdotgg#42506) still spread the removed projectLocationFlags, so the CLI crashed at startup.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
colonelpanic8
force-pushed
the
t3code/main/server-location-overrides
branch
from
December 1, 2026 22:44
50660c4 to
6bb4411
Compare
This branch has not been deployed
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.
Implements step 1 of pingdotgg#19591.
Problem
T3CODE_HOME/--base-diris the only server location setting.<home>/userdataholdssettings.jsonandkeybindings.jsonnext to the database, secrets, logs, and attachments. Config can't be versioned or mounted apart from data, and the database can't move to another disk without taking config with it.Change
Three optional, independent overrides:
--server-config-dirT3CODE_SERVER_CONFIG_DIRsettings.json,keybindings.json,themes/--server-data-dirT3CODE_SERVER_DATA_DIRstatev2.sqlite, secrets, identities, attachments, logs, browser artifacts,server-runtime.json, and worktrees--server-cache-dirT3CODE_SERVER_CACHE_DIRt3 service,t3 update, andt3 uninstallnow ignoreVITE_DEV_SERVER_URL, so from apnpm devshell they put the service log under<home>/userdata/logs, where the service itself runs, instead of<home>/dev/logs.--base-dir/T3CODE_HOMEstays the fallback root and works with any subset of the overrides. One override never moves another category.deriveServerPathsreturnsconfigDir,dataDir, andcacheDir. One resolver,resolveServerLocationsinapps/server/src/cli/config.ts, servesserve,start,theme,trace,triage,auth,project, andconnect.pairbuilds paths for each server it discovers but uses the same override resolution, so readers and writers agree.Places where an ambient override must not apply:
pnpm dev(scripts/dev-runner.ts) drops the three variables when it picks a worktree home, so a dev server can't open the real database.--base-dir.t3 service,t3 update, andt3 uninstallignore them, because the service records onlyT3CODE_HOME. The systemd unit setsUnsetEnvironment=for the three variables and the launchd plist sets them to empty strings, so values imported into the user manager or set withlaunchctl setenvdon't reach the service.t3 connectskips the background-service offer when this command's locations differ from the service's and prints at3 serve --server-*-dir ...next step instead.t3 connect linkprints the same next step.Docs: a "Where the server keeps its files" section in
docs/user/install.md.Verification
apps/server/src/config.test.tscompares full literal path objects. It covers no overrides (implicit and explicit base dir, dev and userdata), each override alone, all three together, and base dir plus overrides.cli/config.test.tsruns the realresolveServerConfigon temp dirs.settings.jsonis read from the config override, the flag beats the env value, and SQLite createsstatev2.sqliteunder the data override.pair.test.tsruns the real CLI with--server-data-dir, mints a token into that database, and lists it.connect.test.tsasserts the literal next-step text fromt3 connectandt3 connect linkunder overrides.bootService.test.tschecks the rendered unit and plist.shwith a fake HOME, install config ignoring the overrides, and the session scanner's excluded directories.tsc-rs --noEmit,vp lint, andvp fmt --checkpass for the touched packages.t3 service install, desktop, WSL.🤖 Generated with Claude Code