ATT-43 Every tmux window's ambience effect is the background; at-terminal's own meadow goes #51

Merged
merge-queue merged 2 commits from att-43-ambience into main 2026-11-28 17:46:19 -08:00
Owner

Work package: https://openproject.home.romaine.life/wp/ATT-43

Every tmux window gets one of ambience's effects as at-terminal's background, and at-terminal's own meadow is removed (the meadow is now one of ambience's effects).

Removed

  • frontends/rioterm/src/meadow/ (the scene and its painting thread) and --background meadow.

Added and changed

  • frontends/rioterm/src/ambience/: the window's ambience background.
    • painter.rs: ambience-paint from C:\Program Files\at-home\ambience\current\ (from %ProgramFiles%), started directly with CREATE_NO_WINDOW, stderr to null. list runs once on a thread as the window opens. One long-lived child holds every effect; commands are written from a thread of their own and frames ("AMBF" header, then RGBA) read on another into the one-frame slot, never on the event loop. A painter that is missing, fails to start, dies or writes something that isn't a frame is logged once in at-terminal.log and not started again: the window keeps its plain background.
    • mod.rs: what the painter is told, only what changed: size on resize, show <effect> on a background message and when the window is watched again, hold when unfocused or covered, when the effect is empty, and when the background is configured. A show while held is followed by hold, so a new effect stands on its first frame.
  • --background ambience|configured|toggle; ambience is the default, and a saved meadow reads as ambience (state.rs, cli.rs).
  • at-protocol pinned to romaine-life/at-protocol cad0ee9b (PR 4, background and effects); the Rust binding gains both kinds with round-trip tests. A hello is answered as before, then the window sends effects as input to the route (an empty list with no painter; a hello that comes before list answers is owed the list, sent when it answers). background reaches the window as an event.
  • Frames crop at the right and bottom (the existing pixel-scale path draws from the top left at exact scale); transparent cells show the window's own background (premultiplied blending).
  • The frame trace's meadow line is background now; README's Backgrounds section and at-protocol list.

Left alone

  • The one-frame slot and its upload, the background-only frame not counting against key pacing, and holding while unfocused or covered.
  • The at menu's "meadow background" entry (romaine-life/at) still runs --background toggle, which works unchanged; its name is that repo's.

Tests

  • Frame reader: frames back to back to a clean end, a frame in 3-byte pieces, and bad magic, a cut header or pixels, zero sizes and an oversize frame as errors; the list parser.
  • Command flow: the commands for focus, unfocus, effect changes, an empty effect and resizes, held and moving.
  • Against a fake painter over pipes: frames reach the slot and wake the window, a frame painted after the effect went is dropped, and a painter that exits leaves the plain background and isn't restarted.
  • A missing painter is an error, not a crash; with none, the effects list is empty and nothing starts.
  • at-protocol: background and effects round-trip (empty and longest names, an empty list); bad names don't encode; crosswords sends the hello's answer then the window's cue, and a background message reaches the window.
  • state: ambience by default, a saved meadow is ambience, an unknown value is ambience.
Work package: https://openproject.home.romaine.life/wp/ATT-43 Every tmux window gets one of ambience's effects as at-terminal's background, and at-terminal's own meadow is removed (the meadow is now one of ambience's effects). ## Removed - `frontends/rioterm/src/meadow/` (the scene and its painting thread) and `--background meadow`. ## Added and changed - `frontends/rioterm/src/ambience/`: the window's ambience background. - `painter.rs`: `ambience-paint` from `C:\Program Files\at-home\ambience\current\` (from `%ProgramFiles%`), started directly with `CREATE_NO_WINDOW`, stderr to null. `list` runs once on a thread as the window opens. One long-lived child holds every effect; commands are written from a thread of their own and frames ("AMBF" header, then RGBA) read on another into the one-frame slot, never on the event loop. A painter that is missing, fails to start, dies or writes something that isn't a frame is logged once in `at-terminal.log` and not started again: the window keeps its plain background. - `mod.rs`: what the painter is told, only what changed: `size` on resize, `show <effect>` on a `background` message and when the window is watched again, `hold` when unfocused or covered, when the effect is empty, and when the background is `configured`. A `show` while held is followed by `hold`, so a new effect stands on its first frame. - `--background ambience|configured|toggle`; `ambience` is the default, and a saved `meadow` reads as `ambience` (`state.rs`, `cli.rs`). - at-protocol pinned to romaine-life/at-protocol `cad0ee9b` (PR 4, `background` and `effects`); the Rust binding gains both kinds with round-trip tests. A hello is answered as before, then the window sends `effects` as input to the route (an empty list with no painter; a hello that comes before `list` answers is owed the list, sent when it answers). `background` reaches the window as an event. - Frames crop at the right and bottom (the existing pixel-scale path draws from the top left at exact scale); transparent cells show the window's own background (premultiplied blending). - The frame trace's `meadow` line is `background` now; README's Backgrounds section and at-protocol list. ## Left alone - The one-frame slot and its upload, the background-only frame not counting against key pacing, and holding while unfocused or covered. - The at menu's "meadow background" entry (romaine-life/at) still runs `--background toggle`, which works unchanged; its name is that repo's. ## Tests - Frame reader: frames back to back to a clean end, a frame in 3-byte pieces, and bad magic, a cut header or pixels, zero sizes and an oversize frame as errors; the `list` parser. - Command flow: the commands for focus, unfocus, effect changes, an empty effect and resizes, held and moving. - Against a fake painter over pipes: frames reach the slot and wake the window, a frame painted after the effect went is dropped, and a painter that exits leaves the plain background and isn't restarted. - A missing painter is an error, not a crash; with none, the effects list is empty and nothing starts. - at-protocol: `background` and `effects` round-trip (empty and longest names, an empty list); bad names don't encode; crosswords sends the hello's answer then the window's cue, and a `background` message reaches the window. - state: ambience by default, a saved `meadow` is ambience, an unknown value is ambience.
The meadow module and --background meadow are removed: --background is
ambience|configured|toggle, ambience the default, a saved meadow reading as
ambience. One ambience-paint child holds every effect, started directly with
no window; its commands are written and its frames read on threads of their
own into the one-frame slot, held while unfocused or covered. at-protocol is
pinned to cad0ee9b: background from at-tmux names the window's effect, and
effects, sent after each hello, names what the painter can draw.
ATT-43 The painter's command is split per system, so Linux has no unused mut
All checks were successful
Suite default / check-fetches (pull_request) Has been skipped
Suite release / reserve (pull_request) Has been skipped
Suite release / publish (pull_request) Has been skipped
Suite release / reused-checks (push) Has been skipped
Suite release / publish (push) Has been skipped
Suite release / home-sync (push) Has been skipped
Suite release / deploy-image (push) Has been skipped
Suite default / scope (pull_request) Successful in 29s
Suite rust / scope (pull_request) Successful in 30s
Suite release / module (pull_request) Has been skipped
Suite release / build (rust, x86_64-pc-windows-msvc) (, rust-x86_64-pc-windows-msvc, x86_64-pc-windows-msvc, false, windows-latest, x86_64-pc-windows-msvc, rust) (pull_request) Has been skipped
Suite rust / check-services (pull_request) Has been skipped
Suite rust / check-audit (pull_request) Has been skipped
Suite default / check-rules (pull_request) Has been skipped
Suite release / scope (pull_request) Successful in 33s
Suite release / home-sync (pull_request) Has been skipped
Suite rust / check-typos (pull_request) Has been skipped
Suite rust / check-machete (pull_request) Has been skipped
Suite release / finalize (pull_request) Has been skipped
Suite release / deploy-image (pull_request) Has been skipped
Suite rust / check-format (pull_request) Successful in 46s
Suite default / check-logs (pull_request) Successful in 27s
Suite default / reused-checks (pull_request) Successful in 23s
Suite rust / check-test-linux (pull_request) Successful in 7m6s
Suite release / check-build (rust, x86_64-pc-windows-msvc) (, rust-x86_64-pc-windows-msvc, x86_64-pc-windows-msvc, false, windows-latest, x86_64-pc-windows-msvc, rust) (pull_request) Successful in 11m23s
Suite release / check-package (pull_request) Successful in 47s
Suite rust / check-test-windows (pull_request) Successful in 12m23s
Suite release / reused-checks (pull_request) Successful in 35s
Suite rust / reused-checks (pull_request) Successful in 30s
merge-queue landed on main
22759e9095
merge-queue deleted branch att-43-ambience 2026-11-28 17:46:20 -08:00
Sign in to join this conversation.
No reviewers
No labels
queue
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
romaine-life/at-terminal!51
No description provided.