Skip to content

Fix sidebar dropdown menu overlay - #89

Merged
touch2be merged 3 commits into
masterfrom
fix/sidebar-dropdown-overlay
Jun 13, 2026
Merged

touch2be merged 3 commits into
masterfrom
fix/sidebar-dropdown-overlay

Conversation

@touch2be

Copy link
Copy Markdown
Collaborator

Summary

  • align sidebar three-dot dropdowns to open into the content area
  • give session and project dropdowns a fixed menu width so labels do not wrap against the small trigger width

Checks

  • vp check

@github-actions

Copy link
Copy Markdown

PR Review: fix/sidebar-dropdown-overlay

Confidence Score: 5/5

Changes are minimal (6 additions, 2 deletions, 1 file) and clear in intent.

Changes

  1. SessionItemMenu (src/components/SidebarItemMenus.tsx:118-122) — align="end" → align="start", added className="w-64"
  2. ProjectItemMenu (src/components/SidebarItemMenus.tsx:689) — align="end" → align="start", added className="w-64"

Issues & Suggestions

No bugs introduced. The changes are correct and follow existing patterns.

Nit — hardcoded w-64 may be brittle if the sidebar or content area resizes. A better approach would be:

  • min-w-64 instead of w-64 to allow the menu to grow for longer content
  • Or compute the width dynamically based on available viewport space (e.g., max-w-[min(16rem,calc(100vw-4rem))])

But this is a minor polish concern, not a blocker.

Alignment change is correct. The three-dot buttons sit on the right edge of sidebar items (ml-auto). Changing from align="end" (dropdown opens right-aligned, extending left — overflowing the sidebar edge) to align="start" (dropdown opens left-aligned, extending right — into the content area) directly fixes the described overlay issue.

No test coverage — there are no tests for these components to verify behavior. Not a regression from this PR, but worth noting.

Verdict

LGTM. Safe, focused fix.

New%20session%20-%202026-06-13T16%3A14%3A48.326Z
opencode session  |  github run

@github-actions

Copy link
Copy Markdown

PR Review: fix/sidebar-dropdown-overlay

Confidence Score: 5/5


Issues Detected

1. onSelect → onClick on ContextMenu.Item will break keyboard accessibility (SidebarItemMenus.tsx)

The diff changes 11 onSelect handlers to onClick on ContextMenu.Item components (lines 510–659). Radix UI's ContextMenu.Item provides onSelect as the proper event handler for both click and keyboard (Enter/Space) activation. Switching to onClick silently drops keyboard support — users navigating with a keyboard will not trigger these handlers. This also breaks the menu's auto-close-on-select behavior.

Fix: Revert to onSelect throughout ProjectMenuContent.

2. "dev" and "dev:web" scripts removed from package.json (package.json)

- "dev": "vp dev",
- "dev:web": "vp dev --host 127.0.0.1",

While vp dev may work as a Vite+ built-in, removing the npm scripts breaks pnpm dev / npm run dev, which is the conventional entry point. Contributors and tooling expect a dev script. This change is unrelated to the PR's stated goal.

Fix: Keep the "dev": "vp dev" and "dev:web" scripts. Only the "start" script change (pnpm exec → vp exec) is warranted.


Positive Changes

Change Assessment
align="end" → align="start" on both dropdowns ✅ Correct — opens the menu rightward into the content area, fixing the overlay
className="w-64" on both dropdowns ✅ Prevents label wrapping against the small 3-dot trigger
"start" → vp exec ✅ Consistent with AGENTS.md convention

Summary

The core dropdown alignment fix is correct. However, the PR includes two categories of unrelated/risky changes: (1) the onSelect → onClick refactor that breaks keyboard accessibility for context menus, and (2) removal of dev scripts. These should be reverted before merge.

New%20session%20-%202026-06-13T16%3A24%3A06.736Z
opencode session  |  github run

@touch2be
touch2be merged commit 8fa0b83 into master Jun 13, 2026
1 check passed
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.

1 participant