Skip to content

fix: keep Move to workspace submenu adjacent when flipped left#136

Merged
InbarR merged 1 commit into
InbarR:mainfrom
le-immortal:fix/move-to-workspace-submenu-position
Jun 20, 2026
Merged

fix: keep Move to workspace submenu adjacent when flipped left#136
InbarR merged 1 commit into
InbarR:mainfrom
le-immortal:fix/move-to-workspace-submenu-position

Conversation

@le-immortal

Copy link
Copy Markdown
Contributor

What this fixes

The Move to workspace submenu in the pane overflow menu rendered detached, far to the left of the menu, when the parent menu was right-aligned (panes on the right side of the grid).

Root cause

When the parent menu was anchored near the right edge of the viewport, the submenu was flipped to the left using a fixed SUBMENU_W = 240 width estimate (r.left - 4 - SUBMENU_W). Because that offset was based on a guessed width rather than the submenu's actual size, the submenu landed well to the left of the trigger row instead of beside it.

Fix

When flipping to the left, anchor the submenu's right edge against the trigger row's left edge (via a right style instead of a guessed left). The submenu now stays adjacent to Move to workspace regardless of its rendered width, with the same small 4px gap used on the right-side anchor.

Scope

Touches only the submenu positioning in TerminalPanel.tsx (state type + onClick anchor calc + render style). No behavioral change when the menu has room on the right.

When the pane overflow menu is right-aligned, the Move to workspace submenu flipped to the left using a 240px estimated-width offset, which placed it detached far from the menu. Anchor the submenu's right edge against the trigger row's left edge instead so it stays adjacent regardless of width.
@le-immortal

Copy link
Copy Markdown
Contributor Author
Screenshot 2026-06-19 160650 Screenshot 2026-06-19 160626 uploaded image of after and before

@InbarR InbarR merged commit 56a7216 into InbarR:main Jun 20, 2026
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