Skip to content

fix(desktop): keep the fast toggle in the model menu, and typing in settings no longer jumps to search - #8384

Merged
AviPeltz merged 2 commits into
mainfrom
fix/model-search-typing-redirect
Oct 11, 2026
Merged

AviPeltz merged 2 commits into
mainfrom
fix/model-search-typing-redirect

Conversation

@AviPeltz

@AviPeltz AviPeltz commented Oct 11, 2026 •

Copy link
Copy Markdown
Collaborator

Follow-up to #8243. Resolves the one thread left open there (typing in a settings submenu pulled focus to the model search).

Summary

  • The typing-to-search redirect now lives in ModelPanel's own key handler, so it only fires for keys inside the model list. Before, it sat on the whole DropdownMenuContent; 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.
  • The standalone ⚡ Fast pill beside the model pill is gone. The toggle stays inside the menu: in the effort slider card, or as a trait row for an agent with fast mode but no effort levels. One place is enough.

How It Works

ModelPanel.onPanelKeyDown already 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). ModelPicker loses sendTypingToSearch, the wrapper div, fastOn, and the LuZap/useLingui imports.

How to review: most of the ModelPicker.tsx delta is the de-indent from dropping the wrapper div — git diff -w shows the real change (~20 lines).

Manual QA Checklist

Verified over CDP in the dev app (Claude session, Fable 5.1):

  • Open the model menu, hover a row so it takes menu focus, type o → the search input reads o (redirect still works inside the list)
  • Tab onto the effort slider thumb, type x → focus stays on the thumb, search stays empty, value unchanged
  • Composer footer shows only the mode pill and the model pill; no Fast pill
  • Menu still renders the effort slider card and the model rows; no runtime exceptions
  • Not exercised: typing inside a trait submenu (the Claude session exposes no trait rows) and the in-menu ⚡ itself (no fast-mode option). Same code path as the slider case; a Codex session would show both.

Testing

  • biome check on the picker directory: clean
  • bun run typecheck in apps/desktop: no errors in the changed files (the remaining local errors are the known Better Auth install split, unrelated)
  • bun test for useOptimisticSelections: 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.

  • Typing-to-search now only fires from keys inside the model list, not the whole menu content, so the effort slider and trait submenus keep their focus.
  • The standalone ⚡ Fast pill next to the model pill is gone; the toggle stays in the effort slider card, or as a trait row for agents with fast mode but no effort levels.

Written for commit fc1665a. Summary will update on new commits.

View guided diff Turn on auto-fix

Summary by CodeRabbit

  • Model Picker
    • Fast is shown in the effort slider when an effort setting is available; otherwise, it remains in the settings list.
    • Pressing a character key outside the search field now moves focus to the search field.
    • Typing while hovering over a menu row no longer forwards characters to the search field.

…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.
@coderabbitai

coderabbitai Bot commented Oct 11, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 07919214-90ae-422c-bc15-e9ac910b4113

📥 Commits

Reviewing files that changed from the base of the PR and between 21b8f4a and fc1665a.


📒 Files selected for processing (2)
  • apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/hooks/usePaneRegistry/components/ChatSession/components/Composer/components/ModelPicker/ModelPicker.tsx
  • apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/hooks/usePaneRegistry/components/ChatSession/components/Composer/components/ModelPicker/components/ModelPanel/ModelPanel.tsx

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.



📝 Walkthrough

Walkthrough

The model picker no longer shows a separate Fast button. Fast appears in the effort control when an effort option exists, or in the settings rows otherwise. The model panel focuses search when an eligible single-character key is pressed outside the search input.

Changes

Model picker

Layer / File(s) Summary
Picker controls and keyboard search
apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/hooks/usePaneRegistry/components/ChatSession/components/Composer/components/ModelPicker/ModelPicker.tsx, apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/hooks/usePaneRegistry/components/ChatSession/components/Composer/components/ModelPicker/components/ModelPanel/ModelPanel.tsx
The picker removes the separate Fast button and its menu-level typing handler. Fast is passed to EffortSliderCard when an effort option exists; otherwise it remains in the settings rows. The model panel focuses search for unmodified, single-character, non-space keys pressed outside the search input.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Suggested reviewers: harshithmullapudi


Merge Risk: ⚪ Minimal · up to fc166

No change-introduced issue remains identified. The picker is mergeable after normal checks.

Pre-merge checks | Passed 4 | Failed 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 2 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description check Passed The description explains the problem, the implementation, and the testing performed. It includes manual QA details and identifies untested trait-submenu and in-menu Fast-toggle cases. The template che…
Title check Passed The title uses conventional commit format and clearly describes both primary changes: keeping the Fast toggle in the model menu and preventing typing in settings from redirecting to search.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR


🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Oct 11, 2026 •

Copy link
Copy Markdown
Contributor

🧹 Preview Cleanup Complete

The following preview resources have been cleaned up:

  • ✅ Neon database branch

Thank you for your contribution! 🎉

@greptile-apps

greptile-apps Bot commented Oct 11, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

[Medium impact] This PR appears safe to merge; no actionable issues were found.

Summary

This PR keeps the Fast toggle inside the model menu and limits typing-to-search to ModelPanel.

  • Typing in settings no longer jumps to model search.
  • The Fast toggle now lives inside the model menu.

Acknowledged intent: AviPeltz explicitly states that typing in settings should stay there and that the standalone Fast pill should be removed.

Reviews (1) · Last reviewed commit: "feat(desktop): keep the fast-mode toggle..." · Reviewed by Greptile

@AviPeltz
AviPeltz merged commit 284f73b into main Oct 11, 2026
17 checks passed

This branch was previously deployed

1 inactive deployment
preview — fc1665a3 Deployed Oct 11, 2026 by AviPeltz via Deploy API #11661
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants