feat(tui-components): add animated backgrounds and motion storybook - #629
Draft
CSRessel wants to merge 4 commits into
Draft
feat(tui-components): add animated backgrounds and motion storybook#629CSRessel wants to merge 4 commits into
CSRessel wants to merge 4 commits into
Conversation
Accept explicit scene, time, and transition progress; retain MotionState as an optional controller returning owned frames. Split palette, sampling, zoom, tile geometry, and state boundaries. Preserve existing visual snapshots and document the API migration and retained profiling evidence.
Prepare styles and bounded per-frame geometry caches, skip invisible fields, and buffer the existing Ratatui incremental output. Preserve sampled glyph/style output. Save baseline, interleaved release measurements, live terminal traces, syscall counts, and reproduction tools.
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.
Adds a reusable Ratatui
MotionBackgroundwidget for onboarding and other full-screen experiences. Applications render it first, then place existing forms or menus over its optional quiet area. The caller owns the terminal, input, redraw cadence, animation time, and transition progress;MotionStateprovides an optional transition controller. The widget also supports palettes, ASCII, reduced motion, and clipped viewports.The
motion_storybookexample loops between dots and braille formations, with platoon and muster variants and no UI overlays.--at-ms Npauses at an exact story time for reproducible review. Snapshot coverage includes 16 buffer fixtures and 10 paired text/ANSI terminal captures covering endpoints, inward and outward zoom, and narrow viewports. Fixed times include ambient motion as well as zoom progress.Frame-local geometry caches, prepared style ramps, skipped hidden fields, and buffered terminal writes reduce measured headless p95 frame work by 21–26% while preserving 1,160 sampled glyph/style fingerprints. Ratatui continues to perform incremental terminal diffs. Large live PTY viewports still miss some 25 FPS deadlines; these measurements do not establish graphical terminal presentation FPS. Reproduction scripts, raw data, and limitations are in the performance report.
Validation:
cargo test -p nori-tui-components -- --include-ignored --test-threads=1: 127 tests passed, including the isolated tmux storybook tests and doctest; snapshot updates disabled for the verification run.just fix -p nori-tui-componentsandjust fmtpassed.sseeking to the inward frame, clean exit, and terminal mode restoration.Try from
nori-rs/: