feat: add rejection reason fields to ChatAgentConfig and demote route#3219
feat: add rejection reason fields to ChatAgentConfig and demote route#3219rrbanda wants to merge 1 commit into
Conversation
When an admin rejects an agent (demotes review→draft), they can now provide a reason. The backend stores rejectionReason, rejectedBy, and rejectedAt on the ChatAgentConfig. These fields are cleared when the agent is re-submitted for review. Changes: - Add rejectionReason, rejectedBy, rejectedAt to ChatAgentConfig and ChatAgent interfaces - Add createdBy field to both interfaces (prerequisite for downstream PRs) - Update PUT /agents/:id/demote to accept optional 'reason' in body - Surface rejection fields through overlayConfig in unified agent list - Update demoteAgent API method to accept optional reason parameter - Update report.api.md files for both augment and augment-common 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 #3219 +/- ##
==========================================
- Coverage 53.41% 53.41% -0.01%
==========================================
Files 2373 2373
Lines 84895 84905 +10
Branches 23568 23574 +6
==========================================
Hits 45349 45349
+ Misses 39200 38007 -1193
- Partials 346 1549 +1203
*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 1 (#3222) which consolidates rejection reason fields with the full backend type plumbing. |



Summary
rejectionReason,rejectedBy,rejectedAtfields toChatAgentConfigandChatAgentinterfacesreview→draft, they can include areasonin the request body which gets storeddemoteAgentfrontend API method updated to accept optionalreasonparametercreatedByfield to both interfaces (prerequisite for ownership checks)Part of Epic #3208. Prerequisite for PR F (rejection UI).
Test plan
PUT /agents/:id/demotewith{ targetStage: "draft", reason: "Needs better description" }→ reason is storeddraft→review→ rejectionReason/rejectedBy/rejectedAt are clearedGET /agentsreturns rejection fields for agents that have been rejected