fix: disable command menu auto highlight#1548
fix: disable command menu auto highlight#1548SpreadSheets600 wants to merge 3 commits intopingdotgg:mainfrom
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Copilot reviewed 1 out of 1 changed files in this pull request and generated no comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3159852e9a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
- Keep the current highlighted item when the menu emits a non-string value - Avoid resetting command menu highlight state during navigation
What Changed
Disabled the composer slash-command menu's built-in auto-highlight behavior in
ComposerCommandMenu.tsx. The menu now relies only on the app-managed active item state instead of also keeping Base UI's initial highlighted row.Why
When using
/model, arrow-key navigation is handled in the chat composer, not by the menu primitive. That meant Base UI kept the first item highlighted from mount while the app separately highlighted the keyboard-active item, so gpt-5.4 appeared selected even when navigating to another model. Disabling the menu primitive's auto-highlight is the narrow fix because it removes the stale visual state without changing selection behavior.UI Changes
Before :
2026-03-29_23-16-16-60fps.mp4
After :
2026-03-29_23-51-48.mp4
Checklist
Note
Low Risk
Low risk UI behavior change limited to command-menu highlighting; it may slightly alter keyboard/mouse highlight feedback but does not affect selection or data handling.
Overview
Disables the command menu primitive’s built-in auto-highlighting in
ComposerCommandMenuby settingautoHighlight={false}andkeepHighlight={false}, so the UI highlight is driven solely by the app-managedactiveItemId.Tightens the
onItemHighlightedhandler to only forward string item IDs (no longer emittingnull), avoiding stale/competing highlight state in the slash-command menu.Written by Cursor Bugbot for commit 4333e56. This will update automatically on new commits. Configure here.
Note
Disable auto-highlight in
ComposerCommandMenuSets
autoHighlight={false}andkeepHighlight={false}on theCommandelement in ComposerCommandMenu.tsx. TheonHighlightedItemChangecallback is now only invoked with string item IDs; it is no longer called withnullwhen no string value is highlighted.📊 Macroscope summarized 4333e56. 1 file reviewed, 1 issue evaluated, 0 issues filtered, 1 comment posted
🗂️ Filtered Issues