fix(ui): keep main panel reachable on small screens#9144
Open
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
MAIN_PANEL_MIN_SIZE_PX = 128minimum to the main panel in the canvas, generate, workflows, and upscaling layouts — wide enough for both floating toggle button groups with breathing room.addPanel({ minimumWidth })) and afterregisterContainerrestores from persisted JSON (via a newenforceMainPanelMinWidthhelper), 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) — cleanpnpm test:no-watch— 1097/1097 pass, including the 85 navigation-api tests🤖 Generated with Claude Code