docs: bundles separation - #13734
Conversation
WalkthroughTwo new shared MDX partials ( ChangesBundle install documentation rollout
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested labels
Suggested reviewers
🚥 Pre-merge checks | ✅ 9✅ Passed checks (9 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
✅ Test Coverage AdvisorNo source changes detected without accompanying tests. Thanks for keeping coverage up! 🎉
|
This comment has been minimized.
This comment has been minimized.
|
Build successful! ✅ |
There was a problem hiding this comment.
Actionable comments posted: 3
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
docs/docs/Components/bundles-cometapi.mdx (1)
7-9:⚠️ Potential issue | 🔴 Critical | ⚡ Quick winMissing Icon in bundles introduction and misplaced import.
Line 9 lacks the Icon component that other bundle pages use. Additionally, the
PartialLfxBundlesInstallimport is at line 31 (after the component is used at line 15), which causes a render error. Move the import to the top of the file with other imports, and add the Icon.🐛 Proposed fix
import Icon from "`@site/src/components/icon`"; +import PartialLfxBundlesInstall from '`@site/docs/_partial-bundle-lfx-bundles-install.mdx`'; [Bundles](/components-bundle-components) contain custom components that support specific third-party integrations with Langflow.And replace line 9:
-[Bundles](/components-bundle-components) contain custom components that support specific third-party integrations with Langflow. +<Icon name="Blocks" aria-hidden="true" /> [**Bundles**](/components-bundle-components) contain custom components that support specific third-party integrations with Langflow.Then remove the duplicate import at lines 30–31:
import PartialParams from '`@site/docs/_partial-hidden-params.mdx`'; -import PartialLfxBundlesInstall from '`@site/docs/_partial-bundle-lfx-bundles-install.mdx`';🤖 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 `@docs/docs/Components/bundles-cometapi.mdx` around lines 7 - 9, The bundles introduction is missing the Icon component usage that other bundle documentation pages include, and the PartialLfxBundlesInstall import is positioned after where it is first used in the file, causing a render error. Add the Icon component to the introductory paragraph at line 9 (following the pattern used in other bundle pages), then move the PartialLfxBundlesInstall import from its current location at line 31 to the top of the file with the other imports around line 7, and remove the duplicate import statement that was at lines 30-31.Source: Coding guidelines
🤖 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 `@docs/docs/Components/bundles-google.mdx`:
- Around line 12-14: The PartialLfxBundlesInstall component is being used in the
JSX before its import statement is declared, which will cause a "not defined"
error at runtime. Move the import statement for PartialLfxBundlesInstall from
line 161 (near the legacy section) to the top of the file around line 6-7 where
the other imports are located, ensuring the import is declared before any JSX
usage of the component.
In `@docs/docs/Components/bundles-redis.mdx`:
- Line 66: The PartialLfxBundlesInstall import statement is currently placed at
line 66 after markdown content and after its usage, which violates the
established convention of keeping all imports at the top of the file. Remove the
import statement for PartialLfxBundlesInstall from line 66 and move it to the
top import block with the other import statements to match the pattern used in
similar files like bundles-agentics.mdx and bundles-aiml.mdx for better
maintainability and consistency.
In `@docs/docs/Components/components-custom-components.mdx`:
- Around line 38-40: The admonition type `:::note` is not allowed per
documentation style guidelines. Replace the `:::note` admonition marker with one
of the allowed types: `:::tip`, `:::warning`, or `:::danger`. Choose the type
that best fits the content context (in this case, the note about the frozen path
and recommendation to use distributable bundles instead).
---
Outside diff comments:
In `@docs/docs/Components/bundles-cometapi.mdx`:
- Around line 7-9: The bundles introduction is missing the Icon component usage
that other bundle documentation pages include, and the PartialLfxBundlesInstall
import is positioned after where it is first used in the file, causing a render
error. Add the Icon component to the introductory paragraph at line 9 (following
the pattern used in other bundle pages), then move the PartialLfxBundlesInstall
import from its current location at line 31 to the top of the file with the
other imports around line 7, and remove the duplicate import statement that was
at lines 30-31.
🪄 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: a41b9ecd-4527-4824-bbae-8ac6abfce857
📒 Files selected for processing (71)
docs/docs/API-Reference/flow-devops-sdk.mdxdocs/docs/Components/bundles-agentics.mdxdocs/docs/Components/bundles-aiml.mdxdocs/docs/Components/bundles-altk.mdxdocs/docs/Components/bundles-amazon.mdxdocs/docs/Components/bundles-anthropic.mdxdocs/docs/Components/bundles-apify.mdxdocs/docs/Components/bundles-assemblyai.mdxdocs/docs/Components/bundles-azure.mdxdocs/docs/Components/bundles-baidu.mdxdocs/docs/Components/bundles-bing.mdxdocs/docs/Components/bundles-cassandra.mdxdocs/docs/Components/bundles-chroma.mdxdocs/docs/Components/bundles-cleanlab.mdxdocs/docs/Components/bundles-clickhouse.mdxdocs/docs/Components/bundles-cloudflare.mdxdocs/docs/Components/bundles-codeagents.mdxdocs/docs/Components/bundles-cohere.mdxdocs/docs/Components/bundles-cometapi.mdxdocs/docs/Components/bundles-composio.mdxdocs/docs/Components/bundles-couchbase.mdxdocs/docs/Components/bundles-cuga.mdxdocs/docs/Components/bundles-datastax.mdxdocs/docs/Components/bundles-deepseek.mdxdocs/docs/Components/bundles-elastic.mdxdocs/docs/Components/bundles-exa.mdxdocs/docs/Components/bundles-faiss.mdxdocs/docs/Components/bundles-files-ingestion.mdxdocs/docs/Components/bundles-firecrawl.mdxdocs/docs/Components/bundles-glean.mdxdocs/docs/Components/bundles-google.mdxdocs/docs/Components/bundles-groq.mdxdocs/docs/Components/bundles-huggingface.mdxdocs/docs/Components/bundles-icosacomputing.mdxdocs/docs/Components/bundles-langchain.mdxdocs/docs/Components/bundles-lite-llm.mdxdocs/docs/Components/bundles-lmstudio.mdxdocs/docs/Components/bundles-maritalk.mdxdocs/docs/Components/bundles-mem0.mdxdocs/docs/Components/bundles-milvus.mdxdocs/docs/Components/bundles-mistralai.mdxdocs/docs/Components/bundles-mongodb.mdxdocs/docs/Components/bundles-notion.mdxdocs/docs/Components/bundles-novita.mdxdocs/docs/Components/bundles-nvidia.mdxdocs/docs/Components/bundles-ollama.mdxdocs/docs/Components/bundles-openai.mdxdocs/docs/Components/bundles-openrouter.mdxdocs/docs/Components/bundles-perplexity.mdxdocs/docs/Components/bundles-pgvector.mdxdocs/docs/Components/bundles-pinecone.mdxdocs/docs/Components/bundles-qdrant.mdxdocs/docs/Components/bundles-redis.mdxdocs/docs/Components/bundles-sambanova.mdxdocs/docs/Components/bundles-searchapi.mdxdocs/docs/Components/bundles-serper.mdxdocs/docs/Components/bundles-supabase.mdxdocs/docs/Components/bundles-upstash.mdxdocs/docs/Components/bundles-vectara.mdxdocs/docs/Components/bundles-vertexai.mdxdocs/docs/Components/bundles-vllm.mdxdocs/docs/Components/bundles-weaviate.mdxdocs/docs/Components/bundles-wikipedia.mdxdocs/docs/Components/bundles-xai.mdxdocs/docs/Components/components-bundles.mdxdocs/docs/Components/components-custom-components.mdxdocs/docs/Components/concepts-components.mdxdocs/docs/Contributing/contributing-bundles.mdxdocs/docs/Support/release-notes.mdxdocs/docs/_partial-bundle-graduated-install.mdxdocs/docs/_partial-bundle-lfx-bundles-install.mdx
|
|
||
| <PartialLfxBundlesInstall /> | ||
|
|
There was a problem hiding this comment.
Critical: Move import statement to the top of the file.
The PartialLfxBundlesInstall component is rendered at line 13, but the import statement is placed at line 161 (near the legacy section). In MDX/React, all imports must be declared before they are used. This will cause a runtime error: "PartialLfxBundlesInstall is not defined."
Move the import to the top of the file, near other imports (line 6-7).
🔧 Proposed fix
Remove import from line 161:
-import PartialLegacy from '`@site/docs/_partial-legacy.mdx`';
-import PartialLfxBundlesInstall from '`@site/docs/_partial-bundle-lfx-bundles-install.mdx`';
+import PartialLegacy from '`@site/docs/_partial-legacy.mdx`';Add import at the top of the file (after line 6):
import Icon from "`@site/src/components/icon`";
+import PartialLfxBundlesInstall from '`@site/docs/_partial-bundle-lfx-bundles-install.mdx`';Also applies to: 161-161
🤖 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 `@docs/docs/Components/bundles-google.mdx` around lines 12 - 14, The
PartialLfxBundlesInstall component is being used in the JSX before its import
statement is declared, which will cause a "not defined" error at runtime. Move
the import statement for PartialLfxBundlesInstall from line 161 (near the legacy
section) to the top of the file around line 6-7 where the other imports are
located, ensuring the import is declared before any JSX usage of the component.
| <PartialParams /> | ||
|
|
||
| import PartialConditionalParams from '@site/docs/_partial-conditional-params.mdx'; | ||
| import PartialLfxBundlesInstall from '@site/docs/_partial-bundle-lfx-bundles-install.mdx'; |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
cat -n docs/docs/Components/bundles-redis.mdxRepository: langflow-ai/langflow
Length of output: 4215
🏁 Script executed:
# Search for similar imports in other docs files to understand pattern conventions
rg "import Partial.*from.*_partial.*\.mdx" docs/ -A 1 -B 1 | head -100Repository: langflow-ai/langflow
Length of output: 9246
🏁 Script executed:
# Check if there are imports after markdown content in other files
fd "\.mdx$" docs/docs/Components/ | head -5 | xargs -I {} sh -c 'echo "=== {} ===" && cat -n {} | grep -E "^[[:space:]]*[0-9]+[[:space:]]+import|^[[:space:]]*[0-9]+[[:space:]]+^#{1,6}|<Partial|<Icon"'Repository: langflow-ai/langflow
Length of output: 2533
🏁 Script executed:
# Check for docusaurus config and MDX processing settings
find . -maxdepth 2 -name "docusaurus.config.*" -o -name ".mdx*" -o -name "package.json" | head -5Repository: langflow-ai/langflow
Length of output: 127
🏁 Script executed:
# Look for other MDX files with imports after markdown content/usage
fd "\.mdx$" docs/docs/ --max-one-result=20 | xargs -I {} sh -c '
if grep -q "<Partial" {} && grep -q "^import.*_partial.*\.mdx" {}; then
first_partial=$(grep -n "<Partial" {} | head -1 | cut -d: -f1)
last_import=$(grep -n "^import.*_partial.*\.mdx" {} | tail -1 | cut -d: -f1)
if [ "$first_partial" -lt "$last_import" ]; then
echo "MISORDER: {} - Usage at $first_partial, Import at $last_import"
fi
fi
' 2>/dev/nullRepository: langflow-ai/langflow
Length of output: 280
🏁 Script executed:
# Check docusaurus configuration to understand MDX processing
cat -n docusaurus.config.js 2>/dev/null | grep -A 5 -B 5 -i "mdx\|markdown" | head -50Repository: langflow-ai/langflow
Length of output: 46
🏁 Script executed:
# Check docusaurus config file for MDX settings
cat docs/docusaurus.config.js | head -100Repository: langflow-ai/langflow
Length of output: 3641
🏁 Script executed:
# Look for imports after markdown content in bundle files
fd "\.mdx$" docs/docs/Components/bundles-*.mdx | while read file; do
first_usage=$(grep -n "<Partial" "$file" | head -1 | cut -d: -f1)
if [ -n "$first_usage" ]; then
last_import=$(grep -n "^import.*from.*\.mdx" "$file" | tail -1 | cut -d: -f1)
if [ -n "$last_import" ] && [ "$first_usage" -lt "$last_import" ]; then
echo "PROBLEM: $file - Usage line $first_usage, Last import line $last_import"
fi
fi
doneRepository: langflow-ai/langflow
Length of output: 5947
🏁 Script executed:
# Check if Docusaurus MDX automatically hoists imports or requires them at top
cat docs/package.json | grep -i "mdx\|remark\|rehype" -A 2 -B 2Repository: langflow-ai/langflow
Length of output: 250
🏁 Script executed:
# Check for imports after markdown content in bundle files - corrected approach
for file in docs/docs/Components/bundles-*.mdx; do
first_usage=$(grep -n "<Partial" "$file" 2>/dev/null | head -1 | cut -d: -f1)
if [ -n "$first_usage" ]; then
last_import=$(grep -n "^import.*from.*\.mdx" "$file" 2>/dev/null | tail -1 | cut -d: -f1)
if [ -n "$last_import" ] && [ "$first_usage" -lt "$last_import" ]; then
echo "PROBLEM: $(basename $file) - Usage line $first_usage, Last import line $last_import"
fi
fi
doneRepository: langflow-ai/langflow
Length of output: 463
🏁 Script executed:
# Check MDX behavior in Docusaurus - look for documentation or comments about import handling
cat docs/docusaurus.config.js | grep -A 20 "presets:\|mdx\|markdown"Repository: langflow-ai/langflow
Length of output: 2044
🏁 Script executed:
# Look at how MDX files with top imports are structured in the current version
for file in docs/docs/Components/bundles-anthropic.mdx docs/docs/Components/bundles-agentics.mdx; do
echo "=== $(basename $file) ==="
head -15 "$file"
doneRepository: langflow-ai/langflow
Length of output: 1438
🏁 Script executed:
# Check if these files with imports-after-usage are actually in the deployed/built site
ls -la docs/versioned_docs/version-1.10.0/Components/ | grep -E "bundles-(amazon|cometapi|datastax|google|langchain|redis)"Repository: langflow-ai/langflow
Length of output: 490
🏁 Script executed:
# Verify the actual behavior - check if Docusaurus/MDX successfully processes these files
# by looking at build logs or checking if the imports are required to be at top
git log --oneline docs/docs/Components/bundles-redis.mdx | head -5Repository: langflow-ai/langflow
Length of output: 132
🏁 Script executed:
# Check if there's any linting config for MDX file structure
find docs -name ".eslintrc*" -o -name ".prettierrc*" -o -name "package.json" | xargs grep -l "mdx\|import" 2>/dev/null | head -3Repository: langflow-ai/langflow
Length of output: 82
🏁 Script executed:
# Check ESLint or Prettier config in docs directory for MDX import rules
cat docs/package.json | jq '.eslintConfig, .prettier' 2>/dev/null || echo "No ESLint/Prettier in package.json"Repository: langflow-ai/langflow
Length of output: 74
🏁 Script executed:
# Look for eslint config files
find docs -maxdepth 2 -name ".eslintrc*" -o -name "eslint.config.*"Repository: langflow-ai/langflow
Length of output: 46
🏁 Script executed:
# Verify that MDX imports are hoisted by checking MDX/Docusaurus documentation reference
# by examining how `@mdx-js/react` handles imports
cat docs/package.json | grep -A 5 "scripts"Repository: langflow-ai/langflow
Length of output: 249
🏁 Script executed:
# Check if there's any build/linting script that processes MDX files
cat docs/package.json | head -40Repository: langflow-ai/langflow
Length of output: 1276
Move PartialLfxBundlesInstall import to the top import block for consistency.
Line 66 declares the import after markdown content and after usage on line 14. While MDX automatically hoists imports during compilation, keeping imports at the top of the file follows the established convention in the codebase (see bundles-agentics.mdx, bundles-aiml.mdx, etc.) and improves maintainability.
Suggested fix
import Icon from "`@site/src/components/icon`";
import PartialParams from '`@site/docs/_partial-hidden-params.mdx`';
+import PartialLfxBundlesInstall from '`@site/docs/_partial-bundle-lfx-bundles-install.mdx`';
@@
import PartialConditionalParams from '`@site/docs/_partial-conditional-params.mdx`';
-import PartialLfxBundlesInstall from '`@site/docs/_partial-bundle-lfx-bundles-install.mdx`';🤖 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 `@docs/docs/Components/bundles-redis.mdx` at line 66, The
PartialLfxBundlesInstall import statement is currently placed at line 66 after
markdown content and after its usage, which violates the established convention
of keeping all imports at the top of the file. Remove the import statement for
PartialLfxBundlesInstall from line 66 and move it to the top import block with
the other import statements to match the pattern used in similar files like
bundles-agentics.mdx and bundles-aiml.mdx for better maintainability and
consistency.
| :::note | ||
| The `src/lfx/src/lfx/components` path is frozen for new providers. To add new provider integrations that others can install, create a [distributable bundle](/contributing-bundles) instead. The default path is intended for personal customizations and internal-use components only. | ||
| ::: |
There was a problem hiding this comment.
Use an allowed admonition type instead of note.
Please replace :::note with one of the allowed admonitions (:::tip, :::warning, or :::danger) per the docs style rules.
Suggested fix
-:::note
+:::warning
The `src/lfx/src/lfx/components` path is frozen for new providers. To add new provider integrations that others can install, create a [distributable bundle](/contributing-bundles) instead. The default path is intended for personal customizations and internal-use components only.
:::As per coding guidelines: “Use admonitions (:::tip, :::warning, :::danger) for highlighting helpful tips, potential issues, and critical warnings respectively.”
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| :::note | |
| The `src/lfx/src/lfx/components` path is frozen for new providers. To add new provider integrations that others can install, create a [distributable bundle](/contributing-bundles) instead. The default path is intended for personal customizations and internal-use components only. | |
| ::: | |
| :::warning | |
| The `src/lfx/src/lfx/components` path is frozen for new providers. To add new provider integrations that others can install, create a [distributable bundle](/contributing-bundles) instead. The default path is intended for personal customizations and internal-use components only. | |
| ::: |
🤖 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 `@docs/docs/Components/components-custom-components.mdx` around lines 38 - 40,
The admonition type `:::note` is not allowed per documentation style guidelines.
Replace the `:::note` admonition marker with one of the allowed types: `:::tip`,
`:::warning`, or `:::danger`. Choose the type that best fits the content context
(in this case, the note about the frozen path and recommendation to use
distributable bundles instead).
Source: Coding guidelines
|
Superseded by #13775 |
#13563
lfx-bundlescomponent pagesSummary by CodeRabbit