fix: make starter projects auto refactor not remove selected output#8400
Conversation
|
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the WalkthroughThe changes remove the Changes
Sequence Diagram(s)sequenceDiagram
participant ExistingNode as Existing Node Outputs
participant LatestNode as Latest Component Outputs
participant Updater as update_projects_components_with_latest_component_versions
Updater->>LatestNode: For each output in latest outputs
Updater->>ExistingNode: Find matching output by name
ExistingNode-->>Updater: Return existing output with selected attribute
Updater->>LatestNode: Copy selected attribute from existing output
Updater->>LatestNode: Replace node outputs with updated outputs preserving selected
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
|
Build successful! ✅ |
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (4)
src/frontend/src/pages/FlowPage/components/flowSidebarComponent/components/sidebarFooterButtons/index.tsx (1)
15-16: Address the TODO comment during cleanup.The additional feature flag check provides proper control over the store button rendering. Consider creating a tracking issue for the cleanup task mentioned in the TODO comment.
Would you like me to help create a tracking issue for removing this conditional code during cleanup?
src/frontend/src/pages/MainPage/pages/homePage/index.tsx (1)
82-87: Clarify the conditional filtering logic for better readability.The ternary operator in the filter condition could be more explicit. Consider refactoring for improved readability:
- flows?.find( - (flow) => - flow.folder_id === (folderId ?? myCollectionId) && - (ENABLE_MCP ? flow.is_component === false : true), - ) === undefined; + flows?.find( + (flow) => + flow.folder_id === (folderId ?? myCollectionId) && + (!ENABLE_MCP || flow.is_component === false), + ) === undefined;This change makes the logic clearer: when MCP is disabled, all flows are considered; when enabled, only non-component flows are considered.
src/frontend/src/pages/SettingsPage/index.tsx (1)
74-78: Address the TODO comment for code maintainability.The hardcoded
truefor the first parameter and the TODO comment suggest this implementation is temporary. Consider creating a more maintainable solution that doesn't require future cleanup.- // TODO: Remove this on cleanup if (!ENABLE_DATASTAX_LANGFLOW) { - const langflowItems = CustomStoreSidebar(true, ENABLE_LANGFLOW_STORE); + const langflowItems = CustomStoreSidebar( + true, // hasApiKey - could be determined dynamically if needed + ENABLE_LANGFLOW_STORE + ); sidebarNavItems.splice(2, 0, ...langflowItems); }Alternatively, if this conditional block is meant to be removed entirely during cleanup, ensure there's a tracking issue or timeline for the removal.
Would you like me to help create a more permanent solution or track this cleanup task?
docs/docs/Contributing/contributing-how-to-contribute.md (1)
119-122: Fix list formatting for consistency.The static analysis tool correctly flagged the inconsistent list style. The file uses asterisks elsewhere, so these should be changed to maintain consistency.
Apply this diff to fix the formatting:
-## Additional contribution guides - -- [Contribute Bundles](./contributing-bundles.md) -- [Contribute Components](./contributing-components.md) -- [Contribute Tests](./contributing-component-tests.md) -- [Contribute Templates](./contributing-templates.md) +## Additional contribution guides + +* [Contribute Bundles](./contributing-bundles.md) +* [Contribute Components](./contributing-components.md) +* [Contribute Tests](./contributing-component-tests.md) +* [Contribute Templates](./contributing-templates.md)🧰 Tools
🪛 markdownlint-cli2 (0.17.2)
119-119: Unordered list style
Expected: asterisk; Actual: dash(MD004, ul-style)
120-120: Unordered list style
Expected: asterisk; Actual: dash(MD004, ul-style)
121-121: Unordered list style
Expected: asterisk; Actual: dash(MD004, ul-style)
122-122: Unordered list style
Expected: asterisk; Actual: dash(MD004, ul-style)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (2)
src/frontend/package-lock.jsonis excluded by!**/package-lock.jsonuv.lockis excluded by!**/*.lock
📒 Files selected for processing (20)
.github/workflows/release.yml(0 hunks)docs/css/custom.css(1 hunks)docs/docs/Configuration/environment-variables.md(1 hunks)docs/docs/Contributing/contributing-how-to-contribute.md(2 hunks)pyproject.toml(2 hunks)src/backend/base/langflow/custom/custom_component/component.py(0 hunks)src/backend/base/langflow/custom/utils.py(1 hunks)src/backend/base/langflow/initial_setup/starter_projects/Pokédex Agent.json(1 hunks)src/backend/base/langflow/services/database/models/api_key/crud.py(2 hunks)src/backend/base/langflow/services/settings/base.py(1 hunks)src/backend/base/langflow/template/field/base.py(0 hunks)src/backend/base/pyproject.toml(1 hunks)src/backend/tests/unit/test_schema.py(0 hunks)src/frontend/package.json(2 hunks)src/frontend/src/components/core/folderSidebarComponent/components/sideBarFolderButtons/index.tsx(1 hunks)src/frontend/src/customization/components/custom-store-sidebar.tsx(3 hunks)src/frontend/src/customization/feature-flags.ts(1 hunks)src/frontend/src/pages/FlowPage/components/flowSidebarComponent/components/sidebarFooterButtons/index.tsx(2 hunks)src/frontend/src/pages/MainPage/pages/homePage/index.tsx(5 hunks)src/frontend/src/pages/SettingsPage/index.tsx(2 hunks)
💤 Files with no reviewable changes (4)
- src/backend/tests/unit/test_schema.py
- src/backend/base/langflow/template/field/base.py
- src/backend/base/langflow/custom/custom_component/component.py
- .github/workflows/release.yml
🧰 Additional context used
🧬 Code Graph Analysis (4)
src/frontend/src/pages/FlowPage/components/flowSidebarComponent/components/sidebarFooterButtons/index.tsx (1)
src/frontend/src/customization/feature-flags.ts (1)
ENABLE_LANGFLOW_STORE(3-3)
src/frontend/src/components/core/folderSidebarComponent/components/sideBarFolderButtons/index.tsx (2)
src/frontend/src/customization/feature-flags.ts (1)
ENABLE_DATASTAX_LANGFLOW(10-10)src/frontend/src/customization/components/custom-store-button.tsx (1)
CustomStoreButton(4-21)
src/frontend/src/pages/SettingsPage/index.tsx (2)
src/frontend/src/customization/feature-flags.ts (2)
ENABLE_DATASTAX_LANGFLOW(10-10)ENABLE_LANGFLOW_STORE(3-3)src/frontend/src/customization/components/custom-store-sidebar.tsx (1)
CustomStoreSidebar(3-36)
src/frontend/src/pages/MainPage/pages/homePage/index.tsx (1)
src/frontend/src/customization/feature-flags.ts (1)
ENABLE_MCP(16-16)
🪛 markdownlint-cli2 (0.17.2)
docs/docs/Contributing/contributing-how-to-contribute.md
119-119: Unordered list style
Expected: asterisk; Actual: dash
(MD004, ul-style)
120-120: Unordered list style
Expected: asterisk; Actual: dash
(MD004, ul-style)
121-121: Unordered list style
Expected: asterisk; Actual: dash
(MD004, ul-style)
122-122: Unordered list style
Expected: asterisk; Actual: dash
(MD004, ul-style)
⏰ Context from checks skipped due to timeout of 90000ms (5)
- GitHub Check: Optimize new Python code in this PR
- GitHub Check: build-and-deploy
- GitHub Check: Run Ruff Check and Format
- GitHub Check: Update Starter Projects
- GitHub Check: Ruff Style Check (3.13)
🔇 Additional comments (19)
src/frontend/package.json (1)
3-3: Confirm version bump in frontend
Version updated to "1.4.3" to align with backend and root project.src/backend/base/pyproject.toml (1)
3-3: Bump base package version to 0.4.3
Updatedversionfrom "0.4.2" to "0.4.3" to maintain consistency across packages.pyproject.toml (2)
3-3: Update root project version to 1.4.3
Bumpedversionfrom "1.4.2" to "1.4.3" in sync with frontend and base.
20-20: Upgrade langflow-base dependency to 0.4.3
Updated thelangflow-baserequirement to "0.4.3" to match the new base package version.docs/css/custom.css (1)
400-412: Excellent accessibility and layout improvements!The flexbox layout with centered alignment improves visual consistency, and the
focus-visiblepseudo-class provides better keyboard navigation support while avoiding unwanted focus rings on mouse interactions.src/frontend/src/customization/feature-flags.ts (1)
3-3: Feature flag update aligns with PR objectives.The disabling of
ENABLE_LANGFLOW_STOREis consistent with the coordinated changes across multiple frontend components to control store-related UI elements.src/frontend/src/pages/FlowPage/components/flowSidebarComponent/components/sidebarFooterButtons/index.tsx (1)
5-5: Good addition of feature flag control.The import properly brings in the feature flag for conditional rendering control.
src/frontend/src/components/core/folderSidebarComponent/components/sideBarFolderButtons/index.tsx (1)
476-477:Details
✅ Verification successful
Verify the feature flag logic inversion is intentional.
The condition changed from
!ENABLE_DATASTAX_LANGFLOWtoENABLE_DATASTAX_LANGFLOW, which inverts the display logic. SinceENABLE_DATASTAX_LANGFLOWisfalse, this meansCustomStoreButtonwill now be hidden instead of shown.Please confirm this behavioral change is intentional, as it significantly alters when the store button appears.
🏁 Script executed:
#!/bin/bash # Description: Verify usage of ENABLE_DATASTAX_LANGFLOW flag and CustomStoreButton component # Expected: Find other usages to understand the intended behavior # Search for other usages of ENABLE_DATASTAX_LANGFLOW flag echo "=== ENABLE_DATASTAX_LANGFLOW flag usage ===" rg "ENABLE_DATASTAX_LANGFLOW" -A 2 -B 2 echo -e "\n=== CustomStoreButton component usage ===" rg "CustomStoreButton" -A 2 -B 2Length of output: 16055
Feature flag logic inversion is intentional.
The
{ENABLE_DATASTAX_LANGFLOW && <CustomStoreButton />}change matches the cleanup pattern used elsewhere (e.g. in SettingsPage with a similar// TODO: Remove this on cleanup), so displaying the new button only when the flag is true is deliberate and aligns with other flag-based branches. No further action required.src/frontend/src/pages/MainPage/pages/homePage/index.tsx (3)
7-10: LGTM: Feature flag import added correctly.The addition of
ENABLE_MCPto the import statement aligns with the new conditional logic introduced in the component.
248-248: LGTM: Container styling updated consistently.The addition of
flex h-full flex-colclasses provides proper flex layout structure for the content container.
296-296: Verify the significant padding increase is intentional.The padding change from
pt-2(8px) topt-24(96px) is quite substantial. This increases the top spacing dramatically for empty state messages.Please confirm this large padding increase aligns with the design requirements, as it significantly changes the visual layout of empty states.
Also applies to: 307-307
src/frontend/src/customization/components/custom-store-sidebar.tsx (2)
3-6: LGTM: Function signature enhanced with meaningful parameters.The addition of optional boolean parameters with default values maintains backward compatibility while enabling dynamic sidebar configuration based on feature availability.
7-35: LGTM: Dynamic sidebar item construction implemented correctly.The conditional logic cleanly builds the sidebar items array based on the provided flags. The implementation is straightforward and maintains the expected structure for each sidebar item.
src/frontend/src/pages/SettingsPage/index.tsx (1)
6-6: LGTM: Feature flag import added for dynamic sidebar configuration.The addition of
ENABLE_LANGFLOW_STOREimport enables conditional rendering of store-related sidebar items.src/backend/base/langflow/initial_setup/starter_projects/Pokédex Agent.json (1)
925-925: Confirm only formatting changes in code valueThe update to the
APIRequestcomponent’s"code".valueis purely a reserialization/formatting adjustment within the JSON. There are no semantic or functional modifications in the starter project.src/backend/base/langflow/services/settings/base.py (1)
137-137: LGTM! Clean configuration addition.The new
disable_track_apikey_usagesetting follows the established pattern and provides a safe default value. This will help address database contention issues under high concurrency scenarios.docs/docs/Contributing/contributing-how-to-contribute.md (1)
25-28: Excellent improvement to contributor guidance.The placeholder clarifications make the git remote setup instructions much clearer for new contributors.
docs/docs/Configuration/environment-variables.md (1)
194-194: LGTM! Comprehensive documentation of the new environment variable.The documentation entry accurately describes the new setting and clearly explains its purpose for high concurrency scenarios. The format is consistent with other entries in the table.
src/backend/base/langflow/services/database/models/api_key/crud.py (1)
12-12: LGTM: Clean import addition for settings service.The import of
get_settings_serviceis correctly added to support the new conditional tracking feature.
| settings_service = get_settings_service() | ||
| if settings_service.settings.disable_track_apikey_usage is not True: | ||
| await update_total_uses(api_key_object.id) |
There was a problem hiding this comment.
💡 Verification agent
🧩 Analysis chain
Reconsider the synchronous approach for performance.
The change from asynchronous fire-and-forget to synchronous conditional tracking introduces a performance concern. The API key validation now blocks on database updates, potentially increasing response times and database connection hold time.
Consider these improvements:
-
Clarify the boolean condition - Use
not settings_service.settings.disable_track_apikey_usageinstead ofis not Truefor better readability. -
Restore async behavior while respecting the setting - The original fire-and-forget approach was likely better for performance:
- settings_service = get_settings_service()
- if settings_service.settings.disable_track_apikey_usage is not True:
- await update_total_uses(api_key_object.id)
+ settings_service = get_settings_service()
+ if not settings_service.settings.disable_track_apikey_usage:
+ # Fire-and-forget to avoid blocking API key validation
+ asyncio.create_task(update_total_uses(api_key_object.id))The AI summary mentions this change is to "reduce database contention under high concurrency," but the synchronous approach might actually increase contention. Can you verify the original performance issue and confirm this approach addresses it effectively?
🏁 Script executed:
#!/usr/bin/env bash
# Locate and display the definition of update_total_uses for inspection
rg "async def update_total_uses" -n
# Show the first 20 lines of the implementation
rg -n "async def update_total_uses" -A 20 -m 1Length of output: 1457
Avoid blocking API key validation on DB update
The current code awaits the update_total_uses call, which holds up the request until the DB commit completes. To improve readability and prevent added latency under load, please:
- Simplify the condition:
- if settings_service.settings.disable_track_apikey_usage is not True:
- if not settings_service.settings.disable_track_apikey_usage:
- Fire-and-forget the update instead of awaiting it, for example:
-
if not settings_service.settings.disable_track_apikey_usage: -
await update_total_uses(api_key_object.id)
-
if not settings_service.settings.disable_track_apikey_usage: -
# Schedule DB update in background so validation isn’t delayed -
import asyncio -
asyncio.create_task(update_total_uses(api_key_object.id))
- (Optional) For more robust background processing, consider FastAPI’s
BackgroundTasksor an external queue/worker.
File: src/backend/base/langflow/services/database/models/api_key/crud.py
Lines: ~57–59
🤖 Prompt for AI Agents
In src/backend/base/langflow/services/database/models/api_key/crud.py around
lines 57 to 59, the code currently awaits the update_total_uses call, causing
the API key validation to block on the database update and potentially increase
latency. To fix this, simplify the condition by replacing "is not True" with
"not" for better readability, and change the update_total_uses call to
fire-and-forget by not awaiting it. Optionally, consider using FastAPI's
BackgroundTasks or an external worker queue for more robust asynchronous
processing.
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (4)
docs/docs/Contributing/contributing-how-to-contribute.md (2)
25-29: Refactor step instructions as nested list
Indent the placeholder replacements under step 2 to improve readability and reflect proper Markdown nesting.-2. Add the new remote to your local repository on your local machine: -Replace `YOUR_FORK_NAME` with a name for your fork. -Replace `YOUR_GIT_USERNAME` with your Git username. -```bash -git remote add YOUR_FORK_NAME https://github.com/YOUR_GIT_USERNAME/langflow.git -``` +2. Add the new remote to your local repository on your local machine: + * Replace `YOUR_FORK_NAME` with a name for your fork. + * Replace `YOUR_GIT_USERNAME` with your Git username. + ```bash + git remote add YOUR_FORK_NAME https://github.com/YOUR_GIT_USERNAME/langflow.git + ```
119-122: Use consistent asterisk-style bullets
Change the list markers from dashes to asterisks to match the existing Markdown style earlier in the document.-## Additional contribution guides - -- [Contribute Bundles](./contributing-bundles.md) -- [Contribute Components](./contributing-components.md) -- [Contribute Tests](./contributing-component-tests.md) -- [Contribute Templates](./contributing-templates.md) +## Additional contribution guides + +* [Contribute Bundles](./contributing-bundles.md) +* [Contribute Components](./contributing-components.md) +* [Contribute Tests](./contributing-component-tests.md) +* [Contribute Templates](./contributing-templates.md)🧰 Tools
🪛 markdownlint-cli2 (0.17.2)
119-119: Unordered list style
Expected: asterisk; Actual: dash(MD004, ul-style)
120-120: Unordered list style
Expected: asterisk; Actual: dash(MD004, ul-style)
121-121: Unordered list style
Expected: asterisk; Actual: dash(MD004, ul-style)
122-122: Unordered list style
Expected: asterisk; Actual: dash(MD004, ul-style)
src/frontend/src/components/core/folderSidebarComponent/components/sideBarFolderButtons/index.tsx (1)
476-477: Logic inversion may cause confusion.The condition was changed from
!ENABLE_DATASTAX_LANGFLOWtoENABLE_DATASTAX_LANGFLOW, which inverts the display logic. SinceENABLE_DATASTAX_LANGFLOWis currentlyfalse(from the relevant code snippets), this effectively hides theCustomStoreButton.The TODO comment suggests this is temporary, but the logic inversion could be confusing for other developers.
Consider adding a more descriptive comment explaining the intention:
- {/* TODO: Remove this on cleanup */} + {/* TODO: Remove this on cleanup - temporarily showing store button only when DataStax Langflow is enabled */} {ENABLE_DATASTAX_LANGFLOW && <CustomStoreButton />}src/frontend/src/pages/SettingsPage/index.tsx (1)
74-78: Temporary code with cleanup reminderThe TODO comment indicates this is temporary code. The function call correctly passes
truefor API keys (always available) and the feature flag value for store availability.Consider adding a GitHub issue or ticket reference to the TODO comment for better tracking:
- // TODO: Remove this on cleanup + // TODO: Remove this on cleanup - Issue #XXXX
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (2)
src/frontend/package-lock.jsonis excluded by!**/package-lock.jsonuv.lockis excluded by!**/*.lock
📒 Files selected for processing (20)
.github/workflows/release.yml(0 hunks)docs/css/custom.css(1 hunks)docs/docs/Configuration/environment-variables.md(1 hunks)docs/docs/Contributing/contributing-how-to-contribute.md(2 hunks)pyproject.toml(2 hunks)src/backend/base/langflow/custom/custom_component/component.py(0 hunks)src/backend/base/langflow/custom/utils.py(1 hunks)src/backend/base/langflow/initial_setup/starter_projects/Pokédex Agent.json(1 hunks)src/backend/base/langflow/services/database/models/api_key/crud.py(2 hunks)src/backend/base/langflow/services/settings/base.py(1 hunks)src/backend/base/langflow/template/field/base.py(0 hunks)src/backend/base/pyproject.toml(1 hunks)src/backend/tests/unit/test_schema.py(0 hunks)src/frontend/package.json(2 hunks)src/frontend/src/components/core/folderSidebarComponent/components/sideBarFolderButtons/index.tsx(1 hunks)src/frontend/src/customization/components/custom-store-sidebar.tsx(3 hunks)src/frontend/src/customization/feature-flags.ts(1 hunks)src/frontend/src/pages/FlowPage/components/flowSidebarComponent/components/sidebarFooterButtons/index.tsx(2 hunks)src/frontend/src/pages/MainPage/pages/homePage/index.tsx(5 hunks)src/frontend/src/pages/SettingsPage/index.tsx(2 hunks)
💤 Files with no reviewable changes (4)
- src/backend/tests/unit/test_schema.py
- src/backend/base/langflow/template/field/base.py
- src/backend/base/langflow/custom/custom_component/component.py
- .github/workflows/release.yml
🧰 Additional context used
🧬 Code Graph Analysis (5)
src/frontend/src/components/core/folderSidebarComponent/components/sideBarFolderButtons/index.tsx (2)
src/frontend/src/customization/feature-flags.ts (1)
ENABLE_DATASTAX_LANGFLOW(10-10)src/frontend/src/customization/components/custom-store-button.tsx (1)
CustomStoreButton(4-21)
src/frontend/src/pages/FlowPage/components/flowSidebarComponent/components/sidebarFooterButtons/index.tsx (1)
src/frontend/src/customization/feature-flags.ts (1)
ENABLE_LANGFLOW_STORE(3-3)
src/backend/base/langflow/services/database/models/api_key/crud.py (1)
src/backend/base/langflow/services/deps.py (2)
get_settings_service(117-130)session_scope(157-179)
src/frontend/src/pages/SettingsPage/index.tsx (2)
src/frontend/src/customization/feature-flags.ts (2)
ENABLE_DATASTAX_LANGFLOW(10-10)ENABLE_LANGFLOW_STORE(3-3)src/frontend/src/customization/components/custom-store-sidebar.tsx (1)
CustomStoreSidebar(3-36)
src/frontend/src/pages/MainPage/pages/homePage/index.tsx (1)
src/frontend/src/customization/feature-flags.ts (1)
ENABLE_MCP(16-16)
🪛 markdownlint-cli2 (0.17.2)
docs/docs/Contributing/contributing-how-to-contribute.md
119-119: Unordered list style
Expected: asterisk; Actual: dash
(MD004, ul-style)
120-120: Unordered list style
Expected: asterisk; Actual: dash
(MD004, ul-style)
121-121: Unordered list style
Expected: asterisk; Actual: dash
(MD004, ul-style)
122-122: Unordered list style
Expected: asterisk; Actual: dash
(MD004, ul-style)
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: Optimize new Python code in this PR
🔇 Additional comments (20)
src/backend/base/langflow/initial_setup/starter_projects/Pokédex Agent.json (1)
925-925: Formatting-only update for embedded component code
The change adjusts indentation/whitespace in the multiline string under thevaluefield of thecodeproperty. No functional logic was modified.docs/docs/Contributing/contributing-how-to-contribute.md (1)
119-122:Details
✅ Verification successful
Verify linked guide files exist
Ensure all referenced Markdown files are present in thedocs/docs/Contributingdirectory.
🏁 Script executed:
#!/bin/bash # Verify existence of additional contribution guide files FILES=( docs/docs/Contributing/contributing-bundles.md docs/docs/Contributing/contributing-components.md docs/docs/Contributing/contributing-component-tests.md docs/docs/Contributing/contributing-templates.md ) missing=false for f in "${FILES[@]}"; do if [ ! -f "$f" ]; then echo "Missing file: $f" missing=true fi done if [ "$missing" = true ]; then exit 1 else echo "All referenced guide files are present." fiLength of output: 707
All referenced guide files are present
No missing files were detected indocs/docs/Contributing. All four guides (contributing-bundles.md,contributing-components.md,contributing-component-tests.md,contributing-templates.md) exist as expected.🧰 Tools
🪛 markdownlint-cli2 (0.17.2)
119-119: Unordered list style
Expected: asterisk; Actual: dash(MD004, ul-style)
120-120: Unordered list style
Expected: asterisk; Actual: dash(MD004, ul-style)
121-121: Unordered list style
Expected: asterisk; Actual: dash(MD004, ul-style)
122-122: Unordered list style
Expected: asterisk; Actual: dash(MD004, ul-style)
src/backend/base/pyproject.toml (1)
3-3: Bump backend base version to 0.4.3
Version increment aligns with the coordinated release across frontend and root projects.pyproject.toml (2)
3-3: Update project version to 1.4.3
Matches the release version bump in frontend and backend-base.
20-20: Synchronizelangflow-basedependency to 0.4.3
Ensures the root package depends on the updated backend-base version.src/frontend/package.json (1)
3-3: Frontend version bumped to 1.4.3
Consistent with the coordinated release versioning.src/backend/base/langflow/services/settings/base.py (1)
137-137:Details
✅ Verification successful
Add
disable_track_apikey_usagesetting
Introduces a flag to opt out of API key usage tracking under high concurrency. Verify that downstream CRUD logic correctly respects this flag.Run the following to confirm the flag is checked in the CRUD implementation:
🏁 Script executed:
#!/bin/bash # Verify disable_track_apikey_usage is used in the API key CRUD logic rg -n "disable_track_apikey_usage" src/backend/base/langflow/services/database/models/api_key/crud.pyLength of output: 181
Disable tracking flag is respected in CRUD logic
Thedisable_track_apikey_usagesetting is correctly checked in the API key CRUD implementation. No further changes are needed.• src/backend/base/langflow/services/database/models/api_key/crud.py:58
docs/docs/Configuration/environment-variables.md (1)
194-194: Ensure.env.exampleincludes the new env var
The documentation now documentsLANGFLOW_DISABLE_TRACK_APIKEY_USAGEbut the.env.examplefile should also be updated accordingly.src/backend/base/langflow/services/database/models/api_key/crud.py (2)
12-12: LGTM: Import changes support the new functionality.The addition of
get_settings_serviceandsession_scopeimports aligns with the refactored API key usage tracking logic.
57-59:Details
❓ Verification inconclusive
Verify the performance impact of synchronous API key usage updates.
The change from asynchronous task-based updates to synchronous execution could impact API response times, especially under high load. While the conditional logic correctly implements the feature flag, consider the latency implications.
🏁 Script executed:
#!/bin/bash # Description: Check if there are any remaining references to the removed async task management # Expected: No references to update_total_uses_tasks or background task creation for API key updates echo "Searching for removed async task patterns..." rg -A 3 -B 3 "update_total_uses_tasks|create_task.*update_total_uses|asyncio\.create_task" echo "Verifying the settings service integration..." rg -A 5 "disable_track_apikey_usage"Length of output: 21314
Evaluate performance impact of synchronous API key usage updates
We confirmed there are no leftover async‐task calls for API key updates (no
update_total_uses_tasksorasyncio.create_taskpatterns) and thedisable_track_apikey_usageflag is correctly defined and applied insrc/backend/base/langflow/services/database/models/api_key/crud.py.That said, inlining
await update_total_uses(...)in the request flow may increase API latency under load. Please:
- Run targeted benchmarks or load tests on the affected endpoint to measure response‐time impact.
- Verify that performance remains within acceptable SLAs when tracking is enabled.
- Optionally consider moving the update back to a background worker or batching updates if latency becomes a concern.
src/frontend/src/customization/feature-flags.ts (1)
3-3: Clean feature flag toggle.The change from
truetofalseeffectively disables the Langflow Store feature across the frontend. This appears to be coordinated with conditional checks added in other components.src/frontend/src/pages/FlowPage/components/flowSidebarComponent/components/sidebarFooterButtons/index.tsx (2)
5-5: Good addition of feature flag import.The import follows the established pattern and supports the conditional rendering below.
15-16: Well-implemented feature gating.Adding the
ENABLE_LANGFLOW_STOREcheck creates a clean double-gated condition. Since the flag is currentlyfalse, this effectively disables the store button regardless of thehasStorevalue, which aligns with the overall feature toggle strategy across the codebase.docs/css/custom.css (2)
401-407: Excellent flexbox layout improvement.The change from fixed width and padding to flexbox layout with proper alignment provides better responsiveness and visual consistency. The
list-style: noneandoutline: nonehelp create a cleaner appearance for interactive summary elements.
409-412: Great accessibility enhancement.Adding
focus-visiblestyles with proper outline and offset significantly improves keyboard navigation accessibility. This follows modern web accessibility best practices for interactive elements.src/frontend/src/pages/MainPage/pages/homePage/index.tsx (3)
7-10: LGTM - Clean feature flag integrationThe addition of
ENABLE_MCPimport aligns well with the existing feature flag pattern.
248-248: LGTM - Appropriate flexbox layoutAdding
flex h-full flex-colclasses provides proper vertical layout structure for the container.
296-296: Significant padding increase - verify design intentThe padding was increased dramatically from
pt-2(0.5rem) topt-24(6rem). This is a 12x increase that will push the "no flows/components" messages much further down the page.Confirm this substantial visual change aligns with the intended design and doesn't negatively impact user experience, especially on smaller screens.
Also applies to: 307-307
src/frontend/src/pages/SettingsPage/index.tsx (1)
6-6: LGTM - Feature flag import addedClean addition of the
ENABLE_LANGFLOW_STOREfeature flag import.src/frontend/src/customization/components/custom-store-sidebar.tsx (1)
3-36: Excellent refactor for dynamic sidebar contentGreat improvement! The function is now much more flexible and reusable:
✅ Conditional item inclusion based on feature availability
✅ Default parameter values ensure backward compatibility
✅ Clear, readable logic with proper separation of concerns
✅ Maintains existing item structure for seamless integrationThis change enables proper feature flag-driven UI behavior and makes the sidebar content truly dynamic.
| flows?.find( | ||
| (flow) => | ||
| flow.folder_id === (folderId ?? myCollectionId) && | ||
| (ENABLE_MCP ? flow.is_component === false : true), | ||
| ) === undefined; |
There was a problem hiding this comment.
💡 Verification agent
🧩 Analysis chain
Verify flow filtering logic consistency
The conditional filtering logic looks correct, but ensure this aligns with other parts of the codebase that determine flow visibility. When ENABLE_MCP is true, only flows (not components) are considered for the empty folder check.
🏁 Script executed:
#!/bin/bash
# Search for other instances of similar flow filtering logic to ensure consistency
rg -A 3 -B 3 "is_component.*===.*false" --type tsx --type ts
rg -A 3 -B 3 "flow\.is_component" --type tsx --type tsLength of output: 175
🏁 Script executed:
#!/bin/bash
# Re-run search for flow.is_component and ENABLE_MCP across TS/TSX files using glob patterns
rg -g '*.ts' -g '*.tsx' -A3 -B3 "flow.is_component"
rg -g '*.ts' -g '*.tsx' -A3 -B3 "ENABLE_MCP"Length of output: 7179
Review flow filtering logic for consistency
We’ve identified two distinct filtering conditions in src/frontend/src/pages/MainPage/pages/homePage/index.tsx:
- Empty-folder check (lines 83–87):
flows?.find( flow => flow.folder_id === (folderId ?? myCollectionId) && (ENABLE_MCP ? flow.is_component === false : true), ) === undefined;
- View-toggle check later in the same file:
flows?.find( flow => flow.folder_id === (folderId ?? myCollectionId) && flow.is_component === (flowType === "components"), ) === undefined;
These differ when ENABLE_MCP is true and flowType === "components". If you’re viewing components, the empty-folder logic still ignores components (since it only checks is_component === false), which may disable drop targets incorrectly.
Please confirm whether empty-folder checks should respect the current flowType (i.e. include components when viewing “components”), and adjust one of the predicates to match the other for consistent folder-empty behavior.
🤖 Prompt for AI Agents
In src/frontend/src/pages/MainPage/pages/homePage/index.tsx around lines 83 to
87, the empty-folder check filtering logic does not consider the current
flowType when ENABLE_MCP is true, causing inconsistency with the later
view-toggle check. To fix this, update the empty-folder check predicate to
include flows where flow.is_component matches whether flowType is "components",
aligning it with the view-toggle check logic. This ensures that when viewing
components, the empty-folder check includes components correctly and maintains
consistent folder-empty behavior.
8b7869c to
ea4d16e
Compare
ea4d16e to
67fcbad
Compare
…e builder - Added checks to ensure selected output is valid before attempting to set its state. - Enhanced code readability with comments explaining the logic for selecting outputs.
…8400) * Fixed bug where starter projects were refactored incorrectly * fix: improve handling of selected outputs in custom component template builder - Added checks to ensure selected output is valid before attempting to set its state. - Enhanced code readability with comments explaining the logic for selecting outputs. * Set selected output as the previous selected output * Update base.py --------- Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org> Co-authored-by: Edwin Jose <edwin.jose@datastax.com>
…8400) * Fixed bug where starter projects were refactored incorrectly * fix: improve handling of selected outputs in custom component template builder - Added checks to ensure selected output is valid before attempting to set its state. - Enhanced code readability with comments explaining the logic for selecting outputs. * Set selected output as the previous selected output * Update base.py --------- Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org> Co-authored-by: Edwin Jose <edwin.jose@datastax.com>
* update SaaS, Social Media, and YouTube json file * fix: make starter projects auto refactor not remove selected output (#8400) * Fixed bug where starter projects were refactored incorrectly * fix: improve handling of selected outputs in custom component template builder - Added checks to ensure selected output is valid before attempting to set its state. - Enhanced code readability with comments explaining the logic for selecting outputs. * Set selected output as the previous selected output * Update base.py --------- Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org> Co-authored-by: Edwin Jose <edwin.jose@datastax.com> * fix: made clean edges clean after changing dropdown of output (#8460) fixed output considering all outputs not just selected one * refactor(docker): remove --extra deploy flag from uv sync commands (#8485) 🔧 (build_and_push_with_extras.Dockerfile): remove unnecessary uv sync command options to improve build efficiency and reduce redundancy Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org> * fix: refactor mcp and freeze tests to be less prone to flaky results (#8486) * Fixed mcp test to be less prone to errors * Fix freeze spec * fix: made button disabled state more congruent, made edit flow details submit on enter (#8339) * Changed textarea classes * Changed flowsettingscomponent to use form * changed edit flow settings to use form and to submit on enter * Reset form data on close * Updated disabled state to have lower opacity instead of to have set background * Fixed loading state of button * Fix: chat memory store issue and fix output types (#8463) * fix chat memory * update template * update update outputs * update update outputs --------- Co-authored-by: Edwin Jose <edwin.jose@datastax.com> * ci: update setup-uv to possibly fix caching (#8490) * update json * fix custom component * revert change --------- Co-authored-by: Lucas Oliveira <62335616+lucaseduoli@users.noreply.github.com> Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org> Co-authored-by: Edwin Jose <edwin.jose@datastax.com> Co-authored-by: Cristhian Zanforlin Lousa <cristhian.lousa@gmail.com>
* Update Vector Store RAG.json * fix: make starter projects auto refactor not remove selected output (#8400) * Fixed bug where starter projects were refactored incorrectly * fix: improve handling of selected outputs in custom component template builder - Added checks to ensure selected output is valid before attempting to set its state. - Enhanced code readability with comments explaining the logic for selecting outputs. * Set selected output as the previous selected output * Update base.py --------- Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org> Co-authored-by: Edwin Jose <edwin.jose@datastax.com> * fix: made clean edges clean after changing dropdown of output (#8460) fixed output considering all outputs not just selected one * refactor(docker): remove --extra deploy flag from uv sync commands (#8485) 🔧 (build_and_push_with_extras.Dockerfile): remove unnecessary uv sync command options to improve build efficiency and reduce redundancy Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org> * fix: refactor mcp and freeze tests to be less prone to flaky results (#8486) * Fixed mcp test to be less prone to errors * Fix freeze spec * fix: made button disabled state more congruent, made edit flow details submit on enter (#8339) * Changed textarea classes * Changed flowsettingscomponent to use form * changed edit flow settings to use form and to submit on enter * Reset form data on close * Updated disabled state to have lower opacity instead of to have set background * Fixed loading state of button * Fix: chat memory store issue and fix output types (#8463) * fix chat memory * update template * update update outputs * update update outputs --------- Co-authored-by: Edwin Jose <edwin.jose@datastax.com> * ci: update setup-uv to possibly fix caching (#8490) * update templates * update templates * First round of template updates * Update templates * fix: Update SaaS, Social Media, and YouTube json file (#8441) * update SaaS, Social Media, and YouTube json file * fix: make starter projects auto refactor not remove selected output (#8400) * Fixed bug where starter projects were refactored incorrectly * fix: improve handling of selected outputs in custom component template builder - Added checks to ensure selected output is valid before attempting to set its state. - Enhanced code readability with comments explaining the logic for selecting outputs. * Set selected output as the previous selected output * Update base.py --------- Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org> Co-authored-by: Edwin Jose <edwin.jose@datastax.com> * fix: made clean edges clean after changing dropdown of output (#8460) fixed output considering all outputs not just selected one * refactor(docker): remove --extra deploy flag from uv sync commands (#8485) 🔧 (build_and_push_with_extras.Dockerfile): remove unnecessary uv sync command options to improve build efficiency and reduce redundancy Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org> * fix: refactor mcp and freeze tests to be less prone to flaky results (#8486) * Fixed mcp test to be less prone to errors * Fix freeze spec * fix: made button disabled state more congruent, made edit flow details submit on enter (#8339) * Changed textarea classes * Changed flowsettingscomponent to use form * changed edit flow settings to use form and to submit on enter * Reset form data on close * Updated disabled state to have lower opacity instead of to have set background * Fixed loading state of button * Fix: chat memory store issue and fix output types (#8463) * fix chat memory * update template * update update outputs * update update outputs --------- Co-authored-by: Edwin Jose <edwin.jose@datastax.com> * ci: update setup-uv to possibly fix caching (#8490) * update json * fix custom component * revert change --------- Co-authored-by: Lucas Oliveira <62335616+lucaseduoli@users.noreply.github.com> Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org> Co-authored-by: Edwin Jose <edwin.jose@datastax.com> Co-authored-by: Cristhian Zanforlin Lousa <cristhian.lousa@gmail.com> * fix: templates (#8499) * basic-prompting-template-updated * show-system-message * names * blog-writer-tested * financial-report-parser * image-sentiment-analysis * seo-keyword-generator * seo-keyword-generator * Merge branch 'fix-vector-search-template' into mendons-template-branch --------- Co-authored-by: Eric Hare <ericrhare@gmail.com> * Update Basic Prompting.json * Update Blog Writer.json * Further template updates * Update Image Sentiment Analysis.json * Update templates * Update Financial Report Parser.json * Update Market Research.json * Update Market Research.json * Update Image Sentiment Analysis.json * Update Market Research.json * Update image sentiment analysis template * Update Market Research.json * Update Custom Component Maker.json * Update Custom Component Maker.json * Update Hybrid Search RAG.json * Update Hybrid Search RAG.json * Update Hybrid Search RAG.json * More template updates * Update Financial Report Parser.json * Update Custom Component Maker.json * Template updates * Update Custom Component Maker.json * Template updates * fix custom component * Update Financial Agent.json * More template updates * finance report parser fix --------- Co-authored-by: Yuqi Tang <yuqi.tang@datastax.com> Co-authored-by: Edwin Jose <edwin.jose@datastax.com> Co-authored-by: Lucas Oliveira <62335616+lucaseduoli@users.noreply.github.com> Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org> Co-authored-by: Cristhian Zanforlin Lousa <cristhian.lousa@gmail.com> Co-authored-by: Mendon Kissling <59585235+mendonk@users.noreply.github.com> Co-authored-by: Mike Fortman <michael.fortman@datastax.com>
* Update Vector Store RAG.json * fix: make starter projects auto refactor not remove selected output (#8400) * Fixed bug where starter projects were refactored incorrectly * fix: improve handling of selected outputs in custom component template builder - Added checks to ensure selected output is valid before attempting to set its state. - Enhanced code readability with comments explaining the logic for selecting outputs. * Set selected output as the previous selected output * Update base.py --------- Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org> Co-authored-by: Edwin Jose <edwin.jose@datastax.com> * fix: made clean edges clean after changing dropdown of output (#8460) fixed output considering all outputs not just selected one * refactor(docker): remove --extra deploy flag from uv sync commands (#8485) 🔧 (build_and_push_with_extras.Dockerfile): remove unnecessary uv sync command options to improve build efficiency and reduce redundancy Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org> * fix: refactor mcp and freeze tests to be less prone to flaky results (#8486) * Fixed mcp test to be less prone to errors * Fix freeze spec * fix: made button disabled state more congruent, made edit flow details submit on enter (#8339) * Changed textarea classes * Changed flowsettingscomponent to use form * changed edit flow settings to use form and to submit on enter * Reset form data on close * Updated disabled state to have lower opacity instead of to have set background * Fixed loading state of button * Fix: chat memory store issue and fix output types (#8463) * fix chat memory * update template * update update outputs * update update outputs --------- Co-authored-by: Edwin Jose <edwin.jose@datastax.com> * ci: update setup-uv to possibly fix caching (#8490) * update templates * update templates * First round of template updates * Update templates * fix: Update SaaS, Social Media, and YouTube json file (#8441) * update SaaS, Social Media, and YouTube json file * fix: make starter projects auto refactor not remove selected output (#8400) * Fixed bug where starter projects were refactored incorrectly * fix: improve handling of selected outputs in custom component template builder - Added checks to ensure selected output is valid before attempting to set its state. - Enhanced code readability with comments explaining the logic for selecting outputs. * Set selected output as the previous selected output * Update base.py --------- Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org> Co-authored-by: Edwin Jose <edwin.jose@datastax.com> * fix: made clean edges clean after changing dropdown of output (#8460) fixed output considering all outputs not just selected one * refactor(docker): remove --extra deploy flag from uv sync commands (#8485) 🔧 (build_and_push_with_extras.Dockerfile): remove unnecessary uv sync command options to improve build efficiency and reduce redundancy Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org> * fix: refactor mcp and freeze tests to be less prone to flaky results (#8486) * Fixed mcp test to be less prone to errors * Fix freeze spec * fix: made button disabled state more congruent, made edit flow details submit on enter (#8339) * Changed textarea classes * Changed flowsettingscomponent to use form * changed edit flow settings to use form and to submit on enter * Reset form data on close * Updated disabled state to have lower opacity instead of to have set background * Fixed loading state of button * Fix: chat memory store issue and fix output types (#8463) * fix chat memory * update template * update update outputs * update update outputs --------- Co-authored-by: Edwin Jose <edwin.jose@datastax.com> * ci: update setup-uv to possibly fix caching (#8490) * update json * fix custom component * revert change --------- Co-authored-by: Lucas Oliveira <62335616+lucaseduoli@users.noreply.github.com> Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org> Co-authored-by: Edwin Jose <edwin.jose@datastax.com> Co-authored-by: Cristhian Zanforlin Lousa <cristhian.lousa@gmail.com> * fix: templates (#8499) * basic-prompting-template-updated * show-system-message * names * blog-writer-tested * financial-report-parser * image-sentiment-analysis * seo-keyword-generator * seo-keyword-generator * Merge branch 'fix-vector-search-template' into mendons-template-branch --------- Co-authored-by: Eric Hare <ericrhare@gmail.com> * Update Basic Prompting.json * Update Blog Writer.json * Further template updates * Update Image Sentiment Analysis.json * Update templates * Update Financial Report Parser.json * Update Market Research.json * Update Market Research.json * update several templates * Update Image Sentiment Analysis.json * Update Market Research.json * Update image sentiment analysis template * Update Market Research.json * Update Custom Component Maker.json * Update Custom Component Maker.json * Update Hybrid Search RAG.json * Update Hybrid Search RAG.json * Update Hybrid Search RAG.json * More template updates * Update Financial Report Parser.json * updated templates * change custom component maker * Update Twitter Thread Generator.json * updates from main * change model * Update Research Translation Loop.json * expanded output component to fix tests * update template * autofix * fix error * fix change back * change back * ci: Skip truncated values test for refactoring (#8670) * refactor: simplify init target by removing cache cleanup and adding pre-commit hook (#8590) * build: add pyyaml dependency * refactor: simplify init command by removing cache cleaning and langflow run call * refactor: simplify init target by removing cache cleanup and adding pre-commit hook * refactor: update langchain_core.prompts import paths to use specific modules --------- Co-authored-by: Edwin Jose <edwin.jose@datastax.com> * feat: update structured output to multiline input and revise system prompt (#8585) * Update structured_output.py * [autofix.ci] apply automated fixes * Update structured_output.py * [autofix.ci] apply automated fixes * [autofix.ci] apply automated fixes (attempt 2/3) * update to prompt * template updates * Update src/backend/base/langflow/components/processing/structured_output.py * [autofix.ci] apply automated fixes * Update src/backend/base/langflow/components/processing/structured_output.py * Update src/backend/base/langflow/components/processing/structured_output.py * Update src/backend/base/langflow/components/processing/structured_output.py * [autofix.ci] apply automated fixes --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> * feat: add sessions endpoint with session management enhancements (#8596) * 📝 (monitor.py): Add endpoint to get sessions and handle session_id encoding for API requests 📝 (use-get-messages-mutation.ts): Implement a mutation function to fetch messages with query parameters and handle session_id encoding for API requests 📝 (use-get-messages-polling.ts): Ensure proper encoding of session_id for API requests in polling mutation 📝 (use-get-messages.ts): Handle session_id encoding for API requests in messages query 📝 (new-modal.tsx): Implement functions to handle session deletion and proper encoding of session_id for API requests 📝 (utils.ts): Add functions to encode, decode, validate, format, and prepare session IDs for API requests * 📝 (constants.ts): Add SESSIONS constant to API URLs for monitoring sessions 🔧 (use-delete-messages.ts): Add queryClient to UseRequestProcessor to invalidate sessions query ✨ (use-get-sessions-from-flow.ts): Introduce useGetSessionsFromFlowQuery to fetch sessions from flow 🔧 (use-rename-session.ts): Change refetchQueries to invalidateQueries for useGetSessionsFromFlowQuery 🔧 (custom-new-modal.tsx): Update import path for IOModal to playground-modal 🔧 (session-selector.tsx): Add setActiveSession function to handle setting active session 🔧 (sidebar-open-view.tsx): Add setActiveSession function to handle setting active session ♻️ (new-modal.tsx): Refactor IOModal into playground-modal and update functionality ♻️ (playground-modal.tsx): Refactor IOModal to handle playground-specific functionality ⬆️ (flowStore.ts): Add newChatOnPlayground state and setNewChatOnPlayground function ⬆️ (index.ts): Update FlowStoreType to include newChatOnPlayground and setNewChatOnPlayground * 🔧 (pyproject.toml): update testpaths to point to the correct directory for tests ✨ (test_session_endpoint.py): add unit tests for sessions endpoint with flow_id filtering ♻️ (session-selector.tsx): refactor to trim editedSession before setting it ♻️ (sidebar-open-view.tsx): refactor to set visibleSession instead of activeSession * ✨ (use-get-sessions-from-flow.ts): Always include the flow ID as the default session if it's not already present ♻️ (playground-modal.tsx): Refactor setting sessions to include currentFlowId as the default session if not present, and handle visibility of sessions more efficiently * ♻️ (use-get-messages-mutation.ts): remove unused imports and refactor code for better readability and maintainability * ✨ (test_session_endpoint.py): refactor test function names for better clarity and consistency * ✨ (create-new-session-name.ts): add function to generate a new session name based on the current date and time 🔧 (playground-modal.tsx): import createNewSessionName function to dynamically set a new session name when no session is visible * [autofix.ci] apply automated fixes * ✨ (monitor.py): rename get_sessions endpoint to get_message_sessions for clarity and consistency 🔧 (constants.ts): remove unused SESSIONS constant from API URLs 🔧 (use-delete-messages.ts): remove commented out code and unnecessary comments ✨ (use-delete-sessions.ts): add functionality to delete sessions in frontend 🔧 (use-get-sessions-from-flow.ts): update API endpoint for getting sessions to match backend changes 🔧 (playground-modal.tsx): add functionality to delete sessions and associated messages in the UI, update UI optimistically, and handle errors appropriately * [autofix.ci] apply automated fixes * 🐛 (monitor.py): Fix type hinting issue in delete_messages function 📝 (monitor.py): Add comments and improve readability in test_messages_endpoints.py 📝 (session_endpoint.py): Update endpoint paths for consistency and clarity in test_session_endpoint.py * [autofix.ci] apply automated fixes * fix: update SQL statement to use col() for session_id filtering in get_message_sessions function --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org> * fix: implemented cached values and temporary MCP servers on MCP component (#8628) * Added actionCount to fetch only servers without actionCount * Updated queries and uses to use servers without action data first, and then to fetch them * removed comment * updated constants * Added loading dropdown * Make options persist * Implemented new value format for McpComponent and implemented saving and removing temp Mcp Server if config is existent * Changed value type * Implemented cache and saving the server config * Fixed mcp server test * fix backend formatting * fixed lint * Added await * Fixed save button not appearing when no servers are available * added condition to only show save button when options is not null * template autofix * change template * update text sentiment analysis * change basic prompt back * change image sentiment back * update text sentiment and twitter * Update Twitter Thread Generator.json * Add back the input for the chat * add change * fix text sentiment * update research translation * Update Research Translation Loop.json --------- Co-authored-by: Eric Hare <ericrhare@gmail.com> Co-authored-by: Edwin Jose <edwin.jose@datastax.com> Co-authored-by: Lucas Oliveira <62335616+lucaseduoli@users.noreply.github.com> Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org> Co-authored-by: Cristhian Zanforlin Lousa <cristhian.lousa@gmail.com> Co-authored-by: Mendon Kissling <59585235+mendonk@users.noreply.github.com> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
…angflow-ai#8400) * Fixed bug where starter projects were refactored incorrectly * fix: improve handling of selected outputs in custom component template builder - Added checks to ensure selected output is valid before attempting to set its state. - Enhanced code readability with comments explaining the logic for selecting outputs. * Set selected output as the previous selected output * Update base.py --------- Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org> Co-authored-by: Edwin Jose <edwin.jose@datastax.com>
* Update Vector Store RAG.json * fix: make starter projects auto refactor not remove selected output (langflow-ai#8400) * Fixed bug where starter projects were refactored incorrectly * fix: improve handling of selected outputs in custom component template builder - Added checks to ensure selected output is valid before attempting to set its state. - Enhanced code readability with comments explaining the logic for selecting outputs. * Set selected output as the previous selected output * Update base.py --------- Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org> Co-authored-by: Edwin Jose <edwin.jose@datastax.com> * fix: made clean edges clean after changing dropdown of output (langflow-ai#8460) fixed output considering all outputs not just selected one * refactor(docker): remove --extra deploy flag from uv sync commands (langflow-ai#8485) 🔧 (build_and_push_with_extras.Dockerfile): remove unnecessary uv sync command options to improve build efficiency and reduce redundancy Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org> * fix: refactor mcp and freeze tests to be less prone to flaky results (langflow-ai#8486) * Fixed mcp test to be less prone to errors * Fix freeze spec * fix: made button disabled state more congruent, made edit flow details submit on enter (langflow-ai#8339) * Changed textarea classes * Changed flowsettingscomponent to use form * changed edit flow settings to use form and to submit on enter * Reset form data on close * Updated disabled state to have lower opacity instead of to have set background * Fixed loading state of button * Fix: chat memory store issue and fix output types (langflow-ai#8463) * fix chat memory * update template * update update outputs * update update outputs --------- Co-authored-by: Edwin Jose <edwin.jose@datastax.com> * ci: update setup-uv to possibly fix caching (langflow-ai#8490) * update templates * update templates * First round of template updates * Update templates * fix: Update SaaS, Social Media, and YouTube json file (langflow-ai#8441) * update SaaS, Social Media, and YouTube json file * fix: make starter projects auto refactor not remove selected output (langflow-ai#8400) * Fixed bug where starter projects were refactored incorrectly * fix: improve handling of selected outputs in custom component template builder - Added checks to ensure selected output is valid before attempting to set its state. - Enhanced code readability with comments explaining the logic for selecting outputs. * Set selected output as the previous selected output * Update base.py --------- Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org> Co-authored-by: Edwin Jose <edwin.jose@datastax.com> * fix: made clean edges clean after changing dropdown of output (langflow-ai#8460) fixed output considering all outputs not just selected one * refactor(docker): remove --extra deploy flag from uv sync commands (langflow-ai#8485) 🔧 (build_and_push_with_extras.Dockerfile): remove unnecessary uv sync command options to improve build efficiency and reduce redundancy Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org> * fix: refactor mcp and freeze tests to be less prone to flaky results (langflow-ai#8486) * Fixed mcp test to be less prone to errors * Fix freeze spec * fix: made button disabled state more congruent, made edit flow details submit on enter (langflow-ai#8339) * Changed textarea classes * Changed flowsettingscomponent to use form * changed edit flow settings to use form and to submit on enter * Reset form data on close * Updated disabled state to have lower opacity instead of to have set background * Fixed loading state of button * Fix: chat memory store issue and fix output types (langflow-ai#8463) * fix chat memory * update template * update update outputs * update update outputs --------- Co-authored-by: Edwin Jose <edwin.jose@datastax.com> * ci: update setup-uv to possibly fix caching (langflow-ai#8490) * update json * fix custom component * revert change --------- Co-authored-by: Lucas Oliveira <62335616+lucaseduoli@users.noreply.github.com> Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org> Co-authored-by: Edwin Jose <edwin.jose@datastax.com> Co-authored-by: Cristhian Zanforlin Lousa <cristhian.lousa@gmail.com> * fix: templates (langflow-ai#8499) * basic-prompting-template-updated * show-system-message * names * blog-writer-tested * financial-report-parser * image-sentiment-analysis * seo-keyword-generator * seo-keyword-generator * Merge branch 'fix-vector-search-template' into mendons-template-branch --------- Co-authored-by: Eric Hare <ericrhare@gmail.com> * Update Basic Prompting.json * Update Blog Writer.json * Further template updates * Update Image Sentiment Analysis.json * Update templates * Update Financial Report Parser.json * Update Market Research.json * Update Market Research.json * Update Image Sentiment Analysis.json * Update Market Research.json * Update image sentiment analysis template * Update Market Research.json * Update Custom Component Maker.json * Update Custom Component Maker.json * Update Hybrid Search RAG.json * Update Hybrid Search RAG.json * Update Hybrid Search RAG.json * More template updates * Update Financial Report Parser.json * Update Custom Component Maker.json * Template updates * Update Custom Component Maker.json * Template updates * fix custom component * Update Financial Agent.json * More template updates * finance report parser fix --------- Co-authored-by: Yuqi Tang <yuqi.tang@datastax.com> Co-authored-by: Edwin Jose <edwin.jose@datastax.com> Co-authored-by: Lucas Oliveira <62335616+lucaseduoli@users.noreply.github.com> Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org> Co-authored-by: Cristhian Zanforlin Lousa <cristhian.lousa@gmail.com> Co-authored-by: Mendon Kissling <59585235+mendonk@users.noreply.github.com> Co-authored-by: Mike Fortman <michael.fortman@datastax.com>
* Update Vector Store RAG.json * fix: make starter projects auto refactor not remove selected output (langflow-ai#8400) * Fixed bug where starter projects were refactored incorrectly * fix: improve handling of selected outputs in custom component template builder - Added checks to ensure selected output is valid before attempting to set its state. - Enhanced code readability with comments explaining the logic for selecting outputs. * Set selected output as the previous selected output * Update base.py --------- Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org> Co-authored-by: Edwin Jose <edwin.jose@datastax.com> * fix: made clean edges clean after changing dropdown of output (langflow-ai#8460) fixed output considering all outputs not just selected one * refactor(docker): remove --extra deploy flag from uv sync commands (langflow-ai#8485) 🔧 (build_and_push_with_extras.Dockerfile): remove unnecessary uv sync command options to improve build efficiency and reduce redundancy Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org> * fix: refactor mcp and freeze tests to be less prone to flaky results (langflow-ai#8486) * Fixed mcp test to be less prone to errors * Fix freeze spec * fix: made button disabled state more congruent, made edit flow details submit on enter (langflow-ai#8339) * Changed textarea classes * Changed flowsettingscomponent to use form * changed edit flow settings to use form and to submit on enter * Reset form data on close * Updated disabled state to have lower opacity instead of to have set background * Fixed loading state of button * Fix: chat memory store issue and fix output types (langflow-ai#8463) * fix chat memory * update template * update update outputs * update update outputs --------- Co-authored-by: Edwin Jose <edwin.jose@datastax.com> * ci: update setup-uv to possibly fix caching (langflow-ai#8490) * update templates * update templates * First round of template updates * Update templates * fix: Update SaaS, Social Media, and YouTube json file (langflow-ai#8441) * update SaaS, Social Media, and YouTube json file * fix: make starter projects auto refactor not remove selected output (langflow-ai#8400) * Fixed bug where starter projects were refactored incorrectly * fix: improve handling of selected outputs in custom component template builder - Added checks to ensure selected output is valid before attempting to set its state. - Enhanced code readability with comments explaining the logic for selecting outputs. * Set selected output as the previous selected output * Update base.py --------- Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org> Co-authored-by: Edwin Jose <edwin.jose@datastax.com> * fix: made clean edges clean after changing dropdown of output (langflow-ai#8460) fixed output considering all outputs not just selected one * refactor(docker): remove --extra deploy flag from uv sync commands (langflow-ai#8485) 🔧 (build_and_push_with_extras.Dockerfile): remove unnecessary uv sync command options to improve build efficiency and reduce redundancy Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org> * fix: refactor mcp and freeze tests to be less prone to flaky results (langflow-ai#8486) * Fixed mcp test to be less prone to errors * Fix freeze spec * fix: made button disabled state more congruent, made edit flow details submit on enter (langflow-ai#8339) * Changed textarea classes * Changed flowsettingscomponent to use form * changed edit flow settings to use form and to submit on enter * Reset form data on close * Updated disabled state to have lower opacity instead of to have set background * Fixed loading state of button * Fix: chat memory store issue and fix output types (langflow-ai#8463) * fix chat memory * update template * update update outputs * update update outputs --------- Co-authored-by: Edwin Jose <edwin.jose@datastax.com> * ci: update setup-uv to possibly fix caching (langflow-ai#8490) * update json * fix custom component * revert change --------- Co-authored-by: Lucas Oliveira <62335616+lucaseduoli@users.noreply.github.com> Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org> Co-authored-by: Edwin Jose <edwin.jose@datastax.com> Co-authored-by: Cristhian Zanforlin Lousa <cristhian.lousa@gmail.com> * fix: templates (langflow-ai#8499) * basic-prompting-template-updated * show-system-message * names * blog-writer-tested * financial-report-parser * image-sentiment-analysis * seo-keyword-generator * seo-keyword-generator * Merge branch 'fix-vector-search-template' into mendons-template-branch --------- Co-authored-by: Eric Hare <ericrhare@gmail.com> * Update Basic Prompting.json * Update Blog Writer.json * Further template updates * Update Image Sentiment Analysis.json * Update templates * Update Financial Report Parser.json * Update Market Research.json * Update Market Research.json * update several templates * Update Image Sentiment Analysis.json * Update Market Research.json * Update image sentiment analysis template * Update Market Research.json * Update Custom Component Maker.json * Update Custom Component Maker.json * Update Hybrid Search RAG.json * Update Hybrid Search RAG.json * Update Hybrid Search RAG.json * More template updates * Update Financial Report Parser.json * updated templates * change custom component maker * Update Twitter Thread Generator.json * updates from main * change model * Update Research Translation Loop.json * expanded output component to fix tests * update template * autofix * fix error * fix change back * change back * ci: Skip truncated values test for refactoring (langflow-ai#8670) * refactor: simplify init target by removing cache cleanup and adding pre-commit hook (langflow-ai#8590) * build: add pyyaml dependency * refactor: simplify init command by removing cache cleaning and langflow run call * refactor: simplify init target by removing cache cleanup and adding pre-commit hook * refactor: update langchain_core.prompts import paths to use specific modules --------- Co-authored-by: Edwin Jose <edwin.jose@datastax.com> * feat: update structured output to multiline input and revise system prompt (langflow-ai#8585) * Update structured_output.py * [autofix.ci] apply automated fixes * Update structured_output.py * [autofix.ci] apply automated fixes * [autofix.ci] apply automated fixes (attempt 2/3) * update to prompt * template updates * Update src/backend/base/langflow/components/processing/structured_output.py * [autofix.ci] apply automated fixes * Update src/backend/base/langflow/components/processing/structured_output.py * Update src/backend/base/langflow/components/processing/structured_output.py * Update src/backend/base/langflow/components/processing/structured_output.py * [autofix.ci] apply automated fixes --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> * feat: add sessions endpoint with session management enhancements (langflow-ai#8596) * 📝 (monitor.py): Add endpoint to get sessions and handle session_id encoding for API requests 📝 (use-get-messages-mutation.ts): Implement a mutation function to fetch messages with query parameters and handle session_id encoding for API requests 📝 (use-get-messages-polling.ts): Ensure proper encoding of session_id for API requests in polling mutation 📝 (use-get-messages.ts): Handle session_id encoding for API requests in messages query 📝 (new-modal.tsx): Implement functions to handle session deletion and proper encoding of session_id for API requests 📝 (utils.ts): Add functions to encode, decode, validate, format, and prepare session IDs for API requests * 📝 (constants.ts): Add SESSIONS constant to API URLs for monitoring sessions 🔧 (use-delete-messages.ts): Add queryClient to UseRequestProcessor to invalidate sessions query ✨ (use-get-sessions-from-flow.ts): Introduce useGetSessionsFromFlowQuery to fetch sessions from flow 🔧 (use-rename-session.ts): Change refetchQueries to invalidateQueries for useGetSessionsFromFlowQuery 🔧 (custom-new-modal.tsx): Update import path for IOModal to playground-modal 🔧 (session-selector.tsx): Add setActiveSession function to handle setting active session 🔧 (sidebar-open-view.tsx): Add setActiveSession function to handle setting active session ♻️ (new-modal.tsx): Refactor IOModal into playground-modal and update functionality ♻️ (playground-modal.tsx): Refactor IOModal to handle playground-specific functionality ⬆️ (flowStore.ts): Add newChatOnPlayground state and setNewChatOnPlayground function ⬆️ (index.ts): Update FlowStoreType to include newChatOnPlayground and setNewChatOnPlayground * 🔧 (pyproject.toml): update testpaths to point to the correct directory for tests ✨ (test_session_endpoint.py): add unit tests for sessions endpoint with flow_id filtering ♻️ (session-selector.tsx): refactor to trim editedSession before setting it ♻️ (sidebar-open-view.tsx): refactor to set visibleSession instead of activeSession * ✨ (use-get-sessions-from-flow.ts): Always include the flow ID as the default session if it's not already present ♻️ (playground-modal.tsx): Refactor setting sessions to include currentFlowId as the default session if not present, and handle visibility of sessions more efficiently * ♻️ (use-get-messages-mutation.ts): remove unused imports and refactor code for better readability and maintainability * ✨ (test_session_endpoint.py): refactor test function names for better clarity and consistency * ✨ (create-new-session-name.ts): add function to generate a new session name based on the current date and time 🔧 (playground-modal.tsx): import createNewSessionName function to dynamically set a new session name when no session is visible * [autofix.ci] apply automated fixes * ✨ (monitor.py): rename get_sessions endpoint to get_message_sessions for clarity and consistency 🔧 (constants.ts): remove unused SESSIONS constant from API URLs 🔧 (use-delete-messages.ts): remove commented out code and unnecessary comments ✨ (use-delete-sessions.ts): add functionality to delete sessions in frontend 🔧 (use-get-sessions-from-flow.ts): update API endpoint for getting sessions to match backend changes 🔧 (playground-modal.tsx): add functionality to delete sessions and associated messages in the UI, update UI optimistically, and handle errors appropriately * [autofix.ci] apply automated fixes * 🐛 (monitor.py): Fix type hinting issue in delete_messages function 📝 (monitor.py): Add comments and improve readability in test_messages_endpoints.py 📝 (session_endpoint.py): Update endpoint paths for consistency and clarity in test_session_endpoint.py * [autofix.ci] apply automated fixes * fix: update SQL statement to use col() for session_id filtering in get_message_sessions function --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org> * fix: implemented cached values and temporary MCP servers on MCP component (langflow-ai#8628) * Added actionCount to fetch only servers without actionCount * Updated queries and uses to use servers without action data first, and then to fetch them * removed comment * updated constants * Added loading dropdown * Make options persist * Implemented new value format for McpComponent and implemented saving and removing temp Mcp Server if config is existent * Changed value type * Implemented cache and saving the server config * Fixed mcp server test * fix backend formatting * fixed lint * Added await * Fixed save button not appearing when no servers are available * added condition to only show save button when options is not null * template autofix * change template * update text sentiment analysis * change basic prompt back * change image sentiment back * update text sentiment and twitter * Update Twitter Thread Generator.json * Add back the input for the chat * add change * fix text sentiment * update research translation * Update Research Translation Loop.json --------- Co-authored-by: Eric Hare <ericrhare@gmail.com> Co-authored-by: Edwin Jose <edwin.jose@datastax.com> Co-authored-by: Lucas Oliveira <62335616+lucaseduoli@users.noreply.github.com> Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org> Co-authored-by: Cristhian Zanforlin Lousa <cristhian.lousa@gmail.com> Co-authored-by: Mendon Kissling <59585235+mendonk@users.noreply.github.com> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
* Update Vector Store RAG.json * fix: make starter projects auto refactor not remove selected output (langflow-ai#8400) * Fixed bug where starter projects were refactored incorrectly * fix: improve handling of selected outputs in custom component template builder - Added checks to ensure selected output is valid before attempting to set its state. - Enhanced code readability with comments explaining the logic for selecting outputs. * Set selected output as the previous selected output * Update base.py --------- Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org> Co-authored-by: Edwin Jose <edwin.jose@datastax.com> * fix: made clean edges clean after changing dropdown of output (langflow-ai#8460) fixed output considering all outputs not just selected one * refactor(docker): remove --extra deploy flag from uv sync commands (langflow-ai#8485) 🔧 (build_and_push_with_extras.Dockerfile): remove unnecessary uv sync command options to improve build efficiency and reduce redundancy Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org> * fix: refactor mcp and freeze tests to be less prone to flaky results (langflow-ai#8486) * Fixed mcp test to be less prone to errors * Fix freeze spec * fix: made button disabled state more congruent, made edit flow details submit on enter (langflow-ai#8339) * Changed textarea classes * Changed flowsettingscomponent to use form * changed edit flow settings to use form and to submit on enter * Reset form data on close * Updated disabled state to have lower opacity instead of to have set background * Fixed loading state of button * Fix: chat memory store issue and fix output types (langflow-ai#8463) * fix chat memory * update template * update update outputs * update update outputs --------- Co-authored-by: Edwin Jose <edwin.jose@datastax.com> * ci: update setup-uv to possibly fix caching (langflow-ai#8490) * update templates * update templates * First round of template updates * Update templates * fix: Update SaaS, Social Media, and YouTube json file (langflow-ai#8441) * update SaaS, Social Media, and YouTube json file * fix: make starter projects auto refactor not remove selected output (langflow-ai#8400) * Fixed bug where starter projects were refactored incorrectly * fix: improve handling of selected outputs in custom component template builder - Added checks to ensure selected output is valid before attempting to set its state. - Enhanced code readability with comments explaining the logic for selecting outputs. * Set selected output as the previous selected output * Update base.py --------- Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org> Co-authored-by: Edwin Jose <edwin.jose@datastax.com> * fix: made clean edges clean after changing dropdown of output (langflow-ai#8460) fixed output considering all outputs not just selected one * refactor(docker): remove --extra deploy flag from uv sync commands (langflow-ai#8485) 🔧 (build_and_push_with_extras.Dockerfile): remove unnecessary uv sync command options to improve build efficiency and reduce redundancy Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org> * fix: refactor mcp and freeze tests to be less prone to flaky results (langflow-ai#8486) * Fixed mcp test to be less prone to errors * Fix freeze spec * fix: made button disabled state more congruent, made edit flow details submit on enter (langflow-ai#8339) * Changed textarea classes * Changed flowsettingscomponent to use form * changed edit flow settings to use form and to submit on enter * Reset form data on close * Updated disabled state to have lower opacity instead of to have set background * Fixed loading state of button * Fix: chat memory store issue and fix output types (langflow-ai#8463) * fix chat memory * update template * update update outputs * update update outputs --------- Co-authored-by: Edwin Jose <edwin.jose@datastax.com> * ci: update setup-uv to possibly fix caching (langflow-ai#8490) * update json * fix custom component * revert change --------- Co-authored-by: Lucas Oliveira <62335616+lucaseduoli@users.noreply.github.com> Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org> Co-authored-by: Edwin Jose <edwin.jose@datastax.com> Co-authored-by: Cristhian Zanforlin Lousa <cristhian.lousa@gmail.com> * fix: templates (langflow-ai#8499) * basic-prompting-template-updated * show-system-message * names * blog-writer-tested * financial-report-parser * image-sentiment-analysis * seo-keyword-generator * seo-keyword-generator * Merge branch 'fix-vector-search-template' into mendons-template-branch --------- Co-authored-by: Eric Hare <ericrhare@gmail.com> * Update Basic Prompting.json * Update Blog Writer.json * Further template updates * Update Image Sentiment Analysis.json * Update templates * Update Financial Report Parser.json * Update Market Research.json * Update Market Research.json * Update Image Sentiment Analysis.json * Update Market Research.json * Update image sentiment analysis template * Update Market Research.json * Update Custom Component Maker.json * Update Custom Component Maker.json * Update Hybrid Search RAG.json * Update Hybrid Search RAG.json * Update Hybrid Search RAG.json * More template updates * Update Financial Report Parser.json * Update Custom Component Maker.json * Template updates * Update Custom Component Maker.json * Template updates * fix custom component * Update Financial Agent.json * More template updates * finance report parser fix --------- Co-authored-by: Yuqi Tang <yuqi.tang@datastax.com> Co-authored-by: Edwin Jose <edwin.jose@datastax.com> Co-authored-by: Lucas Oliveira <62335616+lucaseduoli@users.noreply.github.com> Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org> Co-authored-by: Cristhian Zanforlin Lousa <cristhian.lousa@gmail.com> Co-authored-by: Mendon Kissling <59585235+mendonk@users.noreply.github.com> Co-authored-by: Mike Fortman <michael.fortman@datastax.com>
* Update Vector Store RAG.json * fix: make starter projects auto refactor not remove selected output (langflow-ai#8400) * Fixed bug where starter projects were refactored incorrectly * fix: improve handling of selected outputs in custom component template builder - Added checks to ensure selected output is valid before attempting to set its state. - Enhanced code readability with comments explaining the logic for selecting outputs. * Set selected output as the previous selected output * Update base.py --------- Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org> Co-authored-by: Edwin Jose <edwin.jose@datastax.com> * fix: made clean edges clean after changing dropdown of output (langflow-ai#8460) fixed output considering all outputs not just selected one * refactor(docker): remove --extra deploy flag from uv sync commands (langflow-ai#8485) 🔧 (build_and_push_with_extras.Dockerfile): remove unnecessary uv sync command options to improve build efficiency and reduce redundancy Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org> * fix: refactor mcp and freeze tests to be less prone to flaky results (langflow-ai#8486) * Fixed mcp test to be less prone to errors * Fix freeze spec * fix: made button disabled state more congruent, made edit flow details submit on enter (langflow-ai#8339) * Changed textarea classes * Changed flowsettingscomponent to use form * changed edit flow settings to use form and to submit on enter * Reset form data on close * Updated disabled state to have lower opacity instead of to have set background * Fixed loading state of button * Fix: chat memory store issue and fix output types (langflow-ai#8463) * fix chat memory * update template * update update outputs * update update outputs --------- Co-authored-by: Edwin Jose <edwin.jose@datastax.com> * ci: update setup-uv to possibly fix caching (langflow-ai#8490) * update templates * update templates * First round of template updates * Update templates * fix: Update SaaS, Social Media, and YouTube json file (langflow-ai#8441) * update SaaS, Social Media, and YouTube json file * fix: make starter projects auto refactor not remove selected output (langflow-ai#8400) * Fixed bug where starter projects were refactored incorrectly * fix: improve handling of selected outputs in custom component template builder - Added checks to ensure selected output is valid before attempting to set its state. - Enhanced code readability with comments explaining the logic for selecting outputs. * Set selected output as the previous selected output * Update base.py --------- Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org> Co-authored-by: Edwin Jose <edwin.jose@datastax.com> * fix: made clean edges clean after changing dropdown of output (langflow-ai#8460) fixed output considering all outputs not just selected one * refactor(docker): remove --extra deploy flag from uv sync commands (langflow-ai#8485) 🔧 (build_and_push_with_extras.Dockerfile): remove unnecessary uv sync command options to improve build efficiency and reduce redundancy Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org> * fix: refactor mcp and freeze tests to be less prone to flaky results (langflow-ai#8486) * Fixed mcp test to be less prone to errors * Fix freeze spec * fix: made button disabled state more congruent, made edit flow details submit on enter (langflow-ai#8339) * Changed textarea classes * Changed flowsettingscomponent to use form * changed edit flow settings to use form and to submit on enter * Reset form data on close * Updated disabled state to have lower opacity instead of to have set background * Fixed loading state of button * Fix: chat memory store issue and fix output types (langflow-ai#8463) * fix chat memory * update template * update update outputs * update update outputs --------- Co-authored-by: Edwin Jose <edwin.jose@datastax.com> * ci: update setup-uv to possibly fix caching (langflow-ai#8490) * update json * fix custom component * revert change --------- Co-authored-by: Lucas Oliveira <62335616+lucaseduoli@users.noreply.github.com> Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org> Co-authored-by: Edwin Jose <edwin.jose@datastax.com> Co-authored-by: Cristhian Zanforlin Lousa <cristhian.lousa@gmail.com> * fix: templates (langflow-ai#8499) * basic-prompting-template-updated * show-system-message * names * blog-writer-tested * financial-report-parser * image-sentiment-analysis * seo-keyword-generator * seo-keyword-generator * Merge branch 'fix-vector-search-template' into mendons-template-branch --------- Co-authored-by: Eric Hare <ericrhare@gmail.com> * Update Basic Prompting.json * Update Blog Writer.json * Further template updates * Update Image Sentiment Analysis.json * Update templates * Update Financial Report Parser.json * Update Market Research.json * Update Market Research.json * update several templates * Update Image Sentiment Analysis.json * Update Market Research.json * Update image sentiment analysis template * Update Market Research.json * Update Custom Component Maker.json * Update Custom Component Maker.json * Update Hybrid Search RAG.json * Update Hybrid Search RAG.json * Update Hybrid Search RAG.json * More template updates * Update Financial Report Parser.json * updated templates * change custom component maker * Update Twitter Thread Generator.json * updates from main * change model * Update Research Translation Loop.json * expanded output component to fix tests * update template * autofix * fix error * fix change back * change back * ci: Skip truncated values test for refactoring (langflow-ai#8670) * refactor: simplify init target by removing cache cleanup and adding pre-commit hook (langflow-ai#8590) * build: add pyyaml dependency * refactor: simplify init command by removing cache cleaning and langflow run call * refactor: simplify init target by removing cache cleanup and adding pre-commit hook * refactor: update langchain_core.prompts import paths to use specific modules --------- Co-authored-by: Edwin Jose <edwin.jose@datastax.com> * feat: update structured output to multiline input and revise system prompt (langflow-ai#8585) * Update structured_output.py * [autofix.ci] apply automated fixes * Update structured_output.py * [autofix.ci] apply automated fixes * [autofix.ci] apply automated fixes (attempt 2/3) * update to prompt * template updates * Update src/backend/base/langflow/components/processing/structured_output.py * [autofix.ci] apply automated fixes * Update src/backend/base/langflow/components/processing/structured_output.py * Update src/backend/base/langflow/components/processing/structured_output.py * Update src/backend/base/langflow/components/processing/structured_output.py * [autofix.ci] apply automated fixes --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> * feat: add sessions endpoint with session management enhancements (langflow-ai#8596) * 📝 (monitor.py): Add endpoint to get sessions and handle session_id encoding for API requests 📝 (use-get-messages-mutation.ts): Implement a mutation function to fetch messages with query parameters and handle session_id encoding for API requests 📝 (use-get-messages-polling.ts): Ensure proper encoding of session_id for API requests in polling mutation 📝 (use-get-messages.ts): Handle session_id encoding for API requests in messages query 📝 (new-modal.tsx): Implement functions to handle session deletion and proper encoding of session_id for API requests 📝 (utils.ts): Add functions to encode, decode, validate, format, and prepare session IDs for API requests * 📝 (constants.ts): Add SESSIONS constant to API URLs for monitoring sessions 🔧 (use-delete-messages.ts): Add queryClient to UseRequestProcessor to invalidate sessions query ✨ (use-get-sessions-from-flow.ts): Introduce useGetSessionsFromFlowQuery to fetch sessions from flow 🔧 (use-rename-session.ts): Change refetchQueries to invalidateQueries for useGetSessionsFromFlowQuery 🔧 (custom-new-modal.tsx): Update import path for IOModal to playground-modal 🔧 (session-selector.tsx): Add setActiveSession function to handle setting active session 🔧 (sidebar-open-view.tsx): Add setActiveSession function to handle setting active session ♻️ (new-modal.tsx): Refactor IOModal into playground-modal and update functionality ♻️ (playground-modal.tsx): Refactor IOModal to handle playground-specific functionality ⬆️ (flowStore.ts): Add newChatOnPlayground state and setNewChatOnPlayground function ⬆️ (index.ts): Update FlowStoreType to include newChatOnPlayground and setNewChatOnPlayground * 🔧 (pyproject.toml): update testpaths to point to the correct directory for tests ✨ (test_session_endpoint.py): add unit tests for sessions endpoint with flow_id filtering ♻️ (session-selector.tsx): refactor to trim editedSession before setting it ♻️ (sidebar-open-view.tsx): refactor to set visibleSession instead of activeSession * ✨ (use-get-sessions-from-flow.ts): Always include the flow ID as the default session if it's not already present ♻️ (playground-modal.tsx): Refactor setting sessions to include currentFlowId as the default session if not present, and handle visibility of sessions more efficiently * ♻️ (use-get-messages-mutation.ts): remove unused imports and refactor code for better readability and maintainability * ✨ (test_session_endpoint.py): refactor test function names for better clarity and consistency * ✨ (create-new-session-name.ts): add function to generate a new session name based on the current date and time 🔧 (playground-modal.tsx): import createNewSessionName function to dynamically set a new session name when no session is visible * [autofix.ci] apply automated fixes * ✨ (monitor.py): rename get_sessions endpoint to get_message_sessions for clarity and consistency 🔧 (constants.ts): remove unused SESSIONS constant from API URLs 🔧 (use-delete-messages.ts): remove commented out code and unnecessary comments ✨ (use-delete-sessions.ts): add functionality to delete sessions in frontend 🔧 (use-get-sessions-from-flow.ts): update API endpoint for getting sessions to match backend changes 🔧 (playground-modal.tsx): add functionality to delete sessions and associated messages in the UI, update UI optimistically, and handle errors appropriately * [autofix.ci] apply automated fixes * 🐛 (monitor.py): Fix type hinting issue in delete_messages function 📝 (monitor.py): Add comments and improve readability in test_messages_endpoints.py 📝 (session_endpoint.py): Update endpoint paths for consistency and clarity in test_session_endpoint.py * [autofix.ci] apply automated fixes * fix: update SQL statement to use col() for session_id filtering in get_message_sessions function --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org> * fix: implemented cached values and temporary MCP servers on MCP component (langflow-ai#8628) * Added actionCount to fetch only servers without actionCount * Updated queries and uses to use servers without action data first, and then to fetch them * removed comment * updated constants * Added loading dropdown * Make options persist * Implemented new value format for McpComponent and implemented saving and removing temp Mcp Server if config is existent * Changed value type * Implemented cache and saving the server config * Fixed mcp server test * fix backend formatting * fixed lint * Added await * Fixed save button not appearing when no servers are available * added condition to only show save button when options is not null * template autofix * change template * update text sentiment analysis * change basic prompt back * change image sentiment back * update text sentiment and twitter * Update Twitter Thread Generator.json * Add back the input for the chat * add change * fix text sentiment * update research translation * Update Research Translation Loop.json --------- Co-authored-by: Eric Hare <ericrhare@gmail.com> Co-authored-by: Edwin Jose <edwin.jose@datastax.com> Co-authored-by: Lucas Oliveira <62335616+lucaseduoli@users.noreply.github.com> Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org> Co-authored-by: Cristhian Zanforlin Lousa <cristhian.lousa@gmail.com> Co-authored-by: Mendon Kissling <59585235+mendonk@users.noreply.github.com> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
This pull request includes a variety of changes across documentation, configuration, and code functionality. Key updates include improvements to documentation for contributors, the addition of a new environment variable, removal of deprecated code, and adjustments to backend logic for handling output selection in custom components.
Documentation Updates:
docs/docs/Contributing/contributing-how-to-contribute.md: Added links to additional contribution guides for bundles, components, tests, and templates to provide more detailed instructions for contributors.docs/docs/Configuration/environment-variables.md: Introduced theLANGFLOW_DISABLE_TRACK_APIKEY_USAGEenvironment variable to allow disabling API key usage tracking under high concurrency.Codebase Simplification:
src/backend/base/langflow/custom/custom_component/component.py: Removed calls tooutput.set_selected()in_set_output_return_typeandto_frontend_nodemethods, simplifying output handling logic. [1] [2]src/backend/base/langflow/custom/utils.py: Refactored logic for setting selected outputs inbuild_custom_component_template_from_inputs, ensuring proper handling of selected outputs based on field configuration.Configuration Changes:
.github/workflows/release.yml: Removed thecall_docker_build_main_epjob, simplifying the release workflow by eliminating unused Docker build logic.pyproject.toml: Updated the project version to1.4.3and synchronized the dependency version forlangflow-baseto0.4.3. [1] [2]Summary by CodeRabbit