mirror of
https://github.com/stablyai/orca.git
synced 2026-10-27 00:02:48 +00:00
The "Open any file, URL, agent, ..." new-tab entry had two gaps:
1. Agents were not really searchable. findMatchingTabAgentLaunchOptions only
matched on exact alias equality, so a partial name ("gemin", "clau") surfaced
no agent. It now scores prefix/token matches (exact alias wins; otherwise every
query token must prefix an alias token; mid-string and single-char hits are
rejected so agents — which rank above file results — don't noisily hijack the
list). The tokenizer is shared with the create-menu matcher via
query-token-match.ts.
2. Arrow keys didn't navigate the list. Navigation only ran when there were >1
result rows, and the just-opened (empty-query) state trapped focus in the input
so the static create/agent list below was unreachable. Arrows now move the
highlight for any result count, and with no result rows focus routes into the
enclosing Radix menu; ArrowUp on the first item returns to the search box so
the trip isn't one-way.
Also adds combobox/listbox + aria-activedescendant semantics so the highlight is
exposed to assistive tech, and splits the row presentation and option types into
focused modules to keep the component under the line cap.