Conversation
## Because - A scope row is a foreign key target for `accountAuthorizations` rows, so a delete fails without a cascade. - A cascade delete would drop a user's consent history, which we must keep. - The admin panel showed a delete button for an action that cannot run safely. ## This pull request - Removes the delete button, the Actions column, and the red delete warning from `PageOAuthScopes`. - Removes `handleDelete`, the `adminApi.deleteOAuthScope` call, the `deletingId` state, and the `canDelete` guard check. - Rewords the page help text: a scope cannot be edited or deleted after creation, because a user's authorizations reference it. - Replaces the delete test block with one test that asserts no delete control renders for AdminProd. ## Issue that this pull request solves Closes: https://mozilla-hub.atlassian.net/browse/FXA-14581
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The focused UI removal is complete, consistent with the stated scope, and covered by an appropriate regression test.
Pull request overview
Removes unsafe OAuth scope deletion controls while preserving scope creation and listing.
Changes:
- Removes deletion UI, state, handlers, and guard checks.
- Clarifies that existing scopes cannot be edited or deleted.
- Replaces deletion tests with an assertion that no delete control renders.
File summaries
| File | Description |
|---|---|
PageOAuthScopes/index.tsx |
Removes scope deletion functionality and warning UI. |
PageOAuthScopes/index.test.tsx |
Verifies deletion controls remain unavailable. |
Review details
- Files reviewed: 2/2 changed files
- Comments generated: 0
- Review effort level: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
clouserw
approved these changes
Sep 18, 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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Because
accountAuthorizationsrows, so a delete fails without a cascade.This pull request
PageOAuthScopes.handleDelete, theadminApi.deleteOAuthScopecall, thedeletingIdstate, and thecanDeleteguard check.Issue that this pull request solves
Closes: https://mozilla-hub.atlassian.net/browse/FXA-14581
Checklist
Put an
xin the boxes that applyHow to review (Optional)
packages/fxa-admin-panel/src/components/PageOAuthScopes/index.tsxand itsindex.test.tsx.Screenshots (Optional)
The scopes table loses its Actions column and the red delete warning above it. No screenshot was captured for this branch, because the stack was not started.
Other information (Optional)
Out of scope for this pull request, per the ticket:
AdminPanelFeature.DeleteOAuthScopeand its guard config.adminApi.deleteOAuthScopeclient method, which now has no caller.DELETE /api/oauth-scopes/:idendpoint infxa-admin-server.A separate pull request removes the server side.
Local checks:
nx test-unit fxa-admin-panel(frontend suite): 22 suites, 152 tests passed.nx lint fxa-admin-panelandtsc --noEmitboth pass.Two CSP failures in the package server test suite are present before this change and are not related to it. Playwright functional tests did not run locally. CI runs them.