From 39d173ab756420dc45f74232550915227f70d69f Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 22 Apr 2026 11:49:56 +0000 Subject: [PATCH] kasuti: shared replay URL lands on empty board, no confetti MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Hydration now pre-arms celebratedRef so the completion effect skips both the confetti and the replayIdx=stitches.length snap. The viewer lands on an empty fabric with the full tour queued up and drives playback from the replay controls — no spoiler, and no party popper on someone else's accomplishment. https://claude.ai/code/session_01KNdXjQczMCRGMK7K3Qderw --- src/components/interactives/KasutiEmbroidery.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/components/interactives/KasutiEmbroidery.tsx b/src/components/interactives/KasutiEmbroidery.tsx index 39e9c54..8a7ff00 100644 --- a/src/components/interactives/KasutiEmbroidery.tsx +++ b/src/components/interactives/KasutiEmbroidery.tsx @@ -1095,6 +1095,10 @@ const KasutiEmbroidery: React.FC = () => { setCurrentVertex(from); setActiveSide(rebuilt.length % 2 === 0 ? 'front' : 'back'); setStitches(rebuilt); + // Pre-arm the celebration flag so the completion effect leaves replayIdx + // at 0 and doesn't fire confetti — URL arrivals should land on an empty + // board and press play themselves to watch the tour get stitched in. + celebratedRef.current = true; setCompleted(true); hydratedRef.current = true; }, []);