Add clear button to the paper search field - #40
Merged
Merged
Conversation
A × inside the search box empties the query and keeps focus in the field.
koppor
force-pushed
the
search-clear-button
branch
from
September 14, 2026 11:33
9e09def to
d578175
Compare
Gram21
marked this pull request as ready for review
September 21, 2026 18:46
Owner
|
Thanks for the PR! It looks good to me and I will merge it. As it was only a draft, if you want to add something, feel free to do so in another PR |
Gram21
approved these changes
Sep 21, 2026
Contributor
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
Small, low-risk UI change with matching styling updates and explicit test covering the new behavior.
Review effort: Lite
Findings: None
What changed in this PR
Adds inline clear (×) control to paper list search input so users can reset query quickly without losing typing focus, improving sidebar search UX.
Changes:
- Add conditional “Clear search” button inside search field; click clears query and re-focuses input.
- Update search input right-padding and introduce new
.paper-search-clearstyling to avoid text overlap with new control. - Add regression test verifying clear behavior restores full list and preserves focus.
| File | Description |
|---|---|
| src/styles/index.css | Reserve space for new clear button; add styling/positioning for .paper-search-clear. |
| src/components/PaperList.tsx | Render clear button when query non-empty; clear query and focus input on click. |
| src/components/PaperList.test.tsx | Test clear button visibility, clearing behavior, focus retention, and list reset. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🤖 The paper list search had no quick way to empty it. A × button now appears inside the box while a query is entered; clicking it clears the search and leaves focus in the field.
Test:
🤖 Generated with Claude Code
https://claude.ai/code/session_01AWQS82YpFEMT2mdiyoA4od