Repository navigation
fix(desktop): keep the fast toggle in the model menu, and typing in settings no longer jumps to search - #8384
Conversation
…e model list The redirect sat on the whole menu content, so a letter typed in a trait submenu, or on the effort slider, stole focus back to the search (review: greptile). It now lives in the model panel's own key handler.
The standalone ⚡ Fast pill beside the model pill duplicated the toggle in the effort slider card. One place is enough; the card already shows it, and an agent with fast mode but no effort levels still gets it as a trait row.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to No change-introduced issue remains identified. The picker is mergeable after normal checks. Pre-merge checks |
|
🧹 Preview Cleanup CompleteThe following preview resources have been cleaned up:
Thank you for your contribution! 🎉 |
|
Follow-up to #8243. Resolves the one thread left open there (typing in a settings submenu pulled focus to the model search).
Summary
ModelPanel's own key handler, so it only fires for keys inside the model list. Before, it sat on the wholeDropdownMenuContent; React portals still bubble to React ancestors, so a letter typed in a trait submenu or on the effort slider stole focus back to the search input.How It Works
ModelPanel.onPanelKeyDownalready owned Tab and ⌘-digit handling; the single-character redirect joins it, with the same guards as before (no modifiers, not a space, target is not the search).ModelPickerlosessendTypingToSearch, the wrapperdiv,fastOn, and theLuZap/useLinguiimports.How to review: most of the
ModelPicker.tsxdelta is the de-indent from dropping the wrapperdiv—git diff -wshows the real change (~20 lines).Manual QA Checklist
Verified over CDP in the dev app (Claude session,
Fable 5.1):o→ the search input readso(redirect still works inside the list)x→ focus stays on the thumb, search stays empty, value unchangedFastpillTesting
biome checkon the picker directory: cleanbun run typecheckinapps/desktop: no errors in the changed files (the remaining local errors are the known Better Auth install split, unrelated)bun testforuseOptimisticSelections: 4/4 (unchanged by this PR)Summary by cubic
Fixes the model picker so typing in settings submenus no longer steals focus to the search input, and removes the duplicate Fast-mode pill from the composer footer.
Written for commit fc1665a. Summary will update on new commits.
Summary by CodeRabbit