Smooth shelf dismissal animation - #4
Conversation
Only `finishHide` drains `pendingHideCompletions`, and a close that is superseded never reaches it: `show()` bumps `closeToken`, so the fade's completion handler returns early. The queued paste then survived and fired at the *next* close instead. Press Return, re-open the shelf inside the 180 ms fade, then close it again, and an item chosen seconds earlier pasted into whatever app happened to be frontmost. `show()` now drops the queue along with the close it belonged to, which is what re-summoning the shelf means. Modelled the token bookkeeping to confirm both halves, since the app target carries no tests.
2201bbf to
ef79abb
Compare
|
The diagnosis here is good and I had not thought about it: activating the previous app while the Liquid Glass panel is still fading does resample its backdrop mid-flight. Moving I pushed one commit for a bug the rework introduced. A superseded close stranded the paste it was carrying. Only
One thing I left alone deliberately: the paste keystroke now fires about 330 ms after Return rather than 150 ms, because it waits out the fade. The activation margin itself is unchanged at 150 ms, so reliability does not drop, and that latency is the trade this PR is making on purpose. Worth watching in daily use. Builds clean. Merging. |
Summary
orderOutWhy
On macOS 26, the shelf could flicker for a frame or appear to disappear abruptly. An Instruments Animation Hitches trace did not show application-side rendering hitches: the transition is handled by the compositor. The visible flash came from changing the active app behind the live glass while it was still on screen, combined with resetting the panel opacity immediately after ordering it out.
Verification
xcodebuildCopyCoretests successfullyreadywith zero findings