Tunal/docs/motion-audit.md
2026-11-19 05:15:10 -06:00

2.3 KiB

Motion audit (S035)

Quick-effort audit of crates/tunal/ui against the motion rules (CLAUDE.md §2, app-taste) and the improve-animations catalog. Commit at audit time: b042dfe.

Recon

  • Stack: Slint 1.19, animate blocks on properties, one MotionClock (animation-tick, runs only while running) for folder transitions, Timers for delays.
  • Tokens: motion.slint: M3 durations short1–long4, emphasized/standard easings, squeeze scales; Motion.time() returns 0 under reduced motion (portal enable-animations or TUNAL_REDUCED_MOTION=1).
  • Frequency: high: row/control hover, press squeeze, ripple, selection. Medium: menus, tabs, view switch, toasts. Low: dialogs, player bar, settings.

Findings

# Severity Category Location Finding Fix
1 LOW Accessibility components/toast.slint exit Timer Removal waited Motion.short4 even under reduced motion, so the stack closed up 200 ms after an instant exit interval: Motion.time(Motion.short4) (applied)
2 MEDIUM Performance app No way to check idle repaint TUNAL_FRAMES=1 logs each drawn frame (applied)

Cleared (checked, nothing to fix):

  • Easing and duration: every animate uses Motion.time(...) with token durations; enters use emphasized-decelerate, exits standard; no ease-in on UI; no literal durations or easings outside motion.slint.
  • Interruptibility: all motion is property animation (retargets from the current value); Overlay reverses mid-entrance; the folder transition clock is re-timed by the model when interrupted.
  • Physicality: surfaces enter from Motion.enter-scale (0.92), never 0; menus open from anchors.
  • Idle: MotionClock and the wavy toast line tick only while something runs; no looping animation otherwise. Measured 0 frames over 11 s idle (below).
  • Delays (tooltip, drag-switch, toast timeout) are delays, not motion, and stay under reduced motion by design.

Missed opportunities

None worth adding now. The software renderer can't draw the press squeeze, so its feel is for the user's live review.

Idle check

Under Xvfb :97: env -u WAYLAND_DISPLAY DISPLAY=:97 TUNAL_FRAMES=1 timeout 16 target/debug/tunal <dir> logged 5 frames during start-up (until 3.2 s), then none from 5 s to 16 s.