Skip to content

fix(review): stop Escape in other inputs from clearing the files filter - #138

Merged
fgilio merged 1 commit into
mainfrom
claude/files-filter-state-loss-4jyent
Jul 21, 2026
Merged

fix(review): stop Escape in other inputs from clearing the files filter#138
fgilio merged 1 commit into
mainfrom
claude/files-filter-state-loss-4jyent

Conversation

@fgilio

@fgilio fgilio commented Jul 21, 2026

Copy link
Copy Markdown
Owner

https://claude.ai/code/session_01M3Jts3UrUJYfdJFjvqnJZy

Summary by CodeRabbit

  • Bug Fixes

    • Improved Escape-key behavior on the review page.
    • Pressing Escape in the file filter now clears the filter and restores all file results.
    • Pressing Escape in another input no longer changes the file filter or its results.
  • Tests

    • Added browser coverage for both file-filter Escape-key scenarios.

The page-level Escape handler cleared fileFilter whenever Escape was
pressed in any input or textarea outside a comment form — the branch
picker search, settings fields, and the global review comment box all
silently wiped the sidebar files filter, forcing the user to retype it.

Scope the clear to the filter input itself (now tagged
data-testid=file-filter) while keeping the generic blur-on-Escape for
other inputs, and drop the filter input's own duplicate escape handler
so the clear fires once.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01M3Jts3UrUJYfdJFjvqnJZy
@coderabbitai

coderabbitai Bot commented Jul 21, 2026

Copy link
Copy Markdown

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

Run ID: af07a3b3-48fb-4f9f-bbe0-38cc366d4ebf

📥 Commits

Reviewing files that changed from the base of the PR and between 5bed294 and 71859fc.

📒 Files selected for processing (2)
  • resources/views/pages/⚡review-page.blade.php
  • tests/Browser/FileInteractionTest.php

📝 Walkthrough

Walkthrough

The review page now clears the file filter only when Escape originates in that input. Browser tests cover clearing the filter and preserving it when Escape is pressed in the overall review comment field.

Changes

File filter Escape handling

Layer / File(s) Summary
Scoped Escape handling and browser coverage
resources/views/pages/⚡review-page.blade.php, tests/Browser/FileInteractionTest.php
The page-level Escape handler conditionally clears the file filter using its new test attribute, while browser tests verify filter clearing and preservation from another input.

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

Suggested reviewers: claude

🚥 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 describes the main change: Escape in non-filter inputs no longer clears the files filter.
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.

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.

@fgilio
fgilio merged commit abec7c5 into main Jul 21, 2026
15 checks passed
@fgilio
fgilio deleted the claude/files-filter-state-loss-4jyent branch July 21, 2026 10:05
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