inbox-zero icon indicating copy to clipboard operation
inbox-zero copied to clipboard

No Loading Indicator & Modal Not Closing After Deleting a Rule

Open ppranay20 opened this issue 5 months ago • 2 comments

Description When deleting a rule in the Rules section, the UI does not provide any visual feedback. There’s no loading spinner or progress indicator, and the rule dialog remains open even after the rule has been successfully deleted.

Steps to Reproduce

  1. Click on any rule.
  2. When the dialog open click on delete.
  3. Observe there is no loading indicator.
  4. Even the toast shows deleted the dialog does not close.

https://github.com/user-attachments/assets/7f08f152-994d-4249-b81c-0f6965c5793d

ppranay20 avatar Nov 05 '25 11:11 ppranay20

A summary of the changes CodeRabbit can apply:

  • In apps/web/app/(app)/[emailAccountId]/assistant/RuleForm.tsx: add an isDeleting useState, set loading={isDeleting} on the Delete button, wrap the delete flow with setIsDeleting(true)/finally setIsDeleting(false), and on success call onSuccess() when isDialog (otherwise router.push to /automation?tab=rules) so the dialog closes and a loading spinner shows during deletion.

  • Add delete-state and async deletion flow to RuleForm.tsx: introduce isDeleting state, show loading on the Trash button, set isDeleting true/false around the delete action, call deleteRuleAction with confirmation, handle success by calling onSuccess when in a dialog or routing to /automation?tab=rules otherwise, and show toast messages on success/failure.

  • [ ] Executed edits - (🔄 Check again to try again)

coderabbitai[bot] avatar Nov 05 '25 11:11 coderabbitai[bot]

[!CAUTION] The CodeRabbit agent's plans did not produce any file changes.

coderabbitai[bot] avatar Nov 05 '25 16:11 coderabbitai[bot]