Skip to content

fix(webapp): focus the search field when a filter sub-menu opens - #4443

Merged
samejr merged 1 commit into
mainfrom
samejr/focus-submenu-search
Jul 31, 2026
Merged

fix(webapp): focus the search field when a filter sub-menu opens#4443
samejr merged 1 commit into
mainfrom
samejr/focus-submenu-search

Conversation

@samejr

@samejr samejr commented Jul 31, 2026

Copy link
Copy Markdown
Member

Summary

Opening a filter sub-menu that has its own search field left the cursor outside it, so you had to click into the field before you could type. The cursor now lands in the search field every time a sub-menu opens.

ComboBox now focuses its input whenever the popover is open and the field is present, so the cursor lands there both when a menu opens normally and when a sub-menu mounts its field late. It is a no-op wherever focus already worked.

Verified in the dashboard against the Tags menu: before, the field mounted with focus still on the popover container; after, it mounts focused and accepts typing straight away.

Sub-menus that load their options mount the search field after the
popover is already open, so nothing focused it and you had to click
into the field before typing.
@changeset-bot

changeset-bot Bot commented Jul 31, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 874afc6

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@coderabbitai

coderabbitai Bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Walkthrough

ComboBox now obtains its open state and base input element. An effect focuses the base input when the combobox opens or when its base element changes.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description explains the problem, implementation, scope, and verification, but it omits the required template sections and checklist. Add the issue reference, checklist, Testing, Changelog, and Screenshots sections from the repository template.
✅ Passed checks (4 passed)
Check name Status Explanation
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.
Title check ✅ Passed The title clearly describes the main change: focusing search fields when filter sub-menus open.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch samejr/focus-submenu-search

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.

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Devin Review found 2 potential issues.

Open in Devin Review

Comment thread apps/webapp/app/components/primitives/Select.tsx
Comment thread apps/webapp/app/components/primitives/Select.tsx
@samejr
samejr merged commit 55e6225 into main Jul 31, 2026
42 checks passed
@samejr
samejr deleted the samejr/focus-submenu-search branch July 31, 2026 20:57
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