[webui] Display 0 for statistics before pipeline starts#6051
[webui] Display 0 for statistics before pipeline starts#6051mihaibudiu merged 1 commit intofeldera:mainfrom
Conversation
mythical-fred
left a comment
There was a problem hiding this comment.
Missing behavior coverage, see inline.
| import TransactionStatus from './performance/TransactionStatus.svelte' | ||
|
|
||
| const formatQty = (v: number) => format(',.0f')(v) | ||
| const formatQty = (v: number) => (typeof v === "number" && Number.isFinite(v) ? format(',.0f')(v) : '0') |
There was a problem hiding this comment.
This changes web-console behavior, so it needs a test. The new rule is undefined/NaN/non-finite stats render as 0 instead of formatting the raw value, and the frontend rules are explicit that behavioral web-console changes do not get a pass without coverage. Please add a focused Vitest/@testing-library test for this component (or extract formatQty into a tiny helper and unit-test it) that exercises both a normal number and the pre-start/non-finite case that regressed here.
|
0 is even worse than NaN. If we don't have data, we should display |
|
Why is 0 worse? it is the accurate number of records. |
The accurate number is not known at this point because we haven't received it from the pipeline. |
Signed-off-by: Mihai Budiu <mbudiu@feldera.com>
|
Amended commit to start from "unknown" |



Fixes #6050
Describe Manual Test Plan
See attached screenshot