Skip to content

style(webui): type scale — role-aware sizing on a centralized rem scale - #250

Merged
zheli merged 3 commits into
mainfrom
webui-type-scale-hybrid
Jul 11, 2026
Merged

style(webui): type scale — role-aware sizing on a centralized rem scale#250
zheli merged 3 commits into
mainfrom
webui-type-scale-hybrid

Conversation

@srikanth-bitdynamics

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

Copy link
Copy Markdown
Collaborator

Combines the two ideas from #248 and #249 into one scale — role-aware sizing and a centralized rem scale.

The scale

A named fs scale in tokens.ts, in rem so the console honors the browser/OS font-size preference (accessibility — the root is now 100%), verified live: bumping the browser root 16→20px scales the whole UI proportionally.

micro 10 · label 11 · meta 12 · data 13 · body 14 · lead 15 · strong 16 · title 22 · stat 26 (px @ default).

Role-aware, not flat

Unlike a uniform +2, sizes stay tuned to what the text is:

  • Data dense — table cells/headers, mono contract IDs (MonoId), metric values, chart labels, badges, nav → micro/label/meta/data (10–13px).
  • Prose larger — page titles → title (22), descriptions/section headings → lead (15), dialog/body copy → body/strong (14–16).

So dense tables keep their density (the ACS Template column doesn't truncate away the identifying suffix), while reading text is docs-scale.

Scope

fs scale + ~440 inline fontSize px literals → fs.* tokens (value-preserving), index.css root → 100% and its sizes → rem. tsc clean, 218 frontend tests pass, build green.

Supersedes #248 and #249

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.
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.
@srikanth-bitdynamics srikanth-bitdynamics changed the title style(webui): hybrid type scale — bump prose, keep data dense style(webui): type scale — role-aware sizing on a centralized rem scale Jul 11, 2026
…anel (#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.
@zheli
zheli merged commit 0079005 into main Jul 11, 2026
6 checks passed
@zheli
zheli deleted the webui-type-scale-hybrid branch July 11, 2026 11:03
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