Skip to content

sessions: hide disabled chat input pickers#307494

Merged
hawkticehurst merged 1 commit intomainfrom
copilot/sound-yak
Apr 2, 2026
Merged

sessions: hide disabled chat input pickers#307494
hawkticehurst merged 1 commit intomainfrom
copilot/sound-yak

Conversation

@hawkticehurst
Copy link
Copy Markdown
Member

Fixes #306455.

Summary

  • hide disabled picker controls in the sessions app new/active chat UI
  • stop contributing the worktree and branch repository-config pickers outside the new-session state
  • add focused coverage for hiding the session-type picker when only one choice is available

Notes for reviewers

An intentional decision was made to keep this fix scoped to the sessions app rather than changing shared lower-level workbench chat widgets.

In particular, the remaining active-session dropdowns rendered through the shared chat-sessionPicker-container are hidden in the sessions app with scoped CSS (display: none) under src/vs/sessions/browser/media/style.css.

That was done deliberately to avoid reaching down into lower-level shared widget infrastructure for a sessions-specific UI issue.

Validation

  • npm run compile-check-ts-native
  • npm run valid-layers-check
  • hygiene on touched sessions files

Hide disabled/new-session-only pickers in the sessions app instead of changing shared chat widgets. This keeps the fix scoped to sessions and intentionally uses CSS display:none for the shared active-session option-group dropdowns to avoid reaching down into lower-level workbench picker infrastructure.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings April 2, 2026 19:27
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 addresses a sessions-app-specific UX issue by hiding chat input picker controls when they’re disabled/unavailable, and by limiting certain repository configuration pickers to the “new session” state.

Changes:

  • Update sessions pickers (mode/model/isolation/branch/session-type) to hide their slots when unavailable and remove them from keyboard navigation.
  • Restrict repository-config picker action contributions (worktree/isolation + branch) to IsNewChatSessionContext.
  • Add a focused browser test ensuring the session-type picker is hidden when only one session type is available, and add scoped Sessions CSS to hide shared workbench pickers in the active chat UI.

Reviewed changes

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

Show a summary per file
File Description
src/vs/sessions/contrib/copilotChatSessions/browser/modePicker.ts Hide the mode picker slot when only one mode is available; update tab focus/ARIA accordingly.
src/vs/sessions/contrib/copilotChatSessions/browser/modelPicker.ts Hide the cloud model picker slot when no models are available; update tab focus/ARIA accordingly.
src/vs/sessions/contrib/copilotChatSessions/browser/isolationPicker.ts Hide the isolation picker when not applicable (config disabled or no git repo); update tab focus/ARIA accordingly.
src/vs/sessions/contrib/copilotChatSessions/browser/branchPicker.ts Hide the branch picker while loading or when not applicable; update tab focus/ARIA accordingly.
src/vs/sessions/contrib/copilotChatSessions/browser/copilotChatSessionsActions.ts Gate isolation/branch picker contributions behind IsNewChatSessionContext to avoid showing them outside new-session state.
src/vs/sessions/contrib/chat/browser/sessionTypePicker.ts Hide the session-type picker when only one session type is available; update tab focus/ARIA accordingly.
src/vs/sessions/contrib/chat/test/browser/sessionTypePicker.test.ts Add coverage for hiding/showing the session-type picker based on available session types.
src/vs/sessions/browser/media/style.css Add scoped Sessions CSS to hide shared workbench chat session pickers in the sessions app active chat UI.

Copy link
Copy Markdown
Collaborator

@justschen justschen left a comment

Choose a reason for hiding this comment

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

i think this looks good, thanks!

@hawkticehurst hawkticehurst merged commit c2f1a6e into main Apr 2, 2026
23 checks passed
@hawkticehurst hawkticehurst deleted the copilot/sound-yak branch April 2, 2026 21:29
@vs-code-engineering vs-code-engineering bot added this to the 1.115.0 milestone Apr 2, 2026
@sandy081
Copy link
Copy Markdown
Member

sandy081 commented Apr 7, 2026

@hawkticehurst What is the reason behind hiding branch and worktree pickers while loading? I do not see an associated issue asking for it. It seems this caused pickers to jump while changing folders.

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.
@hawkticehurst
Copy link
Copy Markdown
Member Author

hawkticehurst commented Apr 7, 2026

What is the reason behind hiding branch and worktree pickers while loading? I do not see an associated issue asking for it. It seems this caused pickers to jump while changing folders.

Ah yes, the linked issue should have been updated. After some offline discussion I clarified that the actually ask here was to hide any disabled dropdowns across new chat and active chat session views (and then make them visible again once they are enabled).

The only exception to this rule is when you toggle the Worktree/Workspace picker in new chat view the git branch picker to right of it should just become disabled/enabled but not hidden because it looks / feels very off to have the pickers jumping around as one of them disappears and reappears.

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.

Sessions: Do not show the session type picker as disabled

5 participants