okami.mom/strata
git clone https://git.nkp.pet/okami.mom/strata
2b36e8a02
main
15 · Motion and fluidity
Across the app · Rules interaction-guidelines.md · Harness scripts/motion.mjs
Motion is the layer that makes the app feel considered. It is also the layer most able to make a machine running a language model feel slow, so it is rationed deliberately.
What is today
- One scale: 100 / 160 / 240 / 320 / 460 ms, one standard curve, springs only for direct manipulation.
- Twenty keyframes, down from twenty-three, most entrances collapsed into two shared recipes.
- Route changes morph through
startViewTransition, including a shared element where one exists. - Three grid-track animations — sidebar rail, context rail, workspace tree.
- Interruptible overlays throughout, proven by frame-sampled contact sheets.
- Reduced motion substitutes opacity for movement, verified:
transform: noneandopacity: 1under the OS setting. - Nothing animates during generation except the caret and the status dot.
Where it falls short
-
Progress and gauge fills are not on the scale everywhere. Some jump to their value; some ease. The inconsistency is visible when two update together.
-
The
st-enterrecipe carries nearly every entrance, which makes unrelated surfaces move identically. A palette and a toast should not arrive the same way. -
No motion exists for the most common action — sending a message. The user message simply appears.
-
Nothing acknowledges a completed generation when scrolled away.Fixed. A reply that finishes off screen had no way to say so — the text simply stopped arriving. The jump-to-latest pill now dips once, on opacity alone, so the cue is noticed without anything moving and without pulling the eye off what the reader is actually reading. Verified: the cue fires withst-cueon the--st-t-choreotoken. Under reduced motion it becomes a colour change rather than a pulse, so the acknowledgement is not lost. -
Two loops can run simultaneously — the busy dot and a progress bar — where the rule allows one moving thing per region.
-
No motion budget is measured.Fixed for the loop budget.scripts/motion.mjsnow checks one loop per region across nine routes in both themes, grouping by the nearest card, panel or table so a spinner in a list row is judged against that row rather than the whole screen.Proven non-vacuous: a second loop inside a settings card reports
light · settings: 20 loops at once in "st-card.st-card--flush"and exits 1; removing it returns to 0.Two bugs in the check itself, both found by trying to prove it. It only covered seven routes, so the probe I first used to test it — on Settings — could not have failed. And it toggled the theme by clicking a control that the setup modal covers, which timed out on that route. Both fixed; the check now sets the theme the way the app does and covers every reachable route. Frame cost is asserted only for lensing, which was declined. The rest is assumed cheap.
-
The reading-progress hairline animates on scroll but nothing else does, though the header hairline and title collapse share the same trigger — three scroll-driven effects on one element tree, never measured together.
The plan
Substance
- Finish the scale's application: every value-driven fill eases on
--st-t-local; every state change is a token on--st-t-control; nothing jumps except a value the user typed. - Differentiate entrances by kind, not by taste: transient surfaces lift (6 px), modal surfaces scale (0.98), inline content fades (0 px). Three recipes, each with a reason.
A send acknowledgement.Wrong — it already had one. The claim was that "the most frequent action in the app currently has no response at all", but a sent message animates in onst-enter: 6 px lift over 240 ms, measured. The plan's proposed values (4 px on--st-t-control, 160 ms) differ by degree, not by existence, and the existing values sit on the scale. No change made.A completion cue.Done, on opacity only.
Discipline
- One loop per region, enforced: the audit gains a rule that two elements with running infinite animations may not share a stacking context.
- A motion budget check covering the three scroll-driven effects together: p95 frame time while scrolling must stay within 1.2× of a build with them disabled.
Motion
The reference table the audit enforces:
| Band | Token | Travel | Use |
|---|---|---|---|
| micro | 100 ms | ≤ 4 px | hover, press, colour |
| control | 160 ms | ≤ 16 px | menus, rows, small transforms |
| local | 240 ms | ≤ 24 px | drawers, disclosure, value fills |
| surface | 320 ms | — | rails, routes, whole panels |
| choreographed | 460 ms | — | first run only |
Verification
npm run motionstays green: every surface reverses mid-flight.- New: no two infinite animations share a stacking context.
- New: p95 scroll frame time within 1.2× of the scroll-effects-disabled build.
- Reduced-motion sweep asserts
transform: noneon every moving element andopacity: 1on every fading one.
1# 15 · Motion and fluidity 2 3**Across the app** · **Rules** [interaction-guidelines.md](../interaction-guidelines.md) · **Harness** `scripts/motion.mjs` 4 5Motion is the layer that makes the app feel considered. It is also the layer most 6able to make a machine running a language model feel slow, so it is rationed 7deliberately. 8 9## What is today 10 11- **One scale**: 100 / 160 / 240 / 320 / 460 ms, one standard curve, springs only 12for direct manipulation. 13 - **Twenty keyframes**, down from twenty-three, most entrances collapsed into two 14shared recipes. 15 - **Route changes morph** through `startViewTransition`, including a shared 16element where one exists. 17 - **Three grid-track animations** — sidebar rail, context rail, workspace tree. 18- **Interruptible overlays** throughout, proven by frame-sampled contact sheets. 19- **Reduced motion substitutes opacity for movement**, verified: `transform: none` 20and `opacity: 1` under the OS setting. 21 - **Nothing animates during generation** except the caret and the status dot. 22 23## Where it falls short 24 251. **Progress and gauge fills are not on the scale everywhere.** Some jump to 26their value; some ease. The inconsistency is visible when two update together. 272. **The `st-enter` recipe carries nearly every entrance**, which makes unrelated 28surfaces move identically. A palette and a toast should not arrive the same way. 293. **No motion exists for the most common action** — sending a message. The user 30message simply appears. 314. ~~Nothing acknowledges a completed generation when scrolled away.~~ **Fixed.** 32A reply that finishes off screen had no way to say so — the text simply 33stopped arriving. The jump-to-latest pill now dips once, **on opacity alone**, 34so the cue is noticed without anything moving and without pulling the eye off 35what the reader is actually reading. Verified: the cue fires with `st-cue` on 36the `--st-t-choreo` token. Under reduced motion it becomes a colour change 37rather than a pulse, so the acknowledgement is not lost. 385. **Two loops can run simultaneously** — the busy dot and a progress bar — where 39the rule allows one moving thing per region. 406. ~~No motion budget is measured.~~ **Fixed for the loop budget.** 41`scripts/motion.mjs` now checks **one loop per region** across nine routes in 42both themes, grouping by the nearest card, panel or table so a spinner in a 43list row is judged against that row rather than the whole screen. 44 45Proven non-vacuous: a second loop inside a settings card reports 46`light · settings: 20 loops at once in "st-card.st-card--flush"` and exits 1; 47removing it returns to 0. 48 49**Two bugs in the check itself, both found by trying to prove it.** It only 50covered seven routes, so the probe I first used to test it — on Settings — 51could not have failed. And it toggled the theme by clicking a control that 52the setup modal covers, which timed out on that route. Both fixed; the check 53now sets the theme the way the app does and covers every reachable route. Frame cost is asserted only for lensing, 54which was declined. The rest is assumed cheap. 557. **The reading-progress hairline animates on scroll but nothing else does**, 56though the header hairline and title collapse share the same trigger — three 57scroll-driven effects on one element tree, never measured together. 58 59## The plan 60 61### Substance 621. **Finish the scale's application**: every value-driven fill eases on 63`--st-t-local`; every state change is a token on `--st-t-control`; nothing 64jumps except a value the user typed. 652. **Differentiate entrances by kind**, not by taste: *transient* surfaces lift 66(6 px), *modal* surfaces scale (0.98), *inline* content fades (0 px). Three 67recipes, each with a reason. 683. ~~A send acknowledgement.~~ **Wrong — it already had one.** The claim was that 69"the most frequent action in the app currently has no response at all", but a 70sent message animates in on `st-enter`: **6 px lift over 240 ms**, measured. 71The plan's proposed values (4 px on `--st-t-control`, 160 ms) differ by degree, 72not by existence, and the existing values sit on the scale. No change made. 734. ~~A completion cue.~~ **Done**, on opacity only. 74 75### Discipline 765. **One loop per region, enforced**: the audit gains a rule that two elements 77with running infinite animations may not share a stacking context. 786. **A motion budget check** covering the three scroll-driven effects together: 79p95 frame time while scrolling must stay within 1.2× of a build with them 80disabled. 81 82## Motion 83 84The reference table the audit enforces: 85 86| Band | Token | Travel | Use | 87|---|---|---|---| 88| micro | 100 ms | ≤ 4 px | hover, press, colour | 89| control | 160 ms | ≤ 16 px | menus, rows, small transforms | 90| local | 240 ms | ≤ 24 px | drawers, disclosure, value fills | 91| surface | 320 ms | — | rails, routes, whole panels | 92| choreographed | 460 ms | — | first run only | 93 94## Verification 95 96- `npm run motion` stays green: every surface reverses mid-flight. 97- New: **no two infinite animations share a stacking context**. 98- New: **p95 scroll frame time within 1.2×** of the scroll-effects-disabled build. 99- Reduced-motion sweep asserts `transform: none` on every moving element and 100`opacity: 1` on every fading one.