Skip to content

fix(frontend): clear the picked version when switching datasets in the dataset picker - #8928

Open
tanishqgandhi1908 wants to merge 1 commit into
apache:mainfrom
tanishqgandhi1908:fix/dataset-picker-stale-path
Open

tanishqgandhi1908 wants to merge 1 commit into
apache:mainfrom
tanishqgandhi1908:fix/dataset-picker-stale-path

Conversation

@tanishqgandhi1908

Copy link
Copy Markdown
Contributor

What changes were proposed in this PR?

DatasetSelectionModalComponent.onDatasetChange cleared the file tree but kept the previously picked version and path. After switching datasets, the version box still showed the old version name, Select stayed enabled, and clicking it returned the previous dataset’s path.

It now clears selectedVersion and selectedPath when the dataset changes, as ModelSelectionModalComponent.onModelChange already does. In file mode this also drops the previous file when the new dataset has no versions or its versions are still loading.

Reopening the picker on a saved value now also re-selects that version in non-file mode; previously only file mode did, so File Lister showed an empty version box.

Before: after switching to weather-readings, “v1” is still shown and Select returns owner-access-demo’s path:

before-2-switched-to-b before-3-field-value

After: the version box is emptied and Select is disabled until a version of the new dataset is picked, which then gives the right path:

after-1-switched-to-b after-2-field-value

Reopening the picker shows the saved dataset and version:

after-3-reopened

Any related issues, documentation, discussions?

Closes #8927

How was this PR tested?

Added three cases to dataset-selection-modal.component.spec.ts:

Switching datasets disables Select again (non-file mode).
Switching to a dataset with no versions drops the previous file (file mode).
Reopening on a saved value re-selects that version (non-file mode).

The first two fail without the fix.

cd frontend
yarn ng test --watch=false --include='**/dataset-selection-modal.component.spec.ts'
Tests 19 passed (19)

Also checked against a local stack with a File Lister operator, following the steps in #8927, and by reopening the picker afterwards.

Was this PR authored or co-authored using generative AI tooling?

Generated-by: Claude Code (Claude Opus 5.5)

@tanishqgandhi1908 tanishqgandhi1908 changed the title ix(frontend): clear the picked version when switching datasets in the dataset picker fix(frontend): clear the picked version when switching datasets in the dataset picker Oct 8, 2026
@github-actions

github-actions Bot commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

Automated Reviewer Suggestions

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

  • No candidates found from git blame history.

@github-actions github-actions Bot added fix frontend Changes related to the frontend GUI labels Oct 8, 2026
@Yicong-Huang Yicong-Huang added release/v1.3 back porting to release/v1.3 release/v1.2 back porting to release/v1.2 labels Oct 8, 2026
@github-actions
github-actions Bot requested review from mengw15 and xuang7 October 8, 2026 19:21
@github-actions

github-actions Bot commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

Backport auto-label report

This fix: PR was checked against each actively-supported release branch. A release/* label nominates a backport target; the branch's release manager approving this PR is what sends the fix there. The required Backport Approvals check stays red until every label below is approved, so each manager either approves or removes their own label — which is why the labels left on a merged PR are exactly the branches it reached.

Release branch Analysis
✅ release/v1.3 Change detected on this branch — label added; this fix is queued to backport here. @mengw15 decides: approving sends the fix here, removing this label declines it. The merge waits on one or the other. Review requested.
✅ release/v1.2 Change detected on this branch — label added; this fix is queued to backport here. @xuang7 decides: approving sends the fix here, removing this label declines it. The merge waits on one or the other. Review requested.

Auto-label run.

@codecov-commenter

codecov-commenter commented Oct 8, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.24%. Comparing base (be65bf8) to head (3783ece).

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #8928      +/-   ##
============================================
+ Coverage     92.60%   93.24%   +0.63%     
  Complexity     5046     5046              
============================================
  Files          1252     1256       +4     
  Lines         53586    60394    +6808     
  Branches       6673     8325    +1652     
============================================
+ Hits          49625    56314    +6689     
- Misses         2317     2361      +44     
- Partials       1644     1719      +75     
Flag Coverage Δ *Carryforward flag
access-control-service 77.38% <ø> (ø) Carriedforward from be65bf8
agent-service 99.16% <ø> (ø) Carriedforward from be65bf8
amber 88.11% <ø> (ø) Carriedforward from be65bf8
computing-unit-managing-service 60.48% <ø> (ø) Carriedforward from be65bf8
config-service 87.37% <ø> (ø) Carriedforward from be65bf8
file-service 81.53% <ø> (ø) Carriedforward from be65bf8
frontend 96.94% <100.00%> (+0.35%) ⬆️
notebook-migration-service 83.73% <ø> (ø) Carriedforward from be65bf8
pyamber 98.52% <ø> (ø) Carriedforward from be65bf8
workflow-compiling-service 74.09% <ø> (ø) Carriedforward from be65bf8

*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.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fix frontend Changes related to the frontend GUI release/v1.2 back porting to release/v1.2 release/v1.3 back porting to release/v1.3

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The dataset version picker returns the previous dataset’s path after switching datasets

3 participants