Skip to content

refactor: Clear up VLM settings limitations - #2170

Open
mfortman11 wants to merge 3 commits into
mainfrom
vlm-settings-limitations
Open

refactor: Clear up VLM settings limitations#2170
mfortman11 wants to merge 3 commits into
mainfrom
vlm-settings-limitations

Conversation

@mfortman11

@mfortman11 mfortman11 commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

in SaaS disabling langflow ingestion does not work w/ picture descriptions this change clarifies that relationship for the users

Summary by CodeRabbit

  • New Features

    • Added clearer guidance for SaaS ingestion settings with tooltips.
    • Prevented incompatible ingestion options from being enabled simultaneously.
    • Enabling one mutually exclusive option now automatically turns off the other.
  • Bug Fixes

    • Improved handling of ingestion preferences across supported deployment modes.
    • Ensured on-premises configuration links and behavior use the correct run mode.

@github-actions github-actions Bot added frontend 🟨 Issues related to the UI/UX community labels Jul 29, 2026
@coderabbitai

coderabbitai Bot commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Walkthrough

Adds typed run-mode constants and propagates them through authentication and URL utilities. SaaS ingest settings now enforce mutual exclusivity between Langflow ingestion disabling and picture descriptions with automatic switching and tooltips.

Changes

Ingest mode controls

Layer / File(s) Summary
Typed run-mode contracts
frontend/lib/constants.ts, frontend/contexts/auth-context.tsx, frontend/lib/url-utils.ts
Defines OSS, SAAS, and ON_PREM run modes, types authentication state and URL parameters, and uses the typed on-premises mode for URL resolution.
SaaS ingest toggle constraints
frontend/app/settings/_components/ingest-settings-section.tsx
Makes “Disable Langflow Ingestion” and “Picture Descriptions” mutually exclusive in SaaS, automatically turns off the conflicting option, and explains disabled states with tooltips.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related PRs

  • langflow-ai/openrag#2159: Updates the same picture descriptions settings area with VLM controls and related disabling behavior.

Suggested labels: enhancement

Suggested reviewers: lucaseduoli

🚥 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 is concise and broadly matches the main SaaS VLM settings limitation changes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.
✨ 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 vlm-settings-limitations

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.

@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: 2

🤖 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/app/settings/_components/ingest-settings-section.tsx`:
- Around line 782-809: The settings form currently allows legacy SaaS state with
both disableIngestWithLangflow and pictureDescriptions enabled to be submitted
unchanged. Update the load/save handling around these state values and the
related save controls near the Switch to normalize the pair or prevent
submission until one is disabled, while preserving the existing mutual-exclusion
behavior for user changes.
- Around line 782-809: The disabled-state tooltip around the
“disable-ingest-with-langflow” Switch is not keyboard-accessible because
TooltipTrigger targets a non-focusable div. Update this TooltipTrigger wrapper,
and the corresponding tooltip block around the other affected Switch, to be
focusable and provide an accessible name when the tooltip is shown, while
preserving the existing disabled logic and tooltip condition.
🪄 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 Plus

Run ID: 3fb8ebdc-c6ae-45b0-8c67-0ec1036a84db

📥 Commits

Reviewing files that changed from the base of the PR and between 6735f36 and ffbc00f.

📒 Files selected for processing (4)
  • frontend/app/settings/_components/ingest-settings-section.tsx
  • frontend/contexts/auth-context.tsx
  • frontend/lib/constants.ts
  • frontend/lib/url-utils.ts

Comment on lines +782 to +809
<TooltipProvider>
<Tooltip>
<TooltipTrigger asChild>
<div>
<Switch
id="disable-ingest-with-langflow"
checked={disableIngestWithLangflow}
disabled={
isSaas &&
pictureDescriptions &&
!disableIngestWithLangflow
}
onCheckedChange={(checked) => {
setDisableIngestWithLangflow(checked);
if (isSaas && checked) setPictureDescriptions(false);
}}
/>
</div>
</TooltipTrigger>
{isSaas &&
pictureDescriptions &&
!disableIngestWithLangflow && (
<TooltipContent>
<p>Unavailable while Picture Descriptions is on.</p>
</TooltipContent>
)}
</Tooltip>
</TooltipProvider>

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.

🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

Enforce mutual exclusivity before saving.

If a legacy SaaS configuration loads with both settings enabled, both disabled conditions remain false, so the user can change an unrelated setting and submit both flags as true. Normalize the pair on load/save or block the save until one option is disabled.

Also applies to: 855-885

🤖 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 `@frontend/app/settings/_components/ingest-settings-section.tsx` around lines
782 - 809, The settings form currently allows legacy SaaS state with both
disableIngestWithLangflow and pictureDescriptions enabled to be submitted
unchanged. Update the load/save handling around these state values and the
related save controls near the Switch to normalize the pair or prevent
submission until one is disabled, while preserving the existing mutual-exclusion
behavior for user changes.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Make the disabled-state tooltip keyboard-accessible.

TooltipTrigger asChild targets a plain <div>, while the nested Switch is disabled. The explanation is therefore pointer-only; keyboard users cannot focus the trigger. Use a focusable wrapper with an accessible name when the tooltip is shown.

Also applies to: 855-885

🤖 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 `@frontend/app/settings/_components/ingest-settings-section.tsx` around lines
782 - 809, The disabled-state tooltip around the “disable-ingest-with-langflow”
Switch is not keyboard-accessible because TooltipTrigger targets a non-focusable
div. Update this TooltipTrigger wrapper, and the corresponding tooltip block
around the other affected Switch, to be focusable and provide an accessible name
when the tooltip is shown, while preserving the existing disabled logic and
tooltip condition.

@github-actions

Copy link
Copy Markdown
Contributor

React Doctor found no new issues. 🎉

Reviewed by React Doctor for commit 2cd19b7.

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

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

Labels

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