sessions: hide disabled chat input pickers#307494
Conversation
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>
There was a problem hiding this comment.
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. |
justschen
left a comment
There was a problem hiding this comment.
i think this looks good, thanks!
|
@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. |
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. |
Fixes #306455.
Summary
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-containerare hidden in the sessions app with scoped CSS (display: none) undersrc/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-nativenpm run valid-layers-check