Skip to content

refactor: remove unused dataset, hub and graph glyph code - #9720

Merged
aglinxinyuan merged 4 commits into
apache:mainfrom
aglinxinyuan:refactor/unused-dataset-hub-and-graph-code
Nov 27, 2026
Merged

aglinxinyuan merged 4 commits into
apache:mainfrom
aglinxinyuan:refactor/unused-dataset-hub-and-graph-code

Conversation

@aglinxinyuan

@aglinxinyuan aglinxinyuan commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

What changes were proposed in this PR?

Remove code that nothing uses from the dataset service, the dataset file uploader, the Hub component and service, and the canvas glyph service (+154/−578 lines). There is no behavior change.

  • DatasetService: four dead pieces go.
    • Six forwarders: multipartUpload, listMultipartUploads, findExistingUploadFiles and finalizeMultipartUpload only call MultipartUploadService, and resetDatasetFileDiff and getDatasetDiff only call StagedFileService. feat(frontend): add model file upload and version creation #8078 moved every caller to those services and kept the forwarders "so existing callers are untouched"; only specs still called or stubbed them.
    • The GuiConfigService and MultipartUploadService constructor dependencies that the forwarders and nothing else used.
    • The re-exported MultipartUploadProgress type, which nothing imports from here.
    • URL constants that nothing outside the service imports. The base paths become file-local, and the ones used once are written at their call site.
  • Specs:
    • The dataset spec's 15 cases that tested the upload and staging services through the forwarders go. multipart-upload.service.spec.ts and staged-file.service.spec.ts already cover 12 of them.
    • The other three move to multipart-upload.service.spec.ts: progress smoothing, the ETA clamp, and the 0% failure for an empty file. They account for 84 of the added lines.
    • The clamp case now stalls at 10 of 100 bytes. At 50, the clamped and unclamped ETAs both rounded to 3 s, so it passed with any bound.
    • The dataset spec's HTTP cases state the URLs they expect, and the dataset-detail spec drops its stubs of the removed forwarders.
  • FilesUploaderComponent: the newUploadFileTreeNodes field and its import, unused since Add FileService as a standalone microservice, LakeFS+S3 as dataset storage #3296.
  • Hub: HubComponent's isLogin input and GuiConfigService injection are never read. The dashboard stops passing isLogin, and keeps its own login state. ActionType.Unlike has no user; postUnlike keeps its literal endpoint.
  • JointUIService:
    • Sixteen constants that nothing imports become file-local: eleven glyph constants and five CSS class names. Their values are unchanged.
    • The DEFAULT_GROUP_MARGIN and DEFAULT_GROUP_MARGIN_BOTTOM statics go. Remove Operator Group #3033 removed operator groups, their last reader.
    • The attribute blocks for the abbreviated, processed and output count labels go. chore: Removal of extra operator statistics #3558 removed those labels from the markup.
Event PR / Commit
Introduced by Forwarders and the re-exported type: #8078 (2026-08-31); uploader field: #2719 (2024-07-23); HubComponent.isLogin: #2725 (2024-09-24); ActionType.Unlike: #3442 (2025-06-28); group margins: #754 (2020-12-11); count-label attributes: #1374 (2021-11-23) and #3477 (2025-07-08)
Usage removed by Uploader field: #3296 (2025-03-11). Group margins: #3033 (2024-11-13). Count-label attributes: #3558 (2025-07-11). Everything else: unused since introduction.

As of 2026-11-26:

  • HubComponent.isLogin and the group margins have gone unread for over 2 years.
  • The uploader field has been unused for over a year and a half, and the count-label attributes for over a year.
  • ActionType.Unlike has been unused for almost a year and a half.
  • The forwarders have had no caller in the almost 3 months they have existed.

Any related issues, documentation, discussions?

Closes #9719.

How was this PR tested?

Ran on this branch and on main at 927379aa28 (Windows 11; Node 24 with Yarn 4.14.1):

cd frontend
npx ng test --watch=false --include='**/dataset.service.spec.ts' --include='**/dataset-detail.component.spec.ts' --include='**/files-uploader.component.spec.ts' --include='**/hub.component.spec.ts' --include='**/dashboard.component.spec.ts' --include='**/hub.service.spec.ts' --include='**/joint-ui.service.spec.ts' --include='**/multipart-upload.service.spec.ts'
npx tsc --noEmit -p src/tsconfig.app.json
npx tsc --noEmit -p src/tsconfig.spec.json
npx ngc -p src/tsconfig.app.json --noEmit
yarn prettier-eslint --list-different $(git diff --name-only --relative origin/main -- src)
yarn eslint $(git diff --name-only --relative origin/main -- src | grep -E '\.(ts|html)$')
  • Specs: the eight specs run 357 tests on this branch and 371 on main, all passing.
    • The branch drops the dataset spec's 15 forwarder cases and runs 3 of them in the multipart spec.
    • It also drops the Hub component's isLogin and GuiConfigService checks, and renames one Hub case for the dropped input.
    • Every other test keeps its name and outcome.
  • Controls: widening or narrowing the engine's 30% ETA bound fails the moved clamp case (27 s or 20 s instead of 23 s). At 50 bytes, as on main, the widened bound passed. Dropping the empty-file guard fails the 0% case.
  • Checks: both typechecks, the AOT compile (the dashboard template changes), prettier-eslint and ESLint pass.

To re-check, this returns no hits on this branch and 19 on main:

git grep -nE "public (multipartUpload|listMultipartUploads|findExistingUploadFiles|finalizeMultipartUpload|resetDatasetFileDiff|getDatasetDiff)\(|newUploadFileTreeNodes|Unlike = |texera-operator-(abbreviated|processed|output)-count|private config: GuiConfigService|DEFAULT_GROUP_MARGIN|export const operator(ReuseCacheText|ReuseCacheIcon|ViewResultIcon|Icon|FriendlyName)Class" -- frontend/src/app/dashboard/service/user/dataset frontend/src/app/dashboard/component/user/files-uploader frontend/src/app/hub frontend/src/app/workspace/service/joint-ui

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

Generated-by: Claude Code (Claude Opus 5.5)

- DatasetService: four multipart forwarders that only its spec called (the
  uploader calls MultipartUploadService directly), two constructor
  dependencies nothing read, a re-exported progress type, and URL constants
  nothing imported, inlined where each was used once.
- FilesUploaderComponent: an unused file-tree field and its import.
- HubComponent: an isLogin input and a GuiConfigService injection that
  nothing read, and the unused ActionType.Unlike member.
- JointUIService: exports nothing imports, and attribute blocks for three
  operator count labels that no markup defines.
@aglinxinyuan
aglinxinyuan requested review from kunwp1 and a balanced review from Copilot November 26, 2026 06:05

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 refactor Refactor the code frontend Changes related to the frontend GUI labels Nov 26, 2026
@github-actions

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, @kunwp1, @mengw15
    You can notify them by mentioning @tanishqgandhi1908, @kunwp1, @mengw15 in a comment.

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

LGTM! One optional suggestion and a nit below.

The dataset spec's 15 cases that call MultipartUploadService or
StagedFileService go; the multipart and staged-file specs already cover
12 of them. The progress-smoothing, ETA-clamp and empty-file failure
cases move to multipart-upload.service.spec.ts. The clamp case now
stalls at 10 of 100 bytes, so rounding can no longer hide a wrong bound.
Five class-name constants that nothing outside joint-ui.service.ts
imports lose their export, and the unread DEFAULT_GROUP_MARGIN and
DEFAULT_GROUP_MARGIN_BOTTOM statics go.
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 96.29630% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 91.76%. Comparing base (927379a) to head (64b48bd).

Files with missing lines Patch % Lines
...c/app/dashboard/component/dashboard.component.html 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main    #9720      +/-   ##
============================================
- Coverage     91.77%   91.76%   -0.01%     
+ Complexity     5135     5118      -17     
============================================
  Files          1306     1305       -1     
  Lines         58051    57660     -391     
  Branches       7547     7512      -35     
============================================
- Hits          53274    52910     -364     
+ Misses         2889     2878      -11     
+ Partials       1888     1872      -16     
Flag Coverage Δ *Carryforward flag
access-control-service 77.44% <ø> (ø) Carriedforward from 9452628
agent-service 99.55% <ø> (-0.02%) ⬇️ Carriedforward from 9452628
amber 85.92% <ø> (-0.03%) ⬇️ Carriedforward from 9452628
computing-unit-managing-service 63.81% <ø> (ø) Carriedforward from 9452628
config-service 87.50% <ø> (ø) Carriedforward from 9452628
file-service 82.16% <ø> (ø) Carriedforward from 9452628
frontend 96.44% <96.29%> (-0.01%) ⬇️
notebook-migration-service 83.77% <ø> (-0.08%) ⬇️ Carriedforward from 9452628
pyamber 98.71% <ø> (+0.01%) ⬆️ Carriedforward from 9452628
result-service 86.48% <ø> (ø) Carriedforward from 9452628
workflow-compiling-service 80.90% <ø> (ø) Carriedforward from 9452628

*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 Nov 27, 2026
Merged via the queue into apache:main with commit fec4330 Nov 27, 2026
29 checks passed
@aglinxinyuan
aglinxinyuan deleted the refactor/unused-dataset-hub-and-graph-code branch November 27, 2026 00:28
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.

Remove unused dataset, hub and graph glyph code

4 participants