Skip to content

refactor(frontend): extract shared VersionsFilesBrowser component - #8942

Merged
aglinxinyuan merged 1 commit into
apache:mainfrom
Ma77Ball:refactor/frontend-versions-files-browser
Oct 10, 2026
Merged

aglinxinyuan merged 1 commit into
apache:mainfrom
Ma77Ball:refactor/frontend-versions-files-browser

Conversation

@Ma77Ball

@Ma77Ball Ma77Ball commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

What changes were proposed in this PR?

  • Extracted the duplicated "Versions & Files" tab from dataset-detail and model-detail into one shared presentational component, texera-versions-files-browser (template, SCSS, toolbar view-state, sider resize, and copy-path logic).
  • Both detail pages now render <texera-versions-files-browser> with inputs/outputs and keep their own data loading and version-selection logic.
  • Kept isMaximized and isRightBarCollapsed parent-owned as two-way bindings, since isMaximized also gates the page header outside the tab; the child reports toggles rather than owning the flags.
  • Moved the view-state unit tests (sider resize, animation-frame scheduling, copy-path, toggle emits) into the new component's spec; parent specs keep their integration coverage by rendering the real child.

Any related issues, documentation, discussions?

Closes: #8941

How was this PR tested?

  • Run cd frontend && npx ng test --include='**/versions-files-browser.component.spec.ts' --include='**/dataset-detail.component.spec.ts' --include='**/model-detail.component.spec.ts', expect all 231 tests to pass.
  • Open a dataset detail page, switch to the "Versions & Files" tab, confirm the version picker, file tree, file renderer, resize handle, maximize/minimize, hide/show right bar, copy-path, and zip download all behave as before.
  • Repeat on a model detail page and confirm identical behavior, and confirm the model Settings tab (which still uses nz-select) is unaffected.

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

Co-authored with Claude Opus 4.8 in compliance with ASF
🤖 Generated with Claude Code

…et-detail + model-detail into one shared texera-versions-files-browser component.
@github-actions github-actions Bot added refactor Refactor the code frontend Changes related to the frontend GUI labels Oct 9, 2026
@github-actions

github-actions Bot commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

Automated Reviewer Suggestions

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

  • Contributors with relevant context: @tanishqgandhi1908, @aglinxinyuan
    You can notify them by mentioning @tanishqgandhi1908, @aglinxinyuan in a comment.

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 98.32402% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 92.58%. Comparing base (2cd44ee) to head (71e2add).
⚠️ Report is 13 commits behind head on main.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
...el/user-model-explorer/model-detail.component.html 81.81% 2 Missing ⚠️
...iles-browser/versions-files-browser.component.html 98.95% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main    #8942      +/-   ##
============================================
- Coverage     92.59%   92.58%   -0.02%     
  Complexity     5043     5043              
============================================
  Files          1252     1254       +2     
  Lines         53583    53537      -46     
  Branches       6672     6670       -2     
============================================
- Hits          49617    49566      -51     
- Misses         2319     2321       +2     
- Partials       1647     1650       +3     
Flag Coverage Δ *Carryforward flag
access-control-service 77.38% <ø> (ø) Carriedforward from 2cd44ee
agent-service 99.16% <ø> (ø) Carriedforward from 2cd44ee
amber 88.07% <ø> (ø) Carriedforward from 2cd44ee
computing-unit-managing-service 60.41% <ø> (ø) Carriedforward from 2cd44ee
config-service 87.37% <ø> (ø) Carriedforward from 2cd44ee
file-service 81.53% <ø> (ø) Carriedforward from 2cd44ee
frontend 96.56% <98.32%> (-0.03%) ⬇️
notebook-migration-service 83.73% <ø> (ø) Carriedforward from 2cd44ee
pyamber 98.58% <ø> (ø) Carriedforward from 2cd44ee
workflow-compiling-service 74.09% <ø> (ø) Carriedforward from 2cd44ee

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

@aglinxinyuan
aglinxinyuan added this pull request to the merge queue Oct 10, 2026
Merged via the queue into apache:main with commit 8bfe034 Oct 10, 2026
27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

frontend Changes related to the frontend GUI refactor Refactor the code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Extract shared VersionsFilesBrowser component from dataset and model detail

3 participants