Skip to content

fix(slash menu): make it follow active item when navigating with arrows#269

Open
yzuyr wants to merge 1 commit into
cameronapak:mainfrom
yzuyr:fix/slash-menu-follow-active-item
Open

fix(slash menu): make it follow active item when navigating with arrows#269
yzuyr wants to merge 1 commit into
cameronapak:mainfrom
yzuyr:fix/slash-menu-follow-active-item

Conversation

@yzuyr

@yzuyr yzuyr commented Jul 15, 2026

Copy link
Copy Markdown

Oi @cameronapak. Fixing slash menu active item visibility when navigating with arrows.

Summary by CodeRabbit

  • Bug Fixes
    • Improved slash menu navigation by automatically scrolling the active option into view.
    • Ensures the selected option remains visible while moving through the menu.

@coderabbitai

coderabbitai Bot commented Jul 15, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: ec512523-c67a-41da-ab6a-4e477c7c1da7

📥 Commits

Reviewing files that changed from the base of the PR and between 7c9cfd1 and ce3a97d.

📒 Files selected for processing (1)
  • src/components/slash-menu-list.tsx

📝 Walkthrough

Walkthrough

SlashMenuList now tracks its scrollable container and automatically scrolls the element marked aria-selected="true" into view whenever activeIndex changes.

Changes

Slash menu scrolling

Layer / File(s) Summary
Active option visibility
src/components/slash-menu-list.tsx
Adds React refs and an activeIndex effect that finds the selected option and calls scrollIntoView({ block: "nearest" }) on the attached scroll container.

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

Suggested reviewers: cameronapak

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: keeping the slash menu aligned with the active item during arrow-key navigation.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.
✨ 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.

@yzuyr

yzuyr commented Jul 15, 2026

Copy link
Copy Markdown
Author

Nevermind, I see there's #98 existing already. Feel free to close it 😅

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.

1 participant