fix: hide admin lifecycle buttons from non-admin users#3217
Conversation
Non-admin users now see role-appropriate controls in AgentLifecycleDetail: - Draft stage: "Submit for Review" button (the only mutation they can do) - Review stage: read-only "Awaiting admin approval" chip - Other stages: read-only stage label chip - "Rebuild" button hidden for non-admins (requires admin/Kagenti access) Admins retain full access to all lifecycle transition buttons. The isAdmin prop is now passed through from ChatView and the admin KagentiAgentsPanel. Part of Epic redhat-developer#3208
Missing ChangesetsThe following package(s) are changed by this PR but do not have a changeset:
See CONTRIBUTING.md for more information about how to add changesets. Changed Packages
|
|
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #3217 +/- ##
==========================================
- Coverage 53.41% 53.41% -0.01%
==========================================
Files 2373 2373
Lines 84895 84907 +12
Branches 23568 23580 +12
==========================================
+ Hits 45349 45351 +2
+ Misses 39200 38009 -1191
- Partials 346 1547 +1201
*This pull request uses carry forward flags. Click here to find out more. Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
|
Closing: superseded by Phase 2 (#3223) which consolidates role-aware buttons with rejection UI and auto-redirect. |



Summary
AgentLifecycleDetail:isAdminprop added toAgentLifecycleDetailPropsand threaded through fromChatViewandKagentiAgentsPanelPart of Epic #3208
Test plan