feat: add presences read and write scopes to API keys#3050
feat: add presences read and write scopes to API keys#3050ArnabChatterjee20k wants to merge 1 commit into
Conversation
Greptile SummaryThis PR adds
Confidence Score: 4/5Safe to merge; changes are additive and isolated to the scope-selection UI. Both changes are straightforward and additive. The constants addition is correct. The fallback logic in the component handles the case where the API omits a category, but the same fallback is not applied to the No files require special attention. Important Files Changed
Reviews (1): Last reviewed commit: "feat: add presences read and write scope..." | Re-trigger Greptile |
| scopesById.set(scope.$id, { | ||
| scope: scope.$id, | ||
| description: scope.description, | ||
| category: normalizeCategory(scope.category), | ||
| category: normalizeCategory(scope.category || fallback?.category || ''), | ||
| deprecated: scope.deprecated, | ||
| icon: '' | ||
| }); |
There was a problem hiding this comment.
The fallback applies
category from the local scope definition when the API omits it, but icon is still hardcoded to '' even though fallback?.icon is available. This creates an inconsistency: if the API returns a presences scope without its category, the grouping recovers correctly, but the icon stays blank rather than using the locally defined 'user-group' value.
| scopesById.set(scope.$id, { | |
| scope: scope.$id, | |
| description: scope.description, | |
| category: normalizeCategory(scope.category), | |
| category: normalizeCategory(scope.category || fallback?.category || ''), | |
| deprecated: scope.deprecated, | |
| icon: '' | |
| }); | |
| scopesById.set(scope.$id, { | |
| scope: scope.$id, | |
| description: scope.description, | |
| category: normalizeCategory(scope.category || fallback?.category || ''), | |
| deprecated: scope.deprecated, | |
| icon: fallback?.icon ?? '' | |
| }); |
What does this PR do?
(Provide a description of what this PR does.)
Test Plan
(Write your test plan here. If you changed any code, please provide us with clear instructions on how you verified your changes work.)
Related PRs and Issues
(If this PR is related to any other PR or resolves any issue or related to any issue link all related PR and issues here.)
Have you read the Contributing Guidelines on issues?
(Write your answer here.)