mirror of
https://github.com/jonasbark/swiftcontrol.git
synced 2026-12-01 02:02:33 +01:00
A denied Local Network permission was only visible where the rider happened to be looking — a connection tile, or the onboarding wizard. On the home screen the app card read as merely "waiting to connect", which is the one thing it will do forever when nothing the bridge advertises can leave the device. Add SetupStepId.appLocalNetwork between appConnectionMethod and appConnected, which is where it bites: the method is switched on and looks fine, and the wire never comes up. Required rather than optional, so it colours the card and counts towards the banner — this is not an offer like the gear overlay, it is work. AppInput.localNetworkGranted is nullable and null keeps the step out of the checklist altogether: a Bluetooth-only rider, or a platform with no such permission, is never shown work that is not theirs. When it does apply the step is present either way, so it ticks green rather than vanishing. The home page holds the last measured status instead of reading LocalNetworkAccess.cached: that cache expires after 30s and returns null, so the step would have quietly disappeared half a minute after the rider looked at it. Tapping it runs the permission sheet and, on a grant, starts the enabled network methods and re-reads the status. That prompt-recheck-and-start behaviour was about to exist in three places, so it moves to satisfyRequirements() and ensureLocalNetworkAccess() in connection_method.dart, beside enableLocalControl() which is its Local-side mirror; onboarding drops its private copies. core.logic gains needsLocalNetwork, replacing the inline expression startEnabledConnectionMethod had and the home page needed too. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>