Skip to content

feat(model-picker): port upstream redesign with favorites and search#47

Merged
tyulyukov merged 2 commits into
mainfrom
marcode/port-t3-model-picker
Apr 20, 2026
Merged

feat(model-picker): port upstream redesign with favorites and search#47
tyulyukov merged 2 commits into
mainfrom
marcode/port-t3-model-picker

Conversation

@tyulyukov
Copy link
Copy Markdown
Owner

Summary

  • New model picker UI with dedicated sidebar, search functionality, and visual redesign
  • Favorites support added to settings for saving preferred models
  • Keybindings for model picker toggle (mod+shift+m) and jump keys (mod+1–9)
  • Shortcut modifier state tracking to properly detect Ctrl/Meta key states for jump commands
  • Composer todo list panel extracted into dedicated component with showTodosInComposer setting
  • Simplified Claude adapter by removing redundant TodoWrite plan step extraction
  • Updated keybindings system to support contextual when conditions (e.g., modelPickerOpen)
  • Icon utilities for provider-specific icon rendering and styling

Testing

  • Added integration tests in ChatView.browser.tsx for model picker toggle and jump key behavior
  • Added tests in shortcutModifierState.test.ts (146 lines) validating modifier key tracking
  • Added tests in modelPickerSearch.test.ts (109 lines) for search filtering logic
  • Updated keybinding tests in keybindings.test.ts to verify new model picker commands
  • Updated persistent settings snapshot in clientPersistence.test.ts with new fields (favorites, showTodosInComposer)
  • Verified /model slash command opens picker and focuses search input
  • Verified keybindings apply correctly with when conditions
  • Verified plan sidebar auto-open behavior removed (no regression from plan flow)

…arch

Port T3 Code upstream commit 66c326b ("Redesign model picker with
favorites and search (pingdotgg#2153)") to MarCode. Replaces the nested Menu
dropdown with a Popover composed of a vertical provider sidebar and
content pane with tokenized fuzzy search, favorites, and keyboard-jump
shortcuts 1-9 (held under the modifier key).

MarCode-specific preservations:
- Claude brand orange (text-[#d97757]) tint on the trigger and sidebar
  icons.
- PROVIDER_OPTIONS keeps claudeAgent first; opencode and cursor remain
  non-selectable "Coming soon" sidebar entries via the new
  pickerSidebarBadge field. AVAILABLE_PROVIDER_OPTIONS filters them out
  of the selectable list; the sidebar still renders them with
  Clock3Icon + tooltip.
- /model slash-command now opens the new picker instead of inserting
  text.
- modelPicker.toggle keybinding clicks the picker trigger via the
  data-chat-provider-model-picker attribute.
- keybindings + terminalOpen props forwarded so jump labels (\u22c31-\u22c39)
  render immediately when the modifier is held.
- @marcode/contracts import path (upstream used @t3tools/contracts).
- Opencode runtime stays deleted (kept coming-soon only in UI).

Regression guards (service.notification-wiring, windowState.integration)
remain green.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
…-picker

# Conflicts:
#	apps/web/src/localApi.test.ts
@tyulyukov tyulyukov merged commit 26c242c into main Apr 20, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants