From 612f4c7ad2207126b26328a4b64084698505fa6b Mon Sep 17 00:00:00 2001 From: dev_agent Date: Wed, 7 Oct 2026 01:36:15 -0400 Subject: [PATCH] Animate Try it and Pass exits and deck promotion MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add web/src/discover/motion.ts with the handoff Motion §2, §3, §5 and §6 values over the Web Animations API: the button and Quest log pill bump, the "Try it!" stamp pop, wiggle and throw right, the Pass page fold with its shade, the 300 ms deck promotion and the 200 ms reduced-motion fade. Each exit takes an optional starting transform for the swipe gesture and returns { finished, cancel }. DiscoverPage now runs the exit, sends the decision once the card is gone and keeps input locked until it settles; a refused decision cancels the exit so the card comes back, and leaving the page mid-exit sends nothing. The shade uses --color-text (#201e1d). Maestro task cb7da499-ffda-441d-8574-82e57b332fb6. Co-Authored-By: Claude Opus 5.5 --- web/src/discover/DeckCard.tsx | 5 +- web/src/discover/DiscoverPage.module.css | 10 ++ web/src/discover/DiscoverPage.test.tsx | 187 ++++++++++++++++++++++- web/src/discover/DiscoverPage.tsx | 101 +++++++++--- web/src/discover/motion.test.ts | 176 +++++++++++++++++++++ web/src/discover/motion.ts | 142 +++++++++++++++++ web/src/test/animate.ts | 52 +++++++ 7 files changed, 652 insertions(+), 21 deletions(-) create mode 100644 web/src/discover/motion.test.ts create mode 100644 web/src/discover/motion.ts create mode 100644 web/src/test/animate.ts diff --git a/web/src/discover/DeckCard.tsx b/web/src/discover/DeckCard.tsx index 7d3df64..6c2cb2d 100644 --- a/web/src/discover/DeckCard.tsx +++ b/web/src/discover/DeckCard.tsx @@ -17,7 +17,7 @@ export type DeckCardProps = { // DeckCard is one Side quest in the deck. Only the top card is read out and // reachable; the cards behind it are the stack's edge, kept rendered so they // can be promoted. Its "Try it!" and "Pass" stamps stay hidden until a -// decision shows them. +// decision shows them, and its shade until Pass folds it (see motion.ts). export function DeckCard({ quest, depth }: DeckCardProps) { const top = depth === 0 const titleId = `side-quest-${quest.id}` @@ -38,12 +38,13 @@ export function DeckCard({ quest, depth }: DeckCardProps) { Why this? {quest.reason}

-