Skip to content

refactor(frontend): drop unused generated protobuf TypeScript - #9020

Merged
aglinxinyuan merged 3 commits into
apache:mainfrom
omavashia2005:refactor/frontend-proto-generation
Oct 19, 2026
Merged

aglinxinyuan merged 3 commits into
apache:mainfrom
omavashia2005:refactor/frontend-proto-generation

Conversation

@omavashia2005

@omavashia2005 omavashia2005 commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

What changes were proposed in this PR?

bin/frontend-proto-gen.sh runs protoc on workflow.proto and virtualidentity.proto, but ts-proto also writes TypeScript for their transitive imports. Those imports are used only for ScalaPB options (scalapb.options, scalapb.field), which shape the Scala output and produce no TypeScript types. As a result, two files nothing uses were generated and committed:

File Lines Imported by
proto/google/protobuf/descriptor.ts 6824 scalapb.ts only
proto/scalapb/scalapb.ts 2394 nothing

Changes:

File Change
bin/frontend-proto-gen.sh Removes proto/scalapb and proto/google after protoc runs, so the files don't come back on the next regeneration
frontend/src/app/common/type/proto/{google,scalapb}/ Deleted
LICENSE Removes the descriptor.ts entry and the scalapb.ts line. The scalapb.proto entry stays because that file is still in the repo
.licenserc.yaml Removes the license-check exclusions for the two deleted files
Before:  protoc -> workflow.ts, virtualidentity.ts, scalapb.ts, descriptor.ts (committed, unused)
After:   protoc -> workflow.ts, virtualidentity.ts

User-facing behavior is unchanged.

Any related issues, documentation, discussions?

Closes #9012

Follows #9010, which added the LICENSE entries for these generated files.

How was this PR tested?

  • bash bin/frontend-proto-gen.sh: the output folder contains only org/apache/texera/amber/core/{virtualidentity,workflow}.ts
  • cd frontend && yarn build: succeeds
  • cd frontend && yarn test: 237 test files passed; 6649 tests passed, 1 skipped

No tests added: this removes dead generated code and nothing imports it.

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

Co-authored by Claude-Code (helped with file and code deletion, navigating repo, writing this PR description, and tests)

@github-actions github-actions Bot added refactor Refactor the code frontend Changes related to the frontend GUI docs Changes related to documentations infra labels Oct 19, 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: @mengw15, @aglinxinyuan
    You can notify them by mentioning @mengw15, @aglinxinyuan in a comment.

@github-actions

Copy link
Copy Markdown
Contributor

👋 Thanks for your first contribution to Texera, @omavashia2005!

If you're looking for a good place to start, browse issues labeled starter-task; they're scoped to be approachable for newcomers.

You can drive common housekeeping yourself by commenting one of these commands on its own line:

  • Issues. Comment /take to assign an open issue to yourself, or /untake to release it. You can find unclaimed work with the search filter is:issue is:open no:assignee.
  • Sub-issues. To link issues into a parent/child hierarchy, comment /sub-issue #5166 #5222 on the parent to attach those children (or /unsub-issue #5166 #5222 to detach them). From a child issue, comment /parent-issue #5166 to set its parent, or /unparent-issue to clear it (the current parent is detected automatically). References may be written as #5166 or as a bare 5166; cross-repository references are not supported.
  • Pull requests (author only). Comment /request-review @user to request a review from someone, or /unrequest-review @user to withdraw that request.

Each command must match exactly: /take this will not work, only /take does. For the full contribution flow, see CONTRIBUTING.md.

@omavashia2005

Copy link
Copy Markdown
Contributor Author

Hey @mengw15 and @aglinxinyuan - would love to get feedback & get this merged. Do lmk if any changes are needed on my end. Thanks!

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

Comment thread bin/frontend-proto-gen.sh Resolved
@omavashia2005

Copy link
Copy Markdown
Contributor Author

@aglinxinyuan let me know if this is ok. Thanks!

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

Left a mirror comment.

Comment thread bin/frontend-proto-gen.sh Resolved
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.33%. Comparing base (a46ddc6) to head (285661a).

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #9020      +/-   ##
============================================
- Coverage     92.33%   92.33%   -0.01%     
  Complexity     5045     5045              
============================================
  Files          1261     1261              
  Lines         54120    54120              
  Branches       6768     6768              
============================================
- Hits          49970    49969       -1     
  Misses         2488     2488              
- Partials       1662     1663       +1     
Flag Coverage Δ *Carryforward flag
access-control-service 77.38% <ø> (ø) Carriedforward from 57d887c
agent-service 99.16% <ø> (ø) Carriedforward from 57d887c
amber 87.31% <ø> (ø) Carriedforward from 57d887c
computing-unit-managing-service 60.48% <ø> (ø) Carriedforward from 57d887c
config-service 87.37% <ø> (ø) Carriedforward from 57d887c
file-service 82.00% <ø> (ø) Carriedforward from 57d887c
frontend 96.55% <ø> (-0.01%) ⬇️
notebook-migration-service 83.73% <ø> (ø) Carriedforward from 57d887c
pyamber 98.51% <ø> (ø) Carriedforward from 57d887c
workflow-compiling-service 72.43% <ø> (ø) Carriedforward from 57d887c

*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 19, 2026
Merged via the queue into apache:main with commit 22b82a2 Oct 19, 2026
25 checks passed
renovate-bot pushed a commit to renovate-bot/apache-_-texera that referenced this pull request Nov 3, 2026
…he#9269)

### What changes were proposed in this PR?

Removes 36 image files of unknown origin that Texera never shows (option
A on apache#8984). They have no recorded source, so they can't ship in the
source release, and since nothing uses them, deleting them is simpler
than replacing them.

- **35 operator icons** whose names match no registered operator type
(`LogicalOp.scala`). Operator icons are only loaded as
`assets/operator_images/<operatorType>.png` (`joint-ui.service.ts`), and
no code references these files by path.
- **`frontend/src/favicon.ico`**: the Angular CLI default favicon from
the 2018 scaffold. `index.html` uses the favicons in `assets/logos/`,
and `angular.json` only copies `src/assets`, so it was never served.

<details>
<summary>The 35 operator icons</summary>

- **Name not referenced anywhere (25):** `AdhocSink`,
`DictionarySource`, `EmojiSentiment`, `FuzzyTokenMatcher`,
`FuzzyTokenSource`, `HdfsFileScan`, `JoinDistance`, `LocalFileScan`,
`NlpEntity`, `NlpSplit`, `RegexMatcher`, `RegexSource`, `RegexSplit`,
`SVMClassifierTrainer`, `SVMRegressorTrainer`, `Sampler`,
`SentimentAnalysis`, `SimilarityJoin`, `SklearnDummy`,
`SklearnTrainingDummy`, `ToLowerCase`, `WordCloudV2`, `WordCount`,
`WordCountIndexSource`, `run-icon`
- **Name only in test fixtures, mocks or prose, never as an image path
(10):** `Aggregation`, `Comparison`, `FileSource`, `KeywordMatcher`,
`KeywordSource`, `NlpSentiment`, `ScanSource`, `SimpleSink`,
`TimeSeries`, `ViewResults`

`SklearnDummy*.png` matched no operator type; the
`SklearnDummyClassifier` operators get their own icons in apache#9261.
</details>

With this PR, apache#9220 and apache#9261, every remaining file in
`frontend/src/assets/operator_images/` is either listed in `LICENSE` or
was made by the project (apache#5686, apache#8804, apache#8999, apache#9220, apache#9261). Git history
keeps the deleted files if any is ever needed again.

### Any related issues, documentation, discussions?

Part of apache#8984 (option A, proposed there on 2026-10-30). Follows apache#9220
and apache#9261. Precedent for deleting unused assets: apache#8803, apache#9020.

All 36 files are identical on `release/v1.3`, so this backports cleanly
there.

### How was this PR tested?

File deletions only, no code change.

- Checked each name against the operator registry (`LogicalOp.scala`)
and searched the repository for every name and `<name>.png` path: no
operator type and no image reference.
- The frontend loads operator icons only through
`"assets/operator_images/" + operatorType + ".png"`, so a file with no
matching operator type is never requested.
- `favicon.ico`: not referenced by `index.html` or `angular.json`.
`StaticAssetCacheFilterSpec` uses the `/favicon.ico` URL only as a
string to test cache headers.
- Coverage check after the change: each file left in `operator_images/`
is in `LICENSE`, carries a "Created for Apache Texera" PNG notice, or
was last written by one of the project-made PRs listed above.

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

Generated-by: Claude Code (claude-opus-5-5)

Claude Code was used to check the files against the operator registry
and code references and to draft this description.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Changes related to documentations frontend Changes related to the frontend GUI infra refactor Refactor the code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Frontend proto generation commits two TypeScript files nothing imports

3 participants