Skip to content

sessions: disable branch picker in folder mode#307692

Merged
hawkticehurst merged 2 commits intomainfrom
copilot/curious-boa
Apr 3, 2026
Merged

sessions: disable branch picker in folder mode#307692
hawkticehurst merged 2 commits intomainfrom
copilot/curious-boa

Conversation

@hawkticehurst
Copy link
Copy Markdown
Member

Summary

  • keep the new chat branch picker visible when isolation mode switches from Worktree to Folder
  • disable the branch picker instead of hiding it, and re-enable it when switching back to Worktree
  • keep the disabled picker cursor consistent on hover and add regression coverage for the folder/worktree toggle

Validation

  • npm run compile-check-ts-native
  • npm run valid-layers-check
  • node --experimental-strip-types build/hygiene.ts src/vs/sessions/contrib/copilotChatSessions/browser/branchPicker.ts src/vs/sessions/contrib/copilotChatSessions/test/browser/branchPicker.test.ts src/vs/sessions/contrib/chat/browser/media/chatWelcomePart.css

Notes

  • This stays local to the sessions branch picker behavior and does not change the shared logic that hides other disabled chat input pickers.

Keep the new chat branch picker visible when isolation switches to Folder, but disable it until Worktree is selected again. Also add regression coverage for the folder/worktree toggle and keep the disabled picker cursor consistent on hover.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings April 3, 2026 19:05
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the sessions Copilot Chat branch picker so that when isolation mode switches from Worktree to Folder it remains visible but disabled (instead of being hidden), and becomes interactive again when switching back to Worktree. It also tweaks the disabled hover cursor styling and adds regression tests to cover the folder/worktree toggle behavior.

Changes:

  • Update BranchPicker visibility/disabled logic to keep the UI visible in folder mode while preventing interaction.
  • Add browser tests validating disabled/enabled behavior across isolation mode toggles.
  • Adjust CSS so the disabled picker cursor remains default on hover.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
src/vs/sessions/contrib/copilotChatSessions/browser/branchPicker.ts Keeps the picker visible when isolation mode is workspace, but disables interaction and focus appropriately.
src/vs/sessions/contrib/copilotChatSessions/test/browser/branchPicker.test.ts Adds regression coverage for disabled state in folder mode and re-enable behavior when switching back to worktree mode.
src/vs/sessions/contrib/chat/browser/media/chatWelcomePart.css Ensures disabled picker hover keeps a consistent cursor: default.

Keep the branch picker behavior change, but drop the extra disabled hover cursor styling so the PR only contains the intended picker visibility/disabled-state update.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@hawkticehurst hawkticehurst merged commit b9d09e3 into main Apr 3, 2026
19 checks passed
@hawkticehurst hawkticehurst deleted the copilot/curious-boa branch April 3, 2026 20:01
@vs-code-engineering vs-code-engineering bot added this to the 1.115.0 milestone Apr 3, 2026
sandy081 added a commit that referenced this pull request Apr 7, 2026
sandy081 added a commit that referenced this pull request Apr 7, 2026
* Revert "sessions: disable branch picker in folder mode (#307692)"

This reverts commit b9d09e3.

* Revert "sessions: hide disabled chat input pickers (#307494)"

This reverts commit c2f1a6e.
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.

3 participants