mengw15 opened a new pull request, #7688:
URL: https://github.com/apache/texera/pull/7688
### What changes were proposed in this PR?
Takes the missing side of each conditional in the four files, so their
partial
branches clear. No production code was changed.
**`DatasetSelectionModalComponent`** (+4) — no dataset selected, so no
version
list is fetched; a dataset selected in non-file mode, where the versions
load but
none is auto-selected; a dataset with no version, so the file tree is not
fetched; and a file click in non-file mode, which leaves the path alone.
**`UdfDebugService`** (+12) — a condition set on a line that has no
breakpoint;
clearing a breakpoint that lost its id; console events from another
operator, with
no messages, and not from the debugger; a status update that is not
`Uninitialized`; stepping and deletion messages that carry no line number;
a deletion for a line with no debug state; creation messages missing the id,
and
missing both id and line; a stepping message on an existing breakpoint; and
the
two `markContinue` combinations the existing test did not reach.
**`HubWorkflowDetailComponent`** (+8) — a workflow with a description and one
with an empty description, asserting the placeholder reaches the description
child; `postUnlike` reporting failure; the refreshed counts carrying no
`like`
on both the like and the unlike path; and the two `wid` re-checks inside the
like/unlike handlers. The two like/unlike responses are asynchronous in
production, so a `Subject` stands in for the pending request and the id is
cleared between issuing the call and the response arriving — `of(...)`
resolves
too early to reach those `return`s.
**`UserDatasetComponent`** (+9) — both view-child accessors read before the
view
is initialized, so each `throw` runs, and read after assignment; the filter
component reporting a change; and the search de-duplication guard driven one
condition at a time: unchanged, forced, a changed sort method, a filter
added,
and a filter replaced by another (same length, different contents, which
only the
element-wise comparison distinguishes).
Two spots named by the issue are not reachable and are left uncovered:
- `UserDatasetComponent`'s `if (!this.searchResultsComponent) throw new
Error("searchResultsComponent is undefined.")` is dead. The accessor above
it
either returns a truthy component or throws, so the negation is never true
—
the "before it is initialized" error is what actually fires, and that is
the
one the tests assert.
- `hub-workflow-detail.component.ts:65` is the class declaration line, which
the
source map attributes TypeScript's emitted decorator helper to. It was
already
uncovered before this change (baseline unhit lines were `65,239,257`; 239
and
257 are the two `return`s this PR covers).
### Any related issues, documentation, discussions?
Closes #7686
### How was this PR tested?
Extended unit tests, run locally in `frontend/` (all green; the failure paths
were verified by breaking assertions in each file and confirming the suites
go
red and exit non-zero):
```
ng test --watch=false --include
.../dataset-selection-modal.component.spec.ts # 11 passed
ng test --watch=false --include .../udf-debug.service.spec.ts
# 33 passed
ng test --watch=false --include .../hub-workflow-detail.component.spec.ts
# 42 passed
ng test --watch=false --include .../user-dataset.component.spec.ts
# 35 passed
prettier --write <specs> # clean
eslint <specs> # clean
```
The coverage report was re-run over the four specs to confirm the partials
cleared: `dataset-selection-modal.component.ts` and `udf-debug.service.ts`
reach
100% of statements with no partial or never-taken branch left;
`hub-workflow-detail.component.ts` and `user-dataset.component.ts` are left
only
with the two unreachable spots described above.
### Was this PR authored or co-authored using generative AI tooling?
Generated-by: Claude Code (Opus 4.8 [1M context])
--
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]