Repository navigation
fix(app): tidy the model picker header, stick group titles and show variants - #57927
Conversation
There was a problem hiding this comment.
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.
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+TextInputas the ⌘K palette and the new-session location dialog, with the actions as sharedIconButtons (24px, ghost-muted).TextInputgains atrailingslot 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 getsscroll-padding-topso 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 withmenu-scrollbars.