Skip to content

Context menu selects an item on the opening right-button release #4439

Closed

Description

@ariofrio

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 main at 4354b88ce14457fbdf1fc1a8e0db2dd4b5ef90f3 with Node v22.23.2 and the repo's pinned dependencies.
  • Provider is irrelevant; this is a client context-menu interaction.

Steps to reproduce

  1. Open bb with enough threads that a thread row sits near the bottom of the sidebar viewport.
  2. Right-click that row without moving the pointer before releasing the button.
  3. 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

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions