aglinxinyuan opened a new pull request, #7783:
URL: https://github.com/apache/texera/pull/7783
### 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 `@NgModule`s 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)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]