Repository navigation
Conversation
The sheet was presented from the first connected scene and its first window. Scenes come from a set, so that could be a background or external-display scene, or another SDK's overlay window. Use the same active window lookup that paywalls already use. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Maple review🟢 Confidence 8/10 · likely safe to merge The test mode sheet now selects its presenter through the existing foreground/key-window helper instead of arbitrary scene and window ordering. No introduced defects were found; the scene-selection change has no automated regression test. What was checked
|
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
Reviewed the switch of the test mode sheet's presenter lookup to the shared activeWindow helper, plus its changelog entry.
- Presenter lookup:
presentTestModeModalnow gets its root fromUIApplication.sharedApplication?.activeWindowinstead ofconnectedScenes.first/windows.first. That means it picks the foreground active scene's key window, the same waytopMostViewControllerandGetPresenteralready do.TestModeModal.topPresenter(from:)still climbs from that root, and thefinish()fallback from #534 still covers a presentation that UIKit refuses. - Changelog: Added one Fixes bullet to the staged release section. It doesn't bump the version.
claude-opus-5.5 | 𝕏
…t-active-window # Conflicts: # CHANGELOG.md
Maple review🟢 Confidence 8/10 · likely safe to merge The test mode sheet now selects its presenter through the existing What was checked
|

What
The test mode sheet was presented from
connectedScenes.firstand that scene'swindows.first.connectedScenesis a set, so.firstcan be a background, CarPlay or external-display scene.windows.firstcan be another SDK's overlay window that isn't on screen. When that happens the sheet either isn't shown at all or is shown somewhere the user can't see it.This switches to
UIApplication.activeWindow, the lookup paywalls already use. It prefers the foreground active scene and its key window.Why now
Natural Camera (app 1128) changed its bundle ID on the dashboard, which put production users into test mode. 81 sheet opens were logged on Oct 6–7, but only 6 were ever closed. That case is the "something is already on screen" problem, which #534 already fixed on develop by presenting from the topmost screen and falling back to the saved choices. This PR closes the other way the sheet can silently fail to show.
Testing
Not unit tested. The change picks a window from the live
UIApplicationscenes, which the test target can't set up. It reuses the existingactiveWindowhelper, which paywall presentation already depends on. The SDK builds for the iPhone 17 Pro simulator (iOS 26.5).Checklist
CHANGELOG.mdfor any breaking changes, enhancements, or bug fixes.swiftlintin the main directory and fixed any issues.🤖 Generated with Claude Code
The PR appears safe to merge.
Summary
The test mode sheet now uses
UIApplication.activeWindowinstead of the first connected scene and its first window.CHANGELOG.md.No actionable issues were found. yusuftor explicitly acknowledged the missing unit test and explained why this change relies on the existing helper.
Reviews (1) · Last reviewed commit: "Show the test mode sheet on the window t..." · Reviewed by Greptile