Skip to content

fix: disable command menu auto highlight#1548

Open
SpreadSheets600 wants to merge 3 commits intopingdotgg:mainfrom
SpreadSheets600:feature/disable-command-menu-highlight
Open

fix: disable command menu auto highlight#1548
SpreadSheets600 wants to merge 3 commits intopingdotgg:mainfrom
SpreadSheets600:feature/disable-command-menu-highlight

Conversation

@SpreadSheets600
Copy link
Copy Markdown

@SpreadSheets600 SpreadSheets600 commented Mar 29, 2026

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

  • This PR is small and focused
  • I explained what changed and why
  • I included before/after screenshots for any UI changes
  • I included a video for animation/interaction changes

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 ComposerCommandMenu by setting autoHighlight={false} and keepHighlight={false}, so the UI highlight is driven solely by the app-managed activeItemId.

Tightens the onItemHighlighted handler to only forward string item IDs (no longer emitting null), 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 ComposerCommandMenu

Sets autoHighlight={false} and keepHighlight={false} on the Command element in ComposerCommandMenu.tsx. The onHighlightedItemChange callback is now only invoked with string item IDs; it is no longer called with null when no string value is highlighted.

📊 Macroscope summarized 4333e56. 1 file reviewed, 1 issue evaluated, 0 issues filtered, 1 comment posted

🗂️ Filtered Issues

Copilot AI review requested due to automatic review settings March 29, 2026 18:23
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 29, 2026

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 5e4c60dc-2b96-4cad-865d-e1141039de58

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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 and usage tips.

@github-actions github-actions bot added size:XS 0-9 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list. labels Mar 29, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

SpreadSheets600 and others added 2 commits March 30, 2026 00:07
- Keep the current highlighted item when the menu emits a non-string value
- Avoid resetting command menu highlight state during navigation
@SpreadSheets600 SpreadSheets600 changed the title Disable command menu auto highlight fix: disable command menu auto highlight Mar 29, 2026
Copy link
Copy Markdown
Contributor

@UtkarshUsername UtkarshUsername left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XS 0-9 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants