Skip to content

feat(augment): Phase 2 - consolidate frontend lifecycle UX fixes#3223

Merged
pkliczewski merged 2 commits into
redhat-developer:mainfrom
rrbanda:pr/lifecycle-hardening-phase2
May 21, 2026
Merged

feat(augment): Phase 2 - consolidate frontend lifecycle UX fixes#3223
pkliczewski merged 2 commits into
redhat-developer:mainfrom
rrbanda:pr/lifecycle-hardening-phase2

Conversation

@rrbanda
Copy link
Copy Markdown
Contributor

@rrbanda rrbanda commented May 21, 2026

Summary

Phase 2 of the Deep-Dive Lifecycle Hardening plan. Consolidates all frontend fixes that were previously split across PRs C/D/F into a single PR. Depends on Phase 1 (PR #3222).

Changes

MarketplacePage

  • Added switchToMyAgentsKey prop: auto-switches to "My Agents" tab after agent creation

ChatView

  • Added justCreatedRef to prevent intent dialog reopening after successful creation
  • Passes switchToMyAgentsKey and isAdmin to child components

AgentLifecycleDetail

  • Added isAdmin prop for role-aware action buttons (non-admins: Submit for Review only; admins: full lifecycle controls)
  • Added rejection banner for draft agents with rejection reason

KagentiAgentsPanel

  • Passes isAdmin={true} in admin panel context

ReviewQueue

  • Added rejection dialog with reason text field for admin reject action

Test plan

  • After creating an agent, marketplace auto-switches to My Agents tab
  • Intent dialog does NOT reopen after wizard closes post-creation
  • Non-admin: only Submit for Review on draft agents, read-only chip elsewhere
  • Admin: full lifecycle buttons in admin panel and front door
  • Rejection banner shown for drafts with rejection reason
  • Reject dialog sends reason to demoteAgent API

@github-actions
Copy link
Copy Markdown
Contributor

This pull request adds a new top-level directory under workspaces/. Please follow Submitting a Pull Request for a New Workspace in CONTRIBUTING.md.

@rhdh-gh-app
Copy link
Copy Markdown

rhdh-gh-app Bot commented May 21, 2026

Important

This PR includes changes that affect public-facing API. Please ensure you are adding/updating documentation for new features or behavior.

Changed Packages

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

# ============================================================================
# Cosmos DB Account (Serverless)
# ============================================================================
resource "azurerm_cosmosdb_account" "main" {
@rrbanda rrbanda force-pushed the pr/lifecycle-hardening-phase2 branch from 9751b11 to 4ece3d7 Compare May 21, 2026 17:18
@codecov
Copy link
Copy Markdown

codecov Bot commented May 21, 2026

Codecov Report

❌ Patch coverage is 54.38596% with 52 lines in your changes missing coverage. Please review.
✅ Project coverage is 53.80%. Comparing base (3ae6323) to head (711ee8d).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3223      +/-   ##
==========================================
+ Coverage   53.55%   53.80%   +0.24%     
==========================================
  Files        2362     2362              
  Lines       84709    84772      +63     
  Branches    23464    23488      +24     
==========================================
+ Hits        45367    45612     +245     
+ Misses      39085    38901     -184     
- Partials      257      259       +2     
Flag Coverage Δ *Carryforward flag
adoption-insights 83.58% <ø> (ø) Carriedforward from 3ae6323
ai-integrations 70.03% <ø> (ø) Carriedforward from 3ae6323
app-defaults 69.60% <ø> (ø) Carriedforward from 3ae6323
augment 47.57% <54.38%> (+0.60%) ⬆️
bulk-import 72.86% <ø> (ø) Carriedforward from 3ae6323
cost-management 16.49% <ø> (ø) Carriedforward from 3ae6323
dcm 32.85% <ø> (ø) Carriedforward from 3ae6323
extensions 61.79% <ø> (ø) Carriedforward from 3ae6323
global-floating-action-button 74.30% <ø> (ø) Carriedforward from 3ae6323
global-header 61.68% <ø> (ø) Carriedforward from 3ae6323
homepage 50.92% <ø> (ø) Carriedforward from 3ae6323
konflux 91.01% <ø> (ø) Carriedforward from 3ae6323
lightspeed 68.33% <ø> (ø) Carriedforward from 3ae6323
mcp-integrations 81.59% <ø> (ø) Carriedforward from 3ae6323
orchestrator 36.36% <ø> (ø) Carriedforward from 3ae6323
quickstart 62.88% <ø> (ø) Carriedforward from 3ae6323
sandbox 79.56% <ø> (ø) Carriedforward from 3ae6323
scorecard 83.84% <ø> (ø) Carriedforward from 3ae6323
theme 64.54% <ø> (ø) Carriedforward from 3ae6323
translations 8.49% <ø> (ø) Carriedforward from 3ae6323
x2a 78.59% <ø> (ø) Carriedforward from 3ae6323

*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 3ae6323...711ee8d. 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 added 2 commits May 21, 2026 13:24
Phase 1 of lifecycle hardening: single PR consolidating all backend
type changes and plumbing that were previously split across PRs A/B/E.

Backend types (shared.ts):
- Add createdBy, createdAt to ChatAgentConfig and ChatAgent
- Add rejectionReason, rejectedBy, rejectedAt for rejection tracking

Agent routes (agentRoutes.ts):
- overlayConfig surfaces all new lifecycle fields
- GET /agents scoped for non-admins: published + own + legacy unowned
- Promote: ownership checks, phantom draft blocking for non-admins,
  createdBy set on new config entries, rejection fields cleared on re-promote
- Demote: accepts optional reason param, stores rejection fields on
  review → draft transitions
- DELETE /agents/:agentId: ownership-gated draft deletion for non-admins,
  full deletion for admins, with audit logging

Frontend API (AugmentApi.ts):
- Add deleteAgentConfig(agentId) method
- Add reason param to demoteAgent signature

Audit logger:
- Add 'agent.delete' audit action

API reports updated for both augment-common and augment plugins.
Phase 2 of lifecycle hardening: single PR consolidating all frontend
fixes that were previously split across PRs C/D/F.

MarketplacePage:
- Add switchToMyAgentsKey prop to auto-switch to My Agents tab after
  agent creation

ChatView:
- Add justCreatedRef to prevent intent dialog from reopening after
  agent creation (fixes double-dialog bug)
- Pass switchToMyAgentsKey to MarketplacePage
- Pass isAdmin to AgentLifecycleDetail

AgentLifecycleDetail:
- Add isAdmin prop for role-aware action buttons
- Non-admins see "Submit for Review" for drafts, read-only status chip
  for other stages
- Admins see full lifecycle transition and rebuild buttons
- Add rejection banner showing reason and rejector for draft agents

KagentiAgentsPanel:
- Pass isAdmin={true} to AgentLifecycleDetail in admin context

ReviewQueue:
- Add rejection dialog with reason text field
- Rejection reason passed to demoteAgent API for review → draft
@sonarqubecloud
Copy link
Copy Markdown

@pkliczewski pkliczewski merged commit 18fe980 into redhat-developer:main May 21, 2026
62 checks passed
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.

3 participants