Skip to content

Sort missing numeric metrics below zero (#3874) - #15778

Open
MSharooq wants to merge 1 commit into
linkerd:mainfrom
MSharooq:codex/fix-missing-metric-sorting
Open

MSharooq wants to merge 1 commit into
linkerd:mainfrom
MSharooq:codex/fix-missing-metric-sorting

Conversation

@MSharooq

@MSharooq MSharooq commented Nov 8, 2026

Copy link
Copy Markdown

Sorting dashboard metrics in descending order places rows with null or
undefined metrics ahead of measured values, obscuring the highest values.

Use -1 as the sort value for missing entries in numeric columns. This
places missing metrics below zero in both sort directions while retaining
real zero measurements and leaving nonnumeric column sorting unchanged.

Validated with all 96 JavaScript tests across 15 suites, the webpack build
(including ESLint), and git diff --check. The new regression test fails on
the original code and checks both sort directions, including zero values.

To reproduce the checks from the repository root:

cd web/app
yarn install --frozen-lockfile
yarn lingui compile
yarn jest --runInBand --watch=false --no-coverage
NODE_ENV=test yarn webpack

Before and after screenshots use the same isolated MetricsTable fixture,
sorted by P99 latency descending, with missing, positive, and zero values:

Before After
Missing metrics precede measured values Missing metrics sort below zero

Fixes #3874

Signed-off-by: Mohammed Sharooq sharooqlavanya04@gmail.com

Sorting dashboard metrics in descending order places rows with null or
undefined metrics ahead of measured values, obscuring the highest values.

Use -1 as the sort value for missing entries in numeric columns. This
places missing metrics below zero in both sort directions while retaining
real zero measurements and leaving nonnumeric column sorting unchanged.

Validated with all 96 JavaScript tests across 15 suites, ESLint for
BaseTable.jsx, and git diff --check. The new regression test fails on the
original code and checks both sort directions, including zero values.

Fixes linkerd#3874

Signed-off-by: Mohammed Sharooq <sharooqlavanya04@gmail.com>
@MSharooq
MSharooq requested a review from a team as a code owner November 8, 2026 09:08
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.

Dashboard/UI should treat no-value rows as below-zero in sorting

1 participant