[Bug]: "Add project starts in" is a per-environment path exposed as a global setting, so local and remote environments cannot differ
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 23k
- Forks
- 5.9k
- Avg merge
- 11h 14m
- Merged PRs (30d)
- 357
Description
Area
apps/desktop
Steps to reproduce
- Use T3 Code with more than one environment — for example a local macOS machine and a remote
Linux server added as a remote environment. - Open Settings → General → Projects & threads and set "Add project starts in" (the
setting stored asaddProjectBaseDirectory, labelled "Add project base directory" in the
source) to a directory that exists on one of those machines. - Switch to the other environment and open Add Project.
Expected behavior
The setting is a filesystem path, so it should be per-environment — each machine should be able to
have its own value, the way environmentIcon already does.
Actual behavior
There is a single value under General, which reads as an application-wide preference. A path
that is correct on one machine is meaningless on another:
macOS local machine /Users/<user>/Code
Linux server /srv/projects
No single string is right for both. Setting it for one environment makes it wrong for the other,
and leaving it empty falls back to ~/ — which on a headless server is often a service account's
home directory rather than anywhere projects belong.
Why this looks like an exposure bug rather than a design decision
addProjectBaseDirectory is declared in the same per-environment settings schema as
environmentIcon:
environmentIcon: Schema.optionalKey(Schema.NullOr(EnvironmentMachineKind)),
defaultThreadEnvMode: Schema.optionalKey(ThreadEnvMode),
newWorktreesStartFromOrigin: Schema.optionalKey(Schema.Boolean),
addProjectBaseDirectory: Schema.optionalKey(TrimmedString),
and the client reads it keyed by environment:
(b.find(t => t.environmentId === e)?.serverConfig?.settings ?? null)
?.addProjectBaseDirectory?.trim() ?? ``
So the storage and the read path are already per-environment. The difference is only where each is
surfaced in the UI:
environmentIcon apps/web/src/components/settings/ConnectionsSettings.tsx per-environment
addProjectBaseDirectory apps/web/src/components/settings/SettingsPanels.tsx General
environmentIcon can be set per environment today and is written to that environment's own
settings. This one cannot, despite being stored the same way — which suggests it is in the wrong
panel rather than intentionally global.
Suggested fix
Surface it per-environment, either by moving it beside the other per-environment settings or by
adding an environment selector to the Projects & threads group. The underlying storage appears to
need no change.
Additional: it is undocumented
addProjectBaseDirectory appears in packages/contracts/src/settings.ts, CommandPalette.tsx,
SettingsPanels.tsx, apps/mobile/.../AddProjectScreen.tsx and two test files, but the string
"base director" does not appear in any of the files under docs/user/. docs/user/source-control.md
says only "Choose a hosting provider or paste a Git URL, then choose where to save it", with no
mention that a default can be configured. Users looking for this setting cannot find it in the
manual, and at least one AI assistant invents a plausible-looking T3CODE_BASE_DIR environment
variable that does not exist in the binary.
Impact
Minor degradation or inconvenience
Version or commit
Server t3 serve 0.0.41-nightly.20260914.1707 (linux arm64), desktop app connected via T3 Connect.
Environment
macOS desktop app with a remote Linux environment over T3 Connect.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with apps/web/src/components/settings/ConnectionsSettings.tsx and SettingsPanels.tsx, then inspect packages/contracts/src/settings.ts and the existing tests for addProjectBaseDirectory. Compare how environmentIcon is surfaced and written, and verify that Add Project uses the value for the selected environment. Done means each environment can expose its own path without changing storage, with the setting documented in docs/user/.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- desktop, frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 78/100