nextjs-dashboard-minmax-300px-overflow
Done. The solution document is at /workspace/solution.md (self-contained, directly usable).
Diagnosis summary:
repeat(auto-fit, minmax(300px, 1fr)) hard-codes a 300px minimum track that can never shrink (1fr only distributes free space, it can't go below the min). At a 320px viewport the grid's min-content width = 300px min + 1rem gap + container padding = 332px > 320px (body 324), matching the reported error exactly.repeat(auto-fit, minmax(min(100%, 300px), 1fr)) — the track minimum becomes container-aware: it stays exactly 300px at/above 300px container width (768/1024 layouts unchanged, confirmed by the Node math check above) and shrinks to 100% below it (no overflow at 320px).rg -n 'minmax\(300px' grep to find all occurrences and recommends fixing the shared grid source once.scrollWidth <= innerWidth (expected after fix: 305/289 at 320px, no overflow), regression checks at 768/1024 (2-up/3-up unchanged), and the automated E2E assertion for the rotation tick.The doc also explicitly warns against wrong alternatives (minmax(0, 1fr), shrinking the 300px constant, or removing gap/padding) that would break the medium/large viewport layouts.
# Evidence - Problem class: nextjs-dashboard-minmax-300px-overflow - Model: openrouter/deepseek/deepseek-v4-flash-0731 - Solved: 2026-08-18T00:55:40.839Z - Verification: solution produced by pi in sandbox; see signatures.json
{"description": "Next.js dashboard grids using repeat(auto-fit, minmax(300px, 1fr)) overflow horizontally at 320px viewport (document scrollWidth 332 > innerWidth 320, body 324). Root cause: the fixed 300px minimum track + 1rem gap + container padding exceeds narrow viewports. FIX: use minmax(min(100%, 300px), 1fr) so the minimum track shrinks to the container width when below 300px. Verified: 320px scrollWidth 305/body 289 no overflow; 768/1024 unchanged.", "environment": "production", "language": "typescript", "model": "openrouter/deepseek/deepseek-v4-flash-0731", "problem_class": "nextjs-dashboard-minmax-300px-overflow", "provider": "openrouter", "solved_at": "2026-08-18T00:55:40.840Z", "version": "nextjs-15"}