Skip to content

[M11] Motion layer (M11.9) - #99

Merged
ssoufii merged 1 commit into
mainfrom
auto/m11.9-motion-layer
Nov 17, 2026
Merged

ssoufii merged 1 commit into
mainfrom
auto/m11.9-motion-layer

Conversation

@ssoufii

@ssoufii ssoufii commented Nov 17, 2026

Copy link
Copy Markdown
Owner

Adds the motion from docs/FRONTEND_DESIGN.md section 8. CSS does everything it can (end of page.css). web/src/motion.ts handles only what CSS can't: section entrances, input modality, and the flush group move.

The moves

  • Shutter: the hero stage opens from its bottom edge, once (1100ms --ease-in-out), while the console settles from scale(1.04). The keyframe animates the stage's own ten-point notch polygon from flat to notched, so the notch is never lost mid-move. An inset() clip would have dropped it.
  • Section entrances: heading, text, then fragment, 70ms apart, rising 20px, through IntersectionObserver with a -100px margin. The waiting state only applies under a .motion class, which the script adds once it knows the entrance can run. If the script fails, nothing is hidden.
  • Towers: a new tower builds block by block (140ms each, 40ms apart). A tombstone fades to --surface-3. A flush moves the towers out as one group (220ms --ease-in-out), and the new tile rises in.
  • Segmented controls (the durability dial and the start dialog): one indicator slides between options (220ms --ease-in-out).
  • Press feedback: scale(0.97) on every button and on the links too.
  • Keyboard actions don't travel (rule 8): the last input kind is recorded on <html>. A tower or tile fixes its entrance when it mounts, so it is not replayed when the visitor switches input. Keyboard-born ones fade, and keyboard segment moves don't slide.
  • Reduced motion: no shutter, no settle, no travel, no scale. Entrances become a 140ms fade.

Acceptance criteria

  • Motion tokens and every move in section 8: shutter (once), staggered entrances, tower build and flush moves, sliding segment indicator, scale(0.97) press feedback on every pressable element
  • Hover only under @media (hover: hover) and (pointer: fine) (CSSOM walk); keyboard-initiated actions don't animate travel (tested on a keyboard put and arrow keys on the dial)
  • Under reducedMotion: 'reduce', all content is visible immediately and nothing travels or scales
  • A CSSOM walk fails on transition: all, ease-in, and keyframes or transitions on width, height, top, left, margin, padding (it also asserts it actually saw the page's transitions and keyframes)
  • At least 8 elements animate during load and scroll (sampled from document.getAnimations()); no content stays hidden if the motion script can't run (tested by removing IntersectionObserver)

Test changes outside the new spec

  • house-rules.spec.ts now scrolls through the page once (tests/support/reveal.ts) before auditing and taking screenshots. That way the sections below the fold are checked after their entrance, as a visitor sees them.
  • console.spec.ts tombstone test now polls for the settled colour, because the tombstone colour fades over 220ms.

Verified locally (macOS)

  • pytest: 1304 passed, 6 skipped (/proc descriptor tests). Ruff is clean.
  • Lint, typecheck and build: clean.
  • Playwright: 130 passed. The 2 failures are the existing console.spec.ts keyboard test, which presses Control+A. That doesn't select all on macOS, so it is a Mac-only failure; it passes on Linux CI.
  • I opened and checked the full-page screenshot at 1440 after the scroll-through: every section is present, and the notch is intact after the shutter.

Closes #87

🤖 Generated with Claude Code

https://claude.ai/code/session_01QWNkuQ7vhXw8ijQ3q3NZDG

…gments

Story M11.9. The hero stage opens with the shutter once; sections enter
staggered via IntersectionObserver, applied only once the motion script runs
so a failure hides nothing; towers build block by block and tiles rise, but
fade instead when the action came from the keyboard; a flush moves the towers
out as one group; segmented controls slide one indicator. tests/motion.spec.ts
walks the CSSOM for transition: all, ease-in, layout properties and bare
hover rules, and checks reduced motion, script failure and press feedback.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QWNkuQ7vhXw8ijQ3q3NZDG
@ssoufii
ssoufii merged commit 43ff124 into main Nov 17, 2026
9 checks passed
@ssoufii
ssoufii deleted the auto/m11.9-motion-layer branch November 17, 2026 07:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[M11] Motion layer (M11.9)

1 participant