Skip to content

fix(studio): Feedback on deployed agent deletion#57

Merged
htolentino-nvidia merged 2 commits into
mainfrom
NV6221288-Fix-feedback-on-deployed-agent-deletion/htolentino
May 27, 2026
Merged

fix(studio): Feedback on deployed agent deletion#57
htolentino-nvidia merged 2 commits into
mainfrom
NV6221288-Fix-feedback-on-deployed-agent-deletion/htolentino

Conversation

@htolentino-nvidia
Copy link
Copy Markdown
Contributor

@htolentino-nvidia htolentino-nvidia commented May 26, 2026

Addresses https://nvbugspro.nvidia.com/bug/6221288

Summary by CodeRabbit

  • Bug Fixes

    • Improved error messaging when deleting agents with active deployments (specific “active deployments” error shown instead of a generic failure).
  • Improvements

    • Success notification shown on successful agent deletion.
    • Agent list automatically refreshes after deletion.
    • Option added to suppress result toasts for delete flows.
  • Tests

    • Added a test covering the delete-agent conflict scenario and its error toast behavior.

Review Change Stack

Signed-off-by: Henrique Tolentino <henrique.tolentino@gretel.ai>
@htolentino-nvidia htolentino-nvidia requested review from a team as code owners May 26, 2026 18:49
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 26, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: ef822a23-e534-4c76-b85d-f3aee6d9ce2c

📥 Commits

Reviewing files that changed from the base of the PR and between fb6426d and 90babc1.

📒 Files selected for processing (1)
  • web/packages/studio/src/components/dataViews/AgentsDataView/index.spec.tsx

📝 Walkthrough

Walkthrough

DeleteConfirmationModal now accepts an optional suppressResultToasts prop to suppress its own toast messages. AgentsDataView's agent delete handler imports getErrorMessage, adds success toasts with list refetch, special-cases HTTP 409 errors with custom messaging, and wires suppressResultToasts to the modal. A test validates the 409 error path.

Changes

Agent deletion error handling improvements

Layer / File(s) Summary
DeleteConfirmationModal toast suppression prop
web/packages/studio/src/components/DeleteConfirmationModal/index.tsx
DeleteModalProps extends to include suppressResultToasts, destructured and forwarded to ConfirmationModal.
Agent deletion error handling and modal integration
web/packages/studio/src/components/dataViews/AgentsDataView/index.tsx
Import getErrorMessage; update delete-agent mutation to show success toast + refetch on success, special-case HTTP 409 with custom message, use getErrorMessage for other errors; wire suppressResultToasts to DeleteConfirmationModal.
Test for 409 conflict during agent deletion
web/packages/studio/src/components/dataViews/AgentsDataView/index.spec.tsx
Mock HTTP 409 response, drive Delete dialog flow, verify custom error toast appears and generic fallback is absent.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed Title clearly summarizes the main change: improving error feedback when deleting deployed agents with active deployments.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch NV6221288-Fix-feedback-on-deployed-agent-deletion/htolentino

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@web/packages/studio/src/components/dataViews/AgentsDataView/index.spec.tsx`:
- Around line 345-347: Update the test assertion to match the actual toast copy
emitted by the AgentsDataView component: change the expected text in the
assertion that checks errorToast (in index.spec.tsx) from 'Agent has active
deployments. Please delete all deployments before deleting.' to 'Agent has
active deployments. Please delete all deployments before deleting agent.' so the
test string exactly matches the message emitted by the AgentsDataView component
(index.tsx).
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: f40b81ba-1033-4b78-a152-5c32fff70731

📥 Commits

Reviewing files that changed from the base of the PR and between cea5857 and fb6426d.

📒 Files selected for processing (3)
  • web/packages/studio/src/components/DeleteConfirmationModal/index.tsx
  • web/packages/studio/src/components/dataViews/AgentsDataView/index.spec.tsx
  • web/packages/studio/src/components/dataViews/AgentsDataView/index.tsx

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 26, 2026

Suite Lines Covered Line Rate Branch Rate
Unit Tests 18248/24195 75.4% 61.9%
Integration Tests 11668/22977 50.8% 25.9%

Signed-off-by: Henrique Tolentino <henrique.tolentino@gretel.ai>
@htolentino-nvidia htolentino-nvidia added this pull request to the merge queue May 27, 2026
Merged via the queue into main with commit 8df212a May 27, 2026
20 checks passed
aray12 pushed a commit that referenced this pull request May 28, 2026
* Fix feedback on deployed agent deletion

Signed-off-by: Henrique Tolentino <henrique.tolentino@gretel.ai>

* Fix tests

Signed-off-by: Henrique Tolentino <henrique.tolentino@gretel.ai>

---------

Signed-off-by: Henrique Tolentino <henrique.tolentino@gretel.ai>
Co-authored-by: Henrique Tolentino <henrique.tolentino@gretel.ai>
Signed-off-by: Alex Ray <alray@nvidia.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants