aglinxinyuan opened a new issue, #7782:
URL: https://github.com/apache/texera/issues/7782
### Describe the bug
Three pieces of frontend and websocket code are unreachable, and one of them
leaves a dangling client handler wired to an event the backend can never send.
**1. `WorkflowAvailableResultEvent` has no producer, but the frontend still
subscribes to it.**
`grep -rn "WorkflowAvailableResultEvent("` across the repo returns only the
case class declaration — nothing in `src/main` constructs it, and it is not
among the 11 `classOf[...]` entries in `TexeraWebSocketEvent.scala`'s
`@JsonSubTypes`, so it is not reflectively dispatched either. Meanwhile
`frontend/src/app/workspace/service/workflow-result/workflow-result.service.ts`
still subscribes to `"WorkflowAvailableResultEvent"` and routes it to
`handleCleanResultCache`, which is therefore unreachable.
There is a second signal that this path was never live: the TypeScript type
in `workflow-websocket.interface.ts` declares `availableOperators` as
`ReadonlyArray<OperatorAvailableResult>`, while the Scala event and the handler
both treat it as a keyed map (`Map[String, OperatorAvailableResult]` /
`Object.entries(...)`). The declared wire shape matched neither producer nor
consumer.
**2. `UserDatasetListItemComponent` is orphaned.** Its selector
`texera-user-dataset-list-item` appears repo-wide only in its own `@Component`
declaration and its own spec's test host. The one other reference is 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.
**3. `DynamicSchemaService.dynamicSchemaExists` is unused** — exactly one
occurrence repo-wide, its own declaration, while every sibling method has 2–5
call sites.
### How to reproduce?
Grep for each symbol. For (1), note that `handleCleanResultCache` can only
be triggered by a synthetic event pushed directly onto the socket subject in a
test, never by a real frame.
### Version/Branch
main
### Task Type
- [x] Refactor / Cleanup
- [ ] DevOps / Deployment / CI
- [ ] Testing / QA
- [ ] Documentation
- [ ] Performance
- [ ] Other
--
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]