镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

[Bug]: "Add project starts in" saved on the All environments scope copies one machine's path to every machine #35115

Open

Description

@ishanavasthi

Before submitting

  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.

Area

apps/web

Steps to reproduce

  1. Connect a macOS desktop app to a remote Linux environment, so Settings has two environments.
  2. Open Settings → New projects and leave the scope selector on its default, All environments.
  3. Set Add project starts in to a Mac folder, e.g. /Users/me/code/.
  4. Open Add Project and choose the Linux environment.

Expected behavior

The Linux environment's picker opens in a folder that exists on Linux. That could be its own value or ~/. A path that only exists on another machine shouldn't reach the Linux server.

Actual behavior

The Linux picker opens at /Users/me/code/, which doesn't exist there. You have to clear the field back to / and browse down to your projects every time.

The Linux server's own ~/.t3/userdata/settings.json now contains "addProjectBaseDirectory": "/Users/me/code/". Fixing it for one machine takes knowing to switch the settings scope to that environment first. Nothing on the default scope suggests this setting is per-machine.

Impact

Minor bug or occasional failure

Version or commit

macOS desktop 0.1.10-nightly.20261112.4564, remote Linux environment on the same version. Code references are from main @ ee90bdc.

Environment

macOS desktop app plus a remote Ubuntu server environment.

Diagnosis

This is a follow-up to #11756, which was closed after per-environment scope selection was added in #10589. Per-environment values work, but the default scope still writes one filesystem path to every machine:

  • With no machine selected, the settings scope resolves to kind: "all" with every environment id (settingsScope.ts#L144-L149).
  • The field commits with updateSettings({ addProjectBaseDirectory: next }) (SettingsPanels.tsx#L1751), and planScopedSettingsPatch sends it to every connected environment in that scope (scopedSettings.ts#L220-L232).
  • The picker uses the stored value as-is and only falls back to ~/ when it's empty, not when the directory is missing on that machine (CommandPalette.tsx#L671-L679). AddProjectToMachineDialog.tsx#L115 does the same.

Possible fixes, any of which would help:

  • Treat machine-specific path settings (addProjectBaseDirectory, and likely newProjectsRoot) as per-environment only. On the All environments scope, show the field read-only or ask which environment to set.
  • Before saving a path to an environment, check it exists there, or warn when it doesn't.
  • In the Add Project picker, fall back to ~/ when the configured directory doesn't exist on the target environment.

Workaround

In Settings, switch the scope selector to the remote environment and set Add project starts in there.

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