[Bug]: iOS work-row shimmer redraws the screen every frame while a turn streams (~65 mW)
Before submitting
- [x] I searched existing issues and did not find a duplicate.
- [x] I included enough detail to reproduce or investigate the problem.
Split out of #27325, which covers the app's streaming power as a whole. This issue is only the shimmer, its largest single cause.
Area
apps/mobile
Steps to reproduce
- On an iPad or iPhone, open a thread and let a turn stream (the dev Replay provider reproduces it for free).
- Watch the active work row ("Running …", "Read …", "Thinking"). It shimmers for as long as the agent works.
- Measure whole-device power, or profile with Instruments: the main thread steps the native-driver animation every frame, and the system compositor redraws at 60 fps.
Expected behavior
A "working" indicator doesn't force a full-rate redraw. Web already steps its shimmer (steps(30), #16372, #18191), and AGENTS.md says "No continuously repainting animations; they peg the GPU on high-refresh displays."
Suggested direction: step it like web does, keeping a visible working indicator. Both stepped variants below recover most of the cost.
Actual behavior
The mobile shimmer (ShimmeringWorkContent in apps/mobile/src/features/threads/thread-work-log.tsx) is a masked gradient on a React Native Animated loop. It runs every frame, including through its pause. On an iPad mini (A17 Pro) it costs about a third of the app's streaming power.
Streaming phase, 2 A/B blocks against today's shimmer, mW per block (bench and method in #27325):
| Active-row indicator | mW per block |
|---|---|
| No animation | −70 / −58 (earlier −66 / −61, −55 / −72) |
| Trailing dots stepping twice a second | −63 / −45 |
| Same sweep, timed by Core Animation | −26 / −12, −10 / −30 |
| Same sweep on Core Animation, in 12 discrete steps | −49 / −39 (looks the same; the band jumps in steps) |
System spinner (ActivityIndicator) |
−14 / −28 |
How often the screen changes is what costs power. A per-frame animation keeps the compositor busy even when the system draws it, as with the native spinner, while a stepped one lets it idle between steps.
Impact
Major degradation or frequent failure
Version or commit
main @ dac8b11ddc (the shimmer code is unchanged on current main)
Environment
iPad mini (A17 Pro), iPadOS 26.7.2, portrait, minimum brightness, Release build
Logs or stack traces
Bench details and the other suspects (all below 25 mW): #27325 (comment 6527674037). Direction discussion: #27684.
Thanks for the detailed measurements! #28530 (006d7e38f0) steps the mobile work-row shimmer and stops progress updates during its pause, addressing the per-frame redraw. If you see this again, please open a new issue with the reproduction.