Skip to content

feat: show rejection reason to creators and add reason dialog for admins#3220

Closed
rrbanda wants to merge 2 commits into
redhat-developer:mainfrom
rrbanda:pr/rejection-ui
Closed

feat: show rejection reason to creators and add reason dialog for admins#3220
rrbanda wants to merge 2 commits into
redhat-developer:mainfrom
rrbanda:pr/rejection-ui

Conversation

@rrbanda
Copy link
Copy Markdown
Contributor

@rrbanda rrbanda commented May 21, 2026

Summary

  • AgentLifecycleDetail: shows a warning banner when a draft agent has a rejectionReason, displaying the reason text and who rejected it
  • ReviewQueue: "Reject" button now opens a confirmation dialog with an optional text field for the admin to enter a rejection reason before confirming
  • The reason is passed through demoteAgent(agentId, 'draft', reason) to the backend

Part of Epic #3208. Depends on PR #3219 (rejection fields).

Test plan

  • Admin rejects agent with a reason → reason is stored and visible
  • Creator opens their rejected draft agent → sees "Returned from review" banner with the reason
  • Admin rejects without a reason → rejection works, no banner text shown (just "Returned from review")
  • Creator re-submits for review → rejection banner disappears

rrbanda added 2 commits May 21, 2026 11:57
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
- AgentLifecycleDetail now shows a warning banner when a draft agent has
  a rejectionReason, displaying the reason and who rejected it
- ReviewQueue reject button now opens a dialog where admins can enter an
  optional rejection reason before confirming the rejection
- The reason is passed to demoteAgent which stores it on the config

Part of Epic redhat-developer#3208. Requires PR E (rejection fields).
@rrbanda rrbanda requested review from a team and pkliczewski as code owners May 21, 2026 15:59
@rhdh-gh-app
Copy link
Copy Markdown

rhdh-gh-app Bot commented May 21, 2026

Missing Changesets

The following package(s) are changed by this PR but do not have a changeset:

  • @red-hat-developer-hub/backstage-plugin-augment-backend
  • @red-hat-developer-hub/backstage-plugin-augment-common
  • @red-hat-developer-hub/backstage-plugin-augment

See CONTRIBUTING.md for more information about how to add changesets.

Changed Packages

Package Name Package Path Changeset Bump Current Version
@red-hat-developer-hub/backstage-plugin-augment-backend workspaces/augment/plugins/augment-backend none v0.1.0
@red-hat-developer-hub/backstage-plugin-augment-common workspaces/augment/plugins/augment-common none v0.1.0
@red-hat-developer-hub/backstage-plugin-augment workspaces/augment/plugins/augment none v0.1.0

@sonarqubecloud
Copy link
Copy Markdown

@codecov
Copy link
Copy Markdown

codecov Bot commented May 21, 2026

Codecov Report

❌ Patch coverage is 0% with 11 lines in your changes missing coverage. Please review.
✅ Project coverage is 53.41%. Comparing base (7d93262) to head (3e8b592).
⚠️ Report is 1 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff            @@
##             main    #3220     +/-   ##
=========================================
  Coverage   53.41%   53.41%             
=========================================
  Files        2373     2373             
  Lines       84895    84895             
  Branches    23568    23573      +5     
=========================================
  Hits        45349    45349             
+ Misses      39200    37997   -1203     
- Partials      346     1549   +1203     
Flag Coverage Δ *Carryforward flag
adoption-insights 83.58% <ø> (ø) Carriedforward from 53c1c1f
ai-integrations 70.03% <ø> (ø) Carriedforward from 53c1c1f
app-defaults 69.60% <ø> (ø) Carriedforward from 53c1c1f
augment 46.68% <0.00%> (ø) Carriedforward from 53c1c1f
bulk-import 72.86% <ø> (ø) Carriedforward from 53c1c1f
cost-management 16.49% <ø> (ø) Carriedforward from 53c1c1f
dcm 32.85% <ø> (ø) Carriedforward from 53c1c1f
extensions 61.79% <ø> (ø) Carriedforward from 53c1c1f
global-floating-action-button 74.30% <ø> (ø) Carriedforward from 53c1c1f
global-header 61.68% <ø> (ø) Carriedforward from 53c1c1f
homepage 50.92% <ø> (ø) Carriedforward from 53c1c1f
konflux 91.01% <ø> (ø) Carriedforward from 53c1c1f
lightspeed 68.33% <ø> (ø) Carriedforward from 53c1c1f
mcp-integrations 81.59% <ø> (ø) Carriedforward from 53c1c1f
orchestrator 36.36% <ø> (ø) Carriedforward from 53c1c1f
quickstart 62.88% <ø> (ø) Carriedforward from 53c1c1f
sandbox 79.49% <ø> (ø) Carriedforward from 53c1c1f
scorecard 83.84% <ø> (ø) Carriedforward from 53c1c1f
theme 64.54% <ø> (ø) Carriedforward from 53c1c1f
translations 8.49% <ø> (ø) Carriedforward from 53c1c1f
x2a 78.59% <ø> (ø) Carriedforward from 53c1c1f

*This pull request uses carry forward flags. Click here to find out more.


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7d93262...3e8b592. Read the comment docs.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@rrbanda
Copy link
Copy Markdown
Contributor Author

rrbanda commented May 21, 2026

Closing: superseded by Phase 2 (#3223) which consolidates rejection UI with the full frontend lifecycle UX fixes.

@rrbanda rrbanda closed this May 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant