Skip to content

Conversation

@lucaseduoli
Copy link
Collaborator

@lucaseduoli lucaseduoli commented Aug 25, 2025

This pull request updates the default value of the mcp_composer feature flag to be enabled by default in both the backend and frontend configurations. This change ensures that the MCP Composer feature is active unless explicitly disabled.

Feature flag default changes:

Summary by CodeRabbit

  • New Features
    • MCP Composer is now enabled by default across the application, giving users immediate access without additional setup. Administrators can still disable or override this behavior via configuration if needed.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Aug 25, 2025

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Walkthrough

Backend and frontend defaults for the MCP Composer feature flag were flipped from disabled to enabled. The backend FeatureFlags.mcp_composer default is now True, and the frontend Vite config now defaults process.env.LANGFLOW_FEATURE_MCP_COMPOSER to "true" when unset.

Changes

Cohort / File(s) Summary of changes
Backend feature flags
src/backend/base/langflow/services/settings/feature_flags.py
Changed default of FeatureFlags.mcp_composer from False to True.
Frontend build config
src/frontend/vite.config.mts
Defaulted process.env.LANGFLOW_FEATURE_MCP_COMPOSER to "true" when not provided.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested labels

lgtm, fast-track

Suggested reviewers

  • jordanrfrazier
✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/mcp_composer_env

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@github-actions github-actions bot added bug Something isn't working and removed bug Something isn't working labels Aug 25, 2025
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (3)
src/frontend/vite.config.mts (2)

56-58: Document the new default and override instructions.

Please update any environment/feature flag docs (README, .env.example, deployment guides) to reflect that the default is enabled and how to disable it (LANGFLOW_FEATURE_MCP_COMPOSER=false).

I can raise a docs PR or add a snippet if you point me to the docs location.


56-58: Optional: Standardize the MCP Composer flag to Boolean

We found a single usage of this flag in
• src/frontend/src/customization/feature-flags.ts (line 21), where it’s compared as a string:

export const ENABLE_MCP_COMPOSER =
  process.env.LANGFLOW_FEATURE_MCP_COMPOSER === "true";

If you’d like to normalize to a boolean (to match the other flags), you can:

  • In src/frontend/vite.config.mts (lines 56–58), change the default from a string to a boolean:
  •  "process.env.LANGFLOW_FEATURE_MCP_COMPOSER": JSON.stringify(
    
  •    envLangflow.LANGFLOW_FEATURE_MCP_COMPOSER ?? "true",
    
  •  ),
    
  •  "process.env.LANGFLOW_FEATURE_MCP_COMPOSER": JSON.stringify(
    
  •    envLangflow.LANGFLOW_FEATURE_MCP_COMPOSER ?? true,
    
  •  ),
    
  • In src/frontend/src/customization/feature-flags.ts, update the runtime check to compare against a boolean:
  • process.env.LANGFLOW_FEATURE_MCP_COMPOSER === "true"
  • process.env.LANGFLOW_FEATURE_MCP_COMPOSER === true

This change is optional—if you prefer to keep the string-based check, no further action is needed.

</blockquote></details>
<details>
<summary>src/backend/base/langflow/services/settings/feature_flags.py (1)</summary><blockquote>

`4-12`: **Optional: align with pydantic-settings v2 style (only if the repo is already on v2).**

If you’re on pydantic v2/pydantic-settings v2, the recommended config is via SettingsConfigDict instead of an inner Config class. Not required for this PR; consider a separate cleanup.


```python
from pydantic_settings import BaseSettings, SettingsConfigDict

class FeatureFlags(BaseSettings):
  mvp_components: bool = False
  mcp_composer: bool = True
  model_config = SettingsConfigDict(env_prefix="LANGFLOW_FEATURE_")
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 8caa5d9 and 378dd3f.

📒 Files selected for processing (2)
  • src/backend/base/langflow/services/settings/feature_flags.py (1 hunks)
  • src/frontend/vite.config.mts (1 hunks)
🧰 Additional context used
📓 Path-based instructions (3)
{src/backend/**/*.py,tests/**/*.py,Makefile}

📄 CodeRabbit inference engine (.cursor/rules/backend_development.mdc)

{src/backend/**/*.py,tests/**/*.py,Makefile}: Run make format_backend to format Python code before linting or committing changes
Run make lint to perform linting checks on backend Python code

Files:

  • src/backend/base/langflow/services/settings/feature_flags.py
src/frontend/vite.config.*

📄 CodeRabbit inference engine (.cursor/rules/frontend_development.mdc)

Use Vite as the build tool and dev server for the frontend.

Files:

  • src/frontend/vite.config.mts
src/frontend/@(package*.json|tsconfig.json|tailwind.config.*|vite.config.*)

📄 CodeRabbit inference engine (.cursor/rules/frontend_development.mdc)

Frontend configuration files such as package.json, tsconfig.json, and Tailwind/Vite configs must be maintained and updated as needed.

Files:

  • src/frontend/vite.config.mts
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: Run Ruff Check and Format
  • GitHub Check: Update Starter Projects
  • GitHub Check: Ruff Style Check (3.13)
🔇 Additional comments (3)
src/frontend/vite.config.mts (1)

56-58: Default flip to enabled is correct and matches PR intent.

The fallback now enables MCP Composer when LANGFLOW_FEATURE_MCP_COMPOSER is unset. This aligns with the backend change and the PR objective.

src/backend/base/langflow/services/settings/feature_flags.py (2)

6-6: Backend default enabled — LGTM and consistent with the frontend.

Flipping mcp_composer to True at the settings layer aligns the system-wide default with the PR objective. Pydantic will still honor LANGFLOW_FEATURE_MCP_COMPOSER env overrides.


4-12: Feature flag usage and env var prefix verified
All backend references to mcp_composer and mvp_components use FEATURE_FLAGS (no raw os.getenv("LANGFLOW_FEATURE_MCP_COMPOSER") or similar), and the env_prefix = "LANGFLOW_FEATURE_" is correctly applied.

@github-actions github-actions bot added the lgtm This PR has been approved by a maintainer label Aug 25, 2025
@github-actions github-actions bot added bug Something isn't working and removed bug Something isn't working labels Aug 25, 2025
@github-actions
Copy link
Contributor

Frontend Unit Test Coverage Report

Coverage Summary

Lines Statements Branches Functions
Coverage: 4%
4.07% (1042/25572) 1.98% (384/19361) 1.95% (108/5528)

Unit Test Results

Tests Skipped Failures Errors Time
527 0 💤 0 ❌ 0 🔥 8.517s ⏱️

@sonarqubecloud
Copy link

@codecov
Copy link

codecov bot commented Aug 25, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 33.84%. Comparing base (8caa5d9) to head (3cfa7a9).
⚠️ Report is 7 commits behind head on main.

❌ Your project status has failed because the head coverage (3.80%) is below the target coverage (10.00%). You can increase the head coverage or adjust the target coverage.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #9522      +/-   ##
==========================================
+ Coverage   33.80%   33.84%   +0.03%     
==========================================
  Files        1196     1196              
  Lines       56386    56475      +89     
  Branches     5335     5335              
==========================================
+ Hits        19063    19112      +49     
- Misses      37253    37293      +40     
  Partials       70       70              
Flag Coverage Δ
backend 56.10% <100.00%> (+<0.01%) ⬆️
frontend 3.80% <ø> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...d/base/langflow/services/settings/feature_flags.py 100.00% <100.00%> (ø)

... and 12 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@lucaseduoli lucaseduoli enabled auto-merge August 25, 2025 21:02
@lucaseduoli lucaseduoli added this pull request to the merge queue Aug 25, 2025
Merged via the queue into main with commit bd1bec6 Aug 25, 2025
52 of 53 checks passed
@lucaseduoli lucaseduoli deleted the fix/mcp_composer_env branch August 25, 2025 21:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working lgtm This PR has been approved by a maintainer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants