Skip to content

fix: focus search input if search is already open#2431

Merged
gbirman merged 2 commits intomainfrom
macro-cyMFaUXFKs6EPwb7LnDMV-fix-search-hotkey-within-search-menu
Apr 7, 2026
Merged

fix: focus search input if search is already open#2431
gbirman merged 2 commits intomainfrom
macro-cyMFaUXFKs6EPwb7LnDMV-fix-search-hotkey-within-search-menu

Conversation

@gbirman
Copy link
Copy Markdown
Contributor

@gbirman gbirman commented Apr 7, 2026

No description provided.

@gbirman gbirman requested a review from a team as a code owner April 7, 2026 21:59
@macro-application
Copy link
Copy Markdown

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 7, 2026

Caution

Review failed

Pull request was closed or merged during review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 2c5d4f97-5092-4881-a419-b99c2466e9be

📥 Commits

Reviewing files that changed from the base of the PR and between 173f73a and 6127c20.

📒 Files selected for processing (2)
  • js/app/packages/app/component/app-sidebar/sidebar.tsx
  • js/app/packages/app/component/next-soup/soup-view/filters-bar/soup-view-search-bar.tsx

📝 Walkthrough

Summary by CodeRabbit

  • New Features
    • Enhanced search hotkey: if the search view is already open and active, pressing the search hotkey now focuses the search input so you can start typing immediately.
    • Holding Shift while using the search hotkey preserves the previous behavior and opens the search in a new split when appropriate.

Walkthrough

Special-cases the sidebar "go to → search" hotkey: when invoked without Shift, it focuses the existing split's search input (if present) instead of performing the standard open/navigate-with-split behavior.

Changes

Cohort / File(s) Summary
Sidebar hotkey handler
js/app/packages/app/component/app-sidebar/sidebar.tsx
Enhanced the global "go to" hotkey handler to detect link.id === 'search' and, when Shift is not held, locate the active split's data-soup-search input and focus it, returning early to bypass openWithSplit.
Search input attribute
js/app/packages/app/component/next-soup/soup-view/filters-bar/soup-view-search-bar.tsx
Added a data-soup-search attribute to the search <input> so it can be queried/focused by the sidebar hotkey logic; no behavioral changes aside from the attribute.

Possibly related PRs

  • macro-inc/macro PR 1880: Modifies the same sidebar "go to" hotkey handling in sidebar.tsx, adding hotkey-visible state and interception logic that overlaps with this PR's changes.
🚥 Pre-merge checks | ✅ 1 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Description check ❓ Inconclusive No pull request description was provided by the author, making it impossible to assess relevance to the changeset. Add a description explaining the purpose and context of this change, such as the problem it solves or user experience improvement.
✅ Passed checks (1 passed)
Check name Status Explanation
Title check ✅ Passed The title follows conventional commits format with 'fix:' prefix and clearly describes the main change: focusing search input when search is already open.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


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
Copy link
Copy Markdown

github-actions bot commented Apr 7, 2026

@gbirman gbirman merged commit 0377162 into main Apr 7, 2026
21 of 22 checks passed
@gbirman gbirman deleted the macro-cyMFaUXFKs6EPwb7LnDMV-fix-search-hotkey-within-search-menu branch April 7, 2026 22:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant