Skip to content

fix(app): clamp context menus using their measured size - #45

Merged
arifintahu merged 1 commit into
mainfrom
fix/context-menu-clamp
Nov 9, 2026
Merged

arifintahu merged 1 commit into
mainfrom
fix/context-menu-clamp

Conversation

@arifintahu

Copy link
Copy Markdown
Member

What and why

The terminal and tab context menus clamped their position with a hard-coded height/width guess, so Find… and the last tab items were cut off when opened near the bottom or right edge. Both menus now measure their rendered size and clamp with it (utils/menuPosition.ts), and stay visibility:hidden until measured. Initial focus waits for the measured render. Position is unchanged when there is room.

Fixes #44

How you checked it

  • cargo fmt --check, cargo clippy -- -D warnings and cargo test pass (95 Rust tests)
  • pnpm turbo check test build and pnpm version:check pass (159 Vitest tests)
  • New unit tests for the clamp logic (menuPosition.test.ts)
  • No secrets, personal paths or machine names in the diff
  • CHANGELOG.md updated

Known gap: not checked visually in the running app at 100/125/150% display scaling.

The terminal and tab menus clamped to a hard-coded height guess, so Find…
and the last tab items were cut off near the bottom edge. Measure the
rendered menu and clamp with its real size; stay hidden until measured.
@arifintahu arifintahu self-assigned this Nov 9, 2026
@arifintahu
arifintahu merged commit c7bd343 into main Nov 9, 2026
4 checks passed
@arifintahu
arifintahu deleted the fix/context-menu-clamp branch November 9, 2026 00:16
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.

fix(app): context menus get cropped when opened near the bottom edge

1 participant