Skip to content

🎨 Palette: Actionable Escape-to-Clear Shortcut#592

Open
AhmmedSamier wants to merge 2 commits into
masterfrom
palette-escape-to-clear-5289999865392006588
Open

🎨 Palette: Actionable Escape-to-Clear Shortcut#592
AhmmedSamier wants to merge 2 commits into
masterfrom
palette-escape-to-clear-5289999865392006588

Conversation

@AhmmedSamier

@AhmmedSamier AhmmedSamier commented Jul 21, 2026

Copy link
Copy Markdown
Owner

💡 What: Added an Escape key handler to the search input in the search webview that clears the input text and resets all active scopes and filters back to their global defaults.
🎯 Why: Users intuitively expect the Escape key to clear a search input and reset the search context, especially when multiple filters are active. Lacking this native behavior adds friction.
📸 Before/After: Before, pressing Escape while focused on the search input did nothing. Now, pressing Escape clears the input, resets the search scope to 'Everything', and focuses the input. If the input is already empty, the event passes through.
♿ Accessibility: Improves keyboard navigation by providing a standard, universally recognized shortcut to quickly recover from a filtered or typed state without relying on mouse clicks or manual text deletion.


PR created automatically by Jules for task 5289999865392006588 started by @AhmmedSamier

Summary by CodeRabbit

  • New Features
    • Added an Escape-key shortcut to clear search queries and reset active filters.
    • Automatically refreshes results, restores the default search scope, refocuses the search field, and displays a confirmation message.

@google-labs-jules

Copy link
Copy Markdown
Contributor

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@coderabbitai

coderabbitai Bot commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

@AhmmedSamier, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 1 minute

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 7754136c-59de-470f-bcf1-4d99817dbcd0

📥 Commits

Reviewing files that changed from the base of the PR and between bfd7655 and 84d1b5c.

📒 Files selected for processing (2)
  • .jules/palette.md
  • vscode-extension/src/webviews/search-view.html
📝 Walkthrough

Walkthrough

The search webview now clears non-empty queries and resets scopes when Escape is pressed, refreshes results, refocuses the input, and announces the reset. Palette guidance documents this behavior.

Changes

Search clearing

Layer / File(s) Summary
Escape-to-clear interaction
vscode-extension/src/webviews/search-view.html, .jules/palette.md
The search handler clears the query, resets scopes to everything, updates the scope UI, reruns the search, refocuses the input, and displays a status message. Palette guidance documents the shortcut.

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

Possibly related PRs

🚥 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 summarizes the main change: adding an Escape-to-clear shortcut for the search input.
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
  • Commit unit tests in branch palette-escape-to-clear-5289999865392006588

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.

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

Copy link
Copy Markdown

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: bfd7655c07

ℹ️ 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".


searchInput.addEventListener('keydown', (e) => {
if (e.key === 'ArrowDown') {
if (e.key === 'Escape' && searchInput.value !== '') {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Reset filters even when the query is empty

When a scope is active with no remaining text (for example, clicking the Modified/Open scope on an empty input or entering /m , which gets stripped to an empty value), searchInput.value is '', so this Escape handler falls through and leaves currentScope, userScope, and the active scope button unchanged. That makes the new shortcut unable to recover from a filtered-empty state; please treat a non-default scope as something Escape should clear while still passing through only when the input is already empty and the scope is already global.

Useful? React with 👍 / 👎.

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