Skip to content

Restore card flight animations - #75

Merged
austin-smith merged 1 commit into
mainfrom
restore-drag-flight-animations
Jul 15, 2026
Merged

austin-smith merged 1 commit into
mainfrom
restore-drag-flight-animations

Conversation

@austin-smith

Copy link
Copy Markdown
Owner

What Changed

  • Moved the drag flight-boundary state (dropAnimationOffset, dragReturnOffset, overlayTilt, isDroppingCards, droppingSelection, isReturningDrag, returningCards, pendingDropDestination, and the waste return anchor) from DragInteractionController back to @State on ContentView — the storage it had before Stop per-frame whole-board re-evaluation #71.
  • DragInteractionController now holds only the true per-frame gesture state: dragTranslation and activeTarget.
  • DragOverlayView receives the flight-boundary fields as plain values from ContentView and keeps reading only dragTranslation from the controller.

Why

#71 broke every card flight animation: tap-to-move, drag-drop snap, auto-finish, and the invalid-drop return spring all became instant teleports. These flights are driven by withAnimation writes, and an @Observable property loses that transaction when another property has already invalidated the reader in the same tick — the first unanimated write (isDroppingCards = true) stamps the update, and the spring on the offset write behind it is dropped. @State animates per attribute, so the identical write sequence keeps its spring.

None of the shipped performance work is given back: the per-frame drag writes stay isolated in the controller, the moved fields change twice per flight (not per frame) at moments where ContentView already re-evaluates for toolbar enablement, and the board views still prune via their Equatable gates.

Validation

@cursor

cursor Bot commented Jul 15, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@austin-smith
austin-smith merged commit edd2d83 into main Jul 15, 2026
2 checks passed
@austin-smith
austin-smith deleted the restore-drag-flight-animations branch July 15, 2026 21:06
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