fix: enhance webcam utility to support sidepanel environment#39438
Merged
dawnseeker8 merged 6 commits intomainfrom Feb 5, 2026
Merged
fix: enhance webcam utility to support sidepanel environment#39438dawnseeker8 merged 6 commits intomainfrom
dawnseeker8 merged 6 commits intomainfrom
Conversation
- Added support for the new ENVIRONMENT_TYPE_SIDEPANEL in the WebcamUtils class. - Refactored checkStatus method to handle sidepanel and popup environments, improving camera permission handling. - Introduced a new test suite for WebcamUtils, covering various scenarios including sidepanel and popup modes, ensuring robust permission checks and environment readiness.
Contributor
|
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
- Replaced `toEqual` with `toStrictEqual` in multiple test cases to ensure more precise comparison of objects in the WebcamUtils test suite. - Added an ESLint directive to allow importing the `getEnvironmentType` function for mocking purposes, enhancing test reliability.
- Introduced a new test suite for WebcamUtils, covering various scenarios including checks for webcam availability and permissions across different environments (fullscreen, popup, sidepanel). - Implemented mocks for environment type and browser name to ensure consistent test results. - Enhanced error handling tests to verify correct behavior when no webcam is found.
Contributor
Builds ready [fc9b468]
UI Startup Metrics (1283 ± 103 ms)
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs [🚀 Bundle size reduced!]
|
Contributor
Builds ready [3d729c8]
UI Startup Metrics (1341 ± 97 ms)
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs
|
Contributor
Builds ready [019c12f]
UI Startup Metrics (1342 ± 114 ms)
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs
|
Contributor
Builds ready [7ce24d9]
UI Startup Metrics (1309 ± 120 ms)
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs
|
gantunesr
approved these changes
Feb 4, 2026
Akaryatrh
approved these changes
Feb 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR fix camera permissions issue with Keystone HW wallet in sidebar mode
Changelog
CHANGELOG entry: Fixes: Fix camera permissions issue with Keystone HW wallet in sidebar mode (#39267 )
Related issues
#39267
Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Adds sidepanel support and tightens webcam permission logic.
checkStatusinwebcam-utils.jsto detectENVIRONMENT_TYPE_SIDEPANEL, treat popup/sidepanel as restricted, and setenvironmentReadyfalse when permissions are missing or in Firefox within restricted environments; returns explicitpermissionsandenvironmentReadyflags and throwsNO_WEBCAM_FOUNDwhen no device existswebcam-utils.test.tscovering no-device errors, fullscreen vs popup/sidepanel flows, permission vs no-permission outcomes, and Firefox behavior; mocksnavigator.mediaDevices,getEnvironmentType, andgetBrowserNameWritten by Cursor Bugbot for commit 7ce24d9. This will update automatically on new commits. Configure here.