Skip to content

chore: Removal of extra operator statistics - #3558

Merged
jaeyun0503 merged 2 commits into
apache:masterfrom
jaeyun0503:jaeyun-port-stat-improvement
Jul 11, 2025
Merged

jaeyun0503 merged 2 commits into
apache:masterfrom
jaeyun0503:jaeyun-port-stat-improvement

Conversation

@jaeyun0503

Copy link
Copy Markdown
Contributor

This PR addresses the unnecessary statistics from the operators. In previous versions the Processed and Output counts would be shown when an operator is highlighted. This PR removes these two statistics so that the data row counts are only shown on the input and output ports.

Changed File:

  • core/gui/src/app/workspace/service/joint-ui/joint-ui.service.ts
image

@jaeyun0503
jaeyun0503 requested a review from aglinxinyuan July 11, 2025 22:39
@jaeyun0503 jaeyun0503 self-assigned this Jul 11, 2025
@jaeyun0503 jaeyun0503 added the frontend Changes related to the frontend GUI label Jul 11, 2025

@aglinxinyuan aglinxinyuan 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!

@jaeyun0503 jaeyun0503 changed the title chore(gui): Removal of extra operator statistics chore: Removal of extra operator statistics Jul 11, 2025
@jaeyun0503
jaeyun0503 merged commit 1976896 into apache:master Jul 11, 2025
SarahAsad23 pushed a commit to madisonmlin/texera that referenced this pull request May 20, 2026
This PR addresses the unnecessary statistics from the operators. In
previous versions the Processed and Output counts would be shown when an
operator is highlighted. This PR removes these two statistics so that
the data row counts are only shown on the input and output ports.

Changed File:
- core/gui/src/app/workspace/service/joint-ui/joint-ui.service.ts

<img width="312" height="120" alt="image"
src="https://github.com/user-attachments/assets/fed4c3b2-1396-4da3-ab6c-ab1d02cd67b0"
/>

Co-authored-by: Xinyuan Lin <[email protected]>
yangzhang75 pushed a commit to yangzhang75/texera that referenced this pull request Jun 22, 2026
This PR addresses the unnecessary statistics from the operators. In
previous versions the Processed and Output counts would be shown when an
operator is highlighted. This PR removes these two statistics so that
the data row counts are only shown on the input and output ports.

Changed File:
- core/gui/src/app/workspace/service/joint-ui/joint-ui.service.ts

<img width="312" height="120" alt="image"
src="https://github.com/user-attachments/assets/fed4c3b2-1396-4da3-ab6c-ab1d02cd67b0"
/>

Co-authored-by: Xinyuan Lin <[email protected]>
renovate-bot pushed a commit to renovate-bot/apache-_-texera that referenced this pull request Nov 27, 2026
### 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`. apache#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 apache#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. apache#3033 removed operator groups, their last reader.
- The attribute blocks for the abbreviated, processed and output count
labels go. apache#3558 removed those labels from the markup.

| Event | PR / Commit |
| --- | --- |
| Introduced by | Forwarders and the re-exported type: apache#8078
(2026-08-31); uploader field: apache#2719 (2024-07-23);
`HubComponent.isLogin`: apache#2725 (2024-09-24); `ActionType.Unlike`: apache#3442
(2025-06-28); group margins: apache#754 (2020-12-11); count-label attributes:
apache#1374 (2021-11-23) and apache#3477 (2025-07-08) |
| Usage removed by | Uploader field: apache#3296 (2025-03-11). Group margins:
apache#3033 (2024-11-13). Count-label attributes: apache#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 apache#9719.

### How was this PR tested?

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

```bash
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`:

```bash
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)
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.

2 participants