From efac3651753aaa7104eb47981f7ff85e125fa5c3 Mon Sep 17 00:00:00 2001 From: Ben Vinegar Date: Wed, 1 Jul 2026 14:51:37 -0400 Subject: [PATCH 1/2] fix(kit): grid-stack the slides deck so it cross-fades in normal flow MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The `slides` kit swapped slides with display:none — measurable but no cross-fade — so agents hand-rolled decks with `position:absolute` slides stacked over a `min-height` stage to fade between them. That layout is a trap: the absolute overlay grows `scrollHeight` but not the document box, and the surface-page height bridge's ResizeObserver watches the BOX, not scrollHeight. So once the fixed re-measure timers stop (10s), the frame goes blind to the deck's real height and freezes clipped — the taller slide's content gets cut off, nondeterministically depending on whether a timer landed after layout settled ("uncached looks smaller"). Give the kit a cross-fade that stays IN FLOW: grid-stack every `.slide` into the same `1/1` cell (they overlap, but the container still sizes to the tallest slide) and fade with opacity + visibility. Now the deck's true height lives in the box the ResizeObserver can see, so it self-corrects. Also document the out-of-flow trap in DESIGN_GUIDE alongside the existing `position: fixed` ban, with the grid-stack recipe, and add a regression test pinning the in-flow contract. Co-Authored-By: Claude Opus 4.8 --- guide/DESIGN_GUIDE.md | 18 ++++++++++++++---- server/kits.ts | 20 ++++++++++++++++---- test/kits.test.ts | 11 +++++++++++ 3 files changed, 41 insertions(+), 8 deletions(-) diff --git a/guide/DESIGN_GUIDE.md b/guide/DESIGN_GUIDE.md index f57980c..2ed00b2 100644 --- a/guide/DESIGN_GUIDE.md +++ b/guide/DESIGN_GUIDE.md @@ -211,8 +211,17 @@ is yours. height automatically. - `