Skip to content

fix(device): toast when opening a device fails to list devices - #404

Merged
snekxs merged 1 commit into
OpenMouse-Project:mainfrom
ydw1904:fix/device-open-bridge-toast
Sep 30, 2026
Merged

snekxs merged 1 commit into
OpenMouse-Project:mainfrom
ydw1904:fix/device-open-bridge-toast

Conversation

@ydw1904

@ydw1904 ydw1904 commented Sep 29, 2026

Copy link
Copy Markdown
Contributor

Clicking a Home device card runs void control.openDeviceOverview(), which calls navigator.hid.getDevices() with no catch. When OpenMouse Bridge is wedged that call rejects with "OpenMouse Bridge did not answer list in time." and the click does nothing visible. openDeviceOverview and selectAuthorizedDevice now read device groups through a new authorizedDeviceGroups() helper that shows the same "Connection failed" toast the Hardware Test connect button already shows. Testing: npx tsc --noEmit passes; npm test passes all 241 tests. Not checked against a real wedged Bridge.

Clicking a Home device card runs `void control.openDeviceOverview()`,
which calls navigator.hid.getDevices() first. When OpenMouse Bridge is
wedged that call rejects with "OpenMouse Bridge did not answer list in
time.", the rejection is dropped by `void`, and nothing happens on
screen. openDeviceOverview and selectAuthorizedDevice now read the
device groups through one helper that catches the rejection and shows
the same "Connection failed" toast the Hardware Test connect button
already shows.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@snekxs
snekxs merged commit b1e28d7 into OpenMouse-Project:main Sep 30, 2026
3 checks passed
@ydw1904
ydw1904 deleted the fix/device-open-bridge-toast branch October 3, 2026 05:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants