mirror of
https://github.com/gesellix/Bose-SoundTouch.git
synced 2026-08-18 16:46:17 +00:00
The admin console ran a full discovery sweep on every page load whenever discovery was enabled (DOMContentLoaded -> triggerDiscovery). With devices already in the datastore, that re-probed every host (including offline ones) on each visit, which felt slow and surprising. Gate the on-load sweep on a cold start only: fetch the cached device list first, and trigger discovery just when it is empty. With devices known, rely on the cached list, the periodic sweep, and the explicit Discover button. fetchDevices now returns the device count for that check. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>