Skip to content

Repository filter header is unclickable when only 1 grouped repo exists #4947

@eamodio

Description

@eamodio

When gitlens.views.collapseWorktreesWhenPossible is enabled and there's only 1 grouped repository, clicking on the repository filter header node does nothing, even though the UI displays "click to change" when a filter is active.

This affects the Branches, Worktrees, Tags, Remotes, Stashes, and Contributors views.

Impact

Users with an active repository filter cannot clear or modify it when worktree collapsing results in only 1 visible repository group. This creates a confusing UX where the UI promises clickability but the action fails silently.

Validation

  1. Enable gitlens.views.collapseWorktreesWhenPossible setting
  2. Open a repository that has worktrees (all under the same parent repo)
  3. Apply a repository filter to one of the worktrees
  4. Observe the header shows "RepoName — click to change"
  5. Click the header and confirm the repository picker opens
  6. Verify the filter can be cleared or modified

Risk

Low - this is a read-only fix that relaxes early-return conditions. No changes to filtering logic itself.

Metadata

Metadata

Assignees

Labels

area-viewsIssues or features related to (tree) viewsarea-worktreesIssues or features related to worktreesbugverified ✔Verified

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions