Skip to content

refactor(frontend): remove unused dataset dashboard code - #9463

Merged
aglinxinyuan merged 4 commits into
apache:mainfrom
aglinxinyuan:codex/refactor/fe-dataset-dashboard-cleanup
Nov 17, 2026
Merged

aglinxinyuan merged 4 commits into
apache:mainfrom
aglinxinyuan:codex/refactor/fe-dataset-dashboard-cleanup

Conversation

@aglinxinyuan

@aglinxinyuan aglinxinyuan commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

What changes were proposed in this PR?

Remove unreachable code from dataset creation, dashboard search, and file previews, and rename the dataset creator to match the model creator. +245/−388 lines across fourteen files.

  • The dashboard and result export both open the modal to create a dataset. Versions are created on the dataset detail page, so the shared creator form always shows its visibility and downloadability switches.
  • With only dataset creation left, UserDatasetVersionCreatorComponent becomes UserDatasetCreatorComponent and moves from user-dataset-explorer/ to user-dataset/user-dataset-creator/, matching UserModelCreatorComponent in user-model/user-model-creator/. GitHub shows its .ts as a new file because the move and the version-mode removal together change most of it.
  • Dashboard search has no callers for the public or all scopes.
  • HTML, PDF, MS Word, and MS PowerPoint suffixes already fall through to the unsupported-preview notice. The preview guard rejects binary files before the size lookup, and every type it accepts has its own size limit, so the default limit is never used.
Code Introduced by Usage removed by
Modal version mode #3296 #3659
Creator form switch toggle #2413 #3659
Dashboard search scopes #2987 #3129
Binary preview size limit #2413 #3149
Default preview size limit #2413, #3427 Never reached
Unsupported MIME aliases #2413 Never selected a viewer

The modal mode and its switch toggle have been unreachable since August 2025, the search scopes since January 2025, and the binary size limit since December 2024.

Any related issues, documentation, discussions?

Closes #9462.

How was this PR tested?

From frontend/ on Node 24

NODE_OPTIONS=--max-old-space-size=8192 yarn test --progress=false \
  --include='**/{user-dataset-file-renderer,user-dataset-creator,user-model-creator,user-dataset,result-exportation,result-table-frame,context-menu,dataset-detail,version-uploader}.component.spec.ts'
yarn exec tsc --noEmit -p src/tsconfig.app.json
yarn exec tsc --noEmit -p src/tsconfig.spec.json
yarn format:ci
yarn build

509 tests passed across nine suites. The preview test now checks that the four affected suffixes still show the unsupported-preview state without a request to the backend. Both creation entry points, the model creator that shares the creator form, and the dataset version uploader are covered by the targeted run.

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

Generated-by: Codex (GPT-6) and Claude Code (Claude Opus 5.5)

The dataset creation modal opens only in dataset mode, the dashboard always uses the private search scope, and the preview guard excludes the removed types.
Copilot AI balanced review requested due to automatic review settings November 15, 2026 14:03

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@github-actions github-actions Bot added the frontend Changes related to the frontend GUI label Nov 15, 2026
@github-actions

github-actions Bot commented Nov 15, 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, @yangzhang75, @carloea2
    You can notify them by mentioning @tanishqgandhi1908, @yangzhang75, @carloea2 in a comment.

@codecov-commenter

codecov-commenter commented Nov 15, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.78%. Comparing base (e6e6217) to head (c51dcd5).
⚠️ Report is 22 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #9463      +/-   ##
============================================
- Coverage     91.79%   91.78%   -0.02%     
  Complexity     5026     5026              
============================================
  Files          1283     1281       -2     
  Lines         56872    56771     -101     
  Branches       7440     7410      -30     
============================================
- Hits          52208    52108     -100     
+ Misses         2799     2797       -2     
- Partials       1865     1866       +1     
Flag Coverage Δ *Carryforward flag
access-control-service 77.44% <ø> (ø) Carriedforward from a98dea5
agent-service 99.55% <ø> (ø) Carriedforward from a98dea5
amber 85.77% <ø> (ø) Carriedforward from a98dea5
computing-unit-managing-service 64.05% <ø> (ø) Carriedforward from a98dea5
config-service 87.73% <ø> (ø) Carriedforward from a98dea5
file-service 82.31% <ø> (ø) Carriedforward from a98dea5
frontend 96.42% <100.00%> (-0.02%) ⬇️
notebook-migration-service 83.77% <ø> (ø) Carriedforward from a98dea5
pyamber 98.50% <ø> (ø) Carriedforward from a98dea5
workflow-compiling-service 78.30% <ø> (ø) Carriedforward from a98dea5

*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 requested a review from kunwp1 November 16, 2026 01:59

@kunwp1 kunwp1 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the cleanup! I left two small comments. Separately, the creator only creates datasets now, so renaming it to UserDatasetCreatorComponent to match UserModelCreatorComponent could be a follow-up.

aglinxinyuan and others added 2 commits November 16, 2026 14:28
Both creators now leave showToggles at its default, so the creator form
always renders the visibility and downloadability switches.

isPreviewSupported only accepts types that have an entry in
MIME_TYPE_SIZE_LIMITS_MB, so the DEFAULT_MAX_SIZE fallbacks in
reloadFileContent cannot be reached.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The creator only creates datasets now, so rename
UserDatasetVersionCreatorComponent to UserDatasetCreatorComponent to
match UserModelCreatorComponent. Move it out of user-dataset-explorer/
to user-dataset/user-dataset-creator/, mirroring
user-model/user-model-creator/, since only the dataset list and result
export open it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@aglinxinyuan
aglinxinyuan added this pull request to the merge queue Nov 16, 2026
Merged via the queue into apache:main with commit 48fef8f Nov 17, 2026
28 checks passed
@aglinxinyuan
aglinxinyuan deleted the codex/refactor/fe-dataset-dashboard-cleanup branch November 17, 2026 01:07
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove unreachable branches from the dataset dashboard

4 participants