Skip to content

fix(frontend, v1.3): clear the search bar’s suggestions when the user changes - #9229

Merged
mengw15 merged 2 commits into
release/v1.3from
backport/9090-clear-the-search-bar-s-suggestions-when-v1.3
Nov 4, 2026
Merged

mengw15 merged 2 commits into
release/v1.3from
backport/9090-clear-the-search-bar-s-suggestions-when-v1.3

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

What changes were proposed in this PR?

Automated backport of #9090 to release/v1.3.

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.

…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)
@github-actions

Copy link
Copy Markdown
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:

  • frontend/src/app/dashboard/component/user/search-bar/search-bar.component.spec.ts

…the #9090 test)

#9090 added its test right before three tests from #8701, which is not on
release/v1.3, so the cherry-pick conflicted. Keep only the #9090 test; the
#8701 tests use helpers this branch does not have.
@mengw15
mengw15 marked this pull request as ready for review October 30, 2026 06:52
@github-actions github-actions Bot added the frontend Changes related to the frontend GUI label Oct 30, 2026
@github-actions

Copy link
Copy Markdown
Contributor Author

Automated Reviewer Suggestions

Based on the git blame history of the changed files, we recommend the following reviewers:

  • Contributors with relevant context: @aglinxinyuan
    You can notify them by mentioning @aglinxinyuan in a comment.

@mengw15
mengw15 enabled auto-merge October 30, 2026 06:55
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.10%. Comparing base (b92d0b2) to head (f91d6e7).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@               Coverage Diff               @@
##             release/v1.3    #9229   +/-   ##
===============================================
  Coverage           94.10%   94.10%           
  Complexity           4810     4810           
===============================================
  Files                1194     1194           
  Lines               48648    48650    +2     
  Branches             5868     5868           
===============================================
+ Hits                45781    45784    +3     
  Misses               1411     1411           
+ Partials             1456     1455    -1     
Flag Coverage Δ *Carryforward flag
access-control-service 81.00% <ø> (ø) Carriedforward from b92d0b2
agent-service 99.32% <ø> (ø) Carriedforward from b92d0b2
amber 90.11% <ø> (ø) Carriedforward from b92d0b2
computing-unit-managing-service 73.67% <ø> (ø) Carriedforward from b92d0b2
config-service 87.00% <ø> (ø) Carriedforward from b92d0b2
file-service 87.75% <ø> (ø) Carriedforward from b92d0b2
frontend 96.89% <100.00%> (+<0.01%) ⬆️
notebook-migration-service 79.31% <ø> (ø) Carriedforward from b92d0b2
pyamber 98.18% <ø> (ø) Carriedforward from b92d0b2
workflow-compiling-service 77.19% <ø> (ø) Carriedforward from b92d0b2

*This pull request uses carry forward flags. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@mengw15
mengw15 added this pull request to the merge queue Nov 4, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Nov 4, 2026
@mengw15
mengw15 added this pull request to the merge queue Nov 4, 2026
Merged via the queue into release/v1.3 with commit 46fbcb4 Nov 4, 2026
33 of 35 checks passed
@mengw15
mengw15 deleted the backport/9090-clear-the-search-bar-s-suggestions-when-v1.3 branch November 4, 2026 02:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

frontend Changes related to the frontend GUI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants