-
Notifications
You must be signed in to change notification settings - Fork 31
Fix up permissions API with non hardcoded values #1867
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for content-scope-scripts ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Temporary Branch UpdateThe temporary branch has been updated with the latest changes. Below are the details:
Please use the above install command to update to the latest version. |
[Beta] Generated file diffTime updated: Tue, 02 Dec 2025 11:04:23 GMT Android
File has changed Apple
File has changed Chrome-mv3File has changed FirefoxFile has changed Integration
File has changed Windows
File has changed |
7a9e42e to
dd1a57b
Compare
nshuba
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes look good, but it might be worth updating the integration tests? We have some basic ones for permissions APIs already.
afe85a6 to
43e46c7
Compare
Bumps [@rive-app/canvas-single](https://github.com/rive-app/rive-wasm) from 2.31.1 to 2.31.2. - [Changelog](https://github.com/rive-app/rive-wasm/blob/master/CHANGELOG.md) - [Commits](rive-app/rive-wasm@2.31.1...2.31.2) --- updated-dependencies: - dependency-name: "@rive-app/canvas-single" dependency-version: 2.31.2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [esbuild](https://github.com/evanw/esbuild) from 0.25.8 to 0.25.9. - [Release notes](https://github.com/evanw/esbuild/releases) - [Changelog](https://github.com/evanw/esbuild/blob/main/CHANGELOG.md) - [Commits](evanw/esbuild@v0.25.8...v0.25.9) --- updated-dependencies: - dependency-name: esbuild dependency-version: 0.25.9 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 5. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](actions/checkout@v4...v5) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: '5' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Add in file count check for data.files in canShare * Update check and tests * Lint fix
* Update build-and-troubleshooting.md for apple changes * Lint fix
* Auto approve patch changes to the repo * Lint fix * Ignore higher risk deps
* Ensure we check isFeatureEnabled correctly * Only trigger updates on listenForUpdateChanges enabled features (CTL) * Add bail out option for invalid messages
* Add additionalCheck for android rollout * Add test case * Simplify test case * Lint fix * Continue in the loop instead of return
* Add in file count check for data.files in canShare * Update check and tests * Lint fix * Make canShare more permissive
| test('should default to prompt when native error occurs', async ({ page }) => { | ||
| await setupPermissionsTest(page, { removePermissions: removeApi }); | ||
| await permissionsTestCases.testNativePermissionError(page); | ||
| }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: Tests fail when API exists but permissionsPresent not enabled
The createApiTestRunner runs tests with removeApi: false ("with API shimmed"), but setupPermissionsTest doesn't enable permissionsPresent by default. When the browser's permissions API exists and permissionsPresent is not enabled, permissionsFix returns early without modifying anything (line 571-575 in web-compat.js). Tests like testNameOverride expect custom behavior (e.g., renaming push to notifications), but the browser's unchanged native API won't apply these overrides, causing test failures.
Please tell me if this was useful or not with a 👍 or 👎.
Asana Task/Github Issue: https://app.asana.com/1/137249556945/project/1209253361096901/task/1209488147924654?focus=true
Description
Fixes up the API with the current permission status rather than the new Chromium hardcoding they've added.
Adds a setting to allow us to control the rollout here.
Testing Steps
Checklist
Please tick all that apply:
Note
Implements native-aware Permissions handling (with fall-through to original API) and refactors/expands tests to cover both shimmed and existing Permissions APIs.
PermissionStatusclass for shimming.handlePermissionQueryto message native fornative-marked permissions and returnPermissionStatus, else fall through.permissionsPresentFixto proxy existingnavigator.permissions.query; gated bywebCompat.permissionsPresent.permissionsFixto validate args, use shared handler, and default to'prompt'when falling back.createApiTestRunner), setup (setupPermissionsTest), helpers (checkPermission), and reusable cases (permissionsTestCases).Written by Cursor Bugbot for commit 6f4bc06. This will update automatically on new commits. Configure here.