Commit Graph

6876 Commits

Author SHA1 Message Date
fb64e45e75 chore: bump version to 1.11.0 2026-06-09 13:29:01 -07:00
b08442a330 fix: standardize playground code block + container backgrounds on shadcn tokens (#13520)
fix: use shadcn canvas colors for playground code blocks and chat-bg for the container

Standardize the playground tool-call surfaces on shadcn theme tokens so
they swap correctly between light and dark mode:

- Code blocks (SimplifiedCodeTabComponent) use bg-canvas: light grey
  (#F4F4F5) / dark black (#000) so they stand out as the code surface.
- The 'Called tool' container (ContentBlockDisplay) uses bg-background so
  it matches the chat background in both themes instead of inverting to
  solid black in dark mode (it was bg-primary-foreground).

Previously the container and code blocks were both bg-primary-foreground,
which rendered the whole section black in dark mode with no contrast.
2026-06-05 19:04:46 +00:00
d3ee447e31 fix(canvas): anchor new note bottom-center to cursor on placement (#13441)
* fix(canvas): anchor new note bottom-center to cursor on placement

* improve notes component

* [autofix.ci] apply automated fixes

* improve testcases

---------

Co-authored-by: Olayinka Adelakun <olayinkaadelakun@Olayinkas-MacBook-Pro.local>
Co-authored-by: Olayinka Adelakun <olayinkaadelakun@mac.war.can.ibm.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-06-05 17:18:16 +00:00
283cc018a8 fix: slider value lost when adjusting before the node is selected (#13515)
* fix: commit slider value before node selection consumes the interaction

Sliders inside React Flow nodes (e.g. the URL component's Depth field) lost
the value the user set when the node was not yet selected. React Flow selects
a node on click and pans/drags it on pointer down, while Radix drives the
slider with the same pointer events. The interactive SliderPrimitive.Root had
no React Flow isolation, so the first interaction on an unselected node was
consumed by node selection: the slider reacted visually but the chosen value
reverted or snapped to wherever the pointer landed.

Stop pointer/click propagation on the slider root and add React Flow's
nodrag/nopan/noflow/nowheel opt-out classes (matching the slider's value-text
input). Radix composes the handlers, so value setting is unaffected.

Adds a regression test asserting slider pointer-down/click do not bubble to
the node wrapper while unrelated children still do.

* Update src/frontend/src/components/core/parameterRenderComponent/components/sliderComponent/__tests__/slider-node-selection.test.tsx

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* [autofix.ci] apply automated fixes

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-06-05 16:25:56 +00:00
8d1ff75799 fix(i18n): translate QA-identified missing strings for 1.10.0 (#13503)
* fix(i18n): translate missing frontend strings found in QA

- API Keys page: replace hardcoded "Never" with t("settings.apiKeys.never")
- New Flow screen: migrate all WELCOME_* string constants in
  flow-builder-welcome.tsx to t() calls; remove string constants from
  flow-builder-welcome.constants.ts (keep WELCOME_MAX_INPUT_LENGTH)
- Get Started sidebar card: add useTranslation and replace 5 hardcoded
  strings (All Set, Get started, Star repo, Join the community, Create a
  flow) with existing sidebar.* i18n keys
- en.json: add settings.apiKeys.never + 10 flowBuilderWelcome.* keys
- All non-English locale files (ja, fr, es, de, pt, zh-Hans) updated via
  GP upload/download

* fix(i18n): translate additional QA-identified untranslated strings

- Translate canvas assistant banner ("Try the new Langflow Assistant!", "New" pill)
- Translate search placeholder flow type name (was showing raw "flows"/"mcp" in mixed-language)
- Translate UNNAMED tool badge in ToolsComponent and ToolsTable
- Extract all 61 flow default descriptions to i18n keys (flow.defaultDescription.0-60)
  so new flows get a localized random description instead of always English
- Fix backend ja.json: "Vector Store RAG" → "ベクターストア RAG" for consistency
  with the frontend welcome screen translation
- Run GP upload+download to populate fr, ja, es, de, pt, zh-Hans locales

* [autofix.ci] apply automated fixes

* fix(i18n): fix CI failures — Biome import order and updated test constants

- Fix Biome import sort in flow-builder-welcome.tsx (lucide-react after react)
- Update flow-builder-welcome test to use inline English strings instead of
  importing the deleted WELCOME_* constants from flow-builder-welcome.constants

* fix(i18n): truncate long checklist labels with tooltip in get-started sidebar

Long translations (e.g. Japanese) were wrapping to two lines in the narrow
sidebar. Now each label truncates with ellipsis and shows the full text in a
tooltip on hover. Icons also get shrink-0 to stay fixed-size.

* [autofix.ci] apply automated fixes

* fix(i18n): align assistant banner translation with panel title in ja, es, pt

GP inconsistently kept "Assistant" in English in the banner string while
translating it natively in the panel title. Patched directly:
- ja: "Assistant" → "アシスタント"
- es: "Assistant" → "Asistente"
- pt: "Assistant" → "Assistente"
fr, de, zh-Hans were already consistent.

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-06-05 14:33:39 +00:00
f08e9e1d42 fix: Improved styling of DatePicker icon in dark theme (#13506)
Improved styling of DatePicker icon in dark theme for API Key Creation modal.
2026-06-04 18:30:09 +00:00
51eca95293 fix: replace GradientSave icon with plain Save in saved components sidebar (#13485)
* fix: replace GradientSave icon with plain Save in saved components sidebar

* refactor: remove GradientSave icon from icon registry
2026-06-04 15:29:34 +00:00
685d12adab feat: mention canvas components in the assistant input (#13486)
* @-mention canvas components in the assistant input

* fix suggestion width

* add translation

* 70% resizeble chat

* add field search on assistant @

* update docs
2026-06-03 21:20:37 +00:00
ec0b11d721 chore: update lock files (#13483)
* chore: update lock files

update lock files

* fix: migrate Mongo/Weaviate/Perplexity components off removed langchain-community classes

langchain-community 0.4.2 (pulled in by the lock update) removed the
MongoDBAtlasVectorSearch and Weaviate vector stores and the ChatPerplexity
chat model. The MongoDB import failed at test collection, aborting both
backend unit-test groups with an ImportError.

Migrate to the standalone packages, all already declared dependencies:
- mongodb: langchain_mongodb.MongoDBAtlasVectorSearch (drop-in)
- perplexity: langchain_perplexity.ChatPerplexity (drop-in)
- weaviate: rewrite for weaviate-client v4 (connect_to_weaviate_cloud /
  connect_to_custom) + langchain_weaviate.WeaviateVectorStore, adding
  advanced gRPC host/port inputs. The component was already broken on
  weaviate-client v4, which removed the v3 weaviate.Client(url=...) API.

Component class names and identifiers are unchanged, so existing flows are
preserved. The component index is left for the autofix CI job to regenerate.

* chore: auto-bake note keys and regenerate backend locales/en.json [skip ci]

* ci: wake up CI

Co-Authored-By: Oz <oz-agent@warp.dev>

* test: fix concurrent-import deadlock in test_all_modules_importable

test_all_lfx_component_modules_directly_importable imports ~488 modules
concurrently via asyncio.gather over asyncio.to_thread(importlib.import_module).
It flaked ~50% with:

  _DeadlockError: deadlock detected by _ModuleLock('toolguard.runtime.runtime')
  on lfx.components.models_and_agents.policies.tool_invoker

toolguard has an internal circular import: toolguard/runtime/__init__.py does
`from .runtime import ...` while runtime.py does `from toolguard.runtime import
IToolInvoker`. It resolves fine single-threaded, but the lfx policy modules reach
the cycle from two entry points at once -- policies.tool_invoker enters at the
toolguard.runtime package while policies.guard_sync_utils enters at the
toolguard.runtime.runtime submodule. On separate worker threads one holds the
package lock waiting on the submodule lock while the other does the reverse, so
CPython's import machinery raises _DeadlockError.

Pre-import both entry points single-threaded before the fan-out so sys.modules is
warm and the threaded imports only hit the cache. Keeps full parallelism and
coverage (every module is still imported; no skip-list entry).

Verified 24/24 green vs a 4/8 baseline.

* add tests

* pragma

* Update component_index.json

* [autofix.ci] apply automated fixes

* test: fix dropdownComponent fixture import for langchain-community 0.4.2

The dropdownComponent Playwright test pastes component code into the code editor and clicks "Check & Save", which validates the code by importing it. langchain-community 0.4.2 (this branch's lock bump) removed `langchain_community.chat_models.bedrock`, so the import threw, the code modal stayed open, and enableInspectPanel timed out clicking `canvas_controls_dropdown_help` through the open dialog. Failed deterministically (all retries + GHA re-run), only on this branch.

Swap the fixture to `langchain_aws.ChatBedrock`, matching the real Amazon Bedrock component which already migrated, and upstream guidance (BedrockChat deprecated since lc 0.0.34).

Also move the 0.4.2-removed `langchain_community.chat_models.litellm` import off the top level of the deactivated ChatLiteLLM component into build_model so the module imports cleanly. No loaded/product components affected.

* [autofix.ci] apply automated fixes

* chore: update pandas and numexpr

* Update component_index.json

* chore: update templates

---------

Co-authored-by: Eric Hare <ericrhare@gmail.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Oz <oz-agent@warp.dev>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-06-03 17:07:34 -04:00
f1d4db704d fix(frontend): clean up new-flow onboarding, no orphaned placeholders, named templates, assistant tooltip stacking (#13451)
* UI assistant general fixes

* gh suggestions and fix tests

* [autofix.ci] apply automated fixes

* bug fixes pipeline

* [autofix.ci] apply automated fixes

* fix model selection on assistant

* fix ruff and tsx

* fix run flow test

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-06-03 17:40:43 -03:00
2c8b646bb5 fix: enforce mutually exclusive component constraint on paste (#13468)
* fix: enforce mutually exclusive component constraint on paste

Pasting a component (e.g. Chat Input) no longer bypasses the
mutual-exclusivity rule when a conflicting component (e.g. Webhook)
already exists in the flow. The paste flow previously only checked the
singleton constraint, so a copy/paste could place both Chat Input and
Webhook in the same flow and break flow logic.

- Add MUTUALLY_EXCLUSIVE_COMPONENTS as the shared source of truth in
  constants; the sidebar exclusivity rules now alias it
- Add filterMutuallyExclusiveComponents helper, wired into flowStore
  paste; fast-paths non-constrained pastes and guards against
  prototype-key clipboard input
- Internationalize the paste notice across all 7 locales
- Add unit tests covering existing-flow conflicts, intra-selection
  conflicts, edge cleanup, and adversarial input

* refactor: unify component placement policy into one constraint module

Address review: placement policy was duplicated across five locations
(sidebar booleans, EXCLUSIVITY_RULES, checkChatInput/checkWebhookInput,
singleton paste filter, mutual-exclusivity paste filter), which is how
the paste-validation gap drifted in.

- Add utils/componentConstraints.ts as the single source of truth:
  COMPONENT_CONSTRAINTS plus a pure rule engine (evaluatePlacement,
  filterPlaceableSelection, getPresentComponentTypes)
- Sidebar disable/tooltip and flowStore paste both consume the engine;
  remove the four duplicated policy encodings
- Make the paste filter side-effect free (returns { nodes, edges,
  violations }); flowStore surfaces the notice and collapses singleton
  and mutual-exclusivity into one pass
- Move policy out of the global constants dump into the focused module
- Internationalize both paste notices across all 7 locales
- Update tests for the new shapes; add componentConstraints unit tests

* test: type sidebarItemsList mocks to satisfy noExplicitAny
2026-06-03 16:57:11 +00:00
1e0515f019 fix: make playground code block background theme-reactive (#13470)
SimplifiedCodeTabComponent hardcoded a `dark` class, a dark-only
`tomorrow` syntax style, and white label text, so code/JSON/tool-output
blocks in the playground stayed solid black after switching from Dark to
Light theme. Read the active theme from useDarkStore and drive the
container, label, and syntax style from it so the background adapts to
light/dark like other code displays in the app.
2026-06-03 15:24:57 +00:00
db21662f92 fix: prevent MCP server edit from creating a duplicate on name change (#13464)
* fix: prevent MCP server edit from creating a duplicate on name change

When editing an MCP server, changing the name field caused a brand-new
duplicate server to be created instead of updating the existing one,
leaving the original untouched. It only happened when the name input
was changed.

Root cause: the backend PATCH /mcp/servers/{server_name} endpoint
upserts keyed by the name in the URL path, and the edit modal built the
PATCH URL from the edited name. A changed name therefore retargeted the
request to a new key, so the backend created a new server rather than
updating the original.

The server name is the immutable identifier (the storage key and the
PATCH URL path), so during edit we now:
- always reuse the original name (initialData.name) for the request
  instead of re-deriving it from the input, and
- lock the name input, consistent with how the type tabs are already
  disabled in edit mode.

Adds regression tests covering the locked name field (STDIO + HTTP) and
that editing patches the original name without firing the create flow.

* fix: immutable server names
2026-06-03 14:44:33 +00:00
7269456232 fix: populate _embeddings for upload-ingested KBs in Knowledge retrieve (#13446)
* fix: populate _embeddings for upload-ingested KBs in Knowledge retrieve

Knowledge retrieval with `include_embeddings=true` always returned
`_embeddings: None` for any knowledge base populated via direct file
upload.

The retrieval path gathers embedding vectors separately (via
`backend.iter_documents(include_embeddings=True)`) and joins them back
onto the search results. That join was keyed solely on the `_id`
metadata field. Component-driven ingestion stamps a content-hash `_id`
on every chunk, but the direct file-upload path
(`KBIngestionHelper.perform_ingestion`) does not write an `_id` at all.
So for upload-populated KBs the set of wanted ids was empty, the
embedding-gather block was skipped entirely, and every row fell back to
`None`.

Key the join on `_id` when present and on page content otherwise. The
content fallback is exact for this use case — two chunks with identical
text necessarily share the same embedding vector — and the `"id"` /
`"content"` tag namespaces the two key spaces so a mixed KB never
cross-matches. This fixes both existing and newly-ingested KBs across
all backends (the join runs through the shared `iter_documents` API).

Adds regression coverage exercising a real in-process Chroma backend for
the upload-style (no `_id`), component-style (`_id`), and disabled paths,
plus unit tests for the new `_embedding_match_key` helper.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* [autofix.ci] apply automated fixes

* [autofix.ci] apply automated fixes (attempt 2/3)

* fix: opensearch embeddings

* chore: regenerate component index after release-1.10.0 merge

The release branch merge mis-resolved component_index.json, reverting the
Knowledge component's entry (code + code_hash) to the pre-PR source
(4bae415b5feb). Rebuilt from source under Python 3.13 to restore the
correct entry (26a843069b81), matching knowledge.py and the starter flows.

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-06-02 17:59:26 -07:00
2d6321039b fix: Fix timestamp rendering for expires_at in API Key model (#13471)
Fixed timestamp render for expires_at in API Key model to show correct timestamp according to users local timezone.
2026-06-02 20:54:15 +00:00
5120b7705a fix: Move Docling components into bundle (#13442)
* feat: move docling components to bundle

* chore: auto-bake note keys and regenerate backend locales/en.json [skip ci]

* chore: wake CI

* fix: trim docling chunking extra

* Update test_endpoints.py

* Update test_pilot_docling_upgrade.py

* fix: show friendly component label in build banner for bundle nodes

Extension-bundle components have namespaced node ids of the form ext:<bundle>:<ClassName>@<slot>-<uuid>. The flow-build status banner rendered that raw id, which overflowed the fixed-width (530px) container and collided with the elapsed-time counter.

Collapse namespaced ids to <ComponentName>-<uuid> (matching the built-in ComponentName-UUID label) via a new getRunningNodeLabel helper; built-in node ids are returned unchanged. Covered by unit tests.

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-06-02 12:33:38 -07:00
d8b9473b90 feat: Improve canvas deploy review flow (#13246)
* fix: improve canvas deploy review flow

* feat(deploy): update canvas replace dialog

* fix(deploy): align replace dialog styling

* fix(deploy): polish deploy modal i18n

* fix(deploy): restore review label contrast

* fix(frontend): use accent-amber-foreground token in deploy review

Replace hardcoded text-amber-600/dark:text-amber-400 with the existing
accent-amber-foreground semantic token to satisfy the no-hardcoded-tailwind-palette
Biome plugin.
2026-06-02 15:24:48 +00:00
3ade9aaeed test: fix flaky Windows Playwright tests for error popups, settings nav, and output inspection (#13463)
fix user setting test flaky on windows
2026-06-02 10:26:43 -03:00
551270dd40 fix(memory): show dashes for stat cards in All Sessions view (#13443)
Co-authored-by: Olayinka Adelakun <olayinkaadelakun@Olayinkas-MacBook-Pro.local>
2026-06-02 10:39:02 +00:00
affa44f487 Merge release-1.9.5 into release-1.10.0 2026-06-01 16:51:35 -07:00
30c9aaef30 feat: mark Text Input and Text Output components as legacy (#13420)
* feat: mark Text Input and Text Output components as legacy

Chat Input already handles text input natively, and the current API
paradigm forwards all terminal node outputs automatically, making the
Text Input and Text Output components redundant.

Mark both as legacy and point users to their modern replacements:
- TextInput  -> ChatInput  (replacement = ["input_output.ChatInput"])
- TextOutput -> ChatOutput (replacement = ["input_output.ChatOutput"])

Migrate starter templates off the Text Input component:
- Knowledge Retrieval: convert the search-query Text Input to Chat Input
- Blog Writer, Instagram Copywriter, Portfolio Website Code Generator,
  Twitter Thread Generator: inline preset Text Input values directly into
  their target Prompt/LLM fields and remove the now-redundant input nodes

Also drop stale root-level width/height from non-note nodes in Basic
Prompting, fixing a pre-existing test_width_height_at_node_level failure.

Update .secrets.baseline line numbers for the edited starter templates
(component code_hash false positives shifted by the node changes).

* [autofix.ci] apply automated fixes

* test: enable legacy toggle in Playwright specs that drag Text Input/Output

Text Input and Text Output are now legacy, so they are hidden from the
component sidebar by default (showLegacy=false). Specs that drag them from
the sidebar must first enable the legacy toggle via the existing
addLegacyComponents() helper (as freeze.spec.ts already does).

Add the helper call to the 8 specs that added Text Input/Output without it,
fixing the Playwright shard failures on this PR.

* test: fix Blog Writer starter spec for inlined instructions field

Blog Writer no longer has a separate "Instructions" Text Input node; the
value is now an inlined field on the Prompt component (Text Input is legacy).
Fill the Prompt's instructions field (textarea_str_instructions) instead of
the removed node's textarea_str_input_value.

* test: force clicks past legacy banner overlap in similarity & fileUpload specs

Marking Text Input/Output legacy adds a "Legacy" warning bar that increases
node height. In these two tightly-packed layouts the bar/body now overlaps an
adjacent node's handle/button and intercepts the click. Force the affected
clicks past the overlay (consistent with existing force-click usage in
fileUploadComponent).

Fixes the Shard 34 (similarity) and Shard 43 (fileUpload "use text input for
file paths") failures introduced by the legacy marking.

* test: dismiss legacy warning bars instead of force-clicking through them

The previous force-click fix was wrong: Playwright's force click still
dispatches the event at the target's coordinates, which the browser routes to
the topmost element there (the overlapping "Legacy" warning bar), so the real
click never reached the covered handle/button (similarity's inspection modal
never opened).

Add a dismissLegacyWarnings() helper and call it before the affected
interactions in similarity and fileUpload. Dismissing the bars removes the
extra node height, restoring the compact pre-legacy layout so the normal
click lands on its intended target.

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-06-01 22:42:51 +00:00
75efd0a2a4 fix: point file manager empty-state link to the files page route (#13450)
The "My Files" shortcut in the file manager empty state linked to a
top-level "/files" route that does not exist. The files page is nested
under "assets" (routes.tsx: assets -> files), so clicking the link
dead-ended instead of opening My Files.

Point the link at "/assets/files", matching the sidebar navigation in
sideBarFolderButtons (_navigate("/assets/files")). Add a regression test
asserting the empty-state link's href.
2026-06-01 20:50:40 +00:00
ad54146c9f fix: Remove Playwright from Dependencies (#13382)
Remove Playwright from Dependecies

Co-authored-by: Olayinka Adelakun <olayinkaadelakun@Olayinkas-MacBook-Pro.local>
2026-06-01 19:12:25 +00:00
73e49b13a0 test: Skip starter-projects shard4 on Windows CI (#13439)
skip shard 4 for windows
2026-06-01 09:56:11 -03:00
8179ceac3c feat: Hide UI elements in embedded mode (#13099)
* feat(LE-906): Config/settings plumbing

- Add 7 new boolean settings: custom_component_admin_only, embedded_mode,
  hide_logout_button, hide_new_project_button, hide_new_flow_button,
  hide_starter_projects, mcp_servers_locked (all default: false)
- All settings configurable via LANGFLOW_* env vars
- Expose all flags through ConfigResponse schema
- Fix hide_getting_started_progress to read from settings not env
- Add frontend type definitions for all 7 flags
- Initialize utility store with all new flags
- Implement hydration logic for new flags in config hook

* [autofix.ci] apply automated fixes (attempt 2/3)

* fix(LE-906): address PR1 review feedback

- replace internal ICA wording with neutral embedded-mode language
- add settings field for hide_getting_started_progress
- map hide_getting_started_progress from settings in ConfigResponse
- add regression test for embedded_mode hide-flag cascade
- revert unrelated component_index drift from PR scope

* fix(LE-906): address remaining PR1 Gabriel comments

* docs/test(LE-906): clarify embedded_mode scope for QA

- Clarify in settings docs that embedded_mode cascades UI hide flags only
- Keep mcp_servers_locked and custom_component_admin_only as explicit opt-ins
- Add config test assertions that security flags do not auto-cascade

* feat(LE-906): Embedded UI visibility changes

- Hide logout button from account menu when hideLogoutButton flag enabled
- Hide new flow button from header when hideNewFlowButton flag enabled
- Hide new project button from sidebar when hideNewProjectButton flag enabled
- Hide starter projects tab from templates modal when hideStarterProjects enabled
- All UI gates read from utility store (flags populated from server config)
- Supports embedded/iframe mode integration where standalone UI elements are hidden
- Pure frontend changes: no backend dependencies, no breaking changes
- Respects embedded_mode umbrella flag when individual hide flags set

* fix(LE-906): restore overwritten header components and keep embedded UI gates

* [autofix.ci] apply automated fixes

* feat(LE-906): hide new flow entry points

* fix(LE-906): address PR4 review comments from Gabriel

* fix(LE-906): resolve PR4 biome lint failures

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-05-30 12:03:58 +00:00
61ad11e530 feat: MCP lock enforcement + UI/tests (#13097)
* feat(LE-906): MCP lock enforcement + UI/tests

- Add mcp_servers_locked gate to POST /{project_id}/install endpoint
- Extend lock check to PATCH /{project_id} endpoint for auth settings updates
- Non-superuser requests blocked with 403 when flag is enabled
- Add hardened feature-flag checks using getattr(..., False) is True pattern
  to prevent MagicMock truthiness in tests
- Update AddMcpServerModal to show locked message when mcp_servers_locked=true
- Fix JSX structure in modal (missing fragment wrapper)
- All MCP modifications now gated when mcp_servers_locked flag enabled

* fix(LE-906): address PR2 review feedback

- add is_mcp_servers_locked helper with MagicMock-safe semantics and rationale
- add regression tests for explicit-true vs MagicMock placeholder behavior
- add missing mcp.modal.lockedTitle/lockedDescription i18n keys across locales
- remove debug leftover test_page.html
- revert unrelated component_index drift from PR scope

* fix(LE-906): enforce MCP lock in v2 servers

* fix(LE-906): address PR2 review comments from Gabriel

- Remove duplicate is_mcp_servers_locked helper from v1/mcp_projects.py;
  import from api/v2/mcp instead so unit tests protect production code
- Retarget test imports to langflow.api.v2.mcp.is_mcp_servers_locked
- Add test_v2_mcp_servers_unlocked_allows_non_superuser_add_patch_delete
  to cover the flag-off case (non-superuser can CRUD when gate is off)

* fix(LE-906): make MCP lock configurable in PR2

- Declare mcp_servers_locked in Settings so LANGFLOW_MCP_SERVERS_LOCKED is honored
- Add regression test to assert Settings exposes and reads mcp lock env var

* chore(ci): trigger PR2 CI
2026-05-30 03:22:07 +00:00
6049fe061c feat: Add embedded mode configuration flags (#13095)
* feat(LE-906): Config/settings plumbing

- Add 7 new boolean settings: custom_component_admin_only, embedded_mode,
  hide_logout_button, hide_new_project_button, hide_new_flow_button,
  hide_starter_projects, mcp_servers_locked (all default: false)
- All settings configurable via LANGFLOW_* env vars
- Expose all flags through ConfigResponse schema
- Fix hide_getting_started_progress to read from settings not env
- Add frontend type definitions for all 7 flags
- Initialize utility store with all new flags
- Implement hydration logic for new flags in config hook

* [autofix.ci] apply automated fixes (attempt 2/3)

* fix(LE-906): address PR1 review feedback

- replace internal ICA wording with neutral embedded-mode language
- add settings field for hide_getting_started_progress
- map hide_getting_started_progress from settings in ConfigResponse
- add regression test for embedded_mode hide-flag cascade
- revert unrelated component_index drift from PR scope

* fix(LE-906): address remaining PR1 Gabriel comments

* docs/test(LE-906): clarify embedded_mode scope for QA

- Clarify in settings docs that embedded_mode cascades UI hide flags only
- Keep mcp_servers_locked and custom_component_admin_only as explicit opt-ins
- Add config test assertions that security flags do not auto-cascade

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-05-29 22:58:36 +00:00
2e41b7f3e2 fix(i18n): default to English regardless of browser locale (#13324)
Previously, on first load with no saved language preference, the app
used navigator.language as the fallback, causing users with Portuguese
(pt-PT / pt-BR) or other non-English browser locales to see the UI in
that language automatically. The expected behavior is that English is
always the default; users can change the language explicitly via
settings.

Co-authored-by: Antônio Alexandre Borges Lima <104531655+AntonioABLima@users.noreply.github.com>
2026-05-29 21:12:02 +00:00
9cb49c2c7d fix(i18n): backend locale translation fixes — custom component nodes, Toolset output, RAG template notes, UI banner strings (#13296)
* fix(i18n): translate custom component nodes and fix missing RAG template notes in ja/fr

- Add translate_component_node() helper to i18n.py and call it from
  custom_component and custom_component_update endpoints so canvas
  interactions (tool mode toggle, field edits) no longer revert node
  labels to English when a non-English locale is active.
- Sync ja.json and fr.json from GP: both locales were missing
  template_notes.vector_store_rag.* keys, causing the Vector Store RAG
  README note to always render in English.

* fix(i18n): translate Toolset output and UpdateAllComponents banner strings

- Extract the shared tool-mode output ("Toolset") via a sentinel norm
  "_toolmode" in extract_backend_strings.py so the dynamic output
  injected on every component when tool mode is enabled is covered by
  a single shared translation key instead of being silently skipped.
- Update translate_component_node() to use the "_toolmode" norm when
  the output name is "component_as_tool", resolving the key correctly
  for all components.
- Wrap all hardcoded strings in UpdateAllComponents/index.tsx with t()
  (summary banner, Dismiss/Dismiss All, Review All/Update All buttons).
- Add 15 new updateComponents.* keys to frontend en.json with i18next
  _one/_other plural variants; upload and download all locale files.
- Sync all backend and frontend locale files from GP.

* fix(i18n): sync backend locale files with Toolset translations from GP

* fix(i18n): translate Retry button in server connection error dialog

* [autofix.ci] apply automated fixes

* fix(i18n): inline lfx.base constants in extract_backend_strings to fix CI

The GP script test environment mocks lfx.components but does not install
the full lfx package, so `from lfx.base.tools.constants import ...` raised
ModuleNotFoundError. Inline the two constants directly, matching the pattern
already used in bake_note_keys.py.

* [autofix.ci] apply automated fixes

* fix(i18n): address PR review — blockedPlural scheme, TOOL_OUTPUT_NAME constant, translation error isolation

- I1: Replace {{blockedPlural}} English-suffix hack in UpdateAllComponents with two
  separate t() calls (blockedCannotRun + andMustBeUpdated), each driven by its own
  count parameter, giving proper _one/_other pluralization for both counts independently.
  Remove broken blockedAndMustUpdate_one/other keys from all 6 non-English locales
  (de/es/fr/ja/pt/zh-Hans) so they fall back cleanly to English until re-translated
  via the GP pipeline.
- I3: Replace magic string "component_as_tool" in i18n.py with TOOL_OUTPUT_NAME
  imported from lfx.base.tools.constants — the canonical source of truth.
- I4: Move translate_component_node() calls outside the main try/except in both
  custom_component and custom_component_update endpoints; wrap each in a narrow
  try/except that logs and falls through to the untranslated node, so an i18n bug
  can no longer fail a successful component update with HTTP 400.

* fix(i18n): translate update-components modal strings and preserve custom field display_names

- Translate hardcoded strings in UpdateComponentModal (title, column
  headers "Component"/"Update Type", "Breaking" label) — adds 5 new
  keys under updateComponent.* and downloads translations for all locales

- Fix custom component field display_names reverting on reload: extend
  build_component_display_names to collect all known locale translations
  per input field; syncNodeTranslations now checks the known-translation
  set before overwriting a field's display_name — user-customized values
  (not present in any locale file) are left untouched while standard
  translatable values continue to update correctly on locale switch

- Update ComponentDisplayNamesType to include per-field translation sets

* fix(i18n): correct updateComponent.breaking translation key

Change English source from "Breaking" to "Breaking Change" so GP
produces correct translations (all locales were getting "Breaking News"
variants). zh-Hans now correctly shows 重大变更, consistent with the
existing breakingUpdateDesc body text.

* chore(i18n): re-download frontend translations after reverting breaking key to "Breaking"

* fix(i18n): extract and translate FileComponent description

The extraction script silently skipped @property descriptors when reading
description from component classes. Add a fallback to _base_description
for components that use a dynamic @property description.

Unify _base_description with the string used inside get_tool_description()
so there is a single source of truth, then re-run extract/upload/download
to add the missing translations for FileComponent description and Knowledge
component strings across all locales.

* fix(ui): redesign outdated-components banner with title + list layout

Replace long sentence-style summary with bold "Flow needs review" title
and short per-condition bullet lines. Change Dismiss All button from
link to outline variant. Add 3 new i18n keys and sync all locale translations.

* fix(i18n): add missing backend locale translations for de, es, pt, zh-Hans

Regenerated via GP download script after merging release-1.10.0 changes.

* [autofix.ci] apply automated fixes

* fix(i18n): resolve ruff lint errors in i18n utils and endpoints

* fix(lint): suppress SLF001 for internal class attribute access in FileComponent

* [autofix.ci] apply automated fixes

* [autofix.ci] apply automated fixes (attempt 2/3)

* [autofix.ci] apply automated fixes

* starter templates

* fix(tests): update outdated-banner assertions to match redesigned layout

* [autofix.ci] apply automated fixes

* fix(docs): restore accidentally deleted memory-base docs from release-1.10.0

* fix(credentials): restore DB-first API key resolution and tests from release-1.10.0

* [autofix.ci] apply automated fixes

* fix(i18n): revert fetchErrorComponent key to common.retry (out of scope)

* [autofix.ci] apply automated fixes

* chore(i18n): sync backend and frontend locale files from GP

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Antônio Alexandre Borges Lima <104531655+AntonioABLima@users.noreply.github.com>
2026-05-29 20:23:49 +00:00
42ad7ebf80 fix: use Langflow logo on loading screen and remove size jump glitch (#13417)
* change loading to use langflow logo

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-05-29 16:51:48 -03:00
a875c1dfcf feat: sync wxO agent name and description with db (#13026)
* feat: add wxO agent name to api list items

* feat: expose wxO agent metadata in deployment provider data
Add a validated Watsonx Orchestrate deployment item provider_data contract that carries agent name, display name, description, tool IDs, environments, and detail-only LLM metadata.
Use that shared contract in the adapter service and API mapper so list, get, sync, and snapshot binding paths parse provider metadata consistently and fail with structured internal errors when the adapter payload is invalid. Update unit coverage for list/get shaping, sync provider_data, optional LLM handling, empty tool IDs, and contract validation failures.

* feat(deployments): rename deployment label to display name

Rename deployment DB/local contracts from name to display_name so resource_key remains the provider identity and duplicate display labels are allowed.

- Add Alembic migration to rename deployment.name, drop provider-scoped display-name uniqueness, preserve resource_key uniqueness, and restore downgraded names safely.
- Update Deployment model, CRUD create/update/list/count paths, related attachment queries, validation, and conflict messages for display_name.
- Remove deployment display-name conflict checks so duplicate labels can coexist under the same provider account.
- Reject local DB names filters unless load_from_provider=true, keeping names as provider technical-name filtering only.
- Update deployment API route handling and base/watsonx mapper response shaping to read display_name from local rows.
- Update backend unit and integration tests across deployment CRUD, route handlers, mappers, sync, telemetry, flow/project responses, names filters, and attachment paths.

* Update deployment API contract to use display_name
Rename deployment REST request and response fields from name to display_name for Langflow-tracked deployments while preserving provider-only names filtering for load_from_provider=true. Map display_name through create, update, get, list, and status responses, and document that stored/displayed deployment names are synced from the provider.
Update deployment mappers and route tests for the new contract, including rejection of DB-mode names filtering and integration coverage for local display_name responses versus provider name payloads.

* feat: sync provider deployment display metadata
- Rename deployment-facing name semantics toward display_name while preserving resource_key as the stable provider identity
- Add provider metadata extraction contracts for list/get sync and wire routes through shared sync helpers
- Sync provider-owned display_name and description into local deployment rows on list/get
- Preserve updated_at during provider metadata sync so read reconciliation does not look like a local edit
- Decouple wxO technical agent names from user-facing display labels by generating langflow_agent_<id> names
- Stop changing wxO technical name when updating display_name or description
- Remove duplicated display_name and description from wxO provider_data for Langflow-tracked responses
- Require wxO provider display metadata instead of falling back to technical names
- Wrap malformed wxO get metadata as deployment errors instead of leaking KeyError
- Update deployment attachment listing/counting to ignore orphaned flow-version links
- Normalize LFX deployment create/update names with non-empty string constraints
- Add real SQLite CRUD coverage for metadata sync and orphaned attachment filtering
- Add deployment integration coverage for get/list provider metadata sync into DB rows
- Add wxO mapper, service, route, and schema tests for display metadata, generated technical names, and update behavior

* feat: align deployment API with provider display names

- Move tracked wxO deployment create/update labels out of top-level request fields and into `provider_data.display_name`.
- Remove top-level `display_name` from tracked deployment list, get, create, and update responses so provider-owned labels are returned through `provider_data`.
- Add wxO `provider_data.name` for the provider technical agent name and `provider_data.display_name` for the user-facing agent label in create/update/get/list response shaping.
- Remove deployment-list `names` filtering from the REST route, mapper list params, synced list helper, DB list/count helpers, LFX list schema, and wxO service query params.
- Change existing wxO agent onboarding to fetch the provider resource first and create only the local Langflow tracking row.
- Reject create-time mutations when `provider_data.existing_agent_id` is used, including display/LLM/tool/flow changes and explicit description updates.
- Seed local deployment `display_name` and `description` for existing-agent onboarding from provider metadata instead of request fields.
- Add provider-specific mapper hooks to build local `Deployment` models and local update kwargs from validated provider payloads.
- Add `create_deployment_from_model` so routes can persist mapper-built deployment rows without duplicating provider-specific field extraction.
- Require `provider_data.display_name`, `provider_data.llm`, and at least one flow/tool operation for new wxO agent creation.
- Preserve metadata-only update support while routing wxO display-name updates through `provider_data.display_name` and description updates through the public description field.
- Include wxO technical deployment names in adapter create/update result payloads so API responses can expose provider technical names alongside display labels.
- Truncate provider-synced deployment descriptions to the deployment description limit before storing local metadata.
- Remove the tracked deployment status route/schema and mark wxO status lookup as not configured instead of inferring health from draft-agent metadata.
- Tighten LFX update validation by rejecting explicit null technical names while still allowing explicit null descriptions.
- Keep wxO config and snapshot list responses as validated provider payloads instead of collapsing empty payloads to null.
- Update backend and LFX tests for provider-data display labels, removed top-level display names, removed deployment-name filters, existing-agent onboarding, status route removal, metadata sync truncation, and update validation.

* add changes from mapper base

* feat: generate managed wxO technical names
- Generate Langflow-managed wxO agent technical names as `lf_<normalized_display_name>_<short_uuid>`
- Reject display labels that cannot contribute a normalized name segment instead of falling back silently
- Generate a fresh wxO technical name when an agent display label changes
- Keep update payload branching explicit so description, LLM, and name updates only send intended fields
- Use update retry semantics for wxO agent updates
- Make wxO name validation errors use explicit field labels such as `Connection app id`, `Tool name`, and `Agent name`
- Update wxO adapter and mapper tests for managed technical names and resource-specific validation messages

* fix: separate wxO deployment technical names from labels

- Keep adapter-level deployment name fields as provider technical names.
- Move wxO user-facing labels to provider_data.display_name.
- Let the wxO adapter generate Langflow-managed technical names when spec.name is omitted.
- Use the langflow_ prefix with fresh UUID suffixes for generated wxO technical names.
- Strictly validate explicit technical names without rewriting them.
- Reject explicit null or blank values for technical name, display name, LLM, and description updates.
- Allow symbol-only display names by falling back to the resource type for generated names.
- Clarify fallback naming errors when both display name and resource cannot produce a valid segment.
- Add display_name support to wxO create and update payload contracts.
- Align mapper create and rollback behavior with adapter-owned technical name generation.
- Preserve rollback behavior for blank descriptions by mapping them to null.
- Update LFX deployment schemas for optional adapter name fields.
- Fix the deployment rename migration dependency to keep Alembic on a single head.
- Update deployment and wxO tests for the new name contract and validation behavior.

* refactor: separate wxO tool display and technical names

- Replace user-facing wxO tool label inputs with tool_display_name in create, update, and rename payload contracts.
- Remove mapper-side wxO tool technical-name normalization and validation, so user labels are no longer treated as provider technical names.
- Add wxO flow-artifact provider-data validation that requires tool_display_name and generates provider_data.tool_name when omitted.
- Keep provider_data.tool_name as the adapter-owned wxO technical name and provider_data.tool_display_name as the user-facing label.
- Use generated provider_data.tool_name as the raw tool correlation key for tools.raw_payloads and operations[*].tool.name_of_raw.
- Keep top-level raw BaseFlowArtifact.name separate from wxO technical names instead of overloading it for provider correlation.
- Add mapper-local grouped flow-tool payload data containing display_name, provider_data, and raw_name for each flow version.
- Build wxO flow tool provider_data through the adapter payload slot instead of a mapper-owned artifact schema.
- Add create/update adapter payload builder helpers that validate provider payloads through the configured adapter slots.
- Convert adapter-bound payload validation failures during mapper construction into internal contract errors rather than client 422s.
- Remove the generic base mapper create-flow-artifact provider-data helper because wxO now owns provider-specific tool metadata.
- Update create flow mapping to derive default tool_display_name from the flow name and generate technical tool names internally.
- Update update flow mapping to derive tool_display_name for raw flow payloads and emit rename_tool only for existing attached tools.
- Preserve bind, unbind, attach, remove, and rename operation behavior while switching raw selectors to generated technical names.
- Add flow-version provider-data shaping that exposes app_ids, technical tool_name, and user-facing tool_display_name.
- Require snapshot/list item provider data to include both technical name and display name so corrupt provider data fails fast.
- Update deployment flow-version schema documentation to tell clients to display provider_data.tool_display_name and treat provider_data.tool_name as technical metadata.
- Update wxO create/update planning to key raw tools by provider_data.tool_name instead of BaseFlowArtifact.name.
- Update wxO tool creation to set wxO name from provider_data.tool_name and wxO display_name from provider_data.tool_display_name.
- Remove redundant downstream None checks for tool_name and tool_display_name after schema validation guarantees them.
- Remove the raw-tool-name helper and direct None filtering now that tool_name is generated by the provider-data schema.
- Rename provider rename operation payload from new_name to tool_display_name.
- Generate technical names for rename updates from tool_display_name rather than using the display label as the provider name.
- Load current agent tools once during update apply and reuse that tool map for connection deltas, renames, and connection pre-seeding.
- Consolidate existing-tool connection deltas and renames into one helper with separate delta and rename loops and one provider update batch.
- Ensure a tool with both connection changes and a display-name rename is updated once using a single merged writable payload.
- Preserve rollback snapshots for existing tools before connection or rename mutations are applied.
- Pre-seed resolved connection ids from loaded agent tool bindings while letting explicit operation resolution overwrite provider-seeded values.
- Keep later provider binding values for duplicate app ids during pre-seeding, matching explicit update overwrite semantics.
- Add snapshot provider-data extraction in the wxO service that carries technical name, display name, and Langflow connection bindings.
- Update mapper tests for create raw tool payloads, display-name overrides, generated technical names, raw correlation, and rename operations.
- Update adapter schema tests for raw tool pools keyed by generated provider technical names and required display-name provider data.
- Update service/update tests for rename batching, loaded-tool reuse, connection delta preservation, rollback behavior, and ownership checks.
- Update snapshot and flow-version response tests to assert both technical and display tool metadata.

* feat(deployments): sync provider display metadata

- BE `api/v1`, `mappers/deployments`: Source local deployment create and update metadata from provider adapter results so `display_name` and `description` stay aligned with authoritative provider state.
- BE `mappers/deployments`, `database/models/deployment`: Replace the removed deployment metadata schema with mapper-owned CRUD kwargs for list/get/update sync while preserving flexible provider-specific metadata handling.
- BE `mappers/deployments`, `database/models/deployment`: Add description truncation with structured callsite/provider logging and log actual DB metadata sync writes with changed fields and before/after lengths.
- BE `database/models/deployment`: Keep DB metadata sync focused on real changes so provider descriptions truncated locally do not cause unnecessary writes when cached values already match.
- BE `services/adapters/deployment/watsonx_orchestrate`: Update wxO create/update result contracts to include provider display metadata, technical `name`, descriptions, and snapshot/tool binding details consistently.
- BE `services/adapters/deployment/watsonx_orchestrate`: Build wxO create agent payloads once before provider create, carry the resolved provider description into create results, and keep wxO description fallback behavior explicit.
- Both BE `services/adapters/deployment/watsonx_orchestrate` and FE `deploymentsPage`: Separate wxO technical names from user-facing display labels across adapter results, UI payloads, and tests.
- FE `controllers/API/queries/deployments`, `deploymentsPage`: Move deployment create/update payloads to `provider_data.display_name` and `tool_display_name`, removing stale top-level `name` and `tool_name` usage.
- FE `deploymentsPage`, `deploy-choice-dialog`: Default tool display names to the flow name instead of generated technical suffixes, and use keyed selected flow versions to distinguish repeated flow attachments.
- FE `deploymentsPage`, `deploy-choice-dialog`: Update deployment attachment and deploy-choice dialog flows to use selected-flow-version keys, provider tool display names, and current flow names consistently.
- FE `controllers/API/queries/deployments`, `deploymentsPage`: Remove provider name-check hooks, wxO name-normalization helpers, and related validation tests now that display names are not technical identifiers.
- FE `deploymentsPage`: Relax deployment display-name validation to require only non-empty input, allow edit-mode display-name changes, and send changed display labels through `provider_data.display_name`.
- FE `deploymentsPage`: Make deployment display/technical-name helpers null-safe when provider data is missing, with resource-key fallbacks for table, details, delete, and test flows.
- FE `deploymentsPage`: Update deployments page UI to render display names separately from technical names and avoid exposing descriptions in table rows.
- FE `controllers/API/queries/deployments`: Align create, patch, list, and attachment query types with provider metadata and `tool_display_name` contracts.
- LFX `services/adapters/deployment`: Align deployment create results with the provider metadata contract by carrying type, technical name, and description instead of stale config/snapshot result fields.
- BE `database/models/deployment`: Add a TODO for DB-level length enforcement of provider-synced display metadata.
- Tests `src/backend/tests`, `src/frontend/**/__tests__`, `src/lfx/tests`: Add/update coverage for provider metadata sync, truncation, update persistence, response shaping, display-name validation, keyed attachments, and nullable provider data.

* fix: tighten watsonx deployment payload contracts

- Remove snapshot-name filtering from deployment snapshot listing:
  - Drop the `names` query parameter from the API route.
  - Remove `snapshot_names` from `SnapshotListParams`.
  - Remove wxO snapshot-name normalization and service lookup paths.
  - Remove direct E2E scenarios and unit coverage for snapshot-name listing.

- Make wxO deployment provider data match the provider API contract:
  - Require wxO agent list/detail payloads to include `tools` and `llm`.
  - Read `agent["tools"]` and `agent["llm"]` directly instead of defaulting or normalizing missing provider fields.
  - Include `llm` in deployment list/provider-data shaping.
  - Preserve provider-owned strings instead of silently stripping or dropping blanks in result payloads.

- Tighten wxO API and adapter payload validation:
  - Replace ad hoc string validators with shared non-empty string annotations where appropriate.
  - Reject explicit `null` for update scalar fields such as `llm` and `display_name`.
  - Require non-empty provider ids, tool ids, app ids, model names, environments, and execution ids in wxO payload schemas.

- Fix wxO update payload patch semantics:
  - Build provider update bodies using `model_fields_set` so omitted `llm` and `display_name` stay omitted.
  - Keep `exclude_unset=True` for validated update payload serialization.
  - Preserve LLM-only update behavior without emitting omitted scalar fields as explicit nulls.

- Simplify wxO update planning and rollback:
  - Remove `extract_agent_tool_ids` and rely on the wxO agent `tools` field directly.
  - Fetch only existing tools that update operations mutate or rename.
  - Stop pre-seeding connection bindings from unrelated attached tools; operation app ids now resolve through explicit update operations.

- Adjust wxO deployment listing behavior:
  - Treat singular `environment` as a strict local filter.
  - Leave plural provider parameters as provider passthrough.
  - Rename deployments table header from `Name` to `Display Name`.

- Update tests for the new contracts:
  - Remove snapshot-name route, mapper, service, and E2E coverage.
  - Add/update coverage for required `llm`, required provider metadata, null update scalar rejection, stale snapshot handling, and provider-owned string preservation.
  - Update frontend table header expectations.

* direct key access in tool logs

* fix(deployments): preserve full deployment descriptions
- Remove provider metadata sync logging that emitted deployment identifiers and field length changes.
- Remove description truncation from deployment mapper contracts and Watsonx metadata mapping.
- Remove the deployment description max-length cap from LFX schemas, Langflow API schemas, and database CRUD validation.
- Pass provider descriptions through unchanged during create, update, list, and get metadata sync flows.
- Update backend, integration, and LFX tests to assert long descriptions are accepted and preserved.

* refactor(deployments): centralize mapper payload slot validation
- Move shared API request and adapter slot parsing into BaseDeploymentMapper.
- Add provider label enforcement so mapper subclasses fail fast when error text cannot identify the provider.
- Add outer request validation support for provider_data slots and map validation failures to 422 responses.
- Move wxO existing-agent description conflict validation into the wxO create payload contract.
- Update wxO mapper call sites to use the shared base parsing helpers.
- Add focused tests for provider label enforcement, slot error mapping, outer request validation, and existing-agent description conflicts.

* fix downgrade migration to actually recover unique constraint for the name column

* fix(deployments): clarify wxo deployment name labels
- Rename user-facing wxO deployment display-name labels from "Display Name" to "Name" across the deployment form, review step, table, loading state, and details modal.
- Label the provider-backed technical identifier as "Technical Name" in deployment details so it is distinct from the editable display name.
- Restore deployment descriptions under the deployment name in the deployments table.
- Align validation copy and frontend tests with the updated label behavior.

* fix(deployments): validate snapshot patch project scope
- Reuse the existing deployment project-scope validator in the snapshot patch route before resolving provider credentials or mutating wxO artifacts.
- Enforce that replacement flow versions belong to the tracked deployment project while keeping different-flow snapshot updates allowed.
- Add route coverage proving project validation uses the deployment row's project_id and short-circuits before provider adapter work.
- Update stale wxO mapper and sync test expectations for the current provider-data contract and mapper error messages.
- Verified backend deployment tests and isolated lfx deployment tests are green.

* test(deployments): align list integration tests with current API
Update deployment list integration tests after removal of the names
query parameter and list items without a top-level display_name.
Assert synced display names via refreshed DB rows and provider
entries instead of response fields that no longer exist.

* rename test file

* rename test file

* fix(deployments): tighten wxo provider metadata contract
Trust required wxO API fields directly, remove duplicate deployment names from provider_data, and keep mapper output sourcing names from top-level deployment metadata.

* fix(deployments): preserve provider display names in db
Keep deployment display names exactly as received while still rejecting blank values, and continue normalizing resource keys for DB lookups.

* fix(deployments): align patch payload and display_name schema
Send provider_data.llm only when changed in deployment PATCH payloads, preserving granular update behavior and no-op fallback semantics. Keep deployment.display_name nullable across migration/model paths and align wxO snapshot tests with the required display_name provider contract.

* fix test

* chore: remove updates to e2e adapter tests, defer to a follow up PR

* refactor(deployments): simplify wxO provider list shaping
Flatten provider list entries directly from adapter provider_data and
validate once via parse_adapter_slot on deployment_list_result. Remove
redundant per-item schema validation, id strip filtering, and description
guesswork; require provider_data to be a dict and let canonical item
fields override provider payload.

* simplify downgrade migration to always append deploymend id to the name

* fix(wxo): keep mapper imports free of IBM SDK via payloads
Move Watsonx naming and field validation helpers into payloads.py so
mapper -> payloads no longer imports utils.py and its IBM client deps.
Point core modules and tests at the shared payload helpers and leave
utils.py for runtime error/utility helpers only.

* fix(watsonx): lazy adapter package imports and explicit registration

Move adapter registration into register.py so importing payloads or the
mapper does not load optional IBM SDK modules via package __init__.py.
Use lazy package exports for service and types, dedupe update result IDs
in WatsonxDeploymentUpdateResultData, and use direct BaseFlowArtifact
field access in flow tool creation.

* fix(test): align Watsonx guards with lazy package imports
Skip SDK-backed service tests via importorskip on IBM packages instead of
importing the lightweight watsonx_orchestrate package. Run schema and mapper
tests against payloads directly and remove obsolete module-level skips so
Py 3.10 CI can collect SDK-free Watsonx tests.

* fix(test): skip explicit Watsonx modules without IBM SDK

Guard Watsonx-named schema and mapper test modules by importing
WatsonxOrchestrateDeploymentService, which exercises the lazy package export
and fails when optional IBM SDK dependencies are unavailable.

* fix(test): align deployment E2E mocks and review-step expectations

Add provider_data.display_name to deployment mocks so delete and edit
tests match getDeploymentDisplayName. Update review-step Playwright tests
for display-name behavior that no longer blocks deploy on duplicates or
numeric flow names.

* fix ff test

* fix(deployments): hide technical name in details and fix migration chain
Show only the display name in the deployment info grid. Point the
display_name rename migration at f6b3ce6845d4 so Alembic ordering is correct.

* fix down revision

* fix ruff

* fix playwright test

* fix(deployments): send only changed PATCH fields and trust API display names
Stop re-sending unchanged description on update and skip the PATCH when
there are no changes. Resolve UI labels from provider_data.display_name
only, without resource_key or technical name fallbacks.

* fix(deployments): restore i18n labels and polish edit-save UX
Restore deployments.labelName/columnName and related keys instead of
hardcoded English. Show an em dash when display_name is missing, remove
dead toolNameErrors code, and toast when edit save has no changes.

* fix(deployments): scope snapshot list and patch to deployment owner

Remove the actor-owned provider lookup before deployment resolution so
collaborators with READ on a shared deployment can list snapshots. Validate
replacement flow versions under owner_id on snapshot PATCH, not the actor.

* fix(test): deployment edit E2E and Biome import order

Edit stepper skips PATCH when there are no changes, so the E2E test
updates the deployment name before submit. Organize imports in
select-gpt-model.ts for Biome.

* fix(deployments): align provider metadata sync with RBAC owner scope

Match metadata batch updates on (deployment id, owner user_id) so shared
deployment list/get sync writes in the owner's namespace. Stop rolling
back the outer session when attachment sync fails on GET so provider
display_name/description sync is preserved. Group list attachment
reconcile by deployment owner and use row.user_id for stale deletes.

* fix(test): align deployment sync mocks with row owner scope
Add user_id to deployment row mocks so list_deployments_synced tests
match per-owner delete and metadata batch behavior. Remove unused
imports in the deployment step-type component.

* [autofix.ci] apply automated fixes

* revert(deployments): restore rollback, direct metadata keys, single-owner list sync

Per PR review: bring back outer session rollback on GET attachment-sync
failure, fail fast on provider metadata dict access, and use a single
user_id for list attachment reconcile (N+1 per-owner grouping deferred).

Owner-scoped metadata batch updates in CRUD are unchanged.

* update down revision

* fix(frontend): remove unused i18n import in step-review utils

Drop leftover import after refactor so Biome check passes.

---------

Co-authored-by: himavarshagoutham <himavarshajan17@gmail.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-05-29 18:14:15 +00:00
d4013e30b8 feat(i18n): translate missing frontend strings across Memories, Knowledge Base, toasts, and notifications (#13279)
* feat(i18n): translate missing frontend strings for flow list and DB Providers page

- Wrap "Edited X ago" timestamp in flow list with t() using new
  mainPage.editedAgo and mainPage.timeElapsed.* keys (plural forms)
- Add settings.nav.dbProviders and settings.dbProviders.* keys covering
  page title, description, badges, button labels, and all toast messages
- Wire useTranslation into DBProvidersPage, ProviderListItem,
  ProviderConfigurationPanel, TextFieldRow, BooleanFieldRow, and
  dbProviderInputComponent
- Download updated translations for fr, ja, es, de, pt, zh-Hans

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* feat(i18n): translate DB provider descriptions and config field labels

Add translation keys for all provider descriptions (Chroma Local,
Chroma Cloud, OpenSearch, Astra DB, MongoDB Atlas, Postgres pgvector)
and all configField labels and helperTexts (API Key, Tenant, Database,
Region, Cluster URL, Username, Password, index/vector/text fields, TLS
toggles). Use dynamic key lookup with defaultValue fallback so new
providers degrade gracefully. Download updated translations for all
six locales.

* [autofix.ci] apply automated fixes

* feat(i18n): translate missing strings in Memories, Knowledge Base, toasts, and notifications

- Translate untranslated strings in Knowledge Base upload modal (DB Provider label/description, Metadata section)
- Translate all Memories feature strings (sidebar, create modal, detail header, chunk table, empty states)
- Wire all hardcoded toast/notification strings through t() across 14 files (flow store, model provider, deployments, update components, shortcuts, file manager, dict/JSON editors, utils)
- Delete orphaned alerts_constants.tsx (all imports already removed)
- Add ~100 new keys to en.json across memory, errors, deployments, shortcuts, updateComponents, and files namespaces
- Upload to GP and download all 6 translated locale files (fr, ja, es, de, pt, zh-Hans)

* fix(i18n): translate Memories tooltip in left panel nav

* fix(ui): left-align card description text on empty page

* feat(i18n): translate hardcoded strings across UI components and update locale files

Wraps ~100 hardcoded strings in t() calls across 45 source files covering
voice assistant, deployments, flow build, playground, assistant panel,
knowledge base ingestion, inspection panel, IO modal, and more. Adds
corresponding keys to en.json and syncs all locale files (fr, de, es, pt,
ja, zh-Hans) via the GP pipeline.

Also fixes a React 19 RefObject<T | null> type mismatch in visual-variants.ts.

* [autofix.ci] apply automated fixes

* fix(i18n): translate shortcut success/error messages with proper name i18n

Added shortcuts.successChanged and shortcuts.successReset keys so success
toasts display the translated shortcut name via shortcuts.name.* lookup.
Updated EditShortcutButton to use existing translated error keys and the
new success keys with toCamelCase name resolution.

* fix(i18n): translate "or visit" and "+N more" in file upload modal

* fix(i18n): translate NoteNode context menu and fix missing vector store RAG note translations

- Add t() calls to NoteNode select-items.tsx for Duplicate/Copy/Docs/Delete menu items
- Fix docsUnavailable notice string in NoteToolbarComponent
- Download missing fr/ja translations for template_notes.vector_store_rag keys from GP

* fix(i18n): translate Delete label in edge context menu

* fix(i18n): translate Version History Export/Delete menu and preview overlay strings

- VersionListItem: replace hardcoded Export/Delete with t("flow.menu.*")
- VersionPreviewOverlay: replace hardcoded Current Flow, Previewing, (Read-Only),
  Loading preview... with t("version.*") calls
- Add 4 new keys to en.json; upload to GP and download all locale translations

* fix(i18n): translate hardcoded strings in Update Components modal

Replace Component/Update Type headers, Breaking label, and modal title
with t() calls; add 5 new keys to en.json and sync all locale translations

* fix(i18n): translate assistant panel hardcoded strings

- model-selector: replace "Loading..." and "Select model" with t() calls
- assistant-panel.constants: convert getAssistantPlaceholder() to use i18n.t()
  with 5 keyed placeholder variants
- messages.ts: replace 48 hardcoded progress/thinking strings with i18n key arrays
  (8 thinking + 5 groups × 8 progress); VALIDATION_FAILED/RETRYING arrays were
  dead code and removed
- Add 55 new keys to en.json; upload to GP and download all locale translations

* [autofix.ci] apply automated fixes

* fix(i18n): update sidebarSegmentedNav test to expect i18n key for memories

The memories nav item was updated to use "memory.sidebarTitle" as its
label/tooltip i18n key, but the test still expected the old hardcoded
"Memories" string.

* fix(i18n): replace deleted alerts_constants import with t() calls in PageComponent

The release-1.10.0 merge re-introduced an import from alerts_constants which
was deleted in Phase 1 of the i18n migration. This crashed the Vite dev server,
causing all Playwright tests to fail on startup.

Also fixes Biome import order in use-session-history.ts from the merge conflict
resolution.

* fix(i18n): restore ASSISTANT_PLACEHOLDERS export and translate formatDate fallback

- Re-export ASSISTANT_PLACEHOLDERS as translated strings computed from keys
  so getAssistantPlaceholder() returns from the array (restores test contract)
- formatDate() now returns i18n.t("memory.never") instead of "" for the
  empty-date fallback

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-05-29 15:57:30 +00:00
31b7a4cd05 fix: improve trace search functionality (#13383)
* improve trace search functionality

* [autofix.ci] apply automated fixes

---------

Co-authored-by: Olayinka Adelakun <olayinkaadelakun@Olayinkas-MacBook-Pro.local>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-05-29 14:55:20 +00:00
4a700dc5d1 fix(playground): expand session checkbox click target to full row height (#13349)
* fix(playground): expand session checkbox click target to full row height

The selectable-row checkbox wrapper was ``w-4 h-4`` (16x16 px) but the
row is ``h-8`` (32 px). The 8 px band above and the 8 px band below
the visible icon were dead zones that bubbled to the row's
``toggleVisibility`` and navigated to the session instead of toggling
selection — exactly the accidental-navigation UX the bug ticket
describes.

Grow the wrapper to ``w-4 h-8`` so the click target captures the full
row height. Width stays narrow so the text alignment is unchanged; the
icon itself stays ``h-4 w-4``, centered via the existing
``flex items-center justify-center``. Visual position is identical.

Adds ``__tests__/session-selector-checkbox-click-target.test.tsx``
(3 cases): wrapper className guard (h-8 + w-4, not h-4), click on the
wrapper outside the icon triggers selection without bubbling to
toggleVisibility, and click on the inner icon still toggles selection.

* test(playground): drop checkbox-click-target test file (not needed per review)

* [autofix.ci] apply automated fixes

* test: align session-selector checkbox assertions with full-height click target

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-05-29 14:42:35 +00:00
4e6981368c fix(traces): full-height trace panel, and status badge position (#13385)
* fix(traces): full-height trace panel, and status badge position

* [autofix.ci] apply automated fixes

---------

Co-authored-by: Olayinka Adelakun <olayinkaadelakun@Olayinkas-MacBook-Pro.local>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-05-29 12:42:48 +00:00
3f62caff8f test(e2e): Replace non-terminal waits to fix flaky Windows specs (#13407)
* fix assistant test on windows

* improve slider component test
2026-05-29 09:27:53 -03:00
f8ada15e2a feat(components): Add IBM DB2 Vector Store component (#13237)
* feat(ibm): add DB2 Vector Store component

Add comprehensive IBM DB2 Vector Store integration for Langflow.

Components Added:
- DB2VectorStoreComponent: Main vector store component
- DB2VS: LangChain-compatible vector store implementation
- DB2 security validators: Input validation and sanitization

Features:
- Vector similarity search (Similarity, MMR, Similarity Score Threshold)
- Secure connection handling with input validation
- Metadata filtering for complex data types
- Duplicate detection support
- Batch document ingestion

Test Coverage:
- 41 unit tests (38 passing, 3 skipped)
- Component integration tests
- Security validation tests
- DB2VS class tests

Documentation:
- Comprehensive developer guidelines

* refactor(db2): simplify component to match Chroma patterns

- Remove complex data ingestion (CSV, DataFrame, dict, Message handling)
- Add _add_documents_to_vector_store() method matching Chroma
- Add similarity_score_threshold search type
- Simplify data ingestion from 220 to 45 lines (80% reduction)
- Add 5 new tests (similarity_search, mmr_search, search_with_different_types, duplicate_handling, metadata_filtering)
- All 41 tests passing (38 passed, 3 skipped)

BREAKING CHANGE: Component now only accepts Data objects for ingestion.

* ci: fix CI failures - update component index and starter projects

- Regenerate component_index.json with DB2 component
- Update all starter projects with new component registry
- Fix ruff formatting issues

* ci: trigger CI re-run to fix merge issue

* ci: add merge conflict resolution for component_index.json in autofix workflow

Handle merge conflicts in the Update Component Index job by:
- Automatically resolving component_index.json conflicts using --theirs strategy
- Failing if non-generated files have conflicts (requires manual resolution)
- Completing the merge after resolving generated file conflicts

This prevents the workflow from failing when component_index.json has conflicts
during PR updates, as this file is auto-generated and can be safely regenerated.

* fix: Remove DB2SQLComponent reference from IBM components

- Removed DB2SQLComponent from __init__.py as the db2_sql.py module doesn't exist
- This fixes the test_all_modules_importable test failure
- Fixes CI failure in Unit Tests - Python 3.14 - Group 5

* revert: Remove unrelated starter project JSON changes

* revert: Remove unrelated CI workflow and formatting changes

* docs: add DB2 Vector Store .mdx documentation following Chroma DB structure

* fix: address CodeRabbit review comments - add __init__.py docstring and implement score threshold filtering

- Added docstring to src/backend/tests/unit/components/__init__.py to fix Ruff INP001 error
- Added FloatInput score_threshold parameter (default 0.5) to DB2 Vector Store component
- Implemented threshold filtering in similarity_score_threshold search mode
- Filters results to only include documents with relevance scores >= threshold

* chore: remove auto-generated and unnecessary files from PR

- Remove uv.lock (dependency lock file - auto-generated)
- Remove src/frontend/package-lock.json (frontend lock file - auto-generated)
- Remove src/lfx/src/lfx/_assets/component_index.json (auto-generated by CI)
- Remove .secrets.baseline (security baseline - auto-generated)
- Remove starter_projects JSON (auto-generated example)
- Remove tweaks_builder.py (unrelated test helper)

Per DEVELOPMENT.md guidelines, these files should not be committed by contributors.

* chore: restore auto-generated files to keep PR focused on DB2 component

* fix(ci): update auto-generated files and fix docs build

- Update component index with new IBM DB2 components (363 components, 97 modules)
- Update frontend package-lock.json
- Fix docs build by removing reference to missing image in bundles-db2.mdx

Fixes CI failures:
- Update Component Index
- Update Starter Projects
- Test Docs Build

* feat(db2): add SSL/TLS support to DB2 Vector Store component

- Add SSL/TLS encryption support for DB2 database connections
- Add SSL certificate validation and download functionality
- Support local certificate files (.crt, .pem, .cer) and URLs
- Add optional certificate password support for encrypted keystores
- Implement automatic cleanup of temporary downloaded certificates
- Add comprehensive error handling and logging for SSL connections
- Update component_index.json with new SSL configuration inputs
- Update package-lock.json dependencies

Security improvements:
- Validate certificate paths and file permissions
- Support system default CA certificates (recommended for IBM Cloud DB2)
- Redact sensitive information in error messages
- Clean up temporary files on connection failure

This enhancement enables secure encrypted connections to DB2 databases,
which is recommended for production environments.

* [autofix.ci] apply automated fixes

* refactor(db2): minimize metadata storage in DB2 vector store

- Clear metadata before storage to reduce unnecessary data (file_path, filename, etc.)
- Return only text content during retrieval for cleaner results
- Optimize list comprehension for better performance (PERF401, RET504)

* test: remove skipped tests from DB2 vector store test suite

- Removed version compatibility tests for versions where component didn't exist
- Changed file_names_mapping to return empty list for new component
- Overrode base class version tests to prevent skips
- Fixed linting issues (hardcoded passwords, nested with statements)
- All 40 tests now pass with 0 skipped tests

* fix(tests): update DB2 vector store test description format

Fixes test_component_metadata assertion to match the actual component
description format. The test was failing due to line wrapping differences
in the multi-line description string.

Fixes CI failure in PR #13163

* [autofix.ci] apply automated fixes

* chore: trigger CI re-run to resolve flaky test failures

* fix(tests): mark OpenAI-dependent test as api_key_required to prevent CI failures

* restructure as new bundle package

* [autofix.ci] apply automated fixes

* fix(ibm): improve DB2 Vector Store component reliability and validation

* fix: implement SSL/TLS toggle functionality for DB2 Vector Store

- Add update_build_config method to dynamically show/hide SSL certificate fields
- SSL certificate path and password fields now only visible when use_ssl is enabled
- Improves UX by hiding irrelevant fields when SSL is disabled
- Update component_index.json with new component configuration
- All 38 existing tests pass

---------

Co-authored-by: Dhruv Chaturvedi <dhruv_insights@mac.lkw-in.ibm.com>
Co-authored-by: Dhruv Chaturvedi <dhruv_insights@Dhruvs-MacBook-Pro.local>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: priyanshu-krishnan1 <priyanshu.krishnan1@ibm.com>
Co-authored-by: Eric Hare <ericrhare@gmail.com>
2026-05-29 02:58:30 +00:00
2bfa634dfb feat: flow builder assistant with real-time canvas updates (#12575)
* add agentic api backend

* [autofix.ci] apply automated fixes

* add docs to feature

* ruff and test fixes

* ruff fixes

* fix lfx tests

* fix ruff style

* [autofix.ci] apply automated fixes

* [autofix.ci] apply automated fixes (attempt 2/3)

* refactor code improvements

* add rate limit to tests

* [autofix.ci] apply automated fixes

* new canvas control

* chat UI skeleton v0

* add empty state when doesnt have model provider

* add generating code statuses

* assist panel doc

* add stop button to cancel flow generation

* view code dialog

* add translation json flow and stop button on inputchat

* add floating state of the chat

* refacator frontend codes

* assistant docs.

* add execution from .py file

* update docs

* fix verbose error

* improve disabled placeholder

* unify placeholder messages

* start chat state closed

* add canvas behavior

* fix model selection and position chat

* dialog z100

* [autofix.ci] apply automated fixes

* docs update

* change crypto to uuid regular

* fix inexistent assistant

* chore: removed old unused implmentation

remoced old FF and all it's UI components

* add memory to flow..

* add prompt on agent

* [autofix.ci] apply automated fixes

* cherry-pick first commit

* cherry pick commit changes canvas

* code improvements

* fix session id null and close button

* add tests suite

* fix await error

* ruff style and checker

* feat: add pure flow-builder utilities to lfx

Add flow_builder subpackage with pure functions for manipulating
flow JSON dicts — component ops, edge creation with ReactFlow
handle format, topological layout, and dynamic field detection.

* feat: add MCP server for operating Langflow via REST API

FastMCP server exposing 15 tools across auth, flow, component,
connection, and execution groups. Agents can create flows, add
and configure components, wire connections, and run flows against
a Langflow server through MCP tool calls.

* feat: add langflow-mcp-client console script entry point

* [autofix.ci] apply automated fixes

* [autofix.ci] apply automated fixes (attempt 2/3)

* fix: use dict comprehension in setup.py to fix PERF403 lint

* fix: address PR review feedback on MCP client

- Add asyncio.Lock to prevent race condition in _client() under
  concurrent access
- Handle 204 No Content responses in delete() instead of calling
  resp.json() on empty body
- Fix weak assertion in test_default_values

* feat: auto-enable tool_mode when connecting component_as_tool

describe_component_type now shows component_as_tool as an output
for any component with tool_mode-capable outputs. When an agent
connects via component_as_tool, tool_mode is auto-enabled — no
extra step needed.

* refactor: move MCP server from langflow-base to lfx

The MCP server has no langflow dependencies — only httpx, mcp,
and lfx.graph.flow_builder. Moving it to lfx.mcp makes it usable
without installing langflow. Entry point: lfx-mcp.

* feat: improve MCP server UX for agents

- describe_component_type separates advanced fields from core ones
- search_component_types accepts output_type filter
- list_flows accepts query filter and includes ASCII graph repr
- get_flow_info includes ASCII graph repr
- add duplicate_flow tool
- add list_starter_projects tool

* feat: add use_starter_project tool and tests for new features

- use_starter_project creates a flow from a starter template by name
  (starter projects aren't fetchable by ID via /flows/)
- Tests for duplicate_flow, starter projects, graph repr, advanced
  fields, and output_type search

* docs: improve MCP tool descriptions for agent clarity

- Add server-level instructions with typical workflow guide
- Remove internal implementation details from tool descriptions
- Add cross-references between related tools
- Mention component_as_tool and graph diagrams where relevant

* docs: address subagent review feedback on tool descriptions

- Document return values for create_flow, add_component
- Clarify empty-query behavior for search_component_types
- Distinguish get_component_info (instance) vs describe_component_type (type)
- Explain connection type compatibility in instructions
- Clarify configure_component trigger field behavior
- State disconnect_components default when filters omitted

* feat: add batch tool for multi-action requests

Execute multiple actions in one call with $N.field references
to chain results. An agent can build a complete flow in a single
request instead of 6+ round trips.

* improvements UIUX

* change css canvas controls

* feat: add create_flow_from_spec tool for compact text-based flow creation

Accepts a compact text spec with nodes, edges (using real port names),
and config sections. Agents generate a simple string instead of
constructing nested JSON. Tool mode auto-enabled for component_as_tool.

Handles Prompt Template dynamic variables by parsing {var} from
template text and creating input fields. Cleans up flows on failure.
Type coercion for numeric/boolean config values.

* feat: add build_flow validation and create_flow_from_spec

build_flow validates flows by building the graph server-side.
create_flow_from_spec accepts a compact text spec with nodes,
edges, and config. Validates by default (optional).

Handles Prompt Template dynamic {variables}, auto-enables tool_mode
for component_as_tool, cleans up on failure, coerces config types.

* fix: isolate session state and harden MCP server

* pannel execution

* [autofix.ci] apply automated fixes

* fix: move test_flow_builder into tests/unit so CI collects coverage

* improve code gen

* [autofix.ci] apply automated fixes

* fix: address PR review feedback

- Fix test fixture to use contextvars instead of stale module attributes
- Raise ValueError on malformed spec lines instead of silently dropping
- Disambiguate duplicate component types in flow_graph_repr
- Narrow except Exception to ImportError in flow_graph_repr
- Add action-index context to batch error messages
- Fix stale/inaccurate docstrings (group count, "| ", field_name, category, build_flow)
- Mention create_flow_from_spec in MCP instructions

* feat: stream run_flow events via MCP progress notifications

run_flow now consumes Langflow's SSE stream and relays token events
to the MCP client via report_progress. Falls back to a regular POST
if the stream yields no result.

* test: add streaming integration tests for run_flow and stream_post

* chore: rebuild component index

* fix: Remove code execution from assistant validation path (#12244)

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>

* [autofix.ci] apply automated fixes

* fix: handle Message dicts in str field param processing

param_handler's str case called unescape_string on each list element
without checking if the element was a string. On subsequent agent calls,
chat history stores Message dicts in the list, causing
'dict' object has no attribute 'replace'.

Added _coerce_str_value helper that extracts .text from Message/Data/dict
objects before unescaping. Includes 4 regression tests.

* feat: add flow builder tools and propose_field_edit with JSON Patch

- builder.py: builds flow dicts from text specs using local component registry
- flow_builder_tools.py: 9 Langflow components for agent tooling
- propose_field_edit generates validated JSON Patches with dry-run verification
- flow_to_spec_summary converts flow dicts to compact summaries with IDs
- Module-level event queue for real-time UI updates during streaming

* feat: flow builder assistant with intent routing

- flow_builder_assistant.py: Python-based agent flow with 9 tools
- model_config.py: shared model config extracted from translation_flow
- Intent classifier recognizes build_flow, edit, and inspect requests
- Updated LangflowAssistant.json prompt to mention flow building
- 18 tests including graph construction and intent classification

* feat: SSE event pipeline for flow building and editing

- New SSE events: flow_update, flow_preview, flow_action (edit_field)
- assistant_service drains tool events during streaming for real-time updates
- Current flow context injected into all agent requests from DB
- Event consumer forwards flow_preview events through the pipeline
- extract_flow_json for text-based flow detection (fallback path)

* feat: frontend flow preview, edit cards, and real-time canvas updates

- FlowAction type for edit_field proposals with JSON Patch
- FlowEditCarousel: paginated Accept/Dismiss cards for field edits
- AssistantFlowPreview: mini ReactFlow canvas for new flow previews
- SSE handler dispatches flow_update and flow_preview events
- Chat hook applies flow_update events to canvas via setNodes/setEdges
- edit_field events stored as flowActions on messages for user review
- Strips flow_json blocks from visible chat content

* chore: add lfx logger to MCP server, log streaming fallback

* fix: resolve merge issues and harden flow builder state management

- Restore build_flow intent in translation prompt and LangflowAssistant system prompt
- Remove duplicate TYPE_CHECKING block from assistant_service.py (merge artifact)
- Add build_flow to intent classification plaintext fallback
- Add reset_working_flow to streaming finally block (lifecycle leak)
- Replace module-level globals with contextvars for concurrency safety
  in both components/tools and mcp flow_builder_tools
- Remove dead _save_working_flow (ThreadPoolExecutor in async antipattern)
- Handle remove_component and configure flow_update actions in frontend
- Log warning when flow JSON fallback triggers instead of tool events
- Add tests for build_flow/off_topic plaintext fallback and contextvar isolation

* feat: improve flow builder UX and consolidate tool implementations

- Add worked examples to flow builder prompt (new flow + edit flow)
- Add build_flow guardrail: returns error when canvas already has components
- Change ConfigureComponent to accept JSON params dict (batch updates)
- Remove duplicate flow_builder_tools.py from components/tools
  (was breaking test_get_all); single source in lfx.mcp.flow_builder_tools
- Update prompt to explicitly guide build vs edit tool selection

* fix: set_flow replaces canvas instead of appending, Python 3.10 compat

set_flow was using paste() which appends nodes with new IDs, causing
duplicates. Now uses setNodes/setEdges to replace canvas contents.

Also fixes asyncio.Barrier usage (3.11+) in concurrency test and
makes ConfigureComponent accept params as dict or JSON string since
tool frameworks may pass either.

* fix: soften build_flow guardrail and harden intent fallback parser

build_flow no longer hard-blocks on non-empty canvas. Users can now
create new flows while an existing one is open -- the prompt already
guides the agent to prefer edit tools when components exist.

Intent classification fallback now uses a strict regex pattern matching
quoted JSON values ("intent": "build_flow") instead of bare substring
matching, preventing prompt-echo misroutes on weaker models.

* feat: lock canvas while assistant is processing

Syncs the assistant panel's isProcessing state to the
assistantManagerStore so the canvas locks (effectiveLocked) while the
assistant is building or modifying the flow, preventing the user from
dragging nodes during real-time updates.

* feat: flow builder assistant with real-time canvas updates

Add flow builder assistant that builds and modifies flows directly on
the user's canvas via agent tools. SSE event pipeline streams
flow_update and flow_preview events for real-time canvas rendering.

- Flow builder tools: search, describe, add, remove, connect, configure,
  build_flow, propose_field_edit with JSON Patch
- Intent classification with build_flow routing
- Per-request state isolation via contextvars
- Strict regex fallback parser for intent classification
- Canvas lock while assistant is processing
- Frontend handles add, remove, connect, configure, set_flow actions
- Flow preview and edit card components

* fix connection llm mcp

* [autofix.ci] apply automated fixes

* add flow visualization on assistant

* add manage files to assistant

* [autofix.ci] apply automated fixes

* update documentation about file

* [autofix.ci] apply automated fixes (attempt 2/3)

* reasoning thinking v0

* flow builder improvement

* [autofix.ci] apply automated fixes

* add patch to canvas, improve cache and harness

* ruff style and checker fixes

* [autofix.ci] apply automated fixes

* [autofix.ci] apply automated fixes (attempt 2/3)

* fix tests

* fix jest tests

* UI ux improvements

* [autofix.ci] apply automated fixes

* ruff style and checker

* improve sec and harness

* ux warning banner tag assistant

* improve flow builder UI UX

* json updates

* [autofix.ci] apply automated fixes

* [autofix.ci] apply automated fixes (attempt 2/3)

* disable preview for many component

* fix message preview

* MCP and agent improvements

* ruff style and chceker

* fix ux display on generating artifacts

* guard rails and deterministic results improvements

* ruff style and checker

* [autofix.ci] apply automated fixes

* [autofix.ci] apply automated fixes (attempt 2/3)

* split flow_builder_tools, force per-user file isolation, add timeouts and guard rails

* ruff style and checker

* ruff style and checker

* [autofix.ci] apply automated fixes

* [autofix.ci] apply automated fixes (attempt 2/3)

* add model alert

* add padding on warning text

* [autofix.ci] apply automated fixes

* fix frontend tests

* fix credentials detection

* refactor playwright tests: remove duplicate tests and add good practices

* add send playground rule

* fix import dotenv

* fix fe tests

* fix light mode

* fix run flow test

* fix tests failing

* fix folder deletion test

* fix e2e tests

* constant text on tests

* fix publish test

* fix publish tests

* [autofix.ci] apply automated fixes

* [autofix.ci] apply automated fixes

* test: standardize new-project-flow helper into utils/flow

Follow-up to the cz/playwright-tests-refactor merge — align the
new-project-flow helper our branch added with the refactor's directory
and constants conventions:

- Move tests/utils/new-project-flow.ts -> tests/utils/flow/, next to the
  refactor's open-blank-flow / open-starter-project helpers; update the
  15 import sites.
- Use TID / TIMEOUTS constants inside the helper instead of raw
  test-id strings and literal 30000 timeouts, matching open-blank-flow.
- Drop an unused zoomOut import in auto-login-off.spec.ts.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* test: assert New Flow button by test-id, not substring text match

The merge resolution kept the refactor's `expect(...).toBeVisible()`
assertion but on `getByText("New Flow")`, which is a substring match —
it also matches flow cards named "New Flow (N)" and throws a strict-mode
violation once such flows exist. Our previous side used a no-op
`.isVisible()` that silently masked it.

Assert on `getByTestId(TID.newProjectBtn)` instead: unambiguous,
DB-state independent, and consistent with the refactor's test-id-first
convention. Verified — actionsMainPage-shard-1 (3/3) and run-flow now
pass against a populated database.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* fix windows utf open

* assistant message fixes

* [autofix.ci] apply automated fixes

* add tests to validate

* [autofix.ci] apply automated fixes

* bugfixes round 2

* ruff style and checker

* qa fixes

* parse serialized model

* improvement on agent tool usage

* [autofix.ci] apply automated fixes

* ruff style and checker

* [autofix.ci] apply automated fixes

* fix sidebar nav test

* backend tests fixes

* fix tests and change model provider to open dialog

* performance improvements

* [autofix.ci] apply automated fixes

* ruff style and checker fix

* tests fixes

* fix error handling test

* test user overlay

* fix test tool mixin

* last improvements

* ruff style fix

* [autofix.ci] apply automated fixes

* fix user test agentic

* QA fixes round 7

* fix assistant gpt 5.4

* [autofix.ci] apply automated fixes

---------

Co-authored-by: cristhianzl <cristhian.lousa@gmail.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Edwin Jose <edwin.jose@datastax.com>
Co-authored-by: Adam Aghili <Adam.Aghili@ibm.com>
Co-authored-by: Rodrigo Nader <rodrigonader@MacBook-Pro-de-Rodrigo.local>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-28 18:18:00 -03:00
e3dc9d966f fix: bundle event inconsistency and other fixes (#13374)
* Bug fixes for events toasts inconsistency, keyspace argument silent failure, API_KEY expiry timestamp being timezone unaware.

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Eric Hare <ericrhare@gmail.com>
2026-05-28 13:52:13 -07:00
c9fe220d63 feat(memory): add inline docs link to preprocessing instructions tooltip (#13352)
* feat(memory): add inline docs link to preprocessing instructions tooltip

* add tooltip link for example

* remove duplicate key

---------

Co-authored-by: Olayinka Adelakun <olayinkaadelakun@Olayinkas-MacBook-Pro.local>
Co-authored-by: Olayinka Adelakun <olayinkaadelakun@mac.war.can.ibm.com>
2026-05-28 18:32:25 +00:00
e2ef18104b chore(frontend): Clean up biome violations on release-1.10.0 (#13375)
fix biome lint
2026-05-28 13:42:01 -03:00
b63e98ba06 feat(memory): default session filter to All Sessions and add it as a selectable dropdown option (#13350)
* feat(memory): default session filter to All Sessions and add it as a selectable dropdown option

* [autofix.ci] apply automated fixes

* add translation

* [autofix.ci] apply automated fixes

* improve translations

* [autofix.ci] apply automated fixes

* improve translations

* [autofix.ci] apply automated fixes

* fix testcase

* [autofix.ci] apply automated fixes

---------

Co-authored-by: Olayinka Adelakun <olayinkaadelakun@Olayinkas-MacBook-Pro.local>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Olayinka Adelakun <olayinkaadelakun@mac.war.can.ibm.com>
2026-05-28 15:42:16 +00:00
2b8ded4664 fix(chat): align message card surfaces (#13354)
* fix(chat): align message card surfaces

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-05-28 15:37:27 +00:00
a7b8170d53 fix: Force streaming on AgentComponent regardless of toggle (#13358)
* fix streaming default true on release

* [autofix.ci] apply automated fixes

* [autofix.ci] apply automated fixes (attempt 2/3)

* add robust tests around streaming to avoid any future errors

* [autofix.ci] apply automated fixes

* improve fe flaky tests

* fix outdated action test

* fix flaky outdated action tst

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-05-27 18:43:10 -03:00
8c7fe0ac3a chore: bump versions
bump package versions
2026-05-27 14:25:54 -04:00
6a43888915 fix: change docling remote component to receive task id and to throw processing errors (#13353)
* change docling remote component to receive task id and to throw processing errors

* fix: small bug fix tweaks

* fix: report from rafael

* [autofix.ci] apply automated fixes

* [autofix.ci] apply automated fixes (attempt 2/3)

* fix: Global variable selection in tableinput rows

* fix: merge release branch

---------

Co-authored-by: Eric Hare <ericrhare@gmail.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-05-27 09:58:21 -07:00
e248f4f854 fix(api-keys): add expiration date support for API keys (#13330)
* Added is_active check to API Keys, expiresAt field that tracks API Key expiry, UI elements to surface this to the Langflow user.

* [autofix.ci] apply automated fixes

* [autofix.ci] apply automated fixes (attempt 2/3)

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-05-27 01:46:59 +00:00
e24b265482 fix(frontend): Safari Selected Components (#13283)
* refactor(frontend): rename useShiftDragSelectFix → useCanvasDragSelectFix

* add testcases

* ruff changes

---------

Co-authored-by: Olayinka Adelakun <olayinkaadelakun@mac.war.can.ibm.com>
Co-authored-by: Viktor Avelino <64113566+viktoravelino@users.noreply.github.com>
Co-authored-by: Olayinka Adelakun <olayinkaadelakun@Olayinkas-MacBook-Pro.local>
2026-05-26 19:23:30 +00:00
1e138141e0 feat: LE-1017 Event bus for bundle events (#13253)
* Adding lfx bundle lifecycle events.

Routed the useExtensionService to poll for bundle extension updates.

Added reload event deduplication to bundles.

Make bundle events user scoped. Aligned bundle schemas between BE and FE.

* [autofix.ci] apply automated fixes

* [autofix.ci] apply automated fixes (attempt 2/3)

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-05-26 18:51:44 +00:00
87e9c908c6 fix(playground): add gap between consecutive error cards in chat messages (#13325)
* fix(playground): add gap between consecutive error cards in chat messages

When a chat message carries more than one error ContentBlock (e.g. a
component or future agent emits multiple step-level errors per run),
ErrorView used to render the cards as sibling <div>s with no parent
flex / spacing utility, so they butted edge-to-edge and read as one
merged block.

Wrap the blocks.map output in `<div class="flex flex-col gap-2">` so
each card keeps an 8px breathing space. Matches the inter-card rhythm
used by IngestionRuns / IngestionHistory row stacks elsewhere in the
app. Single-block case is unchanged (gap utility no-ops with one
child).

Drive-bys (lines biome would re-flag because the file is touched):
  - Remove dead Markdown / remarkGfm imports and the unused
    ``errorMarkdownComponents`` constant (truly unreferenced).
  - Remove the dead ``CodeTabsComponent`` import and the unused
    ``ComponentPropsWithoutRef`` type import.

Adds ``__tests__/error-message.test.tsx`` covering: single block in
the gap-aware stack, three blocks each rendered as a direct child of
the stack (regression guard against wrapping that would defeat
``gap-2``), and loading state path that should not render the stack.

Fixtures include the required ``allow_markdown`` + ``component`` fields
on ``ContentBlock`` so ``tsc --noEmit`` stays clean. Locally re-mocks
``genericIconComponent`` to expose the ``ForwardedIconComponent`` named
export the SUT imports.

* test(playground): drop className assertions from error-message tests

Address review feedback on PR #13325:
  - viktoravelino: className-string expectations couple the test to
    Tailwind utilities that can change anytime and are not behavioural.
    Replace ``expect(stack.className).toContain("gap-2"|"flex"|...)``
    with the structural assertion that each error card is a *direct
    child* of the stack — that is the actual behavioural guarantee
    that lets any spacing rule (gap utility today, CSS module
    tomorrow) apply. A future regression wrapping cards in an extra
    div still trips this test without us encoding class strings.
  - CodeRabbit: remove the dead CodeTabsComponent mock; the import
    was removed from error-message.tsx so the mock had no consumer.

Describe rename: "multi-card spacing" -> "multi-card structure" to
match the new framing. 3/3 tests still green.
2026-05-26 17:56:13 +00:00