Skip to content

scm: remember worktree visibility across restarts#307887

Open
yogeshwaran-c wants to merge 1 commit intomicrosoft:mainfrom
yogeshwaran-c:fix/scm-remember-worktree-selection
Open

scm: remember worktree visibility across restarts#307887
yogeshwaran-c wants to merge 1 commit intomicrosoft:mainfrom
yogeshwaran-c:fix/scm-remember-worktree-selection

Conversation

@yogeshwaran-c
Copy link
Copy Markdown
Contributor

Summary

  • When a repository is discovered after the initial loading phase (5s debounce) has ended (e.g. git worktrees detected by git.detectWorktrees), the SCM view service was ignoring the persisted visibility state and making the repository visible by default
  • This forced users to re-hide any worktrees they had previously deselected on every restart
  • This change keeps consulting the persisted state for repositories added after loading finished: if the repository was explicitly hidden in the previous session, it stays hidden when it is re-discovered

Fixes #271554

Test plan

  • Open a workspace with a git repository and worktrees with git.detectWorktrees: true
  • Hide one or more worktrees via checkbox in the Source Control view
  • Restart VS Code
  • Verify the hidden worktrees remain hidden after restart
  • Verify the visible worktrees remain visible

Co-Authored-By: Claude Opus 4.6 (1M context) noreply@anthropic.com

When a repository is discovered after the initial loading phase has
ended (e.g. git worktrees detected by git.detectWorktrees), the SCM
view service was ignoring the persisted visibility state and making
the repository visible by default. This forced users to re-hide any
worktrees they had previously deselected on every restart.

This change keeps consulting the persisted state for repositories
added after loading finished: if the repository was explicitly
hidden in the previous session, it stays hidden when it is
re-discovered.

Fixes microsoft#271554

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@vs-code-engineering
Copy link
Copy Markdown
Contributor

📬 CODENOTIFY

The following users are being notified based on files changed in this PR:

@lszomoru

Matched files:

  • src/vs/workbench/contrib/scm/browser/scmViewService.ts

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remember the selection of selected worktrees under the Source Control: Changes panel

2 participants