The GitHub Actions job "Backport Checks" on texera.git/backport/8838-list-a-version-s-files-when-the-versions-v1.3 has succeeded. Run started by GitHub user mengw15 (triggered by mengw15).
Head commit for run: 2b9bd308999905bbabdcb6e422664e21dbf8ccbe / Tanishq Gandhi <[email protected]> fix(frontend): list a version's files when the Versions & Files tab opens (#8838) ### What changes were proposed in this PR? The version file tree uses virtual scroll, which measures its viewport once and then only on scroll. On the dataset and model detail pages the tree sits in the "Versions & Files" tab, which is hidden when the page loads. So the files arrived while the tree measured a 0px viewport, and it drew no rows until switching versions changed its height and forced a re-measure. The tree now re-measures itself whenever its container is shown or resized, using a `ResizeObserver`. The fix is inside the tree component, so the dataset page, the model page and the two version pickers that reuse it are all covered. No change to the host pages. - `user-dataset-version-filetree.component.ts`: observe the container and call `tree.sizeChanged()` (past the library's throttle) on resize; disconnect on destroy. The existing re-measure on a height change goes through the same helper. - `user-dataset-version-filetree.component.html`: `#container` ref on the tree's container. Before: dataset and model right after opening the tab: <img width="1440" height="900" alt="annotated-before-dataset" src="https://github.com/user-attachments/assets/01d99d8c-179b-455f-ab03-68357b3164f3" /> <img width="1440" height="900" alt="annotated-before-model" src="https://github.com/user-attachments/assets/01631a0b-0d66-428a-8161-17ba0568efe3" /> After: the same pages right after opening the tab: <img width="1440" height="900" alt="annotated-after-dataset" src="https://github.com/user-attachments/assets/7c754657-b172-4b9f-a6a4-5c7fa53e54f7" /> <img width="1440" height="900" alt="annotated-after-model" src="https://github.com/user-attachments/assets/747b0135-923d-4735-b0d8-62c2fed0b348" /> ### Any related issues, documentation, discussions? Closes #8833 ### How was this PR tested? One case added to `user-dataset-version-filetree.component.browser.spec.ts`: a tree filled while hidden renders its rows once shown. It fails without the fix (0 rows) and passes with it. ``` cd frontend yarn ng run gui:test-browser --include='**/user-dataset-version-filetree.component.browser.spec.ts' # Tests 6 passed (6) yarn ng test --watch=false --include='**/user-dataset-version-filetree.component.spec.ts' --include='**/dataset-detail.component.spec.ts' --include='**/model-detail.component.spec.ts' # Tests 249 passed (249) ``` Also checked against a local stack: on a dataset and a model with two versions, the latest version's files are listed as soon as the "Versions & Files" tab opens, and switching versions still updates the list. ### Was this PR authored or co-authored using generative AI tooling? Generated-by: Claude Code (Claude Opus 5.5) (backported from commit 9a427ccfc8f2821a5ecd4a6a502baacc45c6d1cb) Co-authored-by: Meng Wang <[email protected]> Report URL: https://github.com/apache/texera/actions/runs/40819857823 With regards, GitHub Actions via GitBox
