Skip to content

Fix cancellation-related animation stalls - #113

Closed
akshaymaloo wants to merge 1 commit into
fif7y:mainfrom
akshaymaloo:fix/animation-cancellation-stalls
Closed

akshaymaloo wants to merge 1 commit into
fif7y:mainfrom
akshaymaloo:fix/animation-cancellation-stalls

Conversation

@akshaymaloo

Copy link
Copy Markdown

Summary

Animation-only replacement for the relevant part of #112. This branch is based directly on main and has no dependency on the security changes.

  • Stop cancelled quiet-wait polls immediately instead of spinning until their deadline.
  • Prevent superseded captures from clearing a newer capture's busy flag or publishing stale snapshots.
  • Publish snapshot metadata together with its image and stop scheduling further captures after cancellation.
  • Add cancellation regression tests.

Validation

  • Reproduced the original quiet-wait bug: both cancellation regressions failed before the fix; one continued for approximately 1.95 seconds after cancellation.
  • Independently built and tested this animation-only branch on macOS 27.2 with Xcode 27.1.
  • All 12 targeted app tests passed: TransitionCancellationTests and BarSnapshotCropTests.
  • git diff --check passed.

Remaining validation

This is a draft. Live rapid hover/click cycles and multi-display animation still need verification on an installed, signed build. The current cancellation tests do not directly simulate every overlapping capture-completion ordering.

Stop cancelled quiet-wait polls and prevent superseded captures from clearing newer capture state or publishing stale snapshots. Add cancellation regression tests.

Co-authored-by: Copilot <[email protected]>
Copilot-Session: 165b0dbb-9a37-49a5-b437-05c62fcaa0a2
@github-actions

Copy link
Copy Markdown
Contributor

Thanks for the pull request! Dimble asks contributors to sign a short Contributor License Agreement (you keep your copyright, see CLA.md). Please post the sentence below as a comment to sign it.


I have read the CLA Document and I hereby sign the CLA


You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot.

@akshaymaloo

Copy link
Copy Markdown
Author

I have read the CLA Document and I hereby sign the CLA

fif7y added a commit that referenced this pull request Oct 29, 2026
…celled one stops waiting out a lift

Follow-up to Akshay's fix. The flag was cleared by any capture that wasn't
cancelled, so a cancel without a replacement would leave it on and every
reveal would wait out coverRetakeWait. A generation token ties it to the
latest capture instead. The lift wait was a second spin: a cancelled sleep
returns at once, so a replaced capture looped for up to liftCoverSafety.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@fif7y

fif7y commented Oct 29, 2026

Copy link
Copy Markdown
Owner

Hey @akshaymaloo, really good PR, thanks! Both bugs are real, and the flag one was the nasty one, a reveal could run without its cover picture.

I ported it onto roster as 13da4f4, with you as the author (that's where the work happens, main only moves at stable releases). So I'll close this one. On top of it, a45040a adds a generation token so only the latest capture clears the flag. It also adds the same cancellation check to the lift wait, which had the same spin.

It should be in the next beta.

@fif7y fif7y closed this Oct 29, 2026
@github-actions github-actions Bot locked and limited conversation to collaborators Oct 29, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants