Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ jobs:
python3 scripts/acceptance_projects.py > dist/oracle-self-test.json
python3 scripts/soak.py --rounds 30 --output dist/soak.json
python3 scripts/smoke_pressure_tui.py --rounds 30 --output dist/ui-pressure.json
python3 scripts/capture_motion.py --check | tee dist/motion-check.txt
python3 scripts/smoke_stream_recovery.py --binary target/portable-glibc231/release/alt --engine /workspace/.alt-tools/goose --rounds 12 --output dist/stream-recovery.json
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02
if: always()
Expand Down
26 changes: 26 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,31 @@
# Changelog

## Unreleased — 0.8 motion (work orders in docs/WORK_ORDERS_0.8_MOTION.md)

- **Motion** (Settings → Appearance → Motion, Ctrl+P `motion`, `ALT_MOTION`):
Full, Reduced (fades only) or Off. The Linux console, `TERM=dumb` and
`NO_MOTION` are always Off. See docs/MOTION.md.
- Pages cascade in. Dialogs dim the page, pop in with a slight overshoot, cast a
shadow and fade out. Notices float in as toasts that always match the status
line. Replies stream in with a soft cursor. Tool status changes flash, running
tools spin, and meters glide. Focus rings breathe while a task runs; buttons
glow on hover and flash on click. The launch splash yields to any key.
- Adaptive frame pacing: 16 ms only while something animates, 60 ms otherwise,
and input is drawn within one fast frame. Transitions are drawn in a few
distinct stages to keep terminal output low, and an idle Alt writes the same
with motion on as off.
- Proof: a frame-time budget test (release 1.44 ms median at 160×48, Off 1.39 ms),
`scripts/capture_motion.py` clips and stills, and `--check`, a bandwidth and
idle regression check.
- Each frame now reaches the terminal in one buffered write, wrapped in a
synchronized update, so no terminal shows half a frame. The background-job
footer appears only after a job has run for 250 ms, so instant refreshes no
longer shift the layout up and back. Ctrl+Q no longer asks "Leave Alt?" over a
disposable view refresh; running tasks, connections and downloads still ask.
- Test harnesses keep reading the PTY while Alt exits (`smoke_tui`,
`terminal_harness`, `smoke_pressure_tui`), and the allowance smoke clicks only
a button row that has held still.

## Unreleased — 0.7 (work orders in docs/WORK_ORDERS_0.7.md)

### A06 small-model edit robustness
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ separately from application tests; see [Status and evidence](#status-and-evidenc
| Small-model effort | Explicit output/sampling, actual request receipts, host workflow, one active skill, source/import outlines and serial independently checked candidates |
| Offline improvement | Development-only instruction proposals with review/rollback; pending trajectory capture, SFT resume/export tooling and verified rewards |
| Recovery | State backup/restore, history retention, preserved imported weights, diagnostics and package rollback |
| Interface | Five themes, four layouts, mouse and keyboard; motion (page cascade, dialog pop, toasts, streaming cursor, gliding meters) with Full, Reduced and Off levels |

**Full access** uses normal host permissions. **Guided changes** reviews edits and
uses Bubblewrap for isolated checks; it reports unavailable isolation instead of
Expand Down Expand Up @@ -164,7 +165,7 @@ Keys are referenced by environment-variable name, not saved in model profiles.
- [Small-model implementation plan](docs/SMALL_MODEL_IMPLEMENTATION_PLAN.md) · [Training handoff](training/README.md)
- [Small-model usage](docs/SMALL_MODEL_USAGE.md) · [Delivered work orders and remaining gates](docs/SMALL_MODEL_DELIVERY.md)
- [Installation and updates](docs/INSTALLATION.md) · [Troubleshooting](docs/TROUBLESHOOTING.md)
- [Workspace guide](docs/WORKSPACE_GUIDE.md) · [CLI reference](docs/CLI.md)
- [Workspace guide](docs/WORKSPACE_GUIDE.md) · [Motion](docs/MOTION.md) · [CLI reference](docs/CLI.md)
- [Verification contracts](docs/VERIFICATION_CONTRACTS.md) · [Runtime qualification](docs/QUALIFICATION.md)
- [Architecture](docs/ARCHITECTURE.md) · [Contributing](CONTRIBUTING.md) · [Changelog](CHANGELOG.md)
- [Implementation and evidence](docs/IMPLEMENTATION.md) · [0.7 work orders](docs/WORK_ORDERS_0.7.md) · [PC test guide](docs/PC_TESTING.md)
Expand Down
125 changes: 125 additions & 0 deletions docs/MOTION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
# Motion

Alt animates its interface the way a modern web app does: pages cascade in,
dialogs pop open over a dimmed page, notices float in and leave, and replies
arrive with a soft cursor. Motion is never a reason to wait. Keys act the moment
they arrive. No text is held back for longer than a quarter of a second, and
with motion **Off** every frame is drawn in its final state.

![Launch](screenshots/0.8/motion/launch-120x40.gif)

## Choosing how much moves

Open **Settings → Appearance → Motion**, or press **Ctrl+P** and type `motion`.

| Level | What you see |
|---|---|
| **Full** (default) | Page cascade, dialog pop with overshoot, toasts that slide, gliding meters, focus glow while a task runs, hover and click feedback, a 0.7 s launch splash |
| **Reduced** | Fades and colour changes only. Nothing slides, scales or breathes, and there is no splash |
| **Off** | No animation. Toasts are not shown; the status line still carries every notice |

`ALT_MOTION=full|reduced|off` overrides the saved choice for one launch.
`NO_MOTION` (any value), `TERM=linux` (the Linux console) and `TERM=dumb` always
turn motion off.

## What moves, and for how long

| Effect | Where | Duration | Levels |
|---|---|---|---|
| Page cascade: rows settle top to bottom, each sliding a few columns and fading up | Content area on every page change | 190 ms | Full (Reduced: fade only) |
| Dialog pop: backdrop dims, dialog grows from 86% with a slight overshoot, drop shadow | Every dialog and approval | 170 ms in, 110 ms out | Full (Reduced: fade only) |
| Toast: the current notice floats in at the top right with a ✓ ✕ • glyph | Page area; never takes clicks | 3.2 s | Full, Reduced |
| Streaming reveal with a `▍` cursor | The reply being generated | catches up at ≥120 chars/s, at most ~250 ms behind | Full, Reduced |
| Tool status flash; running tools spin | Activity column | 650 ms | Full, Reduced |
| Gliding meters (eighth-cell steps) | Context meter, job progress | 420 ms | Full |
| Shimmer on progress of unknown size | Job bar | continuous while the job runs | Full |
| Focus ring breathing | Focused panel border | 2.6 s period, only while a task runs | Full |
| Hover glow and click flash | Any button, row, tab or card | 120 ms / 140 ms | Full, Reduced |
| Launch splash | Whole screen; any key passes through and ends it | 720 ms | Full |

A toast always shows the current status line text. A newer notice replaces it,
and an error or progress update retires it at once, so a toast never shows
anything stale. Identical repeated notices collapse into one card with a count
(×2).

## How it is built

- `src/tui/motion.rs`: one clock (pinnable in tests), easing curves (ease-out
cubic, ease-in-out cubic, ease-out-back), keyed tweens, RGB blending, and the
state of transitions, toasts, the reveal, flashes, hover and the splash.
Every animation is a pure function of time.
- `src/tui/fx.rs`: effects applied to the frame buffer after widgets draw
(fade, slide, clipped reveal, shadow, fade-out, gradient, tint). They only
recolour or move cells that widgets already drew. Layout, hit targets and text
are exactly what the widgets produced, so a click during a transition still
lands on the target it will settle on.
- **Whole frames:** each frame is written once through a buffered backend
inside a synchronized update, so a full-screen effect is never seen half
drawn.
- **Adaptive frame pacing:** Alt draws every 16 ms while something animates and
every 60 ms otherwise, and any input or update is drawn within one fast frame.
Spinners follow the clock, so their speed doesn't depend on the frame rate.

## Budgets and how they are checked

**Frame time.** `frame_time_stays_inside_budget_with_every_effect_active` runs
the same scripted session (page changes, dialogs opening and closing, toasts, a
gliding meter, a busy task, 40 messages) at 160×48 with motion Off and Full.
Measured in a cloud container (release build, not the reference GTX 1070 PC):

| Build | Off median / p95 | Full median / p95 |
|---|---|---|
| release | 1.39 / 4.17 ms | 1.44 / 2.45 ms |
| debug | 13.8 / 20.5 ms | 14.3 / 23.6 ms |

The test fails above 8 ms p95 in release (60 ms in debug), or at
`ALT_FRAME_BUDGET_MS`.

**Bandwidth.** Effects that cover an area repaint every cell they touch. Each
transition is therefore drawn in a few distinct stages, and identical frames
diff to nothing:

- the page cascade passes each row through two stages;
- a dialog pops in three stages;
- the backdrop dims in one step.

`python3 scripts/capture_motion.py --check` runs real sessions through a PTY and
fails if motion writes more than about 4× the bytes of the same session with
motion off, or if a settled screen keeps writing. Bytes written per session
(including the launch splash), from `screenshots/0.8/motion/clips.json`:

| Session | 80×24 Full / Off | 120×40 Full / Off |
|---|---|---|
| Launch | 17 KB / 6 KB | 46 KB / 17 KB |
| Four page changes | 58 KB / 19 KB | 142 KB / 51 KB |
| Palette open, type, close | 54 KB / 22 KB | 110 KB / 54 KB |
| Two theme changes with toasts | 157 KB / 46 KB | 248 KB / 95 KB |
| Idle, settled (1.5 s) | 0.6 KB / 0.6 KB | 0.6 KB / 0.6 KB |

An idle Alt writes the same with motion on as off: focus rings only breathe
while a task runs.

**Behaviour.** Every TUI smoke script runs with motion at its default (Full).
They include 30 pressure journeys under lock contention, real-Goose allowance
journeys, workbench, harness, verification and practice. Unit tests cover each
effect's timing, the exact final frame, Reduced keeping text in place, and Off
drawing in place.

## Clips and stills

Recorded with `python3 scripts/capture_motion.py`, which replays every byte Alt
wrote at its arrival time into a terminal emulator:

- [Launch, 80×24](screenshots/0.8/motion/launch-80x24.gif) ·
[page changes](screenshots/0.8/motion/pages-80x24.gif) ·
[palette](screenshots/0.8/motion/palette-80x24.gif) ·
[theme change and toast](screenshots/0.8/motion/theme-80x24.gif)
- Stills at 120×40: [splash](screenshots/0.8/motion/launch-splash-120x40.png),
[cascade](screenshots/0.8/motion/launch-cascade-120x40.png),
[settled](screenshots/0.8/motion/launch-settled-120x40.png),
[dialog pop](screenshots/0.8/motion/palette-dialog-pop-120x40.png),
[dialog open](screenshots/0.8/motion/palette-dialog-open-120x40.png),
[toast](screenshots/0.8/motion/theme-toast-120x40.png)

Not measured here: frame time and perceived smoothness on the reference PC, and
terminals other than xterm-compatible emulators replayed through pyte.
24 changes: 24 additions & 0 deletions docs/WORK_ORDERS_0.8_MOTION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# 0.8 motion work orders (M01–M05)

Goal: an interface that moves like a high-end web app without ever slowing
input, hiding state or costing an idle terminal anything. Built on the 0.7
branch (`cloud/0.7-2026-10-11`); fixtures only, no new dependencies. Details
and measurements are in [MOTION.md](MOTION.md).

| Order | Scope | Acceptance |
|---|---|---|
| M01 | Motion engine: clock, easing, tweens, colour blend; Full/Reduced/Off saved and in Settings + palette; `ALT_MOTION`; adaptive 16/60 ms frame pacing; clock-driven spinners; gliding meters | Unit tests per primitive; settings/palette reach; pacing test |
| M02 | Page cascade; dialog dim, pop, shadow and fade-out; quantised stages for bandwidth | Final frame exact; Reduced in place; Off in place; pressure smoke 30/30 |
| M03 | Toasts equal to the status line; streaming reveal with cursor; tool flashes and spinners; shimmer | Toasts never stale; progress never toasts; history whole |
| M04 | Gradient wordmark; focus breathing only while busy; hover and click feedback; launch splash that yields to keys | Idle frames identical; keys pass through splash; Reduced has no splash |
| M05 | Proof: frame-time budget test (Off vs Full), PTY bandwidth/idle check, GIF clips and stills, docs | Release p95 < 8 ms; ≤ ~4x bytes of Off; idle equal to Off |

## Status (2026-10-11)

| Order | Commit | Test | Result | Deferred |
|---|---|---|---|---|
| M01 | f861ba8 | motion unit tests, `motion_is_a_saved_setting…`, `adaptive_pacing…`, meters | Pass | — |
| M02 | 554563c | `pages_slide_in…`, `dialogs_pop_in…`, fx tests, all TUI smokes | Pass; also fixed pressure-smoke stalls by quantising transitions | — |
| M03 | 6d78a2e | toast, reveal, flash tests; all TUI smokes | Pass; `smoke_tui` drains its PTY between processes | — |
| M04 | b70f236 | splash, hover/press, breathing/gradient tests; all TUI smokes | Pass | — |
| M05 | this PR's last commit | `frame_time_stays_inside_budget…`, `capture_motion.py --check` | Pass: release 1.44 ms median, 2.45 ms p95 at 160×48; idle bytes equal to Off | Reference-PC frame time and perceived smoothness; non-xterm terminals |
60 changes: 60 additions & 0 deletions docs/screenshots/0.8/motion/clips.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
[
{
"clip": "launch",
"size": "80x24",
"bytes_full": 17403,
"bytes_off": 5542,
"frames": 14,
"gif_bytes": 109778
},
{
"clip": "launch",
"size": "120x40",
"bytes_full": 45527,
"bytes_off": 17361,
"frames": 15,
"gif_bytes": 233492
},
{
"clip": "pages",
"size": "80x24",
"bytes_full": 57762,
"bytes_off": 18636,
"frames": 27,
"gif_bytes": 358875
},
{
"clip": "pages",
"size": "120x40",
"bytes_full": 142006,
"bytes_off": 50979
},
{
"clip": "palette",
"size": "80x24",
"bytes_full": 54388,
"bytes_off": 22026,
"frames": 23,
"gif_bytes": 307098
},
{
"clip": "palette",
"size": "120x40",
"bytes_full": 110100,
"bytes_off": 53667
},
{
"clip": "theme",
"size": "80x24",
"bytes_full": 156557,
"bytes_off": 45864,
"frames": 45,
"gif_bytes": 707448
},
{
"clip": "theme",
"size": "120x40",
"bytes_full": 247658,
"bytes_off": 95122
}
]
Binary file added docs/screenshots/0.8/motion/launch-120x40.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/screenshots/0.8/motion/launch-80x24.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/screenshots/0.8/motion/pages-80x24.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/screenshots/0.8/motion/palette-80x24.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/screenshots/0.8/motion/theme-80x24.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading