tanishqgandhi1908 opened a new pull request, #8838: URL: https://github.com/apache/texera/pull/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="before-dataset-1-blank" src="https://github.com/user-attachments/assets/c35b24f2-e788-4766-8ecd-b948511a507b" /> <img width="1440" height="900" alt="before-model-1-blank" src="https://github.com/user-attachments/assets/e03f28bb-04b2-43a6-87de-7cbd6eabf9b2" /> After: the same pages right after opening the tab: <img width="1440" height="900" alt="before-dataset-2-after-switch" src="https://github.com/user-attachments/assets/3d8ef884-6eee-4aca-8c24-8a976a123105" /> <img width="1440" height="900" alt="before-model-2-after-switch" src="https://github.com/user-attachments/assets/735095c0-798c-4e08-9d35-2af35f7d0e66" /> ### 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) -- 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]
