fix(web): show a tooltip on the thread search clear button #48238
main fromrefs/pull/48238/head·opened View on GitHubProblem
The X button in sidebar thread search has an accessible name, but no visible label. Type a query, then hover over the X or Tab to it from the search field. Nothing tells you that the button clears the search.
Change
Use the existing shared tooltip to show “Clear thread search” on hover and keyboard focus. The tooltip and accessible name use the same translated string. Activating the button still clears the query and returns focus to the search field.
Scope
Addresses the sidebar search case in #47759. This change is limited to the clear button in the web UI shared by web and desktop. It does not change the other controls reported in the issue.
Verification
- On main (9a08ffb), both Chromium regression tests failed because the tooltip was missing on hover and keyboard focus.
- On the patched commit (a59ed80b), both passed. The keyboard test also confirmed that pressing Enter clears the query and returns focus to the search field.
- Captured the before/after screenshots in Chromium using fixture threads. The Electron desktop app was not tested separately. Before: [Upload t3-clear-search-before.png here]
After: [Upload t3-clear-search-after.png here]
Implementation and testing assisted by GPT-6.2 Sol in ChatGPT Work using Codex tools.
- 1
tanstack-source added labelsbug
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:S
macroscopeapp[bot](GitHub profile, opens in a new tab) approved these changes
Approvability#
Verdict: Approved at
a59ed80Macroscope's review found this PR approvable — Adds a tooltip to the thread-search clear button while preserving its accessible label, clear action, and focus behavior. This is a localized presentation change with no material operational or data impact.
You can add or adjust custom eligibility rules. [Learn more](https://docs.macroscope.com/approvability#example-custom-eligibility-rules).No actionable comments were generated in the recent review.
Walkthrough
-
The clear-search button now uses a shared tooltip trigger with its localized label. Browser tests check label visibility on hover and keyboard focus, and verify that activation clears the query and returns focus to the search input.
Changes: Clear thread search tooltip
Layer / File(s) Summary Tooltip trigger and button interactions
apps/web/src/components/sidebar/SidebarThreadHeader.tsx,apps/web/src/components/sidebar/SidebarThreadHeader.browser.test.tsxThe button reuses its localized accessible label for the tooltip. Browser tests check hover and keyboard focus, clearing the query, and returning focus to the search input. Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Bug fix
Suggested reviewers:
chenxin-yan
Merge Risk:
Minimal · up toa59ed-
This adds a tooltip to the sidebar thread-search clear button. The clear and refocus behavior is unchanged, and no merge-blocking risk was found.
Pre-merge checks:
4-
Check name Status Explanation Title check The title "fix(web): show a tooltip on the thread search clear button" matches the main change: the clear-search button in SidebarThreadHeader now shows a tooltip on hover and keyboard focus, and the … Description check The description covers the problem, the change, scope, and verification, so it follows the template. The Problem, Change, and Scope sections are clear. Scope links the related issue #47759and states …Linked Issues check Check skipped because no linked issues were found for this pull request. Out of Scope Changes check Check skipped because no linked issues were found for this pull request. Full details: Title check
-
Explanation
The title "fix(web): show a tooltip on the thread search clear button" matches the main change: the clear-search button in SidebarThreadHeader now shows a tooltip on hover and keyboard focus, and the raw summary and objectives describe the same change. It is a conventional commit title in plain language and is specific enough for a teammate to identify the primary change.
Full details: Description check
-
Explanation
The description covers the problem, the change, scope, and verification, so it follows the template. The Problem, Change, and Scope sections are clear. Scope links the related issue
#47759and states that the change is limited to the clear button. Verification lists focused Chromium regression tests and observed results, and it states that the Electron desktop app was not tested. Gaps: the Scope section does not say whether#47759is a bug report, and the before/after screenshots are still placeholders that were not uploaded. The template also asks for an agent/model line at the end, which the author included.
-
Finishing Touches
-
Generate unit tests (beta)
-
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info-
Run configuration-
- Source mode: Auto
- Repository: pingdotgg/t3code
- Branch: main
- File: .coderabbit.config.ts
- Commit: 9a08ffb
- Layers: Repository TS config
- Review profile: CHILL
- Plan: Advanced
- Run ID:
80f2209d-4c60-4152-a3cb-cef883f91bfc
Commits-
Reviewing files that changed from the base of the PR and between 9a08ffb84084c441dcf4a2f595682a44632ecc89 and a59ed80b04d6897a794181d288284d8b426ff404.
Files selected for processing: 2-
apps/web/src/components/sidebar/SidebarThreadHeader.browser.test.tsxapps/web/src/components/sidebar/SidebarThreadHeader.tsx
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
-
-
Sign in to join this conversation.
This PR changes the test suite by +2 test cases (browser +2, unit 0, server 0).
New browser test files:
apps/web/src/components/sidebar/SidebarThreadHeader.browser.test.tsx. Each browser test file costs CI seconds of module loading before its first test runs; a unit test costs milliseconds.Keep tests that would fail for a real reason, and test logic below the UI where it can be. See Testing.