Files
paseo/docs
Mohamed Boudra 1a606451cd perf(app): keep running-turn indicators off the main thread (#11456)
* perf(app): keep running-turn indicators off the main thread

The six-dot loader, the status ring and the tool-call label shimmer run for
as long as an agent works. Each of them was driven per frame from the thread
that runs React: a requestAnimationFrame loop for the loader on web, a
text-clipped background animation that repainted the label every frame, and
Reanimated shared values that commit a shadow tree every frame on native.

Hand each animation to the platform's animation engine once instead:

- Web: Web Animations API loops over transform and opacity, carried by the
  compositor. No script, style or paint per frame. CSS @keyframes are not
  used because React's root animationiteration listener makes Chromium wake
  the main thread around every cycle of every CSS animation.
- Native: React Native's Animated native driver, with a never-slowing decay
  as a frame-exact clock. The loader's six steps come from a timer aligned
  to step boundaries, not a frame callback.
- One motion policy for all three: no motion under reduced motion, in a
  hidden retained panel, or in the background; the indicator draws its
  resting frame instead.

The look, cadence and phase-sharing of the indicators are unchanged.

Closes #4634

* fix(app): compose the native ring's turning style at render

The module-scope guard for Unistyles style reads flags any `*styles`
property read in a module initializer. Keep only the transform at module
scope and combine it with the rotator geometry in the component.
2026-11-30 19:56:33 +07:00
..