fix(viewer): cap content width, hug warnings, fill heat cells#19
Merged
Conversation
Widescreen tweaks to the viewer SPA: cap the data column at 1440px and center it so it does not stretch edge-to-edge; size warning banners to their text instead of full width; and let heat cells fill their table cell (td padding removed, color carries its own text inset) so a row reads as a continuous heatmap instead of floating rounded bars with white gaps. Rebuilt web/dist.
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.
Summary
The viewer was unpleasant on a wide screen: the content stretched edge-to-edge, warning banners spanned the full width for a single sentence, and every heat cell floated as a rounded bar with white gaps around it, so a row didn't read as a heatmap.
This caps the data column, sizes warnings to their text, and lets heat cells fill their table cell.
What Changed
CSS-only, in the viewer SPA (
internal/viewer/web/src/styles.css), plus the rebuiltweb/dist..tab-content:max-width: 1440px+margin-inline: autoso the data column is centered and readable instead of spanning the whole viewport..warning:width: fit-content; max-width: 100%so a banner hugs its text rather than flex-filling.td:has(.metric-trigger)drops the cell padding and.metric-triggerfills the cell (display:block; width:100%) carrying its own7px 8pxtext inset, so adjacent colored cells are contiguous — a continuous heatmap, no white gaps.Testing
Rebuilt
web/dist(npm build) and re-embedded;go build ./internal/viewer/passes. Verified visually with a headless-chromium screenshot at 2560px before/after: content centered at 1440px, warning hugs its text, heat cells fill their cells with TTFT values intact.Risks
Low — CSS-only.
:has()is supported in all current browsers the viewer targets. The header/tab bar intentionally stays full-width; only the data content is capped.