Loading
Wait for USB enumeration before bootloader connect step
After rebooting to bootloader mode, some USB host controllers (notably AMD Ryzen) are slow to re-enumerate Mediatek devices. Add a waitForDeviceOnBus() helper that listens for the navigator.usb connect event before presenting the step UI, so the device is on the bus by the time the user clicks and triggers requestDevice(). Add detailed debug logging across the bootloader connect flow: paired device VID/PID before each attempt, elapsed time on success/failure, USB bus wait event details, and resilient resetDevice() error handling.