Merged
Conversation
…permission formatting
…nd additional UI elements
…d update timestamp formatting to ISO 8601
jeffsmale90
reviewed
Mar 11, 2026
Contributor
jeffsmale90
left a comment
There was a problem hiding this comment.
I know this is in progress, so take the comments with a grain of salt!
Looking good so far though :)
packages/gator-permissions-snap/src/core/permissionRequestLifecycleOrchestrator.ts
Outdated
Show resolved
Hide resolved
packages/gator-permissions-snap/src/core/permissionRequestLifecycleOrchestrator.ts
Outdated
Show resolved
Hide resolved
packages/gator-permissions-snap/src/core/permissionRequestLifecycleOrchestrator.ts
Outdated
Show resolved
Hide resolved
packages/gator-permissions-snap/src/core/existingpermissions/existingPermissionsService.ts
Outdated
Show resolved
Hide resolved
packages/gator-permissions-snap/src/core/existingpermissions/existingPermissionsContent.tsx
Outdated
Show resolved
Hide resolved
…oken metadata formatting
…ve loading efficiency
…ce denial reason message
packages/gator-permissions-snap/src/core/existingpermissions/permissionFormatter.ts
Outdated
Show resolved
Hide resolved
packages/gator-permissions-snap/src/core/existingpermissions/existingPermissionsService.ts
Show resolved
Hide resolved
…dress conversion to handle decimal chain IDs
packages/gator-permissions-snap/src/core/existingpermissions/permissionFormatter.ts
Show resolved
Hide resolved
… display permissions
packages/gator-permissions-snap/src/core/existingpermissions/permissionFormatter.ts
Outdated
Show resolved
Hide resolved
packages/gator-permissions-snap/src/core/existingpermissions/index.ts
Outdated
Show resolved
Hide resolved
jeffsmale90
reviewed
Mar 11, 2026
Contributor
jeffsmale90
left a comment
There was a problem hiding this comment.
Looking great!
Would be good to get some more test coverage of this.
Also, I wonder if we can increase the margin between permissions in the permission list? Especially with the block of test (justification) they seem to blend into each other a bit.
packages/gator-permissions-snap/src/core/permissionRequestLifecycleOrchestrator.ts
Show resolved
Hide resolved
packages/gator-permissions-snap/src/core/existingpermissions/permissionFormatter.ts
Outdated
Show resolved
Hide resolved
packages/gator-permissions-snap/src/core/existingpermissions/permissionFormatter.ts
Show resolved
Hide resolved
packages/gator-permissions-snap/src/core/existingpermissions/permissionFormatter.ts
Outdated
Show resolved
Hide resolved
packages/gator-permissions-snap/src/core/existingpermissions/permissionFormatter.ts
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
packages/gator-permissions-snap/src/core/existingpermissions/permissionFormatter.ts
Show resolved
Hide resolved
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.
Description
This PR implements the existing permissions display and management feature for the Snap 7715 permissions system. The changes include:
The implementation provides a comprehensive solution for displaying and managing existing permissions, with improved descriptions and token metadata formatting.
Related issues
Fixes:
Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Medium Risk
Adds a new pre-confirmation dialog into the permission request flow and new formatting logic that relies on profile-sync data and token-metadata lookups, which could affect approval UX and edge cases around filtering/formatting. Changes are contained to the permissions Snap but touch the main lifecycle orchestrator and rejection paths.
Overview
Introduces an “Existing permissions” step in the permission-request flow: before showing the final confirmation, the orchestrator now fetches previously granted permissions for the same
origin+chainIdand, if any exist, shows a dialog that the user must explicitly Proceed past (cancelling rejects the request with a more specific reason).Adds a new
ExistingPermissionsServiceplus UI builders (buildExistingPermissionsContent,PermissionCard) and apermissionFormatterthat groups permissions by CAIP-10 account and formats display fields (including tokenmaxAmountvia token metadata, chain labels, and revocation/subscription/stream details). Wires the service insrc/index.ts, exports the new module, updates tests for the new dependency, and adds the required i18n strings inen.json.Written by Cursor Bugbot for commit 69238ea. This will update automatically on new commits. Configure here.