Skip to content
This repository was archived by the owner on Dec 4, 2025. It is now read-only.

Delete Agent via button on FE#201

Open
abjjabjj wants to merge 64 commits intomainfrom
dance/delete-agent-flow
Open

Delete Agent via button on FE#201
abjjabjj wants to merge 64 commits intomainfrom
dance/delete-agent-flow

Conversation

@abjjabjj
Copy link
Copy Markdown
Contributor

@abjjabjj abjjabjj commented Jul 18, 2025

https://www.loom.com/share/e0b7154b54df4e5482ef62cd136c25fa?sid=9500ea6c-8cd4-429b-9ce3-b060188cffae

Will probably do a touchup on placement and button interaction, but the video demonstrates the functionality. You obviously need owner/edit rights on the agent.


Important

Add DeleteAgentButton to frontend for agent deletion with confirmation dialog, and refactor related components and imports.

  • Feature:
    • Add DeleteAgentButton component in delete-button.tsx to allow users to delete agents with confirmation dialog.
    • Integrate DeleteAgentButton into page.tsx for agent edit page, visible to users with owner/edit rights.
  • UI Components:
    • Add alert-dialog.tsx for confirmation dialogs, used in DeleteAgentButton.
  • API:
    • Add deleteAgent() function in agent.ts to handle agent deletion.
  • Refactoring:
    • Rename create-agent-button.tsx to create-button.tsx and update imports in user-sidebar.tsx.
  • Misc:
    • Remove unused text-sm attribute in accordion.tsx.

This description was created by Ellipsis for 1ce09b1. You can customize this summary. It will automatically update as commits are pushed.

abjjabjj added 30 commits March 28, 2025 16:53
@abjjabjj abjjabjj requested review from alpuga and crypto-cooker July 18, 2025 09:44
@abjjabjj abjjabjj self-assigned this Jul 18, 2025
@abjjabjj abjjabjj linked an issue Jul 18, 2025 that may be closed by this pull request
Copy link
Copy Markdown
Contributor

@ellipsis-dev ellipsis-dev Bot left a comment

Choose a reason for hiding this comment

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

Caution

Changes requested ❌

Reviewed everything up to 1ce09b1 in 1 minute and 45 seconds. Click for details.
  • Reviewed 373 lines of code in 8 files
  • Skipped 1 files when reviewing.
  • Skipped posting 2 draft comments. View those below.
  • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. apps/frontend/components/agent/delete-button.tsx:27
  • Draft comment:
    Consider adding a pending/loading state (and disabling the delete button) during the deletion process to prevent duplicate submissions and to provide user feedback. This is mentioned as a TODO but is important for ensuring a robust UX.
  • Reason this comment was not posted:
    Decided after close inspection that this draft comment was likely wrong and/or not actionable: usefulness confidence = 10% vs. threshold = 50% While the suggestion is valid and important for UX, it's already explicitly noted as a TODO in the code. The comment doesn't provide any additional technical insight or specific implementation details beyond what the developer has already acknowledged. Following our rules, we should avoid making comments that don't require immediate action beyond what's already planned. The comment does provide a good explanation of why the loading state is important (preventing duplicate submissions). Maybe this additional context is valuable? While the explanation is helpful, it's still fundamentally restating something the developer has already acknowledged they need to do. The prevention of duplicate submissions is a standard consideration for loading states. The comment should be deleted as it merely restates an already-acknowledged TODO without providing actionable new information.
2. apps/frontend/components/agent/delete-button.tsx:43
  • Draft comment:
    Typo: In the deletion failure toast, the title says "Unable to stop Agent {name}" but this should likely be "Unable to delete Agent {name}".
  • Reason this comment was not posted:
    Marked as duplicate.

Workflow ID: wflow_eoDiKE6gKOokfQYF

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

if (isErrorResult(deleteResult)) {
console.error(`Failed to delete Agent ${id} status code ${deleteResult.code}, ${deleteResult.message}`)
toast({
title: `Unable to stop Agent ${name}`,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The toast error message in the deletion error block incorrectly uses 'Unable to stop Agent' instead of 'Unable to delete Agent'. Please update the title to accurately reflect the error context.

Suggested change
title: `Unable to stop Agent ${name}`,
title: `Unable to delete Agent ${name}`,

Copy link
Copy Markdown
Contributor

@alpuga alpuga Jul 18, 2025

Choose a reason for hiding this comment

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

Yeah, this makes sense. Just switch stop to delete inside of the console.error under deleteResult.

Copy link
Copy Markdown
Contributor

@alpuga alpuga left a comment

Choose a reason for hiding this comment

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

Just the small fix in delete-button.tsx that ellipsis pointed out.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Delete Agent Flow

2 participants