Skip to content

fix(ui): custom sidebar width overflowed the mobile overlay#35

Merged
knep merged 1 commit into
masterfrom
fix/sidebar-width-mobile
Jun 25, 2026
Merged

fix(ui): custom sidebar width overflowed the mobile overlay#35
knep merged 1 commit into
masterfrom
fix/sidebar-width-mobile

Conversation

@knep

@knep knep commented Jun 25, 2026

Copy link
Copy Markdown
Owner

Context

Follow-up to the resizable sidebar (#33). While checking phone responsiveness I found a rough edge it introduced.

Symptom

The resizable-sidebar width is persisted and was applied inline in every layout. In the narrow/overlay layout (< 992 px), a wide desktop width (e.g. 600 px) made the sliding sidebar wider than a phone screen when opened.

Fix

Apply the custom width only on desktop — a sidebarStyle computed returns {} in narrow view, so the overlay width is CSS-driven (width: 300px; max-width: 85vw) and never overflows the viewport. Desktop resizing is unchanged.

Verification

  • Playwright at 390×844 (iPhone-ish), with a persisted 600 px width: opening the sidebar now yields a 300 px overlay (was 600 px), no horizontal overflow. Default case unchanged.
  • npm run test:unit-ci1048 passed (added a narrow-view case to the AppLayout resize tests).

Note on overall mobile support

The app is responsive: viewport meta is set, the sidebar collapses to a hamburger overlay below 992 px, and there's no horizontal overflow. This PR removes the one overflow case introduced by the resize feature.

🤖 Generated with Claude Code

The resizable-sidebar width is persisted and was applied inline in every layout.
In the narrow/overlay layout (< 992px) a wide desktop width (e.g. 600px) made
the sliding sidebar wider than a phone screen when opened.

Apply the custom width only on desktop (via a sidebarStyle computed that returns
{} in narrow view); the overlay width is now CSS-driven (300px, max-width 85vw)
so it never overflows the viewport.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@codecov-commenter

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@knep knep merged commit dcb753c into master Jun 25, 2026
8 checks passed
@knep knep deleted the fix/sidebar-width-mobile branch June 25, 2026 18:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants