mirror of
https://github.com/jonasbark/swiftcontrol.git
synced 2026-11-29 09:11:17 +01:00
Two gaps, both downstream of the launch-time deferral. verifyEnabledNetworkMethod returned on success without starting anything, so granting the permission left the method reading as enabled while advertising nothing — the launch-time start had already been skipped while the wizard held the screen, and nothing re-ran it. The wizard's three exits (done + paywall, done + start riding, welcome/later) mark onboarding completed and pop, but none started the enabled methods either. Before the deferral the launch call had already done that; afterwards a method carried over from a previous session stayed down until the next launch. That one bites without any permission involved. startEnabledConnectionMethod gains userInitiated, which opts out of the deferral: app launch and trainer_setup keep the default and still hold off while the wizard owns the screen, while the grant path and the three exits pass true. The existing !isStarted.value guards mean nothing double-starts. The test asserts the mDNS registration attempt actually reaches the channel, rather than a proxy for it: the first version asserted the method stayed enabled and failed even with the fix, because there is no nsd plugin under `flutter test` and startServer()'s catchError switches the setting back off. Checked both ways — without the start it fails Expected: non-empty / Actual: []. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>