Commit b96e6e0
feat(client): time-based motion foundation and settings-panel transitions (UI/UX v3 P3a) (#77)
* docs(spec): P3a motion foundation design
Timed animations with the Fluent curve/duration tables, animation-driven
redraw, and the settings-panel open/close migration as the first consumer.
Records that the P3 acceptance criterion names build_pane_vertices, which
does not exist; the measurable equivalent is pane-cache misses per second.
Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
* docs(plan): P3a motion foundation implementation plan
Seven tasks: split animations.rs into a module, add the Fluent Curve and
duration tables, add Timed, count pane-vertex-cache misses, let animations
request their own frames, migrate the settings panel open/close, document.
Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
* docs(plan): fix three P3a plan defects found in the pre-flight scan
- The transcribed Curve and duration tables need #[allow(dead_code)]: this
is a binary crate, so unconstructed variants and unread constants fail
the build under -D warnings.
- Task 4's prose and its code block disagreed on where the counter test
module goes.
- Tasks 5 and 6 named a mod tests in state/mod.rs that does not exist; the
only test block there is pane_border_hit_tests.
* refactor(client): split animations.rs into an animations/ module
Pure code movement ahead of UI/UX v3 P3a, which adds Curve and Timed.
No behaviour change; the same tests run and pass.
* feat(client): add the Fluent 2 motion curve and duration tables
Nine cubic-bezier curves and eight duration steps, transcribed from
microsoft/fluentui packages/tokens. The solver mirrors CSS cubic-bezier:
Newton-Raphson on X with a bisection fallback for the two curves whose
X-derivative vanishes at an endpoint.
Since this crate is a binary (no lib.rs), items that Task 3 and Tasks
5/6 will later consume are dead code from clippy's point of view right
now. Beyond the two allow(dead_code) already anticipated for the Curve
enum and the duration module, -D warnings also flagged the impl Curve
methods, the three private solver helpers, and the mod.rs re-export
itself; each now carries its own allow with a comment pointing at the
task that starts consuming it.
* feat(client): add Timed, a curve-eased time-based animation value
A Timed stores start, duration and curve and answers about any instant,
so consumers stay testable without a clock. A zero duration -- what
AnimationsConfig yields when animations are off -- is born finished, which
is the whole reduced-motion path. resuming_at expresses an interruption as
"continue from the value already on screen".
Deviates from the plan's literal resuming_at/raw_progress bodies: they kept
elapsed time in full Duration precision instead of rounding to whole
milliseconds and round-tripping through compute_progress's
Duration::as_millis() truncation. Verified by exhaustive search that no
whole-millisecond reconstruction can satisfy resuming_at_starts_from_the_requested_value's
tolerance for Curve::AccelerateMax at duration_ms = 200 -- the quantization
error is amplified past tolerance by that curve's steep tail near t = 1.
* docs(plan): add the allow-attribute cleanup and the spec correction
Task 6 retires the placeholder #[allow] attributes its own consumption makes
unnecessary. Task 7 corrects the spec's Timed section, which stated a
delegation to compute_progress that Task 3 proved unusable.
* feat(client): count pane-vertex-cache misses under NEXTERM_LOG=trace
The UI/UX v3 P3 acceptance criterion names build_pane_vertices, which does
not exist; the measurable equivalent is a miss on the C4 pane cache. This
adds the counter and a once-per-second trace line, which is also the first
instrument for the cursor-blink invalidation debt in audit-round3 P3.
* feat(client): let running animations request their own frames
AnimationManager::has_active_animation had been dead code since it was
written, so a spring mid-flight only advanced when an unrelated redraw
happened. ClientState::has_active_animation aggregates it, and the event
loop requests a redraw only while it is true — an idle terminal asks for
exactly the frames it asked for before.
* feat(client): animate the settings panel open and close with Timed
The panel's entrance was a frame-count hack (open_progress += 0.15,
'assumes 60 fps'), so its real duration drifted with frame rate and it
ignored animations.intensity entirely; there was no exit animation at all.
It now runs on Timed: a 200 ms Fluent Direct Entrance in, a 150 ms Gentle
Exit out, both scaled by the configured intensity.
is_open stays the single truth for input routing and the AccessKit tree
and still goes false the instant the user dismisses the panel. The new
closing field is render-only — the renderer's permission to keep drawing
the panel while it fades.
* docs: record the P3 split and the animations/ module layout
Also corrects the P3 acceptance criterion, which named a build_pane_vertices
function that does not exist. The measurable equivalent is the pane-vertex
cache miss rate, which P3a now counts.
* refactor(client): split settings open/close animation tests into their own file
nexterm-client-gpu/src/settings/mod.rs grew past the project's 800-line
ceiling on this branch, mostly from the open_close_animation_tests module
Task 6 appended. Move that module's body into
settings/open_close_animation_tests.rs (same pattern already used for the
animations/ split earlier on this branch) and leave a
`#[cfg(test)] mod open_close_animation_tests;` declaration in mod.rs.
No test logic changed.
---------
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Happy <yesreply@happy.engineering>1 parent 7e20ba2 commit b96e6e0
24 files changed
Lines changed: 2920 additions & 144 deletions
File tree
- docs
- plans
- superpowers
- plans
- specs
- nexterm-client-gpu
- src
- animations
- renderer
- event_handler
- input_handler
- overlay/settings
- settings
- state
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
200 | 200 | | |
201 | 201 | | |
202 | 202 | | |
203 | | - | |
204 | | - | |
205 | | - | |
206 | | - | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
207 | 214 | | |
208 | 215 | | |
209 | 216 | | |
| |||
516 | 523 | | |
517 | 524 | | |
518 | 525 | | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
519 | 529 | | |
520 | 530 | | |
521 | 531 | | |
| |||
Lines changed: 1525 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 412 additions & 0 deletions
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
| 25 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
0 commit comments