Skip to content

sessions: improve comparison picker behavior and shortcut discovery - #342682

Merged
Megan Rogge (meganrogge) merged 7 commits into
microsoft:mainfrom
meganrogge:fix/comparison-picker-review-findings
Oct 19, 2026
Merged

Megan Rogge (meganrogge) merged 7 commits into
microsoft:mainfrom
meganrogge:fix/comparison-picker-review-findings

Conversation

@meganrogge

@meganrogge Megan Rogge (meganrogge) commented Oct 19, 2026 •

Copy link
Copy Markdown
Collaborator

Fixes the model-comparison picker regressions and discovery gaps identified after #342656 merged.

Changes

  • key comparison groups by stable section ID so folderless Chats do not collide with a workspace named Chats
  • invalidate pending single-model selections when comparison setup opens through either the picker toggle or command path
  • keep the Compare Models shortcut active when the new-session chat input/composer is focused and when an eligible model picker is focused
  • scope picker shortcut context keys independently of the optional discovery footer and active comparison step
  • show the service-resolved Compare Models shortcut in every discovery hover instead of hard-coding a platform label:
    • the optional Send Query to Multiple Models footer hint
    • the model-picker Compare Models tab action
    • the model picker shown beside the chat input
  • render the optional footer hint without a leading add icon
  • preserve clean labels when the command is unbound
  • enable automatic experimentation for sessions.chat.compareAgents.showPickerHint

Tests cover the same-named workspace collision, both pending-save comparison entry paths, input/composer/picker shortcut contexts, picker focus with the optional hint disabled, resolved shortcut labels, the icon-free footer, and unbound hover fallbacks.

Validation

  • npm run build-fast -- --client-only
  • npm run typecheck-client
  • targeted ESLint for all changed files
  • ./scripts/test.sh --run src/vs/platform/actionWidget/test/browser/tabbedActionListWidget.test.ts
  • ./scripts/test.sh --run src/vs/sessions/contrib/sessions/test/browser/sessionsList.test.ts
  • ./scripts/test.sh --run src/vs/workbench/contrib/chat/test/browser/widget/input/modelPicker/modelPickerTabbedWidget.test.ts
  • ./scripts/test.sh --run src/vs/workbench/contrib/chat/test/browser/widget/input/modelPicker/modelPickerActionItem.test.ts
  • ./scripts/test.sh --run src/vs/sessions/contrib/chat/test/browser/modelPicker.test.ts

Keep folderless comparisons separate from same-named workspaces, invalidate pending model selections when comparison setup opens through the command, and scope comparison shortcuts to the picker popup lifetime.

Co-authored-by: Copilot <[email protected]>

Copilot-Session: 5f2f1f6e-e1d6-4baa-a0ac-d60c48f5edd2
Copilot AI balanced review requested due to automatic review settings October 19, 2026 20:40
Include the resolved Compare Models keybinding in the tab action hover and reuse the same formatting for the optional discovery footer.

Co-authored-by: Copilot <[email protected]>

Copilot-Session: 5f2f1f6e-e1d6-4baa-a0ac-d60c48f5edd2

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

The command-entry regression test independently invalidates the pending save, masking the race it should detect.

1 open issue
What changed in this PR

Fixes model-comparison regressions following #342656 in the Agents window and shared model picker.

Changes:

  • Separates folderless comparisons from workspaces named Chats.
  • Invalidates pending single-model selections when comparison starts through a command.
  • Scopes shortcut contexts to eligible picker popups independently of the discovery hint.
File Description
src/​vs/​workbench/​contrib/​chat/​test/​browser/​widget/​input/​modelPicker/​modelPickerTabbedWidget.test.ts Adds command-entry and shortcut-context coverage.
src/​vs/​workbench/​contrib/​chat/​browser/​widget/​input/​modelPicker/​modelPickerTabbedWidget.ts Updates selection invalidation and popup contexts.
src/​vs/​sessions/​contrib/​sessions/​test/​browser/​sessionsList.test.ts Covers same-named Chats sections.
src/​vs/​sessions/​contrib/​sessions/​browser/​views/​sessionsList.ts Keys comparison groups by section ID.
src/​vs/​platform/​actionWidget/​browser/​tabbedActionListWidget.ts Adds a popup-lifetime behavior hook.

Review effort: Balanced

Co-authored-by: Copilot <[email protected]>

Copilot-Session: 5f2f1f6e-e1d6-4baa-a0ac-d60c48f5edd2
Co-authored-by: Copilot <[email protected]>

Copilot-Session: 5f2f1f6e-e1d6-4baa-a0ac-d60c48f5edd2
Co-authored-by: Copilot <[email protected]>

Copilot-Session: 5f2f1f6e-e1d6-4baa-a0ac-d60c48f5edd2
@meganrogge Megan Rogge (meganrogge) added this to the 1.144.0 milestone Oct 19, 2026
@meganrogge Megan Rogge (meganrogge) changed the title sessions: fix model comparison picker regressions sessions: fix comparison picker state and shortcut discovery Oct 19, 2026
@meganrogge
Megan Rogge (meganrogge) enabled auto-merge (squash) October 19, 2026 20:58
@meganrogge Megan Rogge (meganrogge) changed the title sessions: fix comparison picker state and shortcut discovery sessions: improve comparison picker behavior and shortcut discovery Oct 19, 2026
@meganrogge

Copy link
Copy Markdown
Collaborator Author

Trophy toggle icon follow-up: #342692

Co-authored-by: Copilot <[email protected]>

Copilot-Session: 5f2f1f6e-e1d6-4baa-a0ac-d60c48f5edd2
Co-authored-by: Copilot <[email protected]>

Copilot-Session: 5f2f1f6e-e1d6-4baa-a0ac-d60c48f5edd2
@meganrogge
Megan Rogge (meganrogge) merged commit d3e8d71 into microsoft:main Oct 19, 2026
49 checks passed
Benjamin Christopher Simmonds (benibenj) added a commit that referenced this pull request Oct 19, 2026
#342682 and #342706 both added the IDefaultAccountService import and stub to the Connector authorization test fixture, so main no longer compiles (duplicate identifier). Keep a single copy.

Co-authored-by: Copilot <[email protected]>
Vritant Bhardwaj (vritant24) added a commit that referenced this pull request Oct 19, 2026
This reverts commit c2f7817, matching #342725. The IDefaultAccountService import and service stub already existed from #342682, so main fails to compile with a duplicate identifier.

Co-authored-by: Copilot <[email protected]>
Benjamin Christopher Simmonds (benibenj) added a commit that referenced this pull request Oct 19, 2026
* sessions: extend sessions list drag and drop across placements

Resolve every session drop to a destination placement (Pinned, a custom group, an ungrouped section, or Archived) and apply only the archive, pin, and group changes that placement precedence needs. This lets sessions be dragged out of groups into date sections, unpinned, archived (with undo) and restored by dragging, placed at the top of a date section via its header, and moved to the end of the date sections by dropping below the last row. Nested chats can be reordered within their session through a new persisted, list-owned chat order, and dropping a session on a chat row places it after that chat's session.

Co-authored-by: Copilot <[email protected]>

* sessions: address drag and drop review feedback

Add keyboard Move Up/Move Down actions for nested chats that keep focus on the moved chat. Anchor drops below the last row in an earlier date section when the selection empties the last one, preserve the dragged sessions' display order, and only offer date section drops when date grouping will render the sessions in that section.

Co-authored-by: Copilot <[email protected]>

* agentHost: remove duplicate Connector test fixture from concurrent fixes

#342682 and #342706 both added the IDefaultAccountService import and stub to the Connector authorization test fixture, so main no longer compiles (duplicate identifier). Keep a single copy.

Co-authored-by: Copilot <[email protected]>

---------

Co-authored-by: Copilot <[email protected]>
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.

4 participants