Factory: Optimize layout by combining data sections into 2-column rows on desktop - #1228
Factory: Optimize layout by combining data sections into 2-column rows on desktop#1228mrbobbytables wants to merge 1 commit into
Conversation
… desktop Resolves projectbluefin#1054 - LiveSection: Pair Governor and System Health in 2-column layout when health checks exist - ImagesPanels: Pair Freshness Brackets and Availability by Family in 2-column layout - BuildsPanels: Split Recent Terminal Runs table into 2 columns on desktop - TestsPanels: Make triage list 2 columns on desktop - TestsPanels: Increase sparkline grid min-width to 340px - TestsPanels: Split Recent Runs table into 2 columns on desktop - ApplicationsPanels: Pair Bluefin Flathub downloads and Peer comparison into 2-column layout - MetricsPanels: Differentiate Homebrew peers by color (Bluefin vs macOS vs other Linux) - HiveFactoryDashboard: Increase hiveTaskGrid card min-width to 220px to prevent rank folding - HiveFactoryDashboard: Make Factory Trends occupy full row Signed-off-by: mrbobbytables <mrbobbytables@users.noreply.github.com>
hanthor
left a comment
There was a problem hiding this comment.
No regression. One narrow-viewport risk and one duplication note.
Merged into current main, green and unchanged:
$ npm run test:coverage # origin/main + pr1228
ℹ tests 925
ℹ pass 925
ℹ fail 0
Identical to the unmodified-main baseline (925 / 925 / 0), as expected for a CSS/TSX layout change. Build Docusaurus is green on the PR too.
1. minmax(360px, 1fr) overflows below ~360px viewports
The new two-column rows are built with:
/* panels.module.css and ApplicationsPanels.module.css */
.twoCol {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
...
}auto-fit collapses to a single track once two do not fit, but the track itself keeps its 360px minimum. On a 320-360px viewport the column stays 360px wide and the dashboard scrolls horizontally. There are no @media queries in either of these module files to catch it:
$ grep -n "@media" src/components/factory/panels/panels.module.css \
src/components/factory/panels/ApplicationsPanels.module.css \
src/components/factory/panels/ImagesPanels.module.css
(no output)
The usual fix is repeat(auto-fit, minmax(min(360px, 100%), 1fr)), which behaves identically on desktop and clamps on phones.
This applies to the bumped existing tracks too — .triageList gains minmax(360px, 1fr) where items previously stacked, and .sparklineGrid goes 280px → 340px. In fairness the repo already ships minmax(400px elsewhere and does not use min() anywhere, so this PR is consistent with existing practice rather than introducing the pattern. Flagging it because this PR triples the number of places it appears.
2. .twoCol is defined twice, identically
Byte-identical blocks land in both panels.module.css and ApplicationsPanels.module.css (modulo one margin-bottom). Since these are CSS modules the duplication is invisible at runtime, but the two copies will drift. panels.module.css already looks like the shared sheet for this directory — worth keeping one definition there and importing/composing it.
3. .hiveTaskGrid bump is unexplained
HiveFactoryDashboard.module.css goes minmax(180px, 1fr) → minmax(220px, 1fr), which is the one change not obviously part of "combine data sections into 2-column rows". Probably intentional tuning; a line in the description would save the next reader the detour.
Generated by Claude Code
Fixes #1054
Summary of Changes
.triageListuse a 2-column responsive grid on desktop..hiveTaskGridto prevent badges and usernames from wrapping awkwardly.— hive: backend=copilot model=gemini-3.8-flash
🐝 Hive Agent:
contributor| SHA:54397e08