Model picker redesign: compact rows, catalog-driven short names#4067
Model picker redesign: compact rows, catalog-driven short names#4067SunkenInTime wants to merge 4 commits into
Conversation
…selection styling - Shorten display names in the picker (GPT-5.6-Sol -> 5.6 Sol, Claude Fable 5 -> Fable 5) via getModelPickerDisplayAlias, with unit tests - Hide the per-row provider line on single-provider tabs (the sidebar already shows the provider); keep it for search, favorites, and sub-provider models - Blue-tinted selected-row state, tighter row metrics (rounded-sm, text-sm) - Fix LegendList stale-row renders by passing all row-render inputs through extraData instead of only favoritesSet - Move the scrollbar styling class onto the actual LegendList scroll element; widen the scrollbar hit area with an inset pill thumb Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…talog Replaces the web-layer regex aliasing with catalog-driven shortName: - Claude built-in models get explicit shortName entries - Codex derives shortName at model-list parse time (toCodexShortName), so discovered GPT models render as e.g. "5.6 Sol" / "5.5" - Cursor/OpenCode/Grok models are intentionally left without shortName: their catalogs are dynamic multi-vendor lists - Display-name helpers extracted from providerIconUtils to modelDisplayNames.ts; the picker-only alias regexes are deleted - Picker rows always prefer shortName; extraData now carries filteredModelByKey and getModelDisabledReason so recycled rows cannot render stale disabled state Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Correctness/robustness: - Size the virtualized row estimate at 60 when any filtered model has a subProvider (those rows render the two-line layout even in single-provider tabs), preventing first-paint mis-measurement - Include toggleFavorite in LegendList extraData so recycled rows are invalidated by construction, not by favoritesSet changing in lockstep - Read the selected-row key from listExtraData.activeModelKey instead of recomputing it inline - Allow a fused version letter in toCodexShortName (GPT-4o -> "4o", GPT-4o-Mini -> "4o Mini") and cover the toDisplayName -> toCodexShortName chain with a parser-level test Dead code removal (pre-existing, surfaced by review): - Drop the getTriggerDisplayModelLabel pass-through alias and the never-true useTriggerLabel prop/branch in ModelListRow - Remove the unused providerAccentColor/instanceAccentColor plumbing - Collapse ProviderModelPicker's always-equal triggerLabel into triggerTitle Styling: - Model-picker scrollbar colors now track the theme border token via color-mix (dark-mode overrides removed), with a guarded scrollbar-width/scrollbar-color fallback so Firefox gets the shared thin treatment without disabling the WebKit inset pill Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
ApprovabilityVerdict: Approved UI polish and code reorganization: adds display short names to models, extracts display utilities to a dedicated file, and applies compact row styling. Changes are presentation-layer only with no runtime behavior impact; includes tests. You can customize Macroscope's approvability policy. Learn more. |
What Changed
Why
The picker repeated provider information that was already visible in the sidebar and displayed long catalog names that made the list harder to scan. Using provider-supplied short names and a more compact row layout makes model selection faster and clearer while preserving full names where they carry useful context.
Validation:
vp check,vp run typecheck, and the full web unit suite (1,283 tests) pass.UI Changes
Before
Video.Project.7.mp4
After
Video.Project.4.mp4
Checklist
Note
Low Risk
Mostly presentation and optional model metadata; no auth, routing, or generation logic changes.
Overview
Redesigns the model picker for faster scanning: tighter rows, clearer selected styling, and a theme-aware scrollbar. Provider footers are hidden on single-provider sidebar tabs but still show in favorites, search, and rows with a sub-provider (e.g. Bedrock).
Server: Built-in Claude models now expose
shortName(e.g.Fable 5); Codex catalog parsing derivesshortNamefrom display names viatoCodexShortName(e.g.5.4 Mini) without rewriting custom names.Web: Model label helpers move to
modelDisplayNames; the picker always prefers short names in the list and trigger.LegendListextraDatabundles selection, favorites, and search state so recycled rows stay in sync. Virtual row height adapts when provider lines are omitted.Reviewed by Cursor Bugbot for commit 9256971. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Redesign model picker with compact rows and catalog-driven short names
shortNamefields to built-in Claude models and derives them for Codex/GPT models via a newtoCodexShortNameutility, giving the picker a concise label per model.getDisplayModelName,getTriggerDisplayModelName) into a newmodelDisplayNames.tsmodule, removing it fromproviderIconUtils.ts.Macroscope summarized 9256971.