Skip to content

[Bug]: Adding a project clears the sidebar project filter #18176

Closed

Description

@himanushi

Operating system: macOS

Short summary

With the left-sidebar project filter active (a subset of projects selected under the sidebar filter), adding a project via Add Project → Browse folder clears the filter entirely, so the projects the user had selected are no longer filtered.

How can we reproduce it?

  1. Have 3+ projects in Orca.
  2. Open the sidebar filter and select only one or two projects.
  3. Click Add Project, choose Browse folder, pick a local git repository (or a non-git folder).
  4. Observe the sidebar after the new project opens.

Expected behavior

The previously selected projects stay selected, and the new project is added to the selection so it is visible.

Actual behavior

The project filter is reset to "all projects". The user's selection is lost every time a project is added, and the reset is persisted.

Where it happens

  • src/renderer/src/lib/worktree-activation.ts step 5 of activateAndRevealWorktree calls setFilterRepoIds([]) whenever the target repo is not in the filter.
  • src/renderer/src/components/sidebar/add-repo-skip-finalization.ts does the same in finalizeImportedRepoAfterSkip.
  • Both the git-repo add path and the non-git folder add path (addNonGitFolder → activateAndRevealWorktree) go through these.

Activity

  1. self-assigned this
    on Sep 3, 2026
  2. AmethystLiang commented on Sep 3, 2026

    @AmethystLiang
    Contributor

    thanks for reporting. looking into it

  3. added
    bug
    os:macos
    on Sep 19, 2026
  4. added theissue type on Sep 19, 2026
  5. nwparker commented on Oct 22, 2026

    @nwparker
    Contributor

    Verified against current main: adding a project now preserves the selected project filter and appends the new project, so the existing selection is retained and the new project is visible.

    Both reported reset paths now reuse revealRepoInProjectFilter: normal workspace activation and finalizeImportedRepoAfterSkip. The helper appends the missing repo ID, leaves an unfiltered view unfiltered, and avoids duplicates. I also traced the Browse folder/default-checkout and non-git folder handoffs through these paths.

    Validation: 61 existing tests passed across 7 suites, covering filter preservation during activation, import/Skip, default-checkout handoff, and git/non-git folder dialog routing. The relevant production files match origin/main. This audit used source and regression tests; no new desktop reproduction is claimed.

    Closing as completed.

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

Metadata

Metadata

Assignees

Labels

bugos:macos

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions