Repository navigation
Alt 0.8 motion: page cascade, dialog pop, toasts, streaming cursor, splash (M01–M05) - #3
Merged
Merged
Conversation
- src/tui/motion.rs: one clock (pinnable for tests), ease-out cubic, ease-in-out cubic and ease-out-back curves, keyed tweens, RGB blending, and the transition/toast/reveal/flash state later orders draw from. - Motion level Full | Reduced | Off saved as preferences.motion; ALT_MOTION overrides it; NO_MOTION, TERM=linux and TERM=dumb force Off. Settings → Appearance → Motion and the palette entry 'Setting: Motion' choose it. - Run loop: 16 ms frames only while something animates, 60 ms idle; any input or update draws within one fast frame instead of waiting a tick. - Spinners follow the clock, so speed no longer depends on frame rate. - Header context meter and job progress glide in eighth-cell steps. Tests: easing, blending, level resolution, glides, transitions, toasts, reveal, flashes, splash budget, eighth-cell meters, settings/palette reach and adaptive pacing. fmt, clippy -D warnings, cargo test (185 passed), smoke_tui and smoke_task_tui pass. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Tbobytt56pieYgqXeVGKrx
- src/tui/fx.rs: buffer post-processing (fade, slide, snapshot, changed bounds, scaled clip, shadow, fade-out, gradient, tint). Effects only recolour or move cells widgets already drew; hits and text are untouched. - Page change: rows cascade in top to bottom, each sliding a few columns and fading up from the background over 190 ms. Reduced fades only. - Dialogs: the page dims behind them in one step, the dialog pops from 86% with a slight overshoot (ease-out-back) and casts a shadow; closing fades the last dialog frame out over 110 ms. Targets are live from frame one. - Bandwidth: transitions are quantised into a few distinct stages so identical frames diff to nothing. A page change at 120x40 writes ~30 KB (Off: ~10 KB) instead of ~83 KB for a per-frame slide; this also fixes smoke_pressure_tui stalling when the reader paused mid-transition. Tests: cascade settles on the exact final frame, Reduced keeps text in place, Off draws in place, dialog pop/close, fx unit tests, stepping. fmt, clippy -D warnings, cargo test (192 passed), smoke_tui, smoke_task_tui, workbench, harness, verification, allowance (Goose), practice and pressure (30 rounds) pass. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Tbobytt56pieYgqXeVGKrx
- Toasts: notices float in at the top right of the page (slide + fade in four stages) and leave after 3.2 s. A toast always equals the current status line: a newer notice replaces it, any other status (error, progress, direct update) retires it, identical repeats collapse into one card with a count. The status line is unchanged and still the source of truth; workspace progress updates never toast. - Streaming: the newest reply is revealed as it arrives with a soft '▍' cursor, catching up at >=120 chars/s and never more than ~250 ms behind; history and finished replies appear whole. - Tool list: running tools spin, status changes flash green/red and fade over 650 ms. - Job progress with no known size shows a moving shimmer (Full only). - smoke_tui: drain the first process's unread frames before judging the resumed session on the same PTY (it matched stale output). Tests: toast collapse/replace/retire/expire, progress never toasts, reveal cursor and whole history, flash/spinner, motion units. fmt, clippy -D warnings, cargo test (195 passed), smoke_tui, smoke_task_tui, workbench, harness, verification, allowance (Goose), practice and pressure (30 rounds) pass. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Tbobytt56pieYgqXeVGKrx
- Header wordmark 'ALT //' is a two-accent gradient in every theme. - Focus rings breathe toward the second accent only while a task runs; an idle Alt writes nothing to the terminal (eight levels per breath). - Mouse: the target under the pointer glows (stepped fade-in) and a click flashes it for 140 ms. Moves are tracked from the existing capture. - Launch splash (Full motion only, 720 ms): gradient wordmark, tagline and a filling bar, then the interface cascades in. Any key passes straight through and ends it; a click only ends it (it cannot aim at a hidden screen). Reduced and Off have no splash. - Dialog pop draws a ring on the growing edge, so the reveal stays a clean box; toasts carry a tone glyph (✓ ✕ •). - Removes the staging dead-code allowances from M01/M02. Tests: splash covers then yields to keys and ends within budget, Reduced has none; hover tint and click flash; idle screens are byte-identical over time while busy focus rings breathe; gradient hue. fmt, clippy -D warnings, cargo test (198 passed), smoke_tui, smoke_task_tui, workbench, harness, verification, allowance (Goose), practice and pressure (30 rounds) pass. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Tbobytt56pieYgqXeVGKrx
- frame_time_stays_inside_budget_with_every_effect_active runs one scripted session (page changes, dialogs, toasts, gliding meter, busy task, 40 messages) at 160x48 with motion Off and Full. Release: Off 1.39/4.17 ms, Full 1.44/2.45 ms (median/p95); budget 8 ms p95 release, 60 ms debug, or ALT_FRAME_BUDGET_MS. - Dialogs record their own rect; a full-screen snapshot is taken only during the 170 ms entrance, so a settled dialog costs no extra copy. - scripts/capture_motion.py: records every byte Alt writes through a PTY with timestamps, replays it into a terminal emulator, writes GIF clips (80x24, plus launch at 120x40) and 120x40 stills, and reports bytes with motion against motion off. --check fails above ~4x the Off bytes or when a settled screen keeps writing; it runs in setup-cloud.sh and verify CI. - docs/MOTION.md (levels, effects, budgets, measurements), the M01-M05 board with status, CHANGELOG and README entries. Validation: complete scripts/setup-cloud.sh exit 0 (199 Rust tests, 72 Python unit tests, every TUI, real-Goose openai/ollama, compact and stream-recovery smoke, motion check), smoke_pressure_tui 30/30. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Tbobytt56pieYgqXeVGKrx
The close fade kept the old dialog's characters for its first half (~55 ms). smoke_allowance_tui read the screen in that window after Esc and could not find the composer's button row (CI, 80x24). A closed dialog now leaves only its colours to fade; the text beneath is final at once, so nothing stale can be read or clicked. Tests: fx fade-out keeps new text early and blends colours; dialog close test asserts the text is gone at once while colours still fade. fmt, clippy -D warnings, cargo test (199 passed), all TUI smokes, allowance (Goose) three times, pressure 30/30, capture_motion --check. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Tbobytt56pieYgqXeVGKrx
CI on this PR failed smoke_allowance_tui at 80x24. Reproduced under CPU load and traced to two races the faster motion pacing made visible: - Stdout flushes in ~1 KiB pieces, so a reader could see half a frame (closing a dimmed dialog repaints the whole screen). Frames now go through a 1 MiB buffered backend, one write per frame, wrapped in a synchronized update (ignored by terminals without it). - A short refresh job after each turn grew the footer from 3 to 6 rows and back, moving the composer buttons; a click aimed at the transient layout landed on the composer. The job footer now appears only after a job has run for 250 ms. The same race fails on the 0.7 baseline under load (1 of 3 runs); this head passed 20/20 journeys under that load. - Ctrl+Q no longer opens 'Leave Alt?' over a disposable (replaceable) view refresh; running tasks, connections and downloads still ask. - Harnesses keep reading the PTY while Alt exits (terminal_harness, smoke_pressure_tui), as a terminal does, and report the screen if it does not; the allowance smoke clicks only a button row that held still. Tests: quit prompt only for real work. fmt, clippy -D warnings, cargo test (200 passed), every TUI smoke, allowance (Goose) x2, pc_recorder, capture_motion --check, pressure 30/30 x2 and 30/30 under CPU load. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Tbobytt56pieYgqXeVGKrx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem and resulting behavior
The 0.7 interface was static. Every state change was an instant swap, so it lacked the motion of a modern app. This PR adds a motion layer with three rules: it never delays a key, it never holds text back for more than about a quarter second, and an idle Alt writes no more to the terminal than with motion off.
Stacked on #2: the base is
cloud/0.7-2026-10-11, so the diff shows only the motion work. Retarget tomainonce #2 merges.What users see (Full motion, the default):
▍cursor. Running tools spin and status changes flash. The context meter and job progress glide in eighth-cell steps; progress of unknown size shimmers.motion.ALT_MOTIONoverrides the choice; the Linux console,TERM=dumbandNO_MOTIONare always Off.Clips and stills are in
docs/screenshots/0.8/motion/. Design, budgets and measurements are indocs/MOTION.md.Validation
frame_time_stays_inside_budget…,capture_motion.py --check, clipssmoke_allowance_tui20/20 journeys under 6 CPU burners on 4 cores (0.7 baseline: 12/13 under the same load); pressure 30/30 ×2 and 30/30 under loadcargo fmt --check,cargo clippy --all-targets -- -D warnings,cargo test, and the TUI smokes with motion at its default (Full): tui, task, workbench, harness, verification, practice, allowance (real Goose) and pressure (30 rounds).scripts/setup-cloud.shexited 0, with 199 Rust tests, 72 Python unit tests, every TUI smoke, real-Goose openai and ollama, compact and stream-recovery smokes, and the motion check.smoke_pc_recorderand the motion check pass, and CI (linux, training-handoff, GitGuardian) is green.--checkruns insetup-cloud.shand verify CI.Problems found and fixed:
smoke_pressure_tuistalled when its reader paused mid-transition. Transitions are now drawn in a few distinct stages, so identical frames cost nothing.smoke_tuijudged a resumed session by the previous process's unread frames. It now drains its PTY between processes.smoke_allowance_tui, 80×24): reproduced under CPU load. Two races were to blame:Compatibility and recovery
preferences.motion(defaultfull). Existingpreferences.tomlfiles load unchanged.ALT_MOTION=off. The status line still carries every notice.🤖 Generated with Claude Code
https://claude.ai/code/session_01Tbobytt56pieYgqXeVGKrx