Skip to content

fix(ui): keep main panel reachable on small screens#9144

Open
lstein wants to merge 1 commit intomainfrom
fix/main-panel-min-width
Open

fix(ui): keep main panel reachable on small screens#9144
lstein wants to merge 1 commit intomainfrom
fix/main-panel-min-width

Conversation

@lstein
Copy link
Copy Markdown
Collaborator

@lstein lstein commented May 9, 2026

Summary

  • On small screens (e.g. tablets), the left and right side-panel splitters could be dragged inward until the middle viewer panel was crowded down to ~0px. Once that happened, there was no surface left to grab the splitters and drag the panels back.
  • Add a MAIN_PANEL_MIN_SIZE_PX = 128 minimum to the main panel in the canvas, generate, workflows, and upscaling layouts — wide enough for both floating toggle button groups with breathing room.
  • The constraint is applied both when a layout is initialized fresh (via addPanel({ minimumWidth })) and after registerContainer restores from persisted JSON (via a new enforceMainPanelMinWidth helper), so users with saved layouts that pre-date this constraint pick it up on next load. If the restored width is below the minimum, the helper also resizes the main panel up.

Test plan

  • pnpm lint (eslint + prettier + tsc) — clean
  • pnpm test:no-watch — 1097/1097 pass, including the 85 navigation-api tests
  • Manually verified: with a previously-crowded layout, on next load the main panel pops out to 128px, and the splitters now refuse to drag past it

🤖 Generated with Claude Code

The left and right side-panel splitters could be dragged inward until
the middle viewer panel was crowded down to ~0px, leaving no surface
to grab the splitters and pull the panels back. On a tablet this was
easy to fall into and hard to recover from.

Add a MAIN_PANEL_MIN_SIZE_PX = 128 minimum to the main panel in the
canvas, generate, workflows, and upscaling layouts -- wide enough to
fit both floating toggle button groups (~48px each + breathing room).

Apply it both at fresh-init time and after registerContainer restores
from persisted JSON via enforceMainPanelMinWidth, so existing users
with saved layouts that pre-date the constraint also get it (and the
panel grows up to the minimum if its restored size violates it).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@github-actions github-actions Bot added the frontend PRs that change frontend files label May 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

frontend PRs that change frontend files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant