Skip to content

Model picker redesign: compact rows, shortened names, refined selection#1

Closed
SunkenInTime wants to merge 3 commits into
mainfrom
redesign
Closed

Model picker redesign: compact rows, shortened names, refined selection#1
SunkenInTime wants to merge 3 commits into
mainfrom
redesign

Conversation

@SunkenInTime

@SunkenInTime SunkenInTime commented Jul 16, 2026

Copy link
Copy Markdown
Owner

What

Visual + naming refresh of the model picker:

  • Catalog-driven short names — Claude built-in models carry explicit shortNames ("Fable 5", "Opus 4.8"); Codex derives them at model-list parse time via toCodexShortName() ("GPT-5.6-Sol" → "5.6 Sol", "GPT-5.5" → "5.5"). The provider logo always sits next to the label (composer trigger, sidebar tabs, provider footer in mixed views), so the brand prefix is redundant — same pattern the Codex app uses. Cursor/OpenCode/Grok models are intentionally left unshortened: their catalogs are dynamic multi-vendor lists.
  • Display-name helpers extracted to modelDisplayNames.ts (out of providerIconUtils.ts); an earlier web-layer regex-alias approach was replaced by the catalog approach in the second commit.
  • Provider line hidden on single-provider tabs — the sidebar already identifies the provider; the per-row provider footer now only shows in search, favorites, and for sub-provider models (e.g. "Claude · Bedrock"), with estimatedItemSize adjusted per view.
  • Row + selection styling — blue-tinted selected state (matches ChatComposer active-state idiom), text-sm names, tighter radii, sidebar spacing cleanup.
  • Virtualization fixLegendList's extraData now carries all row-render inputs (favorites, search state, selected instance, active model, jump labels, disabled reasons, model map) instead of only favoritesSet, so recycled rows can't render stale.
  • Scrollbar — the model-picker-list class now sits on the actual LegendList scroll element (it previously targeted a wrapper that never scrolled), with an 8px gutter and inset pill thumb.

Tests

  • modelDisplayNames.test.ts (web) — qualifier stripping + short-name preference
  • CodexProvider.test.tstoCodexShortName derivation incl. non-GPT passthrough
  • ProviderRegistry.test.ts — built-in Claude models expose shortName

🤖 Generated with Claude Code

…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>
@github-actions github-actions Bot added size:M vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. labels Jul 16, 2026
…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>
@github-actions github-actions Bot added size:L and removed size:M labels Jul 16, 2026
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>
@SunkenInTime

Copy link
Copy Markdown
Owner Author

Superseded by the upstream PR: pingdotgg#4067

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

Labels

size:L vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant