aglinxinyuan opened a new pull request, #7993:
URL: https://github.com/apache/texera/pull/7993
### What changes were proposed in this PR?
Four frontend services and one component, bundled because each is only ~3
lines alone. Measured with the CI command itself (`nx test --coverage
--coverage-reporters=lcovonly`), before state restored per-file via `git show
HEAD:<path>`.
**+11 fully-covered lines and +10 branch arms.** Three of the four files
reach 100%; `workflow-result.service.ts` reaches 99.15%.
**Of those +11, nine are reachable from the real UI and two are defensive
defaults on public methods.** I would rather split them than present all eleven
as equivalent. The weaker two: `workflow-runtime-statistics.component.ts:137`
is an out-of-range tab index that the template cannot produce — it renders
exactly 8 tabs for 8 metric keys — but it *is* a public method reachable with a
legal argument, so it counts rather than being refused.
**`user-dataset-file-renderer.component.ts` was in scope and is absent**,
contributing zero: two dead `??`/`||` fallbacks already gated by
`isPreviewSupported`, plus an unreachable partial. `workflow-action.service.ts`
was excluded from the outset for the same reason — its three partials compare a
`Y.Map` value against a freshly-constructed `{x, y}` by reference, so the guard
cannot fire in production.
### A dead-code defect found while assessing, reported not pinned
The empty-row filter in `user-dataset-file-renderer`'s `loadTabularFile` is
**entirely dead**. `for (const cell in row)` enumerates array *index strings* —
`"0"`, `"1"`, … — never `""`, so `cell != ""` is always true, `areCellAllEmpty`
is always false, and no row is ever filtered. Verified directly in node: a
table containing an all-empty row and an empty row keeps both, with the empty
one padded out — contradicting the code's own "filter out all empty row"
comment.
Fixing it means iterating values with `for...of`, which is a production
change. The current behaviour is deliberately **not** pinned, so a fix will not
have to fight a test.
### Verification
22 mutations, **21 killed, 1 equivalent survivor**
(`workflow-result.service.ts:222`, an exhaustive-union arm whose branch body is
unreachable).
The first draft claimed `survivors: []` on
`ui-udf-parameters-sync.service.ts` at "100.00% Codecov". The percentage was
metric-true — independently reproduced at 54/54 — but the file carried **two
real holes** behind it. That is the pattern worth naming: a file can be fully
executed and still barely constrained.
Two further corrections: the bundle presented all +11 lines as equal in
quality (split above), and one uniqueness claim was accurate as far as it went
but incomplete about which sibling tests also failed.
### Deliberately not included
Three arms in the dropped renderer are unreachable, and any mutation
confined to them is equivalent by construction — so none was attempted rather
than being reported as a survivor.
Two constraints shaped what was possible here, both worth recording.
`@angular/build`'s unit-test runner hard-codes `isolate: false`, so every spec
shares one module registry: that rules out mutating an exported const at test
time (it would leak into every other importer), and it is why no `vi.mock` for
Plotly was added to the runtime-statistics spec — per #6580 that pattern is
green solo and red on CI. The existing mock-free real-Plotly pattern is used
instead.
No production file is touched.
### Any related issues, documentation, discussions?
Closes #7991
### How was this PR tested?
```
npx ng test --watch=false
--include="**/ui-udf-parameters-sync.service.spec.ts"
--include="**/workflow-result.service.spec.ts"
--include="**/workflow-result-export.service.spec.ts"
--include="**/workflow-runtime-statistics.component.spec.ts"
```
```
Test Files 4 passed (4)
```
`yarn format:ci` passes. `frontend/junit.xml` and `frontend/coverage/` are
regenerated by every run and are not committed; the jsdom `getContext not
implemented` noise from Monaco is pre-existing.
### 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]