Sitelet https://github.com/modem-dev/hunk/pull/1143
Skip to content

fix(ui): stop wheel scroll and stale hover from drifting comment targets off the highlighted line - #1143

Open
HackAttack wants to merge 1 commit into
modem-dev:mainfrom
HackAttack:fix/comment-target-drift
Open

HackAttack wants to merge 1 commit into
modem-dev:mainfrom
HackAttack:fix/comment-target-drift

Conversation

@HackAttack

Copy link
Copy Markdown
Contributor

A 'c' comment could open its draft a few lines (or one collapsed gap) away from the highlighted line. Two paths let the line cursor drift away from the current line:

  • Wheeling past the highlighted line clamped the cursor to a viewport edge, and wheeling back never restored it; the strand survived the whole roundtrip and deepened with distance.
  • A hover add-note affordance stayed armed after the cursor stepped away, so the next implicit comment targeted the hovered row instead of the highlight.

The clamp now remembers the stop it displaced, unwinding one hop per scroll step back, and a deliberate cursor move ends the unwind; cursor movement retires a stale hover. Keyboard-only commenting was always exact and is unchanged.

A vertical drag across exactly two rows was also swallowed: the click slop that ignores one cell of pointer jitter applied to the row axis, so a two-row gesture read as a jittered click and painted no selection or action bar. The slop is now horizontal only.

…ets off the highlighted line

A 'c' comment could open its draft a few lines (or one collapsed gap)
away from the highlighted line. Two paths let the line cursor drift away
from the current line:

- Wheeling past the highlighted line clamped the cursor to a viewport
  edge, and wheeling back never restored it; the strand survived the
  whole roundtrip and deepened with distance.
- A hover add-note affordance stayed armed after the cursor stepped
  away, so the next implicit comment targeted the hovered row instead of
  the highlight.

The clamp now remembers the stop it displaced, unwinding one hop per
scroll step back, and a deliberate cursor move ends the unwind; cursor
movement retires a stale hover. Keyboard-only commenting was always
exact and is unchanged.

A vertical drag across exactly two rows was also swallowed: the click
slop that ignores one cell of pointer jitter applied to the row axis, so
a two-row gesture read as a jittered click and painted no selection or
action bar. The slop is now horizontal only.

Co-authored-by: GLM-5.3-Flash
@greptile-apps

greptile-apps Bot commented Oct 4, 2026

Copy link
Copy Markdown
Contributor

PR author is not in the allowed authors list.

@vercel

vercel Bot commented Oct 4, 2026

Copy link
Copy Markdown

@HackAttack is attempting to deploy a commit to the Modem Team on Vercel.

A member of the Team first needs to authorize it.

This branch has not been deployed

No deployments
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