feat(ui): add agent deletion controls - #430
Conversation
🦋 Changeset detectedLatest commit: de00e93 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
kumarsks619
left a comment
There was a problem hiding this comment.
@jayesh9747 please add relevant screenshots/screen-recording
|
@kumarsks619 sure. |
|
@chiragjn please R&M whenever u get time |
|
@jayesh9747 Thanks for raising the PR, can we make the design like this Vertical Ellipsis with menu drop containing 2 things edit and delete actions, Ignore the Manage Schedules and Clone and don't add
|
|
@govindavashishtha sure , i will update my pr , is there any channel where we discuss the issue or connect with the repository maintainers ? for example slack ? |
44c4a65 to
de00e93
Compare
|
Addressed the latest feedback and rebased this PR onto the current upstream
Agent actions menu
Delete confirmation
@govindavashishtha @kumarsks619 @chiragjn — please review when you get a chance. Thanks! |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 3 potential issues.
❌ 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 de00e93. Configure here.
| window.addEventListener('keydown', onKeyDown, true); | ||
| return () => window.removeEventListener('keydown', onKeyDown, true); | ||
| }, [closeLibrary, open]); | ||
| }, [agentPendingDelete, closeLibrary, open]); |
There was a problem hiding this comment.
Escape closes library over actions menu
Medium Severity
The library's capture-phase Escape handler still runs while the new actions menu is open. Escape therefore dismisses the whole Agents Library instead of just closing the menu. The confirmation dialog already opts out of that handler, but the dropdown does not.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit de00e93. Configure here.
| } else { | ||
| shell.openLibraryHome(); | ||
| } | ||
| } |
There was a problem hiding this comment.
Active-agent delete dismisses the library
Medium Severity
After a successful delete, clearing the current agent via openDraft or openLibraryHome also sets libraryOpen to false. Deleting the bound agent therefore closes the Agents Library the user is standing in, instead of only unbinding that agent and refreshing the list.
Reviewed by Cursor Bugbot for commit de00e93. Configure here.
| Delete | ||
| </DropdownMenuItem> | ||
| ) : null} | ||
| </DropdownMenu> |
There was a problem hiding this comment.
Actions menu clipped by list overflow
Medium Severity
The new actions DropdownMenu is positioned absolutely inside the library list, which uses overflow-y-auto. For rows near the bottom of the visible list the Edit/Delete menu is clipped, so those actions can be unreachable.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit de00e93. Configure here.
|
@jayesh9747 Please resolve comments and conflicts here |
|
Closing this in favour of #590 |






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; risk is mitigated by confirmation, capability gating, and adapter idempotency, but hosts must implement
deleteAgentcorrectly.Overview
Adds agent deletion to the Agents Library when the host server exposes
deleteAgent, shipped as a minor@truefoundry/trueforge-uirelease.Library rows now use an actions menu (Edit when composer + spec allow, Delete when
typeof server.deleteAgent === 'function') with a confirmation modal, toasts or inline errors, list refresh viainvalidateAgentsList, and shell cleanup (history filter, active agent → draft or library home). Row open/click behavior ignores action buttons.Server wiring:
createTrueFoundryServeronly attachesdeleteAgentwhen a callback is passed (no runtime throw). The bundled harness builder adapter implements delete by resolving the agent id from the list and callingDELETE /api/v1/agents/{id}(idempotent if missing). Docs now state that omittingdeleteAgenthides delete UI instead of failing at call time.Reviewed by Cursor Bugbot for commit de00e93. Bugbot is set up for automated code reviews on this repo. Configure here.