Skip to content

ui: replace the never-useful latency heatmap with a command-latency panel - #245

Merged
zheli merged 3 commits into
webui-type-scale-hybridfrom
fix/metrics-heatmap-064
Jul 11, 2026
Merged

ui: replace the never-useful latency heatmap with a command-latency panel#245
zheli merged 3 commits into
webui-type-scale-hybridfrom
fix/metrics-heatmap-064

Conversation

@srikanth-bitdynamics

@srikanth-bitdynamics srikanth-bitdynamics commented Jul 11, 2026

Copy link
Copy Markdown
Collaborator

Stacked on #250 — base is that branch, so this diff shows only the command-latency change. Merge #250 first; GitHub retargets this to main automatically.

Problem

The Metrics screen's Submit-to-commit heatmap (latency density) never populates on any supported Splice version: 0.6.x exports the sequencing-duration histogram with only the +Inf bucket (verified live on 0.6.4 and 0.6.9), so there's no bucket distribution to plot. The earlier version of this PR just hid it behind a "not available" note — but that's permanent dead space.

Fix

Replace the panel with a metric that is both important and actually live: Command latency (daml_participant_api_commands_submissions_duration_seconds, avg ms per node).

Why this metric (researched against docs.canton.network + the live instance):

  • Canton's documented golden signals (storage load, in-flight/dirty requests, node health) all sit at zero on an idle LocalNet — important to alert on, but flat day-to-day.
  • Command-submission duration is Canton's documented command-latency signal, it's a real average (sum/count) that populates and moves (~16–33 ms per node live), and it restores a working latency view — at the participant/ledger-API layer, distinct from the sequencer-side "Sequencing latency" panel already shown.

Removes the heatmap machinery (loadHeatmap, heatmapCellsOrNote, the note constant, the Heatmap/Cell imports) and wires Q.cmdLatency through the existing per-node loader. The regression test now guards that the query is a real average, not a percentile.

Verification

tsc clean, full frontend suite green (219 tests). Verified live on a 0.6.9 LocalNet: the panel renders per-node command latency (app-provider 30 ms, app-user 33 ms, sv 16 ms); the heatmap is gone.

@srikanth-bitdynamics srikanth-bitdynamics changed the title fix(ui): don't render a misleading latency heatmap on Splice 0.6.4 ui: replace the never-useful latency heatmap with a command-latency panel Jul 11, 2026
The Submit-to-commit heatmap buckets sequencing latency by the histogram's
`le` boundaries. Stock Splice 0.6.4 exports that histogram with only the
+Inf bucket, so every observation collapsed into the top (>2s) row — the
panel read ">2s" for latency that is actually ~100ms, contradicting the
average shown right above it.

Same root cause as the hidden p50/p95/p99 strip. When no finite `le`
bucket is present, show a short note explaining the density can't be
resolved and pointing at the average, instead of the misleading grid. The
grid returns automatically on Splice versions whose histograms carry
finite buckets.

The bucket-vs-note decision is extracted to a pure heatmapCellsOrNote()
helper with a regression test.
Bringing up a Splice 0.6.9 LocalNet showed the note read "Not available
on Splice 0.6.4" on a 0.6.9 instance — the +Inf-only histogram is the
whole 0.6.x line, not 0.6.4 specifically (verified: 0.6.9 also exports a
single-bucket histogram, histogram_quantile is NaN there too). Reword to
"this Splice version" so it's correct on any affected instance.
The submit-to-commit heatmap never populates on any supported Splice
version — 0.6.x exports the sequencing histogram with only the +Inf
bucket (verified on 0.6.4 and 0.6.9), so a latency-density map has nothing
to plot. Rather than leave a permanent "not available" note in that slot,
put a metric there that is both important and actually live.

Per Canton's observability guidance the documented golden signals
(storage load, in-flight/dirty requests, node health) sit at zero on an
idle LocalNet. The command-submission duration — Canton's documented
command-latency signal — is a real average (sum/count) that populates and
moves, and it restores a working latency view at the participant / ledger
API layer (distinct from the sequencer-side "Sequencing latency" panel).

Removes the heatmap machinery (loadHeatmap, heatmapCellsOrNote, the note),
adds Q.cmdLatency through the existing per-node loader, and swaps the
regression test to guard the query stays a real average, not a percentile.
@srikanth-bitdynamics
srikanth-bitdynamics changed the base branch from main to webui-type-scale-hybrid July 11, 2026 08:29
@zheli
zheli merged commit 05d38c2 into webui-type-scale-hybrid Jul 11, 2026
6 checks passed
@zheli
zheli deleted the fix/metrics-heatmap-064 branch July 11, 2026 09:20
zheli pushed a commit that referenced this pull request Jul 11, 2026
…le (#250)

* style(webui): hybrid type scale — bump prose, keep data dense

Refines the flat 16px bump into a role-aware scale for a console that is
scanned and operated, not read top to bottom. Only prose grows; operational
data stays at its tight baseline so dense tables, metric values, and mono
IDs keep their density.

  - Page titles -> 22, descriptions -> 15
  - Prose section / card / dialog headings -> 15-16
  - Empty-state and dialog body copy -> 14-15
  - Untouched: table cells & headers, MonoId, metric values/labels/units,
    chart labels, status badges, nav/topbar, chips, ports, kbd, buttons.

65 fontSize increases across 20 files. No data sizes changed; tsc + build green.

* style(webui): centralize the type scale as rem tokens (fold in #249)

Adopts #249's accessibility approach — a named rem `fs` scale in tokens.ts
so the console honors the browser/OS font-size — on top of #250's role-aware
sizing. The root is now 100% and every inline fontSize references an fs.*
token, so operational data stays dense, prose reads larger, and the whole UI
scales with the reader's font-size preference.

- New `fs` rem scale: micro/label/meta/data/body/lead/strong/title/stat.
- ~440 inline fontSize px literals -> fs tokens (value-preserving, so the
  approved hybrid sizing is unchanged); MonoId and chart labels included.
- index.css root -> 100%, its font-sizes -> rem.

Combines what #248 (flat px) and #249 (flat rem) each had half of.
tsc + 218 frontend tests green.

* ui: replace the never-useful latency heatmap with a command-latency panel (#245)

* fix(ui): don't render a misleading latency heatmap on Splice 0.6.4

The Submit-to-commit heatmap buckets sequencing latency by the histogram's
`le` boundaries. Stock Splice 0.6.4 exports that histogram with only the
+Inf bucket, so every observation collapsed into the top (>2s) row — the
panel read ">2s" for latency that is actually ~100ms, contradicting the
average shown right above it.

Same root cause as the hidden p50/p95/p99 strip. When no finite `le`
bucket is present, show a short note explaining the density can't be
resolved and pointing at the average, instead of the misleading grid. The
grid returns automatically on Splice versions whose histograms carry
finite buckets.

The bucket-vs-note decision is extracted to a pure heatmapCellsOrNote()
helper with a regression test.

* fix(ui): make the heatmap "not available" note version-neutral

Bringing up a Splice 0.6.9 LocalNet showed the note read "Not available
on Splice 0.6.4" on a 0.6.9 instance — the +Inf-only histogram is the
whole 0.6.x line, not 0.6.4 specifically (verified: 0.6.9 also exports a
single-bucket histogram, histogram_quantile is NaN there too). Reword to
"this Splice version" so it's correct on any affected instance.

* ui: replace the latency heatmap with a command-latency panel

The submit-to-commit heatmap never populates on any supported Splice
version — 0.6.x exports the sequencing histogram with only the +Inf
bucket (verified on 0.6.4 and 0.6.9), so a latency-density map has nothing
to plot. Rather than leave a permanent "not available" note in that slot,
put a metric there that is both important and actually live.

Per Canton's observability guidance the documented golden signals
(storage load, in-flight/dirty requests, node health) sit at zero on an
idle LocalNet. The command-submission duration — Canton's documented
command-latency signal — is a real average (sum/count) that populates and
moves, and it restores a working latency view at the participant / ledger
API layer (distinct from the sequencer-side "Sequencing latency" panel).

Removes the heatmap machinery (loadHeatmap, heatmapCellsOrNote, the note),
adds Q.cmdLatency through the existing per-node loader, and swaps the
regression test to guard the query stays a real average, not a percentile.
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.

2 participants