Repository navigation
fix(frontend): clear the picked version when switching datasets in the dataset picker - #8928
tanishqgandhi1908 wants to merge 1 commit into
Conversation
Automated Reviewer SuggestionsBased on the
|
Backport auto-label reportThis
|
Codecov Report✅ All modified and coverable lines are covered by tests. 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
*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:
|
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:
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:
Reopening the picker shows the saved dataset and version:
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)