Skip to content

fix(web): avoid session misclicks during live reordering - #1099

Open
NPUlrk wants to merge 1 commit into
tiann:mainfrom
NPUlrk:fix/session-list-wrong-navigation
Open

fix(web): avoid session misclicks during live reordering#1099
NPUlrk wants to merge 1 commit into
tiann:mainfrom
NPUlrk:fix/session-list-wrong-navigation

Conversation

@NPUlrk

@NPUlrk NPUlrk commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Summary

  • prevent a session row from being selected solely because it moved under the pointer during a live sidebar reorder
  • use the browser's native click targeting for normal activation while preserving long-press behavior
  • cancel pending long-press timers even when the pressed element does not receive the release event
  • add regression coverage for live session reordering and the long-press hook

Root cause

Active sessions can reorder whenever SSE updates change updatedAt. The long-press hook previously invoked onClick from each row's mouseup handler without verifying that the press began on that same row.

If a row moved between mouse down and mouse up, the row newly positioned under the stationary pointer handled mouseup and navigated to the wrong session.

Testing

  • bun typecheck
  • bun run test

AI disclosure

This change was developed with assistance from OpenAI Codex. The reported behavior was reproduced with a regression test, and the resulting diff was reviewed and validated with the repository's full typecheck and test suites.

@techotaku39

Copy link
Copy Markdown
Contributor

Thanks for the original implementation. I have prepared a refreshed PR based on the current main: #1656. It keeps the touch ghost-click protection from #1185, prevents mouseup-driven selection during live session-list reordering, and adds regression coverage for the misclick scenario. The reported Edge PWA flow was manually verified on the task deployment; the focused Web tests pass. If #1656 is accepted, it supersedes this PR.

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.

2 participants