Skip to content

fix(command): clear query when escaping nested command scope - #5363

Open
Iqrima wants to merge 1 commit into
macro-inc:mainfrom
Iqrima:fix/command-menu-escape-query-reset
Open

fix(command): clear query when escaping nested command scope#5363
Iqrima wants to merge 1 commit into
macro-inc:mainfrom
Iqrima:fix/command-menu-escape-query-reset

Conversation

@Iqrima

@Iqrima Iqrima commented Aug 1, 2026

Copy link
Copy Markdown

What changed

When pressing ESC to back out of a sub-command menu (like a multi-step command in Cmd+K), the search text field now resets and clears automatically.

Why

Previously, backing out of a sub-command left the old search text stuck in the input box, so you had to manually backspace the old text before searching for another command.

How it was tested

Verified that pressing ESC inside nested command views returns to a clean, empty search box on the main command menu.

@coderabbitai

coderabbitai Bot commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: e963caef-c9dd-41a1-a209-19a180b6d396

📥 Commits

Reviewing files that changed from the base of the PR and between dd314b2 and dfb4162.

📒 Files selected for processing (1)
  • apps/web/src/features/command/CommandMenu.tsx

📝 Walkthrough

Summary by CodeRabbit

  • Bug Fixes
    • Improved command menu navigation when exiting nested command scopes.
    • Pressing Escape now clears the search query and correctly restores the parent menu selection.

Walkthrough

The command menu keeps the existing searchActive: CommandState.isOpen option. When Escape exits a nested command scope, it now clears the query before resetting selection and restoring the parent scope.

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title uses conventional commit format, describes the change, and is under 72 characters.
Description check ✅ Passed The description clearly explains the nested command behavior change, its reason, and how it was tested.
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.

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.

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