tanishqgandhi1908 opened a new pull request, #8928: URL: https://github.com/apache/texera/pull/8928
### 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: <img width="1440" height="900" alt="before-2-switched-to-b" src="https://github.com/user-attachments/assets/fb5d1fbc-6fd7-4385-93cd-555e861988f5" /> <img width="1440" height="900" alt="before-3-field-value" src="https://github.com/user-attachments/assets/d621cb88-9512-4975-9ba1-1cfd6f6239cc" /> 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: <img width="1440" height="900" alt="after-1-switched-to-b" src="https://github.com/user-attachments/assets/4f696e69-be45-4eaa-9a02-dbf1c9894086" /> <img width="1440" height="900" alt="after-2-field-value" src="https://github.com/user-attachments/assets/aa95879d-c72f-4978-a9a5-5700642be4f8" /> Reopening the picker shows the saved dataset and version: <img width="1440" height="900" alt="after-3-reopened" src="https://github.com/user-attachments/assets/26d07a7f-8c5f-4ba4-983e-70624574cb41" /> ### 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) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
