Skip to content

Add optional compact model picker and effort controls - #471

Merged
wing-anara merged 26 commits into
zeronsh:mainfrom
gaelcado:codex/compact-picker
Oct 1, 2026
Merged

wing-anara merged 26 commits into
zeronsh:mainfrom
gaelcado:codex/compact-picker

Conversation

@gaelcado

@gaelcado gaelcado commented Sep 19, 2026 •

Copy link
Copy Markdown
Contributor

The optional compact model picker puts model selection, reasoning effort and fast-tier controls in a smaller composer popover. It preserves keyboard navigation and favorite identity when the model list reorders, and keeps loading/error/retry states visible alongside available models.

  • Add an Appearance preference for the compact picker, with the existing picker retained as the default.
  • Add effort steps with keyboard and drag control, selection haptics, fast-tier toggle and reset.
  • Show a compact searchable model list with favorites, provider identity and recoverable catalog errors.
  • Add a synthetic keyboard/visual fixture for dark/light and narrow/wide layouts.

Extracted from #429 as an independent draft against main. Rich editing (#469) and native interactions (#470) are separate drafts. Shared picker code requires semantic conflict resolution when those changes merge; the private merge audit retains the original combined behavior.

Validation

Rebased on main 26e2b0dd; tested at 6ec139a2 (the evidence commit on top adds only screenshots).

  • cargo test --locked -p zeron-ui --lib -- --test-threads=1: 1,338 passed.
  • Desktop cargo check --locked -p zeron -p zeron-ui --all-targets --features zeron-ui/appshots-fixture: passed.
  • Isolated fixture build and runtime: passed, including keyboard effort/fast/favorites assertions and dark/light wide/narrow captures.
  • git diff --check passes; cargo fmt --all --check reports the same 25 files as main, none added by this branch.

Evidence

Captured from source 6ec139a2 with the unmodified fixture (synthetic catalogs, default accent); hashes and capture details are in docs/screenshots/compact-picker/README.md. Static frames do not establish animation performance.

Compact effort panel, dark

Compact effort panel, light

Fast mode on, keyboard focus

Narrow model list and keyboard focus

Settings switches, on and off, dark above and light below. Captured from the same source with a local, uncommitted fixture patch that adds two switches:

Switch states


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

…icon)

Carry over the setting, haptic, placement-helper, and icon
dependencies the compact model picker needs, without picker behavior:
- UiSettings.compact_model_picker + reader + appearance toggle + shell
  sync (source: baa9133 settings/appearance/shell hunks).
- haptics.selection_step + NSHapticFeedback feature + mod wiring
  (source: 4c5508e haptics.rs, Cargo.toml, lib.rs).
- popover concentric MENU_ITEM_RADIUS, search-frame radius, and
  faded_menu_list helper (source: 80e138e popover hunks plus the
  pre-existing faded helper HEAD lacks).
- FAST_TIER icon registration + fast-tier.svg asset (predates f85983c;
  required by the compact fast control).
Extract the opt-in compact model picker (effort slider, fast toggle,
reset, option shortcuts, separate All-models list) against current main:
- pickers.rs wiring: ModelRail::All, compact state fields, open/reset
  handling, panel/list key routing incl. cmd-shift-F favorite toggle,
  status-aware nav bounds, compact row delegate, trait filtering, and
  the compact menu branch in Render (sources: baa9133, d8a5e48,
  a54512b placement already on main so not re-added, 16a8ddd,
  4c5508e, plus 28682d7 compact keyboard-follow, All
  favorites-first, and final control order).
- pickers/compact.rs: final 3b3f987 polish module with native
  agent-mode retains reverted to plain clear(), and menu height
  adapted from menu_geometry() to HEAD model_space_below.
- tests: compact keyboard/panel, catalog statuses, All favorites-first.

Excluded: native agent-mode filtering/commands, goal intent, fixture
catalogs, Markdown editor, rich invocation types, and the old
menu_geometry/open-width stabilization superseded by HEAD placement.
Adapted from bd3f11e on feat/desktop-parakeet-dictation without the
microphone spacing. The attachment stays left and the model selector
stays beside Send in collapsed and expanded layouts, with no
left/right relocation animation. Geometry tests cover both picker modes.
Soften the shared glass recipe: shallower drops, a flatter lift, no
accent halo at rest, and a recessed light-mode track whose highlight is
inset (GPUI paints drop shadows under translucent fills). Toggles get a
pill thumb with a dimpled grip, thin on/off marks and a wider track.
Upward menus rose by dropping 2px toward the trigger. Entrances now
travel 4px out of the trigger's side and exits retreat 2px back.
A balanced header (fast button, effort over the model name as one link
with a leaning chevron), a pill-thumb effort slider with a flowing
fast-mode fill, no reset control, a tighter card, and a one-line model
list with a provider jump strip that opens on the current model.
The chip froze at its opening width, truncating the new model or
effort. It now eases to its measured content width; the chip and its
popover are anchored at the trailing edge, so the card stays put.
Only Codex's serviceTier drove the fast button, chip mark and slider
effect; Claude's fastMode toggle and ACP speed options fell through to
a plain option row. One detector now recognises all of them.
The fast-mode button drops its accent plate for a faint neutral one with an
accent glyph. Both header buttons fill the header so their radius is
concentric with the card, the model button fills the row, and the title,
rail and option labels share one 12pt edge.

Accent glass uses the theme's accent_strong fill token with fainter dark
lighting, so dark fills match the accent elsewhere instead of washing out.

Switches follow the effort slider: a longer rail, an overhanging pill thumb
and a fill that runs behind it. Grip dimples snap to device pixels, and the
slider thumb lifts on press instead of shrinking and reflowing its grip.
Add a clean inset knob with adaptive shadows, simplify rail
crossfading, and replace grip marks with polished state indicators.
The slider thumb becomes a plain glass handle, matching the switches, and
the now-unused dimple grip helper goes away.
wing-anara and others added 4 commits September 30, 2026 22:27
- Make the compact picker the default and move its toggle to General.
- Restore the pre-PR switch styling.
- Reopen the new-session canvas on the project/device it was left at.
- Header: keep the selected harness beside the back button; harness strip
  scrolls sideways with per-edge fades that reach zero at the clip edge.
- Show settings of models configured in place (e.g. Fusion) in the panel;
  drop catalog status rows and the selected-model checkmark.
- Fast mode as a toggle for every harness shape (Claude fastMode, Cursor
  fast true/false, Codex/Devin tier); bare button with hover plate and a
  solid bolt when on, in the panel and on the composer chip.
- Even spacing for single-row panels and the options list's bottom edge.
- Fade chip text at the clip edge while the chip width animates.
- Bump zui to 667d0aa (per-pixel SVG edge fades, per-edge fade bands) and
  gpui-component to match.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Panel: a provider button leads the model button; it opens a provider
  page (Starred first once anything is starred, then each provider).
  Picking a provider switches to its last-used model at that model's
  last settings.
- Remember effort per model, falling back to the last level used.
- List pages: one header row with the back button beside the filter;
  the model list holds the current provider's models.
- Cursor: drive its effort option (effort/reasoning/reasoning_effort)
  with the slider and show it on the composer chip.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The panel no longer tabs through its controls behind a focus ring. Its
keys act directly while it is the picker's page: Up/Down open the model
list on the model beside the selected one, Tab cycles providers at their
last-used model, Left/Right (Home/End) set the effort, Enter opens the
list, Escape closes. Keyboard highlight in the lists is the hover look.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@wing-anara
wing-anara merged commit a73fa8f into zeronsh:main Oct 1, 2026
12 checks passed
@gaelcado
gaelcado deleted the codex/compact-picker branch October 1, 2026 11:04
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.

2 participants