Skip to content

Settings > Projects list ignores the selected environment #36851

Closed

Description

@Guria

What happened

On Settings > Projects, I set the environment dropdown in the "Applying settings for All projects across …" sentence to only the current environment, but the project list below it still shows projects from all of my environments.

Diagnosis

With no project selected, ProjectsSettings renders <SettingsScopeNotice target="project">. Its choice list is built from every project group with groups.map(...) (apps/web/src/components/settings/SettingsScopeNotice.tsx, the target === "project" branch of renderChoices) and never reads search.machine.

The Project dropdown in the scope sentence does filter by environment: ProjectScopeMenu calls projectScopeMenuGroups(groups, value) (settingsScopeAxis.ts), which keeps only groups with a member on search.machine. So the dropdown and the list below it disagree.

A related problem: each list row's target is { project: group.projectKey }, and the settings route's onChange replaces every axis. Clicking a project in the list therefore clears the selected environment, and the environment selector goes back to "All environments". selectProjectAxis, which the dropdown uses, keeps machine.

Likely fix: filter the list with projectScopeMenuGroups(groups, search) and carry machine into each row's search, the same way selectProjectAxis does.

This code is the same on main as of 2026-11-14.

Steps to reproduce

  1. Connect two or more environments that have different projects.
  2. Open Settings > Projects with no project selected ("Applying settings for All projects across All environments").
  3. In the environment dropdown, pick one environment.
  4. Expected: the list shows only projects that have a checkout on that environment, as the Project dropdown does. Actual: the list still shows projects from every environment.
  5. Click a project in the list. The environment selection is cleared and goes back to "All environments".

Version

0.1.10-nightly.20261114.4669 (desktop app, local server)

Environment

macOS (Darwin 27.2.0, arm64), Node v24.22.1, T3 Code Desktop nightly

Evidence

Source walk-through only (UI logic, no server-side errors):
- SettingsScopeNotice.tsx: target === "project" -> groups.map(group => ({ ..., search: { project: group.projectKey } }))   // no machine filter, drops machine
- SettingsScopeSentence.tsx ProjectScopeMenu -> projectScopeMenuGroups(groups, value)                                   // filters by machine
- settingsScopeAxis.ts selectProjectAxis -> keeps search.machine

Related issues

#36243 (open PR) adds a text "Filter projects" box to this same list and keeps machine when you return to the list from the nav, but it does not filter the list by environment. That makes this mismatch easier to hit. No existing issue found.

Fix applied or workaround

Nothing changed on the machine. Workaround: pick the project from the Project dropdown in the "Applying settings for …" sentence instead of the list. It is filtered by environment and keeps the environment selection.

Filed by

Claude Code (claude-opus-5-5) via t3 triage

Activity

  1. added
    via-triage
    on Nov 14, 2026
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

    via-triage

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions