mirror of
https://github.com/gesellix/Bose-SoundTouch.git
synced 2026-08-19 00:56:16 +00:00
Closes the loop on the empty-<margeAccountUUID> finding from RegisterSpeakerInfoReachable. Operators in #329 quoted that finding verbatim and asked "What is the recommended way to complete pairing?" — the framework detected the condition but offered no in-UI recourse. The QuickFix completes pairing in-place by dispatching through setup.Manager.PairAccount, which tries HTTP /setMargeAccount first and falls back to telnet `envswitch accountid set` — same code path the existing POST /setup/pair-account/{deviceId} handler uses. Account ID is picked at finding-time when a real (7-digit) account directory already contains this device on disk (typical scenario: AfterTouch remembers a previous pairing the speaker forgot). When no such account exists, the executor generates a fresh 7-digit ID via setup.GenerateAccountID at click time. Either way, the chosen ID is named in the Confirm dialog and the CLI ManualCommand fallback so the operator can see what's about to happen. Architecturally: the FixID constant lives in the health package alongside the check that emits the finding, but the executor is registered from handlers/server.go where setup.Manager is available. This keeps the health package's transitive dep surface small (the boundary comment near speakerInfoXML deliberately forbids importing setup, which would pull SSH/telnet/certmgr). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>