fix: keep Move to workspace submenu adjacent when flipped left#136
Merged
InbarR merged 1 commit intoJun 20, 2026
Merged
Conversation
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.
Contributor
Author
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.


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 = 240width 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
rightstyle instead of a guessedleft). 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.