Skip to content

fix(web): prevent session navigation on right-click - #1636

Open
techotaku39 wants to merge 1 commit into
tiann:mainfrom
techotaku39:fix/web-session-right-click-navigation
Open

fix(web): prevent session navigation on right-click#1636
techotaku39 wants to merge 1 commit into
tiann:mainfrom
techotaku39:fix/web-session-right-click-navigation

Conversation

@techotaku39

Copy link
Copy Markdown
Contributor

Problem / Motivation

A desktop right-click on a session row could trigger the row's click handler after the context-menu event, navigating to that session unexpectedly.

Summary

  • Ignore non-primary mouseup events in useLongPress.
  • Preserve the existing custom context-menu behavior.
  • Add a regression test covering desktop right-click behavior.

Validation

  • bun run --cwd web test -- src/hooks/useLongPress.test.tsx — 15 passed.
  • bun typecheck — passed.
  • pwsh -NoProfile -File .\scripts\Invoke-HapiTaskPlaywright.ps1 -Name session-right-click-navigation -Suite Root terminal-wrap-fidelity.spec.ts — 2 passed.
  • bun run build — passed.
  • bun run test:shared — 279 passed.
  • Web deployment smoke test — 4 seeded sessions loaded; right-click opened the context menu while keeping the /sessions URL unchanged.

Related Issues

None

AI Disclosure

OpenAI Codex (GPT-5.6) assisted with investigation, implementation, testing, and PR drafting.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Findings

  • None.

Summary

  • Review mode: initial. No issues found in the added or modified lines. Residual risk is limited to browser-specific context-menu event ordering; the focused regression test covers the affected mouseup-before-contextmenu sequence.

Testing

  • Not run (automation). GitHub integration check passed; the main test workflow was still in progress at review time.

HAPI Bot

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