Skip to content

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

Merged
lstein merged 7 commits into
mainfrom
fix/main-panel-min-width
Jun 25, 2026
Merged

fix(ui): keep main panel reachable on small screens#9144
lstein merged 7 commits into
mainfrom
fix/main-panel-min-width

Conversation

@lstein

@lstein lstein commented May 9, 2026

Copy link
Copy Markdown
Collaborator

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
@lstein lstein added the 6.13.5 Library Updates label Jun 3, 2026
@lstein lstein moved this to 6.13.5 LIBRARY UPDATES in Invoke - Community Roadmap Jun 3, 2026

@dunkeroni dunkeroni left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works great. Tested on a Pixel Fold.
Users on large screens may have their viewer area very small on the first load in a browser with a stale cache, but after that it always opens normally.

@lstein lstein enabled auto-merge (squash) June 25, 2026 02:35
@lstein lstein merged commit 8fec6ad into main Jun 25, 2026
17 checks passed
@lstein lstein deleted the fix/main-panel-min-width branch June 25, 2026 02:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.13.5 Library Updates frontend PRs that change frontend files

Projects

Status: 6.13.5 LIBRARY UPDATES

Development

Successfully merging this pull request may close these issues.

3 participants