Skip to content

fix(ui): keep task context menu open - #4988

Merged
Astro-Han merged 1 commit into
apache:mainfrom
Phoenix500526:fix/task-context-menu-dismiss
Sep 7, 2026
Merged

fix(ui): keep task context menu open#4988
Astro-Han merged 1 commit into
apache:mainfrom
Phoenix500526:fix/task-context-menu-dismiss

Conversation

@Phoenix500526

Copy link
Copy Markdown
Contributor

Summary

Delay opening a task's context menu until the secondary-button release and
its native default action have completed. This prevents Chromium's popover
light-dismiss behavior from immediately closing the menu on macOS while
preserving keyboard and post-release context-menu invocation.

Fixes #4983

Verification

  • node --test packages/ui/dist/__tests__/session-history-multi-select.test.js
    — 22 passed, including a regression test that fails before the fix
  • npx biome check packages/ui/src/session-history-list.tsx packages/ui/src/__tests__/session-history-multi-select.test.tsx
    — passed
  • npm --workspace @maka/core run build and
    npm --workspace @maka/ui run build — passed
  • Manual Electron verification on macOS — the task menu remains open after
    the secondary button is released
  • npm test — all reported assertions passed, but the parallel workspace
    runner returned code 1 once for MCP and once for CLI; isolated reruns passed
    186/186 and 861/861 respectively

AI use

Select exactly one:

  • No generative tool made a substantive contribution
  • Generative tooling made a substantive contribution

Tool(s) and scope: Codex diagnosed the pointer-event ordering, implemented
the focused fix and regression test, and ran verification. The commit includes
the required Generated-by: Codex trailer.

Checklist

  • Tests cover the change and fail without it
  • Lint, format, typecheck and the affected suites pass locally

Does this PR entail a change in behavior?

  • Yes — described under Summary above
  • No

The menu opened before the secondary-button gesture ended, so native
popover light dismiss closed it on release. Deferring activation until
after pointerup completes keeps the menu open.

CLOSES apache#4983
Generated-by: Codex

Signed-off-by: Jiawei Zhao <Phoenix500526@163.com>
@github-actions github-actions Bot added the effort/S Under 100 readable lines label Sep 7, 2026

@Astro-Han Astro-Han left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the focused fix. Reviewed caed2e6; no blocking findings. Verified the production component in Chromium for deferred opening, post-release and keyboard invocation, and cancellation, with no page errors. These checks dispatch DOM events; native macOS gesture verification is reported in the PR. CI is green. Review assisted by Codex.

@Astro-Han
Astro-Han merged commit 70b40dc into apache:main Sep 7, 2026
2 checks passed
@Phoenix500526
Phoenix500526 deleted the fix/task-context-menu-dismiss branch September 11, 2026 07:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

effort/S Under 100 readable lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Task context menu closes on right-button release

2 participants