Skip to content

fix: share allowedWebHIDDevices per origin - #34

Merged
ianshade merged 1 commit into
mainfrom
feat/webhid-auto-approval
Jun 15, 2026
Merged

ianshade merged 1 commit into
mainfrom
feat/webhid-auto-approval

Conversation

@ianshade

Copy link
Copy Markdown
Contributor

About the Contributor

This pull request is posted on behalf of TV 2 Norge

Type of Contribution

This is a:

Bug fix

Current Behavior

It could happen that a window with allowedWebHIDDevices defined, would not have its device auto-approved, if another window exists in the config, with a URL from the same origin, but no allowedWebHIDDevices.

New Behavior

Due to limited params of the devicePermissionHandler (only having access to origin really), we consider all windows of the same origin as sharing their allowedWebHIDDevices arrays. As documented, If multiple windows load pages from the same URL origin (e.g. https://example.com), a device will be auto-approved as long as it is listed in allowedWebHIDDevices for any of those windows - not necessarily the one actually using it.

Testing Instructions

Other Information

Status

  • PR is ready to be reviewed.
  • The functionality has been tested by the author.
  • Relevant unit tests has been added / updated.
  • Relevant documentation (code comments, system documentation) has been added / updated.

due to limited params of the devicePermissionHandler (only having access to origin really), we need to consider all windows of the same origin
@coderabbitai

coderabbitai Bot commented May 26, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@ianshade, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 45 minutes and 55 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 4821c3ed-6a61-4470-965e-9cc211f9ad91

📥 Commits

Reviewing files that changed from the base of the PR and between f25f931 and 0770195.

📒 Files selected for processing (3)
  • docs/WebHID-Configuration.md
  • src/ChefManager.ts
  • src/helpers/AllWindowsManager.ts
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/webhid-auto-approval

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

Comment @coderabbitai help to get the list of available commands and usage tips.

@ianshade ianshade changed the title fix(EAV-499): share allowedWebHIDDevices per origin fix: share allowedWebHIDDevices per origin May 26, 2026
@Saftret Saftret added the Contribution from TV 2 Norge Contributions sponsored by TV 2 Norge (tv2.no) label May 28, 2026
@ianshade
ianshade merged commit b9342eb into main Jun 15, 2026
3 checks passed
@nytamin
nytamin deleted the feat/webhid-auto-approval branch September 29, 2026 06:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Contribution from TV 2 Norge Contributions sponsored by TV 2 Norge (tv2.no)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants