Skip to content

fix(ios): preserve transparent modal Glass snapshots - #61

Merged
rdlabo merged 2 commits into
mainfrom
fix/modal-glass-snapshots
Nov 17, 2026
Merged

rdlabo merged 2 commits into
mainfrom
fix/modal-glass-snapshots

Conversation

@rdlabo

@rdlabo rdlabo commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Modal rail button snapshots can turn opaque gray even though the live Liquid Glass button looks correct. Restrict the cold-launch in-place filtering workaround to composited window captures; transparent view-root captures now retain their original filtering.

The regression was introduced by #50 (0a435c0), first included in Engine 1.0.6. CoveredSnapshots.capture routed both window and explicit-root draws through the same helper, which changed every glassBackground layer before either kind of draw. That window-specific workaround baked gray pixels into isolated modal PNGs. Restoring the layer flags afterward could not repair the already encoded image. This is present in Engine 1.0.10, used by Capacitor 2.1.10.

Both drawing paths still share main-thread enforcement, reentry rejection and the Objective-C exception boundary. Composited window captures keep their existing flag mutation, restoration and failure behavior. Add regression coverage for transparent-root filtering/reentry and window filtering/restoration, and document the scope.

The hosted iOS integration and iOS consumer jobs now allow 20 minutes for their cold builds, simulator setup and validation. Their previous 12-minute total limit interrupted this PR’s integration tests and canceled the Cordova job just after a successful build. Existing simulator/test step limits remain in place; the Swift package job keeps its 12-minute budget.

Validation:

  • iPhone Duo / iOS 27.2 simulator: final Engine change linked into the actual iOS27 2.2.0 / Capacitor 2.1.10 demo; built, installed and launched a sheet modal. The captured Close PNG and the displayed sheet retain the white glass face and transparent outer pixels. A startup route trigger in the isolated local demo reproduced the sheet; it is not part of this PR.
  • 15 Glass capture tests and 21 covered-snapshot tests passed, including the two new regressions, existing drawing exceptions, root draw order and image reuse.
  • Documentation formatting and git diff --check passed.
  • Independent supervisor and third-party reviews approved the code and final sheet evidence without remaining findings.

Captured modal PNG before the fix:

Close snapshot before the fix

Captured modal PNG with the final fix:

Close snapshot with the final fix

Final demo sheet on the simulator:

Final demo sheet

This PR changes Engine only. Publishing a new Engine version and updating the Capacitor/Cordova dependency pins are separate release steps.


Devin Review

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Devin Review

@rdlabo
rdlabo merged commit e09a2d1 into main Nov 17, 2026
9 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.

1 participant