Skip to content

Fix: added visual loading spinner and success/error toast when restoring default langflow flows#1798

Open
Vchen7629 wants to merge 5 commits into
langflow-ai:mainfrom
Vchen7629:restore-flow-ui-feedback-fix
Open

Fix: added visual loading spinner and success/error toast when restoring default langflow flows#1798
Vchen7629 wants to merge 5 commits into
langflow-ai:mainfrom
Vchen7629:restore-flow-ui-feedback-fix

Conversation

@Vchen7629

@Vchen7629 Vchen7629 commented Jun 8, 2026

Copy link
Copy Markdown

Summary

Fixes #1286, Adds loading state feedback for the restore retrieval flow functionality to improve user experience.

Demo

screen-capture.2.webm

Changes

Testing

  • Confirmed that button is disabled during loading by checking network requests when loading
  • Confirmed that the spinner animation displays correctly
  • Tested restore flow with successful completion
  • Tested restore flow with error handling by disabling backend docker container before restoring

Summary by CodeRabbit

  • New Features
    • Added loading indicators and toast notifications during settings restoration, providing clearer feedback on operation progress and outcomes for both agent and ingest settings.

@github-actions github-actions Bot added community frontend 🟨 Issues related to the UI/UX and removed community labels Jun 8, 2026
@coderabbitai

coderabbitai Bot commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 45a931ec-ec0c-4087-b6e4-2c0a7e44409f

📥 Commits

Reviewing files that changed from the base of the PR and between c0a60f8 and e7bad0d.

📒 Files selected for processing (3)
  • frontend/app/settings/_components/agent-settings-section.tsx
  • frontend/app/settings/_components/ingest-settings-section.tsx
  • frontend/components/confirmation-dialog.tsx

Walkthrough

The pull request adds visual loading feedback to the restore flow functionality across settings panels. A new isLoading prop is added to the ConfirmationDialog component, which disables the confirm button and displays a spinner icon during async operations. Both agent and ingest settings sections now track restoration progress via state flags and pass them to their restore dialogs, while also showing success/error toast notifications to users.

Changes

Restore Flow Loading UI Feedback

Layer / File(s) Summary
ConfirmationDialog loading state support
frontend/components/confirmation-dialog.tsx
Component now accepts an optional isLoading prop that disables the confirm button and renders a Loader2 icon when the operation is in progress.
Agent settings restore with loading feedback
frontend/app/settings/_components/agent-settings-section.tsx
AgentSettingsSection adds isRestoringFlow state and updates handleRestoreRetrievalFlow to set this flag during the /api/reset-flow/retrieval request, restore the system prompt on success, show toast notifications, and wire the flag to the dialog's isLoading prop.
Ingest settings restore with loading feedback
frontend/app/settings/_components/ingest-settings-section.tsx
IngestSettingsSection adds isRestoringFlow state and updates handleRestoreIngestFlow to set this flag during the /api/reset-flow/ingest request, restore default ingest settings on success, show toast notifications for success and error cases, and wire the flag to the dialog's isLoading prop.

🎯 2 (Simple) | ⏱️ ~12 minutes

enhancement

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and specifically describes the main changes: adding visual loading spinner and success/error toast notifications for restoring default langflow flows.
Linked Issues check ✅ Passed The PR successfully addresses all coding requirements from issue #1286: showing loading state, preventing duplicate requests via button disable, displaying spinner animation, and providing success/error toast feedback.
Out of Scope Changes check ✅ Passed All changes are directly scoped to the restore flow UI feedback requirements; no unrelated modifications were introduced.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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 backend 🔷 Issues related to backend services (OpenSearch, Langflow, APIs) tests labels Jun 8, 2026
@Vchen7629 Vchen7629 force-pushed the restore-flow-ui-feedback-fix branch from ea9973b to e7bad0d Compare June 8, 2026 18:27
@Vchen7629

Vchen7629 commented Jun 8, 2026

Copy link
Copy Markdown
Author

I accidentally rebased so the backend and tests labels should be removed

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

Labels

backend 🔷 Issues related to backend services (OpenSearch, Langflow, APIs) frontend 🟨 Issues related to the UI/UX tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: No UI Feedback During Restore flow Process

1 participant