Skip to content

Clear search input and filters when search sheet is closed#4070

Open
FadhlanR wants to merge 2 commits intomainfrom
cs-10263-clear-search-input-filter-when-search-sheet-is-closed
Open

Clear search input and filters when search sheet is closed#4070
FadhlanR wants to merge 2 commits intomainfrom
cs-10263-clear-search-input-filter-when-search-sheet-is-closed

Conversation

@FadhlanR
Copy link
Contributor

Screen.Recording.2026-02-26.at.15.34.31.mov

@github-actions
Copy link

Preview deployments

@github-actions
Copy link

github-actions bot commented Feb 26, 2026

Host Test Results

    1 files  ±0      1 suites  ±0   1h 37m 5s ⏱️ + 3m 15s
1 880 tests +1  1 865 ✅ +1  15 💤 ±0  0 ❌ ±0 
1 895 runs  +1  1 880 ✅ +1  15 💤 ±0  0 ❌ ±0 

Results for commit fdae9d2. ± Comparison against base commit 61ceac3.

♻️ This comment has been updated with latest results.

@FadhlanR FadhlanR marked this pull request as ready for review February 26, 2026 09:18
@FadhlanR FadhlanR requested a review from a team February 26, 2026 09:18
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 onBlur method in SearchSheet component to reset local state after parent closes the sheet
  • Modified onClickOutside modifier to call the new local onBlur method 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);
Copy link

Copilot AI Feb 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
console.log('doExternallyTriggeredSearch', term);

Copilot uses AI. Check for mistakes.
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