Skip to content

perf: stop idle eye redraws - #11

Merged
cloudstudio merged 1 commit into
mainfrom
agent/pause-idle-eye-animation
Aug 10, 2026
Merged

cloudstudio merged 1 commit into
mainfrom
agent/pause-idle-eye-animation

Conversation

@cloudstudio

Copy link
Copy Markdown
Owner

What changed

  • replace the permanently running MoriEyesView animation timeline with finite explicit schedules
  • render stable faces once on a deterministic static frame
  • keep expression morphs, celebrations, winks, and attention feedback animated for bounded windows
  • cap every animated burst at 15 fps while macOS Low Power Mode is enabled
  • add policy tests for idle, transition, attention, overlapping gesture, and low-power behavior

Root cause

PR #4 removed the invisible halo's unbounded timeline and reduced the resting eye rate, but MoriEyesView still ran TimelineView(.animation(..., paused: false)) forever. That continuously redrew a blurred Canvas inside the island's compositing group and transparent always-on-top panel, even when the face was stable.

The new schedule has a finite deadline and a final static frame. Once exhausted, the stable branch contains no TimelineView, so SwiftUI has nothing left to tick.

Validation

  • git diff --check
  • remote commit verified as one commit ahead of main, changing only the expected two files
  • five focused unit tests added for the pure animation plan
  • macOS build and full test suite delegated to this PR's CI; the local execution environment is Linux and does not contain Swift/AppKit

A same-machine WindowServer A/B measurement is still recommended after CI passes, using collapsed idle as the primary case.

Fixes #10

Replace the unbounded eye animation timeline with finite schedules for state transitions and gestures. Stable faces render once, and Low Power Mode caps every animated burst.

Add policy tests covering idle, transitions, attention, overlapping gestures, and low-power frame budgets.
@cloudstudio
cloudstudio marked this pull request as ready for review August 10, 2026 10:15
@cloudstudio
cloudstudio merged commit ab81e97 into main Aug 10, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

NotchFlow drives WindowServer CPU to ~44% sustained; no lighter/low-power mode available

1 participant