Skip to content

Conversation

@GedeonIsezerano
Copy link

Screen.Recording.2026-01-04.at.10.53.07.PM.mov

So, when expanding the dynamic notch, there is always a stutter that looks like it's trying to expand, and then it freezes and then fully expands. Something happens when it's collapsing. After it collapses, it looks like there's a stutter that seems as if it's not closing exactly, and then it fully closes.

When expanding from hidden state, the window would briefly show an
intermediate frame before the animation started, causing a visual
"stutter" or "false start" appearance.

The fix has two parts:

1. Decouple window creation from display by adding an `orderFront`
   parameter to `initializeWindow()`. This allows creating the window
   and setting up the SwiftUI view hierarchy without immediately
   showing it.

2. In `showWindow()`, start with `alphaValue = 0` and fade in over
   0.15s. This masks any initial frame glitches that occur when
   AppKit/SwiftUI first renders the window.

3. Update `_expand()` and `_compact()` to:
   - Create window without showing it
   - Start the state animation
   - Then show window with fade-in

This ensures smooth, stutter-free animations when the notch first
appears.
Fix expand/compact animation stutter on initial appearance
Add fade-out before closing window to mask any visual glitches
during the closing animation.

- Reduced initial wait from 0.4s to 0.25s
- Added fadeOutWindow() that fades alpha to 0 over 0.15s
- Window now smoothly disappears instead of abruptly closing
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.

1 participant