chore: Dialogs examples in TestApp#157
Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
| ]) | ||
|
|
||
| window.addSubview(dimView) | ||
| } |
There was a problem hiding this comment.
Missing view controller containment causes timer leak
Low Severity
showCurrentWindowSizing adds timerVC.view as a subview of dimView without proper view controller containment (addChild/didMove(toParent:)), unlike the analogous methods showHalfSheetSizing, showWindowSizing, and showViewOverlay which all use proper containment. Without it, viewDidDisappear is never called when the dim view is tapped away, so stopTimer() never runs and the CountdownTimerViewController's repeating timer continues firing after dismissal. The cleanup closure also strongly captures timerVC, creating a retain cycle through onComplete.
Additional Locations (1)
| } | ||
|
|
||
| timerVC.onComplete = cleanup | ||
| dimView.onTap = cleanup |
There was a problem hiding this comment.
Cleanup closures create retain cycles leaking view controllers
Low Severity
The cleanup closures in showHalfSheetSizing, showCurrentWindowSizing, and showViewOverlay strongly capture both timerVC and dimView, then get assigned to timerVC.onComplete and dimView.onTap. This creates retain cycles (timerVC → onComplete → closure → timerVC, and similarly for dimView), so neither object is ever deallocated after cleanup runs. Other methods in the same file (e.g. showFullSheet) correctly use [weak timerVC] to avoid this.
Additional Locations (2)
* main: chore: Dialogs examples in TestApp (#157)


Refactor Test app:
Note
Low Risk
Changes are confined to the TestApp demo UI and observability/replay sample actions; no production logic or security-sensitive flows are modified.
Overview
Refactors the TestApp main menu into clearer sections for Session Replay, Observability, and Benchmark, replacing the old toggle-row navigation with a two-column
UIKit/SwiftUIaction grid and adding an in-app toggle to start/stopLDReplay.Adds new dialog demo screens for both
UIKitandSwiftUI, including alerts, confirmation/action sheets, bottom sheets, half-sheet overlays, view overlays, and oversized-UIWindowpresentations via a newWindowSheetPresenter/DimSizinghelper. Also expands the observability demo to record multiple metric types (gauge,histogram,count,incremental,upDownCounter) and updates the ObservabilityserviceNametoobservability-ios-test-app.Written by Cursor Bugbot for commit 56faf8b. This will update automatically on new commits. Configure here.