Skip to content

Ask Bridge for VIA boards by vendor-defined usage - #1560

Merged
snekxs merged 1 commit into
OpenMouse-Project:mainfrom
onyxhq-dev:feat/bridge-vendor-defined-usages
Nov 21, 2026
Merged

snekxs merged 1 commit into
OpenMouse-Project:mainfrom
onyxhq-dev:feat/bridge-vendor-defined-usages

Conversation

@onyxhq-dev

@onyxhq-dev onyxhq-dev commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

Changed

  • The panel asks Bridge to list VIA boards by their vendor-defined usage, so they are found without a vendor id filter.

Summary by CodeRabbit

  • Bug Fixes
    • Device discovery now correctly applies vendor-defined usage filters and avoids duplicate usage entries. Standard usage filters are excluded, and vendor ID filters continue to be sent separately.

Merge together with: OpenMouse-Project/OpenMouse-Bridge#129

Filters with no vendor or product id on a vendor-defined usage page (VIA's raw
HID, 0xFF60:0x61) were dropped when asking Bridge for devices, so Bridge never
listed a VIA keyboard. They are now sent as `usages`. Standard usage pages are
still never sent, and a Bridge that does not know the field ignores it.
@github-actions github-actions Bot added the area: devices Device integration and HID support label Nov 20, 2026
@coderabbitai

coderabbitai Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

HID list requests now include deduplicated usage selectors from qualifying filters. Both getDevices() and requestDevice() use the updated request builder. A test checks selector filtering, deduplication, and vendor-only requests.

Changes: HID filter serialization

Layer / File(s) Summary
Build and use HID list requests
src/features/bridge/bridge-hid.ts, src/features/bridge/bridge-hid.test.ts
The list-command builder adds unique usage selectors for filters without vendor or product IDs when the usage page is at least 0xff00. Both device-listing paths use the builder. Tests check duplicate selectors, standard-page exclusion, separate vendor IDs, and omission of usages when no selectors qualify.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Suggested reviewers: ydw1904, 7eedle

Merge Risk: Minimal · up to 2328c

The panel now sends vendor-defined usage selectors so VIA boards can be found without a vendor ID filter. The client-side serialization is tested and falls back to the previous vendor-ID-only behavior when no selector qualifies. Discovery depends on the Bridge release honoring the new field, which this repository cannot confirm. This is an accepted compatibility limitation, so the merge risk is minimal.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title states the main change: the Bridge request now asks for VIA boards by their vendor-defined usage. The raw summary confirms that list requests add usage-page/usage selectors for filters with …
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Full details: Title check

Explanation

The title states the main change: the Bridge request now asks for VIA boards by their vendor-defined usage. The raw summary confirms that list requests add usage-page/usage selectors for filters with no vendor or product ID, and the objectives confirm this is the intent. The title is specific and matches the changeset, so it passes.

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between d4afe1e and 2328c41.

Files selected for processing: 2

  • src/features/bridge/bridge-hid.test.ts
  • src/features/bridge/bridge-hid.ts

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review.

@snekxs
snekxs merged commit 83ae5e5 into OpenMouse-Project:main Nov 21, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: devices Device integration and HID support

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants