perf(drag): model dynamics on 7 recorded human drags - #5
Merged
Conversation
The original icon-drag recipe used a symmetric smoothstep velocity guessed from a single recording, and icon-drag-lift flaked ~1 in 6. Re-recorded 7 real human drags with helpers/event-logger.swift and replaced the guessed model with the measured one: - velocity: the median human displacement curve (gentle start, ~2.3x burst near 30-40%, long tapering landing) instead of a symmetric ease - path: a deterministic sin-bow (humans arc ~3.3px off a straight line) instead of a perfectly straight track - landing: a still ~135ms settle on the exact drop point before release, so SpringBoard has a stationary target to commit the drop to - this is where placement was slipping Applied to both drag paths (jxa_icon_drag_body in common.sh, dragSegment in gestures.swift) with the curve kept in sync. Commits the event recorder as a repo tool for future re-measurement. Result: icon-drag-lift 13/13 consecutive (was ~5/6); per-drag timing variance collapsed from 7.7-15.5s to 7.55-7.59s.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Replaces the icon-drag's guessed velocity model (symmetric smoothstep, derived from one recording) with dynamics measured from 7 real human drags, fixing the last flaky test.
What the recording showed
Captured with
helpers/event-logger.swift(now committed as a repo tool):Changes
HUMAN_CURVE/humanDragCurvein both drag paths (jxa_icon_drag_bodyincommon.sh,dragSegmentingestures.swift).Testing
--bench 3: 42/42, icon-drag 3/3