Skip to content

refactor: Ingest settings hidden#1920

Merged
mfortman11 merged 2 commits into
mainfrom
ingest-settings-hidden
Jun 18, 2026
Merged

refactor: Ingest settings hidden#1920
mfortman11 merged 2 commits into
mainfrom
ingest-settings-hidden

Conversation

@mfortman11

@mfortman11 mfortman11 commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

mirror of #1910

Summary by CodeRabbit

Release Notes

  • New Features

    • Provider ingest settings visibility is now configurable through backend settings, giving administrators control over whether ingest configuration options are displayed in cloud picker and bucket selection flows.
  • Style

    • Improved delete button icon spacing for better visual clarity.

@github-actions github-actions Bot added community frontend 🟨 Issues related to the UI/UX backend 🔷 Issues related to backend services (OpenSearch, Langflow, APIs) refactor labels Jun 18, 2026
@coderabbitai

coderabbitai Bot commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Walkthrough

Adds a new environment variable OPENRAG_SHOW_PROVIDER_INGEST_SETTINGS that propagates through the backend Pydantic model and /settings endpoint to the frontend Settings type. Both UnifiedCloudPicker and SharedBucketView now fetch this flag via useGetSettingsQuery and conditionally render the IngestSettings panel. Also adds mr-2 spacing to the Trash2 icon in KnowledgeBatchActionsBar.

Changes

IngestSettings Visibility Feature Flag

Layer / File(s) Summary
Backend env config, model, and endpoint
src/config/settings.py, src/api/settings/models.py, src/api/settings/endpoints.py
Defines OPENRAG_SHOW_PROVIDER_INGEST_SETTINGS from environment, adds show_provider_ingest_settings: bool = False to SettingsResponse, and populates it in the get_settings response.
Frontend type and conditional IngestSettings rendering
frontend/app/api/queries/useGetSettingsQuery.ts, frontend/components/cloud-picker/unified-cloud-picker.tsx, frontend/components/connectors/shared-bucket-view.tsx
Adds optional show_provider_ingest_settings to Settings, imports useGetSettingsQuery/useAuth in both components, and wraps IngestSettings in a conditional render guarded by the derived showIngestSettings flag.
Delete button icon spacing fix
frontend/components/knowledge-batch-actions-bar.tsx
Adds mr-2 to the Trash2 icon inside the delete button for spacing.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • langflow-ai/openrag#1615: Both PRs touch frontend/components/knowledge-batch-actions-bar.tsx around the delete button's Trash2 icon — that PR introduced it, this one adjusts its spacing.

Suggested labels

refactor

Suggested reviewers

  • lucaseduoli
  • ricofurtado
🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check ❓ Inconclusive The title 'refactor: Ingest settings hidden' is vague and does not clearly describe the actual changes. While it mentions 'ingest settings,' it is overly generic and does not convey what was actually changed—that a feature flag was added to conditionally show/hide provider ingest settings across multiple components. Consider a more descriptive title such as 'feat: Add feature flag for conditional provider ingest settings visibility' to clearly indicate the implementation of a configurable setting.
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

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

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ingest-settings-hidden

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.

@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 `@src/config/settings.py`:
- Around line 466-468: The OPENRAG_SHOW_PROVIDER_INGEST_SETTINGS configuration
fails to handle environment variable values with leading or trailing whitespace,
causing inputs like " true " to incorrectly evaluate to False. Modify the
os.getenv call to chain .strip().lower() instead of just .lower() on the
environment variable value, ensuring whitespace is removed before checking if
the string matches "true", "1", or "yes".
🪄 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: 5c9a33f9-62ed-4052-8a40-84ed7ffc7544

📥 Commits

Reviewing files that changed from the base of the PR and between 89e0400 and 683d293.

📒 Files selected for processing (7)
  • frontend/app/api/queries/useGetSettingsQuery.ts
  • frontend/components/cloud-picker/unified-cloud-picker.tsx
  • frontend/components/connectors/shared-bucket-view.tsx
  • frontend/components/knowledge-batch-actions-bar.tsx
  • src/api/settings/endpoints.py
  • src/api/settings/models.py
  • src/config/settings.py

Comment thread src/config/settings.py
Comment on lines +466 to +468
OPENRAG_SHOW_PROVIDER_INGEST_SETTINGS = os.getenv(
"OPENRAG_SHOW_PROVIDER_INGEST_SETTINGS", "false"
).lower() in ("true", "1", "yes")

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.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Trim environment input before boolean coercion.

Line 468 lowercases the raw env value; values like " true " evaluate to False and silently disable the flag. Use .strip().lower().

Suggested patch
 OPENRAG_SHOW_PROVIDER_INGEST_SETTINGS = os.getenv(
     "OPENRAG_SHOW_PROVIDER_INGEST_SETTINGS", "false"
-).lower() in ("true", "1", "yes")
+).strip().lower() in ("true", "1", "yes")
🤖 Prompt for 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.

In `@src/config/settings.py` around lines 466 - 468, The
OPENRAG_SHOW_PROVIDER_INGEST_SETTINGS configuration fails to handle environment
variable values with leading or trailing whitespace, causing inputs like " true
" to incorrectly evaluate to False. Modify the os.getenv call to chain
.strip().lower() instead of just .lower() on the environment variable value,
ensuring whitespace is removed before checking if the string matches "true",
"1", or "yes".

@mfortman11 mfortman11 enabled auto-merge (squash) June 18, 2026 20:43

@Wallgau Wallgau 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

@mfortman11 mfortman11 merged commit 3584585 into main Jun 18, 2026
26 of 27 checks passed
@github-actions github-actions Bot added the lgtm label Jun 18, 2026
@github-actions github-actions Bot deleted the ingest-settings-hidden branch June 18, 2026 20:54
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) community frontend 🟨 Issues related to the UI/UX lgtm refactor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants