Repository navigation
fix(web): keep the dashboard Health Strip inside its row at small browser font sizes - #4806
Conversation
…wser font sizes The Health Strip cells sized their text in px while the dashboard row, the card padding, and the cell padding are rem. With a browser default font below 16px the row shrank but the text did not, so at Chrome's "Very small" (9px) the cells stuck out about 6px above and below the card, and at 12px they pressed against its border. The label, value, and detail sizes are now the equal rem values, so they shrink with the row. At the default 16px nothing changes, and the in-app Large and Extra large text settings scale them through the root font size as before. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Warning Review limit reachedEnable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing. Next included review available in 22 minutes. View limit details
|
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Silo Kody — review completeReview finished. Check the inline comments for findings and verify each suggestion against the code and tests. Reviewing changes in Silo
Review settingsReview OptionsThe following review options are enabled or disabled:
|
Quick104
left a comment
There was a problem hiding this comment.
Adversarial review (gpt-6.2-sol, reviewed 6bbe7c1)
I compared the base and head in Chromium on /admin with stubbed API responses and confirmed that the cells fit at a 9px browser default. The inline finding covers a regression at a larger browser font size.
AI review by Codex in T3 Code (gpt-6.2-sol), using Chromium via Playwright for reproduction.
| <div | ||
| className={cn( | ||
| "mt-1 truncate text-[15px] leading-tight font-bold tabular-nums", | ||
| "mt-1 truncate text-[0.9375rem] leading-tight font-bold tabular-nums", |
There was a problem hiding this comment.
S1 [P3] Keep the full health status visible at larger browser font sizes
On /admin at a 1280px viewport with Chrome’s browser font set to 20px, the full-width, one-row strip gives the Postgres value 110px. “Unreachable” measures 92.9px on the base and 116.1px on this head, so the outage status is now ellipsized. I measured both builds with the proposed breakpoint adjustment applied. The grid still uses six cells across at this width.
Keep the rem sizes and let dependency statuses wrap where needed, with enough row height to show the full text.
There was a problem hiding this comment.
Checked in headless Chromium with Postgres unreachable and Redis not configured. This truncation already happens at the default browser font size. At 16px and 1024px wide, the narrowest width with six cells in a row, "Unreachable" (93px) and "Not configured" (110px) are cut to an ellipsis in their 80px cells. That was true before this PR, and it's unchanged after it. At 20px the narrowest six-column width is 1280px. With rem text the cell and its text now keep the same proportions they have at 16px, so the same values are cut there too (116px in 110px). Before, they fit only because the text ignored the larger browser font. At 16px and 1280px nothing is cut, before or after.
So the PR doesn't add a new failure. It makes a 20px font behave the way 16px already does at its narrowest width. The value line handles overflow by design (truncate with the full value in title), and the status keeps its red error colour when it's cut. Letting statuses wrap would make the cells taller inside the fixed one-row card, which is the overflow this PR fixes. Whether long statuses should get more room at the narrowest widths is a separate question that predates this PR, and I've left it for the maintainer rather than changing it here.
🤖 Claude Code (claude-opus-5-5)
Problem
Related issue: N/A
Validation tasks: none
Other clients: N/A (browser layout fix in the web admin dashboard; the Apple, Android, and Roku apps don't render this dashboard)
When a browser's default font size is set below 16px, the admin dashboard's Health Strip spills out of its card. At Chrome's "Very small" setting (9px) the six status cells stick out about 6px above and below the card's border. At "Small" (12px) they press against the border with the card's padding used up. This change makes the cell text shrink with the row, so the strip stays inside its card at small browser font sizes. It should merge after a pending dashboard grid change; see Risks.
The dashboard's rows are a fixed height in rem from 1024px wide up (
--admin-row-h: 6.25rem), and the Health Strip is one row tall by default. The card and cell padding are rem too, butHealthCellsized its label, value, and detail text in px. A smaller browser font shrank the row and padding and left the text at full size.Approach
HealthCell's label, value, and detail sizes are now the equal rem values (0.6875rem,0.9375rem,0.625rem), as #1806 did for the browse and detail screens. At the default 16px nothing changes.The in-app Large and Extra large text settings used to enlarge these sizes through the
html[data-text-scale] .text-[Npx]override rules. Those rules no longer match. The text now scales through the root font size those settings already set (112.5% and 125%), which comes out within a fraction of a pixel of before: a 15px value is 16.875px at Large instead of 16.8px.Changing the
.text-[Npx]rules in app.css to follow the browser font size would fix every px size at once. It would also change text across the whole app for anyone with a non-default browser font, so this converts only this widget, the way #1806 converted its screens.Validation
/adminpage in headless Chromium, with the browser default font size set through CDP the way Chrome's font size setting does. No server sandbox could start, so the dashboard's API responses were stubbed in the browser.en-XApseudo-locale, and in Arabic. Every one of those fits after the change. Three of them overflowed before: 12px with Extra large at 1024px, the pseudo-locale at 12px, and 9px with Postgres down. No capture scrolls horizontally. Browser fonts above 16px are covered under Risks.Evidence: https://evidence.siloserver.org/r/silo-server/health-strip-cell-overflow/
Risks
Merge this after the pending dashboard grid change (a link will follow once it opens). That change starts the dashboard's fixed rows at whichever of 1024px and Tailwind's
lgcomes later. At a browser font above 16px, between 1024px andlg(1280px at Chrome's "Large", 20px), main already uses one fixed-height row while the strip still lays its cells out three across in two rows. The strip already overflows its card there: by about 33px at 20px. With rem text the cells are bigger, so that grows to about 45px. With that change's media query applied in the page, the strip fits at 20px and 24px at every width checked.At the default browser font size the cells render exactly as before.
Follow-ups
StatTile) also use px text in a rem row. At 9px and 12px they cut off their last line instead of spilling out. They're left out of this PR because separate work on those tiles' clipping at narrow widths is changing the same lines.Checklist
Council review
Background review: 1 round, reviewed 6bbe7c1
Answered: Sol's S1 (Postgres "Unreachable" truncates at a 20px browser font at 1280px). The same values already truncate at the default 16px at its narrowest six-column width, before and after this change. The text now keeps the 16px proportions instead of ignoring the larger font. Opus and Gemini found nothing.
Visual review: 2 rounds, on captures of this change's code
Round 2 rated the large-font overlap under Risks a blocker if this merges alone; all three agreed merging after the grid change resolves it. Answered: the 9px text stays as small as the browser setting makes it, since a minimum size would need content-sized dashboard rows. Pre-existing and left out: the stat tiles' sizing, Health Strip labels that wrap and squeeze their icons in long translations, the truncated Nodes detail, the card's uneven insets, and the red error count's contrast.
AI Disclosure
🤖 Generated with Claude Code