Repository navigation
fix(web): show the dashboard resize handle exactly where widget sizes apply - #4844
Conversation
… apply The resize handle showed from Tailwind's lg (64rem), but the grid applied widget spans and fixed rows from 1024px. Rem in a media query follows the browser's default font size, so at any size other than 16px the two disagreed: at 12px the handle showed over a two-column grid that ignores spans, and at 20px the 12-column grid had no handle, and its one-row Health Strip overflowed into its neighbours. The 12-column layout now needs both 64rem and 1024px, and the handle and Now Playing's fixed-rows check use the same pair. At 12px it still starts at 1024px, where the fixed sidebar leaves room for it; at 20px it starts at 1280px. Nothing changes at 16px. 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 42 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 (Gemini 4 Neon, reviewed 153203a)
The grid rule, resize handle, and NowPlayingWidget query now switch together at max(64rem, 1024px), and the compiled CSS preserves source order (@media (min-width: 640px) before @media (min-width: 64rem) and (min-width: 1024px)) and handle utility order (.hidden before nested @media .lg\:min-\[1024px\]\:block). One companion lg: layout in the dashboard was left on plain lg:.
G1 (low) — web/src/components/admin/dashboard/widgets/HealthStripWidget.tsx:72
- Trigger: Browser default font size under 16px (for example 12px) at viewport widths between
64remand1023px(768px–1023pxat 12px). - Impact: The dashboard grid stays in its two-column, content-sized layout below
1024pxbecause the fixed 240px sidebar and px-sized widget text leave too little width for wide columns (web/src/app.css:2370-2372), yetHealthStripWidgetstill switches fromsm:grid-cols-3tolg:grid-cols-6at64rem. At 12px /768px, thelgsidebar (240px) and page gutters (48px) leave480pxfor the grid,442pxinsideCardContent(border+px-6),66pxper cell across six columns withgap-3, and49pxof inner width perCellShell(border+p-2.5). After the10.5pxicon and4.5pxgap, ~34pxremain for fixedtext-[11px]labels (Postgres,Version,Uptime,Errors · 24h) that have notruncateoroverflow-hidden, andtext-[15px]values truncate to a few characters. (Pre-existing onmain, not introduced by this change.) - Evidence:
HealthStripWidget.tsx:72usessm:grid-cols-3 lg:grid-cols-6,HealthStripWidget.tsx:202-205renders<Icon className="h-3.5 w-3.5" />{label}intext-[11px],HealthStripWidget.tsx:226setsmin-w-0without overflow clipping, andAdminLayout.tsx:124,214enables the240pxsidebar and2remgutter atlg:(64rem). - Suggested repair: Change
lg:grid-cols-6onHealthStripWidget.tsx:72tolg:min-[1024px]:grid-cols-6so the six-column row activates at the samemax(64rem, 1024px)threshold as.admin-widget-grid's fixed-row layout. Below1024pxat 12px, rows are content-sized andsm:grid-cols-3gives each cell124px+of inner width; at 16px, 20px, and 24px the transition width is unchanged.
Problem
Related issue: N/A
Validation tasks: none
Other clients: N/A (the customizable admin dashboard exists only in the web app)
When the browser's default font size isn't 16px, the admin dashboard's widget resize handle and the grid it resizes switch at different window widths. At a smaller font size the handle shows on a grid that ignores widget sizes, so resizing appears to work but changes nothing. At a larger one the grid applies widget sizes but shows no handle, so widgets can't be resized, and the Health Strip overflows into its neighbours. This change makes the handle, the grid, and Now Playing switch at the same width.
The handle in
DashboardGrid.tsxshowed from Tailwind'slgbreakpoint (64rem). The.admin-widget-gridrules inapp.cssapplied widget spans and fixed row heights from 1024px, and Now Playing chose how many sessions to mount with the same 1024px query in JS. A rem width in a media query follows the browser's default font size, solgis 768px at 12px (Chrome's "Small") and 1280px at 20px ("Large"):lg:layout hasn't applied yet at that width either, so its cells wrap to two rows and draw over the stat tiles and Now Playing.Approach
The 12-column layout now needs both 64rem and 1024px, and the three places that decide it use that pair: the grid's media query, the handle's class (
lg:min-[1024px]:block), and Now Playing's fixed-rows query. The two-column rule keeps its 640px lower bound and drops its upper bound; the 12-column rule comes after it and overrides everything it sets, which a comment pins.Where the layout starts at each browser font size:
Neither breakpoint works alone. With only 64rem, at a small font the 12-column layout would start at 768px, where the fixed 240px sidebar and the widgets' px-sized text leave too little room: the Health Strip overflowed its row and stat tiles clipped in testing. With only 1024px, a large font would keep the Health Strip overlap above. Comments that described the grid as switching at
lgnow say "the 12-column layout" and point to the rule inapp.css.Validation
Page.setFontSizes). Before: at 12px and 900px the grid had 2 columns while all 15 handles showed and took keyboard focus; at 20px and 1200px it had 12 columns and no handle was shown or reachable. After: the column count and the handles change together on both sides of every switch point measured (12px at 767/768/1023/1024, 16px at 1023/1024, 20px at 1279/1280, 24px at 1535/1536).span 4, rows 2(read back fromGET /api/v2/admin/dashboard/layout) while the widget stayed 301 × 87px. After, the same drag and a keyboard resize at 12px and 1024px resize the widget and announce the new size.(min-width:64rem) and (min-width:1024px)and the handle's class to the same pair, nested.make verify-local-pathspass.make test-web: the files that fail also fail on main (request-deadline, auth-refresh, player, and collections-select tests); none touch the dashboard.Evidence: https://evidence.siloserver.org/r/silo-server/admin-widget-resize-rem/
Risks
None identified. The change is CSS, one class, and one media-query string in the web admin dashboard. At 16px nothing changes; at other font sizes only the width where saved widget sizes apply moves, and the saved layouts themselves are untouched.
Follow-ups:
Checklist
Council review
Background review: 1 round, last reviewed 153203a
Visual review: 2 rounds, final captures from 153203a
Fixed: visual round 1 found the first version (64rem only) too cramped at 12px from 768 to about 1000px (Health Strip overflow, clipped tiles, wrapped chart headers), so the 12-column layout now also needs 1024px. Answered: the remaining visual findings are present on main at the same sizes and went to the follow-ups above. Background review: the Health Strip's own six-column switch (Gemini) is #4871; a resize that crosses the breakpoint mid-drag saves the size its badge showed (Sol), which main does at its own breakpoint too; one definition for the 64rem + 1024px pair through a custom variant (Opus, optional) was left out because the JS query would still repeat it and the comments name all three places.
AI Disclosure
types.tsand suggested dropping the two-column rule's upper bound, both applied. The plan round (Sol and Opus; Gemini was out of quota and its premises were checked by hand) moved the queries to plain@mediain rem and kept the 640px bound. A simplify pass changed nothing. The visual and background reviews are under Council review.🤖 Generated with Claude Code