[webui] Display 0 for statistics before pipeline starts by mihaibudiu · Pull Request #6051 · feldera/feldera · GitHub
Skip to content

[webui] Display 0 for statistics before pipeline starts#6051

Merged
mihaibudiu merged 1 commit intofeldera:mainfrom
mihaibudiu:issue6050
Apr 16, 2026
Merged

[webui] Display 0 for statistics before pipeline starts#6051
mihaibudiu merged 1 commit intofeldera:mainfrom
mihaibudiu:issue6050

Conversation

@mihaibudiu
Copy link
Copy Markdown
Contributor

@mihaibudiu mihaibudiu commented Apr 15, 2026

Fixes #6050

Describe Manual Test Plan

See attached screenshot

@mihaibudiu mihaibudiu requested a review from lalithsuresh April 15, 2026 22:11
@mihaibudiu
Copy link
Copy Markdown
Contributor Author

Copy link
Copy Markdown

@mythical-fred mythical-fred left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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')
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@ryzhyk
Copy link
Copy Markdown
Contributor

ryzhyk commented Apr 15, 2026

0 is even worse than NaN. If we don't have data, we should display - or (no value).

@mihaibudiu
Copy link
Copy Markdown
Contributor Author

Why is 0 worse? it is the accurate number of records.

@ryzhyk
Copy link
Copy Markdown
Contributor

ryzhyk commented Apr 15, 2026

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.

@mihaibudiu
Copy link
Copy Markdown
Contributor Author

image

Signed-off-by: Mihai Budiu <mbudiu@feldera.com>
@mihaibudiu
Copy link
Copy Markdown
Contributor Author

Amended commit to start from "unknown"

@mihaibudiu mihaibudiu enabled auto-merge April 15, 2026 23:25
@mihaibudiu mihaibudiu added this pull request to the merge queue Apr 16, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Apr 16, 2026
@mihaibudiu mihaibudiu added this pull request to the merge queue Apr 16, 2026
Merged via the queue into feldera:main with commit 91d9cd5 Apr 16, 2026
1 check passed
@mihaibudiu mihaibudiu deleted the issue6050 branch April 16, 2026 03:35
@lalithsuresh
Copy link
Copy Markdown
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Don't show NaNs when the pipeline hasn't sent any data to the UI

5 participants