Repository navigation
fix: review follow-ups on metrics, trace controls and inspector width - #13
Merged
Merged
Conversation
Three findings from the dev->main review, plus a docs gap.
Non-finite profiling metrics displayed as 0. `toNumber` mapped anything that
was not a finite number to zero, and non-finite floats now arrive as tokens, so
a rate of NaN rendered as `0.0 Hz` -- indistinguishable from an idle publisher,
which is precisely the confusion that makes an empty trace look broken. Decode
tokens instead and let the value stay non-finite; `toFixed` spells it out
("Infinity Hz") and the consumers that do arithmetic on rates already guard.
Selecting a unit collapsed a publisher row that was capturing, hiding its stop
control while the capture kept running. Keep active trace rows expanded when
the list refocuses.
The inspector's 900px ceiling was arbitrary, and on a narrow window it still
allowed the topology to be squeezed to a sliver. Bound the inspector by what
the topology needs instead: at least 480px, enforced in the grid template too,
so a width stored on a wide monitor cannot squash the graph after a resize.
The global settings list in the user guide did not mention the settings-channel
toggle.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Targets
dev. Follow-ups from themain...devreview — findings 1, 2, 3 and 5.1. Non-finite profiling metrics displayed as
0toNumbermapped anything that wasn't a finite number to zero, and non-finite floats now arrive as tokens — so a rate ofNaNrendered as0.0 Hz, indistinguishable from an idle publisher. That's the exact ambiguity that made an empty trace look broken last week, so it seemed worth closing rather than leaving.It now decodes tokens and lets the value stay non-finite:
toFixedspells it out (Infinity Hz,NaN Hz), and the consumers that do arithmetic on rates already guard (estimateAutoYMaxMsFromRateHz,formatWindowSeconds,defaultTraceWindowSecondsForRateall checkNumber.isFinitefirst). Genuinely non-numeric junk still becomes0.The decode lives in
utils/nonFiniteNumbers.tsasmetricNumberso it's unit-testable;toNumberdelegates.2. Selecting a unit collapsed a capturing row
revealRowsreplacedexpandedIdswholesale, so clicking a unit collapsed a publisher row that was mid-capture — hiding "Stop Profiling Trace" while the capture kept running. Active trace rows are now kept in the expanded set.3. The 900px ceiling
You asked whether it's still needed — it isn't, and it was the wrong shape: arbitrary at the top, and on a narrow window it still let the topology be squeezed to a sliver. The bound is now what the topology needs: at least 480px for the graph, so the inspector's maximum is
viewport - 480.Enforced in two places on purpose:
clampInspectorWidthkeeps the stored number sane (drag, arrow keys,Home, and the settings number input all share it now — the number input previously had its own hardcoded 360/900 pair).min(var(--inspector-width), calc(100vw - 480px)), so a width stored on a wide monitor can't squash the graph after a resize or on a smaller screen, with no resize listener.5. Docs
The global settings bullet list didn't mention the settings-channel toggle.
Verification
npm test: 40 passed (3 newmetricNumbercases, including that a decoded non-finite formats asInfinity Hz).npm run test:e2e: 32 passed, two new:viewport - 480(920 at its 1400px viewport) with the reasoning in a comment.pytest57, ruff and format clean, packaged_webrebuilt and in sync.Skipping finding 4 (
immutableassuming hashed asset names) per your call, and no CHANGELOG per repo convention.🤖 Generated with Claude Code