Swipe gesture on the Discover deck #107

Member

Maestro task 54c12e9e-5f36-4595-babb-e54107bb473b - "Swipe gesture" (Feature 13).

Done-condition: the top card supports pointer dragging per handoff Motion 4 (setPointerCapture, touch-action none, transform translate(dx, dy*0.3) rotate(dx/18 deg) while dragging, Try it stamp opacity clamp(dx/100,0,1) and Pass stamp opacity clamp(-dx/100,0,1)); on release dx > 110 px flies right from the current transform to translate(150%,-60px) rotate(28deg) opacity 0 over 340 ms with no wiggle, dx < -110 px runs the Pass fold prefixed with the current drag transform, otherwise it springs back over 420 ms cubic-bezier(.34,1.4,.64,1) and resets the stamps; only the top card is draggable and input is ignored while busy; Vitest tests with synthetic pointer events cover accept past threshold, decline past threshold, snap-back below threshold and stamp opacity mid-drag; typecheck, test and build pass.

Reuses the merged deck screen (1ecc121c) and its motion module (cb7da499), and goes through the same shared decision handler so the buttons and arrow keys remain equivalent paths. Optimistic mutations/prefetch (ea935fbc) and the Quest log sheet (5ad0b188) remain later tasks.

Maestro task `54c12e9e-5f36-4595-babb-e54107bb473b` - "Swipe gesture" (Feature 13). Done-condition: the top card supports pointer dragging per handoff Motion 4 (setPointerCapture, touch-action none, transform translate(dx, dy*0.3) rotate(dx/18 deg) while dragging, Try it stamp opacity clamp(dx/100,0,1) and Pass stamp opacity clamp(-dx/100,0,1)); on release dx > 110 px flies right from the current transform to translate(150%,-60px) rotate(28deg) opacity 0 over 340 ms with no wiggle, dx < -110 px runs the Pass fold prefixed with the current drag transform, otherwise it springs back over 420 ms cubic-bezier(.34,1.4,.64,1) and resets the stamps; only the top card is draggable and input is ignored while busy; Vitest tests with synthetic pointer events cover accept past threshold, decline past threshold, snap-back below threshold and stamp opacity mid-drag; typecheck, test and build pass. Reuses the merged deck screen (1ecc121c) and its motion module (cb7da499), and goes through the same shared decision handler so the buttons and arrow keys remain equivalent paths. Optimistic mutations/prefetch (ea935fbc) and the Quest log sheet (5ad0b188) remain later tasks.
orchestrator-agent added 1 commit 2026-10-07 01:56:00 -04:00
Add the swipe gesture to the Discover deck's top card
CI / ci (push) Successful in 2m53s
CI / ci (pull_request) Successful in 2m39s
78b0c7b84c
The top card follows a pointer drag per handoff Motion §4: captured with
setPointerCapture under touch-action none, it moves to translate(dx, dy*0.3)
rotate(dx/18 deg) with the "Try it!" and "Pass" stamps at clamp(±dx/100).
A release past 110 px right throws it from where it was let go (340 ms, no
wiggle); past 110 px left folds it from the drag transform; anything shorter
springs back over 420 ms and resets the stamps. Swipe decisions go through
the same decide handler as the buttons and ← / → keys, so the busy lock and
reduced-motion fade apply unchanged; only the top card is draggable and
input is ignored while busy.

motion.ts gains dragTransform, follow, unfollow and snapBack beside the
exits; DeckCard marks its Pass stamp as a part.

Maestro task 54c12e9e-5f36-4595-babb-e54107bb473b.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
review_agent requested changes 2026-10-07 01:59:40 -04:00
Dismissed
review_agent left a comment
Member

Independent Codex gpt-6-sol review: CHANGES_REQUIRED for this exact commit.

Independent Codex gpt-6-sol review: CHANGES_REQUIRED for this exact commit.
overseer added 1 commit 2026-10-07 02:05:10 -04:00
Decide a swipe from the release point and stop stray snap-backs
CI / ci (push) Successful in 2m57s
CI / ci (pull_request) Successful in 2m39s
f3483b1d4d
- Track the pointerup position before choosing Try it, Pass or snap-back,
  so the outcome follows where the card was let go (SQ-107-01).
- Keep the snap-back animation and cancel it when a new drag or a
  decision starts (SQ-107-02).
- Treat losing pointer capture before the release as a cancel, springing
  the card back and resetting its stamps (SQ-107-03).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
review_agent requested changes 2026-10-07 02:09:06 -04:00
Dismissed
review_agent left a comment
Member

Independent Codex gpt-6-sol review: CHANGES_REQUIRED for this exact commit.

Independent Codex gpt-6-sol review: CHANGES_REQUIRED for this exact commit.
overseer added 1 commit 2026-10-07 02:12:41 -04:00
Let one pointer drag the Discover top card at a time
CI / ci (push) Successful in 2m53s
CI / ci (pull_request) Successful in 2m38s
aaa771e23b
A second primary pointer pressing mid-drag replaced the drag record, so
neither release cleared the first pointer's transform and the card stayed
displaced. A press while a drag is in progress is now ignored, and a new
top card ends a drag left on the old one so it cannot block the next.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
review_agent left a comment
Member

Independent Codex gpt-6-sol review: APPROVED for this exact commit.

Independent Codex gpt-6-sol review: APPROVED for this exact commit.
approver_agent merged commit 9088c313cc into feature/e3a8e4ea-8dcb-49e8-878f-552a6af109cb-discover-side-quest-suggestions 2026-10-07 02:18:41 -04:00
Sign in to join this conversation.
No Reviewers
No labels
3 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Maniacs_Mansion/MealQuest#107