Skip to content

Raise the frame move threshold to 5 screen pixels - #5

Merged
rishirsv merged 2 commits into
mainfrom
fix/drag-threshold
Nov 21, 2026
Merged

rishirsv merged 2 commits into
mainfrom
fix/drag-threshold

Conversation

@rishirsv

Copy link
Copy Markdown
Owner

Problem

A click meant to select a board often moves it a little, so selecting and moving are hard to tell apart.

Cause

A press on a frame becomes a move once the pointer travels 3 screen pixels. The move is applied in world units (screen delta divided by zoom). When zoomed out, a small wobble during a click therefore moves the board a long way and commits a revision. At fit zoom 0.29, a 4 px wobble moved the board 14 units.

Fix

  • Frame moves now start at 5 screen pixels, the low end of common desktop drag thresholds. After the threshold, the board follows the full offset from the press, so small precise moves still work.
  • Resize handles keep 3 px. You press a handle on purpose, and resize-reorder checks a 4 px resize.

Verification

  • A new move-select/drag-threshold block fails on main (doc.@A.x is 14, a new revision) and passes with the fix. A 4 px wobble only selects. A 6 px drag moves the board and commits one revision.
  • These suites pass: cli-sessions, pages, layers, the comments blocks (run one at a time after a headless browser crash), screens-cli check, npm test and typecheck.
  • move-select/sel-marquee, resize-reorder/resize-group and resize-reorder/resize-aspect fail at the same steps on main. These failures existed before this change.

Not changed

When a board is the only selection, its live page takes the pointer, so you drag it by its title. Dragging the page body interacts with the page. That is the designed behavior, so this PR leaves it unchanged.

Rishi Sharma added 2 commits November 21, 2026 17:04
A press on a frame became a move after 3 screen pixels. Zoomed out,
that small wobble during a click moved the board by many world units
and committed a revision: at fit zoom 0.29, a 4 px wobble moved it 14
units. Moves now start at 5 px. Resize handles keep 3 px, since they
are pressed on purpose and small resizes need them.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 21, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-21T22:09:17.158552Z 67fefe9 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@rishirsv
rishirsv merged commit 04f1227 into main Nov 21, 2026
1 check passed
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