Skip to content

feat(frontend/builder): add confirmation dialog for workspace file removal#12603

Draft
Abhi1992002 wants to merge 1 commit intodevfrom
feat/file-input-remove-confirmation
Draft

feat(frontend/builder): add confirmation dialog for workspace file removal#12603
Abhi1992002 wants to merge 1 commit intodevfrom
feat/file-input-remove-confirmation

Conversation

@Abhi1992002
Copy link
Copy Markdown
Contributor

Summary

  • Add a confirmation dialog when users remove a workspace-uploaded file from a file input in the builder
  • File deletion from workspace is non-reversible, so users must confirm before proceeding
  • Only applies to workspace upload mode (onDeleteFile provided); base64/local mode clears immediately as before
  • Uses the existing Dialog molecule with "Remove file" title, cancel/remove buttons
  • Works for both default and compact FileInput variants

Changes

  • FileInput.tsx: Added showDeleteConfirm state, requestClear() gate function, and a reusable deleteConfirmDialog element rendered in both variant branches

Test plan

  • Upload a file in workspace mode in the builder, click the remove/trash button — confirm dialog appears
  • Click "Cancel" — dialog closes, file remains
  • Click "Remove" — file is deleted from workspace and cleared from input
  • Upload a file in base64 mode — clicking remove should clear immediately with no dialog
  • Test both default and compact FileInput variants

…moval

When users remove a file from a file input in the builder, show a
confirmation dialog since workspace file deletion is non-reversible.
Only triggers for workspace uploads (onDeleteFile provided); base64
mode clears immediately as before.
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 30, 2026

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: b78ff76d-9d56-4dae-839a-fc31f5620e91

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/file-input-remove-confirmation

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@github-actions github-actions bot added the platform/frontend AutoGPT Platform - Front end label Mar 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

platform/frontend AutoGPT Platform - Front end size/m

Projects

Status: 🆕 Needs initial review
Status: No status

Development

Successfully merging this pull request may close these issues.

1 participant