Skip to content

[codex] Improve paper corner drag responsiveness#42

Merged
jasonmadigan merged 1 commit into
tracefinity:mainfrom
noobydp:codex/paper-corner-drag-perf
May 12, 2026
Merged

[codex] Improve paper corner drag responsiveness#42
jasonmadigan merged 1 commit into
tracefinity:mainfrom
noobydp:codex/paper-corner-drag-perf

Conversation

@noobydp

@noobydp noobydp commented May 12, 2026

Copy link
Copy Markdown
Contributor

Summary

Improve responsiveness when dragging paper corner handles on the trace setup screen.

The corner editor previously pushed every mouse/touch move up to the trace page via onCornersChange, causing the parent trace page to re-render continuously during drag. This PR keeps drag updates local to PaperCornerEditor, coalesces visual updates with requestAnimationFrame, and commits the final corner positions to the parent when the drag ends.

Changes

  • Add local draft corner state while dragging.
  • Coalesce mouse/touch move updates through requestAnimationFrame.
  • Share mouse/touch drag start and move helpers to keep the handler logic consistent.
  • Flush the final corner position on mouseup/touchend.
  • Keep the public PaperCornerEditor props unchanged.

Validation

  • npm exec tsc -- --noEmit

Code and PR drafted by Codex.

@noobydp
noobydp marked this pull request as ready for review May 12, 2026 05:01

@jasonmadigan jasonmadigan left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Clean performance improvement. Local draft state with rAF coalescing during drag, commit on release -- standard pattern, well-scoped.

@jasonmadigan
jasonmadigan merged commit 63efd49 into tracefinity:main May 12, 2026
1 check passed
@noobydp
noobydp deleted the codex/paper-corner-drag-perf branch May 12, 2026 14:35
shanetinklenberg pushed a commit to shanetinklenberg/tracefinity that referenced this pull request Jun 28, 2026
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