feat: app scenes support#187
Conversation
abelonogov-ld
left a comment
There was a problem hiding this comment.
Please attach SR and Trace/Logs screenshots, I fetched branch and I couldn't get them work.
417d511 to
6d71f7a
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit a566891. Configure here.
| switch self { | ||
| case .cold: return "cold" | ||
| case .warm: return "warm" | ||
| case .sceneCreation: return "sceneCreation" |
There was a problem hiding this comment.
Duplicated enum and dead sceneCreation case in LaunchType
Low Severity
LaunchType and SceneLaunchClassification are duplicated enums with identical cases (cold, warm, sceneCreation) and identical description implementations. This PR adds .sceneCreation to LaunchType, but LaunchMeter (the only consumer of LaunchType) never produces that case — it only ever sets .cold or .warm — making it dead code. LaunchTracker was switched to use SceneLaunchClassification instead, so the extension of LaunchType serves no purpose.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit a566891. Configure here.


Note
Medium Risk
Changes how AppStart traces are classified and timed in multi-scene apps, which affects observability metrics; sample-app credential wiring changed but hardcoded keys were removed from schemes.
Overview
Adds UIScene-aware app start instrumentation: launch timing now pairs
sceneWillEnterForegroundwithsceneDidBecomeActive, classifies cold, warm, and new sceneCreation launches per scene ID, and emitsAppStartspans withstart.typeincludingsceneCreation. Cold starts measure from process start; additional scenes after the first cold launch are sceneCreation rather than warm.Introduces shared
SceneLaunchClassifier(also used by the MultiScene demo’s launch overlay) and refactorsLaunchTrackerto delegate classification and subscribe to scene notifications in that order. Span timestamps are derived from system uptime →Date, andLaunchMeter’s launch type enum gains sceneCreation for consistency.Sample apps (ExampleApp, MultiwindowPad, TestApp) drop
Env.swiftand Xcode scheme env vars (including embedded mobile keys); config now comes fromTestAppShared/Secrets.xcconfigvia Info.plist (mobileKey,otlpEndpoint,backendUrl). MultiScene app wires observability startup and a visual launch-stats demo aligned with the new classifier.Reviewed by Cursor Bugbot for commit 82b8f8e. Bugbot is set up for automated code reviews on this repo. Configure here.