feat(ui): add agent deletion controls - #430
Open
jayesh9747 wants to merge 2 commits into
Open
Conversation
jayesh9747
requested review from
govindavashishtha,
kumarsks619,
qaifi-tf,
sajal-truefoundry,
sayan-truefoundry and
vinit-truefoundry
as code owners
August 25, 2026 10:37
🦋 Changeset detectedLatest commit: 44c4a65 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Want higher recall? High effort reviews run extra passes and find more bugs. A team admin can switch effort levels in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 041b993. Configure here.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
Closes #429
Changes
deleteAgent.DELETE /api/v1/agents/{agent_id}SDK routes.deleteAgentwhen no callback is provided.How was this tested?
pnpm test:trueforge-ui— 130 test files / 847 tests passed, including package build and export smoke tests.pnpm --filter @truefoundry/trueforge-ui typecheckpnpm --filter @truefoundry/trueforge-ui lintpnpm format:checkChecklist
Note
Medium Risk
Deletes are destructive and touch shell navigation state after removal; behavior is gated on optional server support and covered by tests, but wrong adapter logic could remove the wrong backend resource.
Overview
Adds agent deletion to the Agents Library when the host server exposes
deleteAgent: a trash action per row, a confirmation dialog, success/error feedback, and a list refresh viainvalidateAgentsList. After a successful delete, the UI clears a matching history filter and navigates away if the deleted agent was active (draft or library home depending on composer mode).createTrueFoundryServerno longer installs a stub that throws whendeleteAgentis omitted—it only attaches the method when a callback is provided, matching custom-server behavior where missing optional ports hide controls instead of failing at runtime.The bundled TrueForge builder adapter implements
deleteAgentby resolving the agent id from the list API and callingDELETE /api/v1/agents/{id}(no-op if the name is already gone). Docs and the BYO checklist now state thatdeleteAgentis invoked from the library when present.Reviewed by Cursor Bugbot for commit 44c4a65. Bugbot is set up for automated code reviews on this repo. Configure here.