fix(RHCLOUD-50680): preserve Kessel permissions for v2 org admins - #1517
Conversation
The v1 fallback PENDING action was resetting integrationsEndpointsPermissions and integrationsReadPermissions to undefined, wiping Kessel-granted permissions for v2 org admins. Preserve already-granted permissions in pending handlers. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 12 included reviews per hour; 11 remain after this review. Summary by CodeRabbit
WalkthroughThe user reducer now preserves existing truthy integration endpoint and read permission values during pending actions. It falls back to ChangesUser permission state
Estimated code review effort: 1 (Trivial) | ~5 minutes Merge Risk: ⚪ Minimal · up to This localized change preserves permissions already granted to v2 organization administrators while allowing the fallback permission flow to continue; no actionable merge-blocking risk remains beyond normal checks and review. Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Full details: Docstring CoverageExplanation No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1 files. Full details: Description checkExplanation The description explains the issue, root cause, implementation, affected users, test plan, and tracked issue. It omits the template headings for screenshots and checklist, but the core required information is present. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Chromatic Build
|
Summary
PENDINGaction in the reducer was resettingintegrationsEndpointsPermissionsandintegrationsReadPermissionstoundefined, wiping Kessel-granted permissions that were just set synchronouslytrue) permissions usingstate.integrationsEndpointsPermissions || undefinedRoot cause
In
PermissionsChecker, when Kessel is enabled,loadPermissionsFromKesseldispatchesFULFILLEDsynchronously (setting permissions totrue), thenloadIntegrationsEndpointsPermissions(v1 fallback) immediately dispatchesPENDINGsynchronously — resetting the state toundefinedand destroying the Kessel result.Test plan
npx jest --testPathPattern="redux/user")Resolves: https://redhat.atlassian.net/browse/RHCLOUD-50680
🤖 Generated with Claude Code