Skip to content

chore(frontend): remove unused operator icons of unknown origin - #9269

Merged
aglinxinyuan merged 1 commit into
apache:mainfrom
CaroFernando:feat/icons-delete-unused
Nov 3, 2026
Merged

aglinxinyuan merged 1 commit into
apache:mainfrom
CaroFernando:feat/icons-delete-unused

Conversation

@CaroFernando

Copy link
Copy Markdown
Contributor

What changes were proposed in this PR?

Removes 36 image files of unknown origin that Texera never shows (option A on #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.
The 35 operator icons
  • 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 #9261.

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

Any related issues, documentation, discussions?

Part of #8984 (option A, proposed there on 2026-10-30). Follows #9220 and #9261. Precedent for deleting unused assets: #8803, #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.

Part of apache#8984. These files have no recorded source and are never shown,
but they ship in the source release:

- 35 operator icons whose names match no registered operator type
  (LogicalOp.scala). Icons are only loaded as
  assets/operator_images/<operatorType>.png, and no code references these
  files; 10 of the names appear only in test fixtures, mocks or prose,
  never as an image path. Includes HdfsFileScan.png and the
  SklearnDummy*.png files (the SklearnDummyClassifier operators use
  SklearnDummyClassifier.png, added in apache#9261).
- frontend/src/favicon.ico, the Angular CLI default favicon from the 2018
  scaffold. index.html uses assets/logos/ and angular.json only copies
  src/assets, so it was never served.

Git history keeps the files if any is needed again.

Generated-by: Claude Code (claude-opus-5-5)
@github-actions github-actions Bot added feature frontend Changes related to the frontend GUI labels Nov 3, 2026
@github-actions

github-actions Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

Automated Reviewer Suggestions

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

  • No candidates found from git blame history.

@mengw15
mengw15 requested a balanced review from Copilot November 3, 2026 00:09

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 wasn't able to review any files in this pull request. Check if the Files changed in this pull request are included in default exclusions.

@mengw15 mengw15 added the release/v1.3 back porting to release/v1.3 label Nov 3, 2026
@mengw15
mengw15 requested review from mengw15 and parshimers November 3, 2026 00:09
@codecov-commenter

codecov-commenter commented Nov 3, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.93%. Comparing base (07fffb3) to head (e2dfe4a).

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #9269      +/-   ##
============================================
+ Coverage     92.17%   92.93%   +0.75%     
  Complexity     4987     4987              
============================================
  Files          1284     1288       +4     
  Lines         55605    63326    +7721     
  Branches       7120     8912    +1792     
============================================
+ Hits          51255    58853    +7598     
- Misses         2591     2641      +50     
- Partials       1759     1832      +73     
Flag Coverage Δ *Carryforward flag
access-control-service 77.44% <ø> (ø) Carriedforward from 07fffb3
agent-service 99.54% <ø> (ø) Carriedforward from 07fffb3
amber 86.84% <ø> (ø) Carriedforward from 07fffb3
computing-unit-managing-service 64.02% <ø> (ø) Carriedforward from 07fffb3
config-service 87.61% <ø> (ø) Carriedforward from 07fffb3
file-service 82.29% <ø> (ø) Carriedforward from 07fffb3
frontend 96.91% <ø> (+0.43%) ⬆️
notebook-migration-service 83.77% <ø> (ø) Carriedforward from 07fffb3
pyamber 98.54% <ø> (ø) Carriedforward from 07fffb3
workflow-compiling-service 77.95% <ø> (ø) Carriedforward from 07fffb3

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

@parshimers parshimers left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Seems fine. Most of these operators were apparently removed in 3c5ce29 but the icons stayed. The others were removed individually but again the icons were left over.

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

@aglinxinyuan
aglinxinyuan added this pull request to the merge queue Nov 3, 2026
Merged via the queue into apache:main with commit ae2203e Nov 3, 2026
97 of 112 checks passed
@github-actions

github-actions Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

Backport PR opened: #9270 (#9270) to release/v1.3 — the cherry-pick was clean, so it is ready for review, waiting on @mengw15. It needs to be reopened once to start its checks; the PR says how.

@xuang7

xuang7 commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

Hi @CaroFernando, this needs to go into release/v1.2 for the 1.2.1 RC2 as well. It cherry-picks cleanly. Could you open a backport PR against release/v1.2? Thanks!

renovate-bot pushed a commit to renovate-bot/apache-_-texera that referenced this pull request Nov 4, 2026
…e SVG (apache#9302)

### What changes were proposed in this PR?

Replaces `frontend/src/assets/card_background.jpg`, the default cover
image for dashboard and Hub cards, with `card_background.svg`, an image
drawn for the project.

The JPEG has no recorded source (it was marked unknown in the apache#9017
audit), and TinEye matches it to a [Shutterstock
vector](https://www.shutterstock.com/image-vector/abstract-vector-background-use-design-153172853),
so it can't ship in a release. The new SVG is an abstract blue low-poly
background (triangles shaded from light blue to navy, close in feel to
the old cover). It carries the ASF license header, so no `LICENSE` or
`LICENSE-binary` entry is needed, and at about 9 KB it replaces a 414 KB
JPEG.

The two places that use the image, `browse-section.component.ts` (Hub)
and `card-item.component.ts` (dashboard), and the Hub spec now point at
the `.svg`. Both show it through `<img>` with `object-fit: cover`; the
SVG uses `preserveAspectRatio="xMidYMid slice"`, so it is cropped the
same way the JPEG was.

### Any related issues, documentation, discussions?

Part of apache#8984, as requested there on 2026-11-04 (replace before RC1).
Follows apache#9220, apache#9261 and apache#9269. With this PR, no file the apache#9017 audit
marked unknown is still on `main` unchanged.

`card_background.jpg` is identical on `release/v1.3`, so this backports
cleanly there.

### How was this PR tested?

```
cd frontend
yarn format:ci
yarn lint
yarn test --watch=false
```

All pass: 248 test files, 7021 tests (1 skipped), including
`browse-section.component.spec.ts` and `card-item.component.spec.ts`.
Also opened the SVG in a browser to check rendering and cropping.

### 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 remaining images against the apache#9017
audit, draw the SVG, update the references and draft this description.

---------

Co-authored-by: Meng Wang <[email protected]>
xuang7 pushed a commit to xuang7/texera that referenced this pull request Nov 20, 2026
…ct-made SVG (apache#9559)

### What changes were proposed in this PR?

Backport of apache#9302 to `release/v1.2` for the 1.2.1 RC2.

Source: fd85b9d

Replaces `frontend/src/assets/card_background.jpg`, a stock image with
no recorded source (TinEye matches it to a Shutterstock vector), with
the project-made `card_background.svg` from apache#9302. The SVG carries the
ASF license header, so no `LICENSE` entry is needed.

The cherry-pick conflicted because the code that uses the cover image is
different on v1.2:

- `card-item.component.ts` doesn't exist on v1.2. On v1.2 the dashboard
cover comes from `defaultCover` in `dataset-card-item.component.ts`, so
that now points at the `.svg`. It shows the image through `<img>` with
`object-fit: cover`, like the main component, so the SVG's
`preserveAspectRatio="xMidYMid slice"` crops it the same way.
- `browse-section.component.ts` (Hub): only `defaultBackground` changes
to the `.svg`. v1.2's surrounding fields are kept.
- `browse-section.component.spec.ts`: the conflicting hunk only contains
tests that exist on main. The v1.2 spec doesn't reference the image, so
the file is unchanged.

After this change, nothing on the branch references
`card_background.jpg`.

### Any related issues, documentation, discussions?

Backport of apache#9302. Part of apache#8984. Independent of the apache#9220 (apache#9512) and
apache#9269 (apache#9513) backports, which are already merged.

### How was this PR tested?

```
cd frontend
yarn format:ci
yarn lint
yarn test --watch=false --include src/app/hub/component/browse-section/browse-section.component.spec.ts --include src/app/dashboard/component/user/dataset-card-item/dataset-card-item.component.spec.ts
```

All pass: 2 test files, 14 tests.

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

Generated-by: Claude Code (Claude Opus 5.5)

Co-authored-by: Meng Wang <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature frontend Changes related to the frontend GUI release/v1.3 back porting to release/v1.3

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants