Repository navigation
Description
Summary
Right-clicking a thread row near the bottom of the window can immediately activate the menu item nearest the cursor as the menu opens. The same behavior occurs in bb's built-in thread-list and in the Ribbon sidebar plugin. The menu should remain open until the user explicitly chooses an item.
Versions and environment
- bb 0.44.0 desktop app, macOS 26.5.1 (reporter-observed UI behavior).
- Source regression reproduced on
mainat4354b88ce14457fbdf1fc1a8e0db2dd4b5ef90f3with Node v22.23.2 and the repo's pinned dependencies. - Provider is irrelevant; this is a client context-menu interaction.
Steps to reproduce
- Open bb with enough threads that a thread row sits near the bottom of the sidebar viewport.
- Right-click that row without moving the pointer before releasing the button.
- Observe whether the thread action menu stays open or an item such as Pin activates immediately.
The source-level repro renders the built-in ThreadRow, opens its context menu, and dispatches a right-button pointerUp on the newly opened Pin item. Run pnpm exec turbo run test --filter=bb-plugin-thread-list with the regression test in the linked PR.
Expected vs actual
Expected: the opening right click opens the menu and performs no action. A later intentional click on Pin pins the thread.
Actual: the right-button release selects Pin. The pre-fix regression test reported sidebarActionCalls as [{ "method": "setPinned", "threadId": "thr_test", "pinned": true }] where it expected [], then the menu closed.
Evidence
- Shared
ContextMenuContenton the tested main commit forwards pointer events without guarding the opening release. - Built-in thread-list menu on the same commit uses that shared component.
- Another bb menu already guards secondary-button pointer-up locally.
- Ribbon PR #122 contains the earlier browser reproduction and a plugin-local guard. This issue and its PR move that behavior into bb's shared component.
The underlying Radix menu item synthesizes a click on pointer-up when it did not receive pointer-down. In a constrained viewport, menu repositioning can put an item under the right-button release. This is the mechanism inferred from the event trace in Ribbon and the failing thread-list test.
What you ruled out
- Not limited to Ribbon: the same selection occurs in bb's built-in thread-list regression test on
main. - The issue search found no report for this same accidental context-menu selection in open or closed issues.
Suggested priority and effort
Medium: a common action can trigger an unintended thread operation; users can undo some actions, but the menu cannot be used reliably for rows near the viewport edge. The shared-component change is small.
Checks
- Reproduced on the latest release or
main. - Searched open and closed issues.
- Linked the investigation report and marked agent authorship.
Written by Codex
AGENT GENERATED
Activity
Prevent context menus from selecting on right-button release (#4440)