Skip to content

fix(app): tidy the model picker header, stick group titles and show variants - #57927

Merged
kitlangton merged 1 commit into
betafrom
model-picker-polish
Oct 21, 2026
Merged

kitlangton merged 1 commit into
betafrom
model-picker-polish

Conversation

@kitlangton

@kitlangton kitlangton commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Kit's Scrawl on the model picker asked three things.

Header spacing. The model picker hand-rolled its own search box (32px tall, 14px glyphs in 28px buttons, 4px end inset). It now uses the same palette-menu-search + TextInput as the ⌘K palette and the new-session location dialog, with the actions as shared IconButtons (24px, ghost-muted). TextInput gains a trailing slot that pulls the buttons' padding out so their glyphs sit at the same inset as the leading search icon (12px in palette search fields, 8px in base fields), 4px apart.

Sticky group titles. Recent / provider titles stick while their group scrolls and the next one pushes the previous off. They're opaque in the dialog surface and show a hairline only while stuck (container-type: scroll-state). The viewport gets scroll-padding-top so arrow keys keep the active row below the stuck title.

Variant on the active row. The hovered or keyboard-active row now shows its current variant, including "Default" in the fainter text colour. The selected row still only shows an explicit variant at rest (keeps the intent of 31c1322). The slot is reserved for every model with variants, so hover never shifts the row.

No changes to ScrollView; merges cleanly with menu-scrollbars.

@opencode-agent opencode-agent Bot 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.

The change looks sound. Both changed packages pass their type checks (packages/ui and packages/app), and I found no problems reading the diff: the new trailing slot is optional and comes after the existing copy/clear button, sticky titles work with the existing scrollIntoView({ block: "nearest" }) keyboard scrolling, and "Default" shows only when no variant is set. I couldn't render the web app here (no browser), so could you add before/after screenshots or a short video of the picker header, a stuck group title and the variant on a hovered row?

The public API is unchanged; trailing is a new optional prop on the internal TextInput component.

One small side effect: the new padding-inline-end: 12px in palette-menu.css also applies to the ⌘K palette and the new-session location dialog. Neither has trailing content, so only the space at the end of their text grows a little.

@kitlangton
kitlangton merged commit f06750a into beta Oct 21, 2026
12 of 20 checks passed
@kitlangton
kitlangton deleted the model-picker-polish branch October 21, 2026 22:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant