searchable-dropdown
Skill2 starsChanged 13 days agoMITView on GitHub
Conventions for the custom searchable dropdown in the Patio web UI (web/src), currently `ModelPicker`. Use when adding or changing a model selector, or any single-choice picker whose list is long enough to need search (more than ~10 options, provider-prefixed ids, descriptions), instead of a native `<select>` or a `Menu`.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- bettyguo/browser-skillstheir own version, first seen Apr 13, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- bettyguo/browser-skills★ 8same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository11 other files it gives its agents.
- AGENTS.mdAGENTS.md
- accessibilitySkill
- connector-requiredSkill
- dropdown-buttonSkill
- frontend-designSkill
- golang-patternsSkill
- golang-testingSkill
- icon-buttonSkill
- list-viewSkill
- releaseSkill
- seoSkill
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 0 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 31
Always get models from useModels (web/src/Chats.tsx): it caches per connector and falls back to Default.
- Very specific: line 46
Never wrap the picker in a <label>: clicking anywhere in the popup would re-trigger the button.
- Very specific: line 53
Don't add a dependency (no UI library in web/package.json).
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Searchable dropdown
Reference: ModelPicker and ModelOption in web/src/ModelPicker.tsx; .model-picker, .model-trigger, .model-pop rules in web/src/styles.css. Examples: chat composer and New chat dialog in web/src/Chats.tsx, scheduled task form in web/src/ScheduledTasks.tsx.
Which control
- Short fixed list (under ~10, no search needed): native
<select>in forms. - Actions or a few choices behind a button:
Menu(seedropdown-buttonskill). - Long or growing list of choices, model ids, anything the user would want to type to find:
ModelPicker.
Usage
const { models, loading } = useModels(connectorID);
<div className="field">
<span className="label-row">
Model {loading && <span className="spinner" role="status" aria-label="Loading models" />}
</span>
<ModelPicker models={models} value={model} loading={loading} onChange={setModel} />
</div>Props: models: ModelOption[] ({ id, label, description? }), value, loading, optional disabled, optional up (open upward and right-aligned; use at the bottom of the screen, e.g. the composer), onChange(id). onChange only fires when the choice actually changes.
Always get models from useModels (web/src/Chats.tsx): it caches per connector and falls back to Default. A value missing from the list is still shown as an option, so saved models never disappear.
Behavior (built in, don't reimplement)
- Trigger shows the current label without the
provider/prefix; the full id is itsdata-tiptooltip. Loading shows "Loading models…" and disables it. - Opening focuses a search box; matching is case-insensitive substring on id, label, and description.
- Ids shaped
provider/modelare grouped under a small provider header; ids without/form one ungrouped list. - ↑/↓ move the active option (wraps), Enter picks, Esc closes and returns focus to the trigger, hover sets the active option, outside click or tabbing away closes.
- ARIA: trigger
aria-haspopup="listbox"; search inputrole="combobox"witharia-controlsandaria-activedescendant; optionsrole="option"witharia-selected. - The popup keeps focus in the search box on mouse down (except on the input itself).
- The popup is
position: fixed, placed from the trigger's rect when opened, so dialogs andoverflow: autopanels can't clip it. It opens in its preferred direction (upor down) unless that side has less than ~390px and the other side has more, caps its height to the space left, and closes on outside scroll or window resize instead of drifting. - Options stack name over a muted description; long names wrap instead of squeezing beside the description.
Layout rules
- Never wrap the picker in a
<label>: clicking anywhere in the popup would re-trigger the button. Use<div className="field">(styled for.createand.skill-editorforms) with a text span. - Context-specific sizing goes through a parent selector, e.g.
.composer-model .model-trigger { height: 32px; max-width: 220px; }. - Buttons default to font-weight 600; the trigger and popup reset to 400. Keep option rows normal weight.
Extending
- A second kind of searchable list (not models): generalize
ModelPicker(rename, make grouping optional) instead of copying it. One component, two callers. - Don't add a dependency (no UI library in
web/package.json).
Checklist
- Uses
ModelPicker, not a native<select>orMenu, for long model lists. - Wrapped in
.fielddiv, not<label>; loading spinner in the label row. upset when the picker sits near the bottom of the viewport.- No
title=tooltips; no colored accent stripes (AGENTS.md). pnpm buildpasses; check search, keyboard pick, mouse pick, and disabled state in the app.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

