Skip to content

[Bug]: "Add project starts in" is a per-environment path exposed as a global setting, so local and remote environments cannot differ #11756

Description

@christhomas

Area

apps/desktop

Steps to reproduce

  1. Use T3 Code with more than one environment — for example a local macOS machine and a remote
    Linux server added as a remote environment.
  2. Open Settings → General → Projects & threads and set "Add project starts in" (the
    setting stored as addProjectBaseDirectory, labelled "Add project base directory" in the
    source) to a directory that exists on one of those machines.
  3. 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.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions