Repository navigation
fix(frontend, v1.2): clear the search bar’s suggestions when the user changes - #9228
Merged
xuang7 merged 2 commits intoNov 10, 2026
Conversation
…es (#9090) ### What changes were proposed in this PR? The top search bar caches its suggestions by the typed text and never cleared that cache. After signing out you land on the About page with the same search bar, and typing text searched before sign-out showed the previous user’s suggestions again, including private workflows, datasets and models, straight from the cache. SearchBarComponent now clears the cache and the shown suggestions in its existing userChanged() handler, which runs on sign-in and sign-out. Before: signed out, “sales” still suggests the private dataset sales-2026, and no request is sent: <img width="1440" height="900" alt="before-2-logged-out-still-suggested" src="https://github.com/user-attachments/assets/818ad412-162e-4f3d-bfbc-978647753167" /> After: signed out, “sales” goes to the public search and suggests nothing: <img width="1440" height="900" alt="after-1-logged-out-no-suggestion" src="https://github.com/user-attachments/assets/10335c5f-c4a9-4241-9e42-8b383658d9a8" /> ### Any related issues, documentation, discussions? Closes #9089 ### How was this PR tested? Added a case to search-bar.component.spec.ts: after the user changes, a repeated query goes to the server as the new user instead of returning the cached suggestions. It fails without the fix. ``` cd frontend yarn ng test --watch=false --include='**/search-bar.component.spec.ts' # Tests 10 passed (10) ``` Also checked against a local stack: signed in, typed a private dataset’s name, signed out, and typed it again. No suggestion is shown, and a public search request is sent. ### Was this PR authored or co-authored using generative AI tooling? Generated-by: Claude Code (Claude Opus 5.5) (backported from commit 553ab15)
Contributor
Author
|
The cherry-pick conflicted and was committed with conflict markers. Resolve the conflicts on this branch, then mark this PR ready for review. Conflicting files:
|
Co-Authored-By: Claude Opus 5.5 <[email protected]>
xuang7
marked this pull request as ready for review
November 4, 2026 04:18
Contributor
Author
Automated Reviewer SuggestionsBased on the
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## release/v1.2 #9228 +/- ##
==================================================
- Coverage 53.45% 53.45% -0.01%
Complexity 2565 2565
==================================================
Files 1078 1078
Lines 42359 42361 +2
Branches 4563 4563
==================================================
+ Hits 22645 22646 +1
Misses 18399 18399
- Partials 1315 1316 +1
*This pull request uses carry forward flags. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
xuang7
deleted the
backport/9090-clear-the-search-bar-s-suggestions-when-v1.2
branch
November 10, 2026 03:28
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.
What changes were proposed in this PR?
Automated backport of #9090 to
release/v1.2.Source: 553ab15 · automation run
Any related issues, documentation, discussions?
Backport of #9090. Originally linked #9089.
How was this PR tested?
Release-branch CI runs on this branch once the conflicts are resolved and this PR is marked ready for review.
Was this PR authored or co-authored using generative AI tooling?
No.