Skip to content

chore(frontend, amber): remove the unreachable available-result event and orphaned list item - #7783

Open
aglinxinyuan wants to merge 1 commit into
apache:mainfrom
aglinxinyuan:cleanup/available-result-event-and-orphans
Open

chore(frontend, amber): remove the unreachable available-result event and orphaned list item#7783
aglinxinyuan wants to merge 1 commit into
apache:mainfrom
aglinxinyuan:cleanup/available-result-event-and-orphans

Conversation

@aglinxinyuan

Copy link
Copy Markdown
Contributor

What changes were proposed in this PR?

Removes three unreachable pieces of code. 998 lines deleted, 1 added.

1. WorkflowAvailableResultEvent and its dangling client handler. Nothing in src/main constructs the event, and it is not among the 11 classOf[...] entries in TexeraWebSocketEvent.scala's @JsonSubTypes, so it is not reflectively dispatched either. Yet workflow-result.service.ts still subscribed to "WorkflowAvailableResultEvent" and routed it to handleCleanResultCache — a handler the backend could never trigger.

A second signal that this path was never live: the TypeScript type declared availableOperators as ReadonlyArray<OperatorAvailableResult>, while both the Scala event and the handler treat it as a keyed map (Map[String, OperatorAvailableResult] / Object.entries(...)). The declared wire shape matched neither producer nor consumer.

Removed: the Scala event, the frontend subscription, handleCleanResultCache, the orphaned TS types and their TexeraWebsocketEventTypeMap entry, and a then-unused WebOutputMode import.

2. UserDatasetListItemComponent is orphaned. Its selector appears repo-wide only in its own @Component declaration and its own spec's test host. The single other reference was a standalone entry in app.module.ts's imports array with no consumer — and since declarations is [AppComponent] only, being in imports merely exposes it to AppComponent's template, where the selector does not appear. The dataset page moved to texera-card-item/texera-search-results in #5947.

Checked beyond the selector, because a component can be reached indirectly: only two @NgModules exist in the app, no loadChildren/loadComponent lazy routes reference it, and there is no createComponent/ngComponentOutlet/ComponentFactoryResolver instantiation.

Removed the .ts, .html, .scss, its spec, and both app.module.ts lines.

3. DynamicSchemaService.dynamicSchemaExists — exactly one occurrence repo-wide, its own declaration, while every sibling method has 2 to 5 call sites.

Two tests were removed, deliberately

Two cases in workflow-result.service.spec.ts existed solely to exercise handleCleanResultCache, by pushing a synthetic event directly onto the socket subject. Their own fixtures are corroborating evidence: they pass availableOperators as a keyed object — matching the Scala type and the handler — while the declared TS type said array. They could not have been written from a real frame.

The user-dataset-list-item spec went with its component for the same reason.

A stale scaladoc paragraph in TexeraWebSocketEventSpec.scala also named this event, noting that "nothing in main constructs it, so pinning its wire shape would only cement dead code" — an independent confirmation of the finding from an earlier reviewer. That paragraph is removed; the preceding one, which lists the five genuinely unregistered producers, stays accurate. No count or reflection assertion depended on it.

Verification

  • Full frontend suite: 200 files, 4708 passed, 1 skipped, 0 failed.
  • Amber TexeraWebSocketEventSpec: main and test compiled with no errors, 10/10 passed. Compiling clean is itself the proof that nothing in amber referenced the deleted class.
  • AOT ng build succeeded — this matters, because ng test and tsc --noEmit both miss Angular template errors, so a removed component could otherwise break the build silently. Bundle generation completed with zero NG#### diagnostics and zero errors referencing src/. The build's exit code is 1 from exactly the 13 pre-existing monaco webpack loader failures on node_modules assets, which are unrelated to this change.
  • yarn format:ci exits 0; scalafmtCheck, Test/scalafmtCheck and scalafixAll --check all pass — no imports were left orphaned.
  • Residual-reference greps for both removed symbols come back empty.

Any related issues, documentation, discussions?

Closes #7782

How was this PR tested?

npx ng test --watch=false
 Test Files  200 passed (200)
      Tests  4708 passed | 1 skipped (4709)

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

Generated-by: Claude Code (Opus 5)

Copilot AI lite review requested due to automatic review settings August 19, 2026 09:20

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 reached their quota limit.

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

@github-actions github-actions Bot added engine frontend Changes related to the frontend GUI labels Aug 19, 2026
@codecov-commenter

codecov-commenter commented Aug 19, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.25%. Comparing base (bf0e777) to head (173fe37).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##               main    #7783    +/-   ##
==========================================
  Coverage     91.24%   91.25%            
- Complexity     4468     4470     +2     
==========================================
  Files          1171     1168     -3     
  Lines         47115    46987   -128     
  Branches       5286     5271    -15     
==========================================
- Hits          42991    42878   -113     
+ Misses         2448     2436    -12     
+ Partials       1676     1673     -3     
Flag Coverage Δ *Carryforward flag
access-control-service 81.00% <ø> (ø) Carriedforward from bf0e777
agent-service 98.62% <ø> (ø) Carriedforward from bf0e777
amber 88.03% <ø> (+0.04%) ⬆️
computing-unit-managing-service 73.67% <ø> (ø) Carriedforward from bf0e777
config-service 86.73% <ø> (ø) Carriedforward from bf0e777
file-service 68.90% <ø> (ø) Carriedforward from bf0e777
frontend 92.62% <ø> (-0.02%) ⬇️
notebook-migration-service 83.74% <ø> (ø) Carriedforward from bf0e777
pyamber 97.57% <ø> (ø) Carriedforward from bf0e777
workflow-compiling-service 77.19% <ø> (ø) Carriedforward from bf0e777

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

@github-actions

Copy link
Copy Markdown
Contributor

✅ No material benchmark regressions detected

🟢 5 better · 🔴 0 worse · ⚪ 10 noise (<±5%) · 0 without baseline

Compared against main bf0e777 benchmarked on this same runner, so the delta is largely free of cross-runner hardware noise. The "7d avg" column still reflects the gh-pages dashboard. Treat <±5% as noise unless repeated.

Dashboard · Run

config throughput MB/s latency max Δ latest / 7d
🟢 bs=10 sw=10 sl=64 794 0.485 12,259/15,835/15,835 us 🟢 -12.3% / 🟢 -20.3%
🟢 bs=100 sw=10 sl=64 1,808 1.104 55,608/61,488/61,488 us 🟢 -24.2% / 🟢 +88.5%
bs=1000 sw=10 sl=64 2,057 1.256 480,637/545,746/545,746 us ⚪ within ±5% / 🟢 +106.9%
Baseline details

Latest main bf0e777 from same runner

config metric PR latest main 7d avg Δ latest Δ 7d
bs=10 sw=10 sl=64 throughput 794 tuples/sec 765 tuples/sec 743.3 tuples/sec +3.8% +6.8%
bs=10 sw=10 sl=64 MB/s 0.485 MB/s 0.467 MB/s 0.454 MB/s +3.9% +6.9%
bs=10 sw=10 sl=64 p50 12,259 us 13,140 us 13,204 us -6.7% -7.2%
bs=10 sw=10 sl=64 p95 15,835 us 18,051 us 16,220 us -12.3% -2.4%
bs=10 sw=10 sl=64 p99 15,835 us 18,051 us 19,867 us -12.3% -20.3%
bs=100 sw=10 sl=64 throughput 1,808 tuples/sec 1,786 tuples/sec 959.52 tuples/sec +1.2% +88.4%
bs=100 sw=10 sl=64 MB/s 1.104 MB/s 1.09 MB/s 0.586 MB/s +1.3% +88.5%
bs=100 sw=10 sl=64 p50 55,608 us 53,052 us 103,974 us +4.8% -46.5%
bs=100 sw=10 sl=64 p95 61,488 us 81,132 us 111,036 us -24.2% -44.6%
bs=100 sw=10 sl=64 p99 61,488 us 81,132 us 118,982 us -24.2% -48.3%
bs=1000 sw=10 sl=64 throughput 2,057 tuples/sec 2,027 tuples/sec 994.68 tuples/sec +1.5% +106.8%
bs=1000 sw=10 sl=64 MB/s 1.256 MB/s 1.237 MB/s 0.607 MB/s +1.5% +106.9%
bs=1000 sw=10 sl=64 p50 480,637 us 485,754 us 1,011,206 us -1.1% -52.5%
bs=1000 sw=10 sl=64 p95 545,746 us 557,925 us 1,055,603 us -2.2% -48.3%
bs=1000 sw=10 sl=64 p99 545,746 us 557,925 us 1,084,808 us -2.2% -49.7%
Raw CSV
config_idx,batch_size,schema_width,string_len,num_batches,total_ms,total_tuples,total_bytes,tuples_per_sec,mb_per_sec,lat_p50_us,lat_p95_us,lat_p99_us
0,10,10,64,20,251.82,200,128000,794,0.485,12258.97,15835.05,15835.05
1,100,10,64,20,1105.97,2000,1280000,1808,1.104,55607.53,61487.81,61487.81
2,1000,10,64,20,9721.86,20000,12800000,2057,1.256,480636.59,545745.51,545745.51

@aglinxinyuan
aglinxinyuan requested a review from mengw15 August 19, 2026 22:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

engine frontend Changes related to the frontend GUI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unreachable websocket event, orphaned dataset list-item component and unused schema helper

3 participants