Skip to content

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

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

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

Conversation

@Vchen7629

@Vchen7629 Vchen7629 commented Jun 8, 2026

Copy link
Copy Markdown
Collaborator

Summary

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

Demo (Before)

screen-capture.4.webm

Demo (After)

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

Summary by CodeRabbit

  • New Features
    • Added loading indicators and toast notifications during settings restoration for both agent and ingest flows.
    • Updated the confirmation dialog to support an optional in-progress loading state (disabling confirmation and showing a spinner).

@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

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.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Suggested labels

bug

🚥 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.
Linked Issues check ✅ Passed All code changes directly address issue #1286 requirements: loading state prevents duplicate requests, spinner indicates processing, and toast notifications provide completion feedback.
Out of Scope Changes check ✅ Passed All changes are scoped to implementing UI feedback for the restore flow process as specified in issue #1286 with no extraneous modifications.
Title check ✅ Passed The title accurately summarizes the main changes: adding a visual loading spinner and success/error toast notifications when restoring default langflow flows, which directly matches the primary objectives and all modified files.

✏️ 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
Collaborator Author

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

@Vchen7629 Vchen7629 changed the base branch from main to release-0.5.1 June 15, 2026 18:20
@Vchen7629 Vchen7629 force-pushed the restore-flow-ui-feedback-fix branch from de81735 to 4ca787e Compare June 15, 2026 19:41
@github-actions github-actions Bot added documentation 📘 Improvements or additions to documentation ci ⬛ CI/CD, build, and infrastructure issues docker labels Jun 15, 2026
@Vchen7629 Vchen7629 force-pushed the restore-flow-ui-feedback-fix branch from 4ca787e to 003c9df Compare June 15, 2026 19:42
@Vchen7629 Vchen7629 changed the base branch from release-0.5.1 to main June 15, 2026 20:02
@Vchen7629 Vchen7629 force-pushed the restore-flow-ui-feedback-fix branch from 003c9df to acd4819 Compare June 15, 2026 20:04
@Vchen7629

Copy link
Copy Markdown
Collaborator Author

Can't merge this into release-0.5.1 branch for now since it changes files introduced by #1563

@hunterxtang hunterxtang left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Looks good

@Vchen7629 Vchen7629 changed the title Fix: added visual loading spinner and success/error toast when restoring default langflow flows fix: added visual loading spinner and success/error toast when restoring default langflow flows Jun 18, 2026
@github-actions github-actions Bot added bug 🔴 Something isn't working. and removed documentation 📘 Improvements or additions to documentation labels Jun 18, 2026
@Vchen7629

Copy link
Copy Markdown
Collaborator Author

Superseeded by #1931

@Vchen7629 Vchen7629 closed this Jun 18, 2026
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) bug 🔴 Something isn't working. ci ⬛ CI/CD, build, and infrastructure issues docker 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

2 participants