fix(dashboard): make logs search bars clearable via Escape / empty box#3096
Conversation
Brings Agent Sessions and other SearchBar consumers in line with the logs filter bar — pressing Escape clears the search like the × button. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Claude Code Review
This repository is configured for manual code reviews. Comment @claude review to trigger a review and subscribe this PR to future pushes, or @claude review once for a one-time review.
Tip: disable this comment in your organization's Code Review settings.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
🦋 Changeset detectedLatest commit: 95aab67 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
There was a problem hiding this comment.
1 issue found across 1 file
Reply with feedback, questions, or to request a fix.
Fix all with cubic | Re-trigger cubic
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
So a single Escape only clears the search instead of also bubbling to close a surrounding popover/dialog; the next (empty-box) Escape bubbles. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
1 issue found across 2 files (changes from recent commits).
Tip: Review your code locally with the cubic CLI to iterate faster.
Fix all with cubic | Re-trigger cubic
…lear
Guard the key-step Escape on searchInput so an empty box lets Escape
bubble (e.g. to close a surrounding popover) and avoids a redundant
onSearchSubmit(""). Add changeset.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
1 issue found across 2 files (changes from recent commits).
Tip: Review your code locally with the cubic CLI to iterate faster.
Tip: cubic used a learning from your PR history. Let your coding agent read cubic learnings directly with the cubic MCP.
Fix all with cubic | Re-trigger cubic
Match the SearchBar two-step behavior: Escape that cancels a build or clears the search consumes the event; an empty box lets it bubble. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
What
Follow-up to #3093 (AGE-2594). Makes the free-text search bars on the logs pages clearable consistently — via Escape and by emptying the box, not only the
×button.Why
Two search bars were involved, both with the same "only the × clears it" friction:
1.
LogFilterBar(MCP Server Logs). It tracks the livesearchInputseparately from the parent's appliedsearchQuery(which drives the data fetch); they only sync on submit. The×calledonSearchSubmit(""), but Escape only cleared the local input (and was gated on the popover being open), and emptying the box never re-submitted — so the applied query lingered.2. The shared
SearchBar(components/ui/search-bar.tsx, used by Agent Sessions'ChatLogsFiltersand elsewhere). It had an×button but no Escape handling. Emptying the box already clears for its consumers since theironChangefires live.How
LogFilterBar:×: clears the input, resets the flow, and callsonSearchSubmit(""). In the operator step it still just cancels the in-progress filter build.onSearchSubmit("").SearchBar:This brings Agent Sessions and every other
SearchBarconsumer in line with the logs filter bar. The dropdown-only bars (Tool LogsObserveFilterBar,MCPServerFilter, Insights filter bars) have no free-text box, so they're unaffected — they clear by deselection.Scope
Frontend-only, 2 files. No backend, migration, or SDK changes.
Testing
tsc -p tsconfig.app.json --noEmit— clean.eslint— clean.