Skip to content

fix(ui): restore sidebar state and width after viewport resize - #11

Open
lviobio wants to merge 1 commit into
lonetis:mainfrom
lviobio:dev/fix-sidebar-resize
Open

lviobio wants to merge 1 commit into
lonetis:mainfrom
lviobio:dev/fix-sidebar-resize

Conversation

@lviobio

@lviobio lviobio commented Oct 10, 2026

Copy link
Copy Markdown
Contributor

Opening docked DevTools can shrink the viewport below the mobile breakpoint, leaving the sidebar collapsed after DevTools closes. Viewport clamping also overwrote the saved sidebar width.

Restore the saved desktop collapse preference when returning from a narrow viewport, and clamp only the rendered width so the chosen width returns as space becomes available. Manual resizing continues to update the saved width.

Validation:

  • All 32 sidebar Playwright tests passed on the development server, including five new viewport-resize regressions covering restoration, manual collapse, narrow-viewport reloads, and dragged-width persistence.
  • The two restoration regressions failed before the fix.
  • npm run build passed.
  • git diff --check passed.

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.

1 participant