Skip to content

fix: restrict ingestion to containers section shows up correctly and error message isn't duplicated#2071

Merged
Vchen7629 merged 7 commits into
mainfrom
restrict-ingestion-section-clear-fix
Jul 15, 2026
Merged

fix: restrict ingestion to containers section shows up correctly and error message isn't duplicated#2071
Vchen7629 merged 7 commits into
mainfrom
restrict-ingestion-section-clear-fix

Conversation

@Vchen7629

@Vchen7629 Vchen7629 commented Jul 9, 2026

Copy link
Copy Markdown
Collaborator

Summary

Fixes #2047 .This PR adds a showContainers state to control when the "Restrict Ingestion to Containers" section shows up and onAuthModeChange to reset it when the user switches authentication methods, preventing stale container data from persisting across auth mode changes. The section also now hides on a failed test connection, so bad credentials clear any previously visible list. Additionally, setContainersError(null) is called at the start of onSubmit to prevent duplicate error messages when a stale connection error and a save validation error would otherwise both appear simultaneously.

Before

screen-capture.11.webm

After

screen-capture.13.webm

Changes

  • settings-dialog.tsx: adds showContainers state, sets it on test success/failure and auth mode change, clears containersError on submit
  • settings-form.tsx: accepts showContainers + onAuthModeChange props, gates the container section on both, resets on tab switch

Summary by CodeRabbit

  • Bug Fixes
    • Improved the Azure Blob setup flow so the container selector only appears when containers are available.
    • After a successful “test connection,” container options are fetched, filtered, and displayed automatically.
    • When switching authentication methods, the container selector is hidden and any container selection and related error messages are cleared.
    • If container loading fails, the correct error is shown while keeping the container selector hidden.
    • Saving now clears container-related error state as part of the submission flow.

@Vchen7629
Vchen7629 requested review from mpawlow and removed request for mpawlow July 9, 2026 23:45
@github-actions github-actions Bot added frontend 🟨 Issues related to the UI/UX bug 🔴 Something isn't working. labels Jul 9, 2026
@coderabbitai

coderabbitai Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

Walkthrough

The Azure Blob settings dialog now controls container selector visibility from saved defaults, connection-test results, authentication changes, and submission errors. The form exposes visibility and authentication-change callbacks and conditionally renders the container selector.

Changes

Azure Blob container visibility

Layer / File(s) Summary
Container visibility form behavior
frontend/enhancements/connectors/azure-blob/settings-form.tsx
The form accepts showContainers and onAuthModeChange, invokes the callback when authentication tabs change, and conditionally renders the container selector.
Dialog visibility orchestration
frontend/enhancements/connectors/azure-blob/settings-dialog.tsx
The dialog initializes and updates visibility from defaults and connection-test outcomes, clears container errors on submit, and hides and resets containers when authentication changes.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

  • langflow-ai/openrag#1974 — Refactors the Azure Blob settings dialog/form container-selector state and authentication-mode wiring.
  • langflow-ai/openrag#2072 — Updates the same Azure Blob connection-test flow with request cancellation and state handling.

Suggested reviewers: mpawlow

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title matches the main change: Azure Blob container section visibility and duplicate error handling.
Linked Issues check ✅ Passed The changes address #2047 by hiding/resetting containers on auth changes, hiding after failed refresh, and clearing duplicate errors on submit.
Out of Scope Changes check ✅ Passed The diff appears tightly scoped to the Azure Blob container visibility and error-message bug described in the linked issue.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch restrict-ingestion-section-clear-fix

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.

@github-actions

github-actions Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

React Doctor found no new issues. 🎉

Reviewed by React Doctor for commit 189ed1a.

@github-actions github-actions Bot added bug 🔴 Something isn't working. and removed bug 🔴 Something isn't working. labels Jul 9, 2026

@coderabbitai coderabbitai Bot left a comment

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.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@frontend/enhancements/connectors/azure-blob/settings-dialog.tsx`:
- Around line 178-179: Update the onAuthModeChange handler in the settings
dialog to reset containers to null in addition to hiding the container selector,
while preserving selectedContainers. This ensures the refresh action and
onSubmit validation require a new container test after authentication changes.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 9cfc11e4-f80b-4fdb-a91b-e1e84afe990f

📥 Commits

Reviewing files that changed from the base of the PR and between 4d1be69 and 43b4480.

📒 Files selected for processing (2)
  • frontend/enhancements/connectors/azure-blob/settings-dialog.tsx
  • frontend/enhancements/connectors/azure-blob/settings-form.tsx

Comment thread frontend/enhancements/connectors/azure-blob/settings-dialog.tsx Outdated
@github-actions github-actions Bot added bug 🔴 Something isn't working. and removed bug 🔴 Something isn't working. labels Jul 9, 2026

@richardz403 richardz403 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.

LGTM

Ran PR locally, the fix does solve the issue of multiple error messages being displayed, removing the excess error messages. The application itself also runs smoothly with no other bugs found.

Ran tests locally, all tests passed, no apparent issues.

@Vchen7629
Vchen7629 requested review from Copilot and mpawlow and removed request for Copilot July 14, 2026 23:19

@mpawlow mpawlow 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.

Code Review 1

  • See PR comments: (1a) (1b)

Functional Review 1

  • ✅ Successfully verified scenarios outlined in issue's expected behavior
  • ⚠️ Additional edge case scenarios identified by (1a) (1b)

Comment thread frontend/enhancements/connectors/azure-blob/settings-dialog.tsx
Comment thread frontend/enhancements/connectors/azure-blob/settings-dialog.tsx
@github-actions github-actions Bot removed the bug 🔴 Something isn't working. label Jul 15, 2026
@github-actions github-actions Bot added bug 🔴 Something isn't working. and removed bug 🔴 Something isn't working. labels Jul 15, 2026
@Vchen7629
Vchen7629 requested a review from mpawlow July 15, 2026 16:30
@github-actions github-actions Bot added bug 🔴 Something isn't working. and removed bug 🔴 Something isn't working. labels Jul 15, 2026
@mpawlow
mpawlow force-pushed the restrict-ingestion-section-clear-fix branch from 40bc811 to 189ed1a Compare July 15, 2026 20:07
@github-actions github-actions Bot added bug 🔴 Something isn't working. and removed bug 🔴 Something isn't working. labels Jul 15, 2026

@mpawlow mpawlow 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.

Code Review 2

  • ✅ Approved / LGTM 🚀
  • ℹ️ Found a minor nit for an extreme edge case
    • Abort-on-unmount cleanup never fires on dialog close, so a canceled test can still land and repopulate stale containers
    • Addressed with a very small change / commit (since it was trivial)
  • ✅ Resolved conflict & rebased branch off of the latest from main

Functional Review 2

  • ✅ Successfully verified all test scenarios

@github-actions github-actions Bot added the lgtm label Jul 15, 2026
@Vchen7629
Vchen7629 merged commit 0e2f173 into main Jul 15, 2026
31 checks passed
@github-actions
github-actions Bot deleted the restrict-ingestion-section-clear-fix branch July 15, 2026 20:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug 🔴 Something isn't working. frontend 🟨 Issues related to the UI/UX lgtm

Projects

None yet

3 participants