Skip to content

[cherry-pick] chat: use trophy icon for model comparison toggle - #342755

Closed
vs-code-engineering[bot] wants to merge 1 commit into
release/1.143from
cherry-pick/342688
Closed

vs-code-engineering[bot] wants to merge 1 commit into
release/1.143from
cherry-pick/342688

Conversation

@vs-code-engineering

Copy link
Copy Markdown
Contributor

Cherry-pick of #342688 from main.

⚠️ This cherry-pick has merge conflicts that need manual resolution. Conflict markers (<<<<<<</=======/>>>>>>>) are committed to the branch — check it out locally, resolve, and force-push.

git fetch origin cherry-pick/342688 && git checkout cherry-pick/342688
# resolve conflicts, then:
git add -A && git commit --amend --no-edit && git push --force-with-lease

Conflicting files:

  • src/vs/workbench/contrib/chat/browser/widget/input/modelPicker/modelPickerTabbedWidget.ts
  • src/vs/workbench/contrib/chat/test/browser/widget/input/modelPicker/modelPickerTabbedWidget.test.ts

trophy.mov

Summary

  • Update @vscode/codicons from 0.0.46-44 to the published 0.0.46-46 prerelease in the root and web packages and lockfiles.
  • Register the trophy glyph (0xecf9) added in Add trophy icon with metadata vscode-codicons#539.
  • Replace the stacked/layers icon on the model picker's Compare Models toggle with the trophy. Keep the accessible label, tooltip, pressed-state behavior, and availability unchanged.
  • Give the enabled comparison toggle a distinct theme-aware fill and border, separate from hover. Reserve the border inside the existing control size so toggling does not shift layout.
  • Extend existing tests to verify the trophy, accessible pressed state, selected colors, and unchanged control dimensions when entering and leaving comparison setup.
  • Show a single trophy in the configured comparison's composer control instead of one provider icon per attempt. Retain model and variant names in the hover and accessible label across expanded, compact, and minimal layouts; restore the normal model label when comparison is reset.
  • Remove the unused per-attempt icon presentation contract and CSS.

Winner displays and metric badges are unchanged. The existing copy-codicons build task supplies the updated font; no custom font binary or release-infrastructure change is needed.

Validation

  • npm run build-fast -- --client-only — passed; client output refreshed and package font copied.
  • npm run typecheck-client — passed after removing an import made unused by the composer simplification.
  • npm run build-fast — passed after the styling update; client, built-in extensions, extension media, and Copilot outputs built for the live Agents window.
  • ./scripts/test.sh --run src/vs/workbench/contrib/chat/test/browser/widget/input/modelPicker/modelPickerTabbedWidget.test.ts — passed, 130 tests.
  • ./scripts/test.sh --reporter dot --run src/vs/workbench/contrib/chat/test/browser/widget/input/modelPicker/modelPickerActionItem.test.ts --run src/vs/workbench/contrib/chat/test/browser/widget/input/modelPicker/modelPickerTabbedWidget.test.ts --run src/vs/sessions/contrib/chat/test/browser/sessionComparisonModelSelection.test.ts — passed, 173 tests, including exact single-trophy rendering, variant accessibility/hover, layout modes, and comparison reset.
  • npm run eslint -- src/vs/workbench/contrib/chat/browser/widget/input/modelPicker/modelPickerWidget.ts src/vs/workbench/contrib/chat/browser/widget/input/modelPicker/modelPickerComparison.ts src/vs/sessions/contrib/chat/browser/sessionComparisonModelSelection.ts src/vs/workbench/contrib/chat/test/browser/widget/input/modelPicker/modelPickerActionItem.test.ts — passed; the test file was rechecked successfully after the final assertion update.
  • node build/hygiene.ts src/vs/workbench/contrib/chat/browser/widget/input/modelPicker/modelPickerWidget.ts src/vs/workbench/contrib/chat/browser/widget/input/modelPicker/modelPickerComparison.ts src/vs/sessions/contrib/chat/browser/sessionComparisonModelSelection.ts src/vs/workbench/contrib/chat/test/browser/widget/input/modelPicker/modelPickerActionItem.test.ts src/vs/workbench/contrib/chat/browser/widget/input/modelPicker/media/modelPicker.css — passed, 5 files.
  • npm run eslint -- src/vs/base/common/codiconsLibrary.ts src/vs/workbench/contrib/chat/browser/widget/input/modelPicker/modelPickerTabbedWidget.ts src/vs/workbench/contrib/chat/test/browser/widget/input/modelPicker/modelPickerTabbedWidget.test.ts — passed.
  • npm run eslint -- src/vs/workbench/contrib/chat/test/browser/widget/input/modelPicker/modelPickerTabbedWidget.test.ts — passed after the styling regression assertions were added.
  • npm run stylelint -- src/vs/workbench/contrib/chat/browser/widget/input/modelPicker/media/modelPicker.css — passed; reported 12 existing design-token suggestions outside the added rules.
  • node build/hygiene.ts src/vs/workbench/contrib/chat/browser/widget/input/modelPicker/media/modelPicker.css src/vs/workbench/contrib/chat/test/browser/widget/input/modelPicker/modelPickerTabbedWidget.test.ts — passed, 2 files.
  • git diff --check and git diff --cached --check — passed before commit.
  • A Node assertion probe verified root/web manifest and lockfile consistency, all generated icon registrations against the published package, the copied font's byte identity, and the compiled trophy codepoint. Existing alias ordering was preserved rather than introducing unrelated generated-file reorderings.
  • Visually checked the existing SingleModelPicker component fixture in dark, light, dark high-contrast, and light high-contrast themes. Activated the trophy toggle and verified comparison setup opens with the existing Compare Models accessible name and pressed state.
  • Launched the current build in an isolated, authenticated Agents window and visually inspected the selected trophy toggle. Verified its active fill and border persist without hover, aria-pressed is true, and the control remains 28 × 28.
  • Reloaded that Agents window with the composer fix and configured six distinct-model attempts. Visually verified exactly one trophy beside "Run 6 Attempts", all six model names retained in the accessible label, and clicking the trophy reopens comparison setup.

Integration/smoke tests and a live screen-reader session were not run locally. The four-theme fixture checks cover the trophy substitution; the final selected-state styling and six-attempt composer were visually checked in the live Agents window with the cloned profile's theme.

Manual Test

With model comparison enabled in the Agents window, open the new-session model picker. Confirm the trophy appears beside Search; activate it to enter comparison setup. Move the pointer away and confirm the selected fill and border remain visible. Activate it again to return to single-model selection; the selected treatment should disappear without changing the control's dimensions.

Configure multiple comparison attempts and finish setup. Confirm the composer displays exactly one trophy instead of multiple provider icons or a joined model-name label. Hover the trophy to inspect the configured models and click it to edit the comparison. The send action should still report the configured attempt count. Repeat with variants of the same model and a narrow composer.

Copilot AI balanced review requested due to automatic review settings October 20, 2026 00:10
@vs-code-engineering vs-code-engineering Bot added the cherry-pick-artifact Auto-generated cherry-pick PR label Oct 20, 2026

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

Committed conflict markers block compilation, and the incoming alternatives depend on APIs and fixtures unavailable on this branch.

2 open issues
What changed in this PR

Cherry-picks #342688’s trophy-based model comparison presentation into the target branch’s chat model picker.

Changes:

  • Introduces a conflicting tooltip alternative.
  • Adds comparison-toggle regression tests and upstream shortcut/discovery tests.
File Description
src/​vs/​workbench/​contrib/​chat/​test/​browser/​widget/​input/​modelPicker/​modelPickerTabbedWidget.test.ts Adds comparison tests within an unresolved conflict.
src/​vs/​workbench/​contrib/​chat/​browser/​widget/​input/​modelPicker/​modelPickerTabbedWidget.ts Contains conflicting tooltip implementations for the trophy toggle.

Review effort: Balanced

Comment on lines +745 to +749
<<<<<<< HEAD
tooltip: comparison.label,
=======
tooltip: this._labelWithKeybinding(comparison.label, comparison.startCommandId),
>>>>>>> 23794cfbb1f (chat: use trophy icon for model comparison toggle (#342688))
Comment on lines +783 to +784
<<<<<<< HEAD
=======

@alexdima Alexandru Dima (alexdima) left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

conflict markers

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

Labels

cherry-pick-artifact Auto-generated cherry-pick PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants