fix(web/nav-rail): switch to the drawer only below mobileBreakpoint #316
All Vouch review confidence checks passed
Residual risk 0.27 = Change Risk (0.45) × (1 − Review Confidence (0.41)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.45 · 453 lines diff across 5 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 91% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.366
Shallow Review Depth
shallow_review_depth
0.344
Real PR Conversation Timeline
1 comments
"Review active on #316"
general
weight: 0.35
coderabbitai[bot]
What this changes
NavRail.Providernow draws the drawer only when the viewport is narrower thanmobileBreakpoint, as its prop doc says ("The viewport width below which the rail is a drawer"). Before, the query was(max-width: ${breakpoint}), which also matches at exactly the breakpoint. It is now(width < ${breakpoint}). The usage notes say where the boundary sits.Why
Apps hide their own phone header with Tailwind's matching variant, and Tailwind v4 breakpoints are
min-width. WithmobileBreakpoint="64rem"and a header markedlg:hidden, a 1024px window got both at once: the rail turned into a closed drawer, and the header holding the trigger that opens it was hidden. The page was left with no navigation. 1024px is a common width (iPad landscape, small laptops), and the default48remhas the same gap againstmd:.width <is the range syntax Tailwind v4 uses for its ownmax-variants, so the two now meet at the same pixel.Type of change
How it was tested
Web only. I applied the same change as a patch over
panelui-web@0.17.0in Outlayr's dashboard (mobileBreakpoint="64rem", phone headerlg:hidden) and checked it in Chrome:packages/webtypecheck and build pass, and so donpm testandnpm run lint. Docs, registry and skills are regenerated.Screenshots
Outlayr's dashboard at 1024×768.
| | Light | Dark |
| --- | --- | --- |
| Before | <img src="https://raw.githubusercontent.com/danestves/PanelUI/pr-assets/nav-rail/breakpoint/before-1024-light.png" width="420" alt="Dashboard at 1024px in light mode with no rail and no phone header, so no navigation"> | <img src="https://raw.githubusercontent.com/danestves/PanelUI/pr-assets/nav-rail/breakpoint/before-1024-dark.png" width="420" alt="Dashboard at 1024px in dark mode with no rail and no phone header, so no navigation"> |
| After | <img src="https://raw.githubusercontent.com/danestves/PanelUI/pr-assets/nav-rail/breakpoint/after-1024-light.png" width="420" alt="Dashboard at 1024px in light mode with the rail shown as a column"> | <img src="https://raw.githubusercontent.com/danestves/PanelUI/pr-assets/nav-rail/breakpoint/after-1024-dark.png" width="420" alt="Dashboard at 1024px in dark mode with the rail shown as a column"> |
Checklist
npm run typecheckpasses (packages/web)npm run buildpasses (packages/web)apps/docs/scripts/web-usage/nav-rail.jsonupdatednpm run docs:generate --workspace=docshas been run and the generated files are committedNotes for the reviewer
Range media queries need Chrome 104, Safari 16.4 or Firefox 63, the same floor Tailwind v4 already sets. This touches
nav-rail/index.tsxand the generatednav-rail.json, as #313, #314 and #315 do, so whichever lands later needsdocs:generateagain.Created with Claude Opus 5.5 in T3 Code (Claude Code harness).
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
<!-- coderabbit-ai-generated:v1 -->
Summary by CodeRabbit
Bug Fixes
The navigation rail now switches to its drawer layout only below the configured mobile breakpoint. At exactly the breakpoint, it remains in column layout.
Documentation
* Clarified the breakpoint behavior and noted that the default breakpoint is 48rem.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->