Clear search input and filters when search sheet is closed#4070
Clear search input and filters when search sheet is closed#4070
Conversation
Preview deployments |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: fdae9d24ea
ℹ️ 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".
|
|
||
| @action | ||
| private doExternallyTriggeredSearch(term: string) { | ||
| console.log('doExternallyTriggeredSearch', term); |
There was a problem hiding this comment.
Remove debug logging of externally triggered searches
This logs every externally triggered search term to the browser console in normal execution, which can leak user-entered query text and create noisy production logs whenever search is driven programmatically. Since this line was introduced in this change and does not affect behavior, it should be removed before release.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Pull request overview
This PR implements functionality to clear the search input and realm filter when the search sheet is closed by clicking outside. The implementation adds a new onBlur handler that wraps the parent's callback and conditionally resets the component's local state when the sheet is successfully closed.
Changes:
- Added integration test to verify search input and realm filter reset behavior when closing the search sheet
- Implemented
onBlurmethod in SearchSheet component to reset local state after parent closes the sheet - Modified onClickOutside modifier to call the new local
onBlurmethod instead of the parent callback directly
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| packages/host/tests/integration/components/operator-mode-ui-test.gts | Adds comprehensive test verifying that search input and realm filter are reset when search sheet is closed by clicking outside |
| packages/host/app/components/search-sheet/index.gts | Implements onBlur method to reset search state after sheet closure, and includes debug console.log statement |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| @action | ||
| private doExternallyTriggeredSearch(term: string) { | ||
| console.log('doExternallyTriggeredSearch', term); |
There was a problem hiding this comment.
This console.log statement appears to be debug code that should be removed before merging. Console.log statements for debugging should typically be removed from production code unless they serve a specific purpose like error logging.
| console.log('doExternallyTriggeredSearch', term); |
Screen.Recording.2026-02-26.at.15.34.31.mov