Commit graph

6,303 commits

Author SHA1 Message Date
Cristhian Zanforlin Lousa
0ce568c221
test: Update notification test selectors for clarity (#8783) 2025-06-30 11:37:38 -03:00
Yuqi Tang
13501a3896
fix: update templates api keys (#8752)
* update templates api keys

* Update src/backend/base/langflow/initial_setup/starter_projects/Meeting Summary.json

Co-authored-by: Cristhian Zanforlin Lousa <cristhian.lousa@gmail.com>

* Update src/backend/base/langflow/initial_setup/starter_projects/Meeting Summary.json

Co-authored-by: Cristhian Zanforlin Lousa <cristhian.lousa@gmail.com>

* Update Text Sentiment Analysis.json

* cust comp test fix

---------

Co-authored-by: Cristhian Zanforlin Lousa <cristhian.lousa@gmail.com>
Co-authored-by: Eric Hare <ericrhare@gmail.com>
Co-authored-by: Mike Fortman <michael.fortman@datastax.com>
2025-06-27 21:05:42 +00:00
Cristhian Zanforlin Lousa
6f7b0c8313
feat: Enhance ChatView scroll behavior and LLM response tracking (#8767)
* 🐛 (chat-view.tsx): fix parameter name from stream_url to _stream_url to improve clarity
 (chat-view.tsx): add logic to handle scrolling behavior based on chat history updates and message content changes

* ♻️ (chat-view.tsx): refactor updateChat function parameters to remove unused _stream_url parameter and improve code readability
2025-06-27 19:06:42 +00:00
Edwin Jose
5ba8f91c9a
refactor: reorganize components and update PromptComponent with priority attribute (#8667)
* Update styleUtils.ts

* update to prompt component

* update to template

* update to mcp component

* update to smart function

* [autofix.ci] apply automated fixes

* update to templates

* fix sidebar

* change name

* update import

* update import

* update import

* [autofix.ci] apply automated fixes

* fix import

* fix ollama

* fix ruff

* refactor(agent): standardize memory handling and update chat history logic (#8715)

* update chat history

* update to agents

* Update Simple Agent.json

* update to templates

* ruff errors

* Update agent.py

* Update test_agent_component.py

* [autofix.ci] apply automated fixes

* update templates

* test fix

---------

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

* fix prompt change

* feat(message): support sequencing of multiple streamable models (#8434)

* feat: update OpenAI model parameters handling for reasoning models

* feat: extend input_value type in LCModelComponent to support AsyncIterator and Iterator

* refactor: remove assert_streaming_sequence method and related checks from Graph class

* feat: add consume_iterator method to Message class for handling iterators

* test: add unit tests for OpenAIModelComponent functionality and integration

* feat: update OpenAIModelComponent to include temperature and seed parameters in build_model method

* feat: rename consume_iterator method to consume_iterator_in_text and update its implementation for handling text

* feat: add is_connected_to_chat_output method to Component class for improved message handling

* feat: refactor LCModelComponent methods to support asynchronous message handling and improve chat output integration

* refactor: remove consume_iterator_in_text method from Message class and clean up LCModelComponent input handling

* fix: update import paths for input components in multiple starter project JSON files

* fix: enhance error message formatting in ErrorMessage class to handle additional exception attributes

* refactor: remove validate_stream calls from generate_flow_events and Graph class to streamline flow processing

* fix: handle asyncio.CancelledError in aadd_messagetables to ensure proper session rollback and retry logic

* refactor: streamline message handling in LCModelComponent by replacing async invocation with synchronous calls and updating message text handling

* refactor: enhance message handling in LCModelComponent by introducing lf_message for improved return value management and updating properties for consistency

* feat: add _build_source method to Component class for enhanced source handling and flexibility in source object management

* feat: enhance LCModelComponent by adding _handle_stream method for improved streaming response handling and refactoring chat output integration

* feat: update MemoryComponent to enhance message retrieval and storage functionality, including new sender type handling and output options for text and dataframe formats

* test: refactor LanguageModelComponent tests to use ComponentTestBaseWithoutClient and add tests for Google model creation and error handling

* test: add fixtures for API keys and implement live API tests for OpenAI, Anthropic, and Google models

* fix: reorder JSON properties for consistency in starter projects

* Updated JSON files for various starter projects to ensure consistent ordering of properties, specifically moving "type" to follow "selected_output" for better readability and maintainability.
* Affected files: Basic Prompt Chaining.json, Blog Writer.json, Financial Report Parser.json, Hybrid Search RAG.json, SEO Keyword Generator.json.

* refactor: simplify input_value type in LCModelComponent

* Updated the input_value parameter in LCModelComponent to remove AsyncIterator and Iterator types, streamlining the input options to only str and Message for improved clarity and maintainability.
* This change enhances the documentation and understanding of the expected input types for the component.

* fix: clarify comment for handling source in Component class

* refactor: remove unnecessary mocking in OpenAI model integration tests

* auto update

* update

* [autofix.ci] apply automated fixes

* fix openai import

* revert template changes

* test fixes

* update templates

* [autofix.ci] apply automated fixes

* fix tests

* fix order

* fix prompts import

* fix frontend tests

* fix frontend

* [autofix.ci] apply automated fixes

* add charmander

* [autofix.ci] apply automated fixes

* fix prompt frontend

* fix frontend

* test fix

* [autofix.ci] apply automated fixes

* change pokedex

* remove pokedex extra

* update template

* name fix

* update template

* mcp test fix

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: cristhianzl <cristhian.lousa@gmail.com>
Co-authored-by: Yuqi Tang <yuqi.tang@datastax.com>
Co-authored-by: Mike Fortman <michael.fortman@datastax.com>
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
2025-06-27 17:02:06 +00:00
Gabriel Luiz Freitas Almeida
03537b5dcc
test: Update regression test to use data-testid for input fields (#8762) 2025-06-27 10:08:50 -03:00
Lucas Oliveira
f4d761e63d
fix: add error handling and message on mcp servers, fixed tool mode on mcp (#8717)
* Added mcp error handling

* Added error param to servers

* Added error display on mcp servers page

* Added error display on mcp component

* Added error handling for other types of errors

* uv lock update and add error handling

* update mcp version

* fixed tool mode not working on mcp component

* update mcp to 1.9.4

* Removed server parameters custom commands on connection to stdio

* removed unused import

* disable mcp notice

* Removed drop state when home type is mcp

* Added loading before showing tools

* Updated mcp to 1.9.4

* Decreased mcp timeout

* Implemented error surfacing with exec command

* removed non default keys either way when mcp_server is used

* update to session handling

* [autofix.ci] apply automated fixes

* updated it to check if it is the same server to not clear on startup

* update to components

* Update mcp_component.py

* Update mcp_component.py

* Update mcp_component.py

---------

Co-authored-by: Edwin Jose <edwin.jose@datastax.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
2025-06-26 22:22:01 +00:00
Eric Hare
e1624b8c6e
feat: Better multi-file consistency for File Component (#8625)
* feat: First pass at output changes for file component

* SQLite support and json parsing

* [autofix.ci] apply automated fixes

* Update base_file.py

* [autofix.ci] apply automated fixes

* Update file.py

* [autofix.ci] apply automated fixes

* Split text supporting messages

* [autofix.ci] apply automated fixes

* Support structured json data

* Routine for inclusion of sample data

* Couple more template updates

* [autofix.ci] apply automated fixes

* Update Text Sentiment Analysis.json

* Update Portfolio Website Code Generator.json

* Test coverage

* [autofix.ci] apply automated fixes

* Update constants.py

* Update base_file.py

* Update service.py

* Update src/backend/base/langflow/components/processing/split_text.py

Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>

* [autofix.ci] apply automated fixes

* Update service.py

* Add get file size that is unimplemented

* Update service.py

* Fix return

* Remove type annotation

* Update graph for new templates

* Update test_vector_store_rag.py

* Update stop-building.spec.ts

* [autofix.ci] apply automated fixes

* Update fileUploadComponent.spec.ts

* Update fileUploadComponent.spec.ts

* Update fileUploadComponent.spec.ts

* Update fileUploadComponent.spec.ts

* Update fileUploadComponent.spec.ts

* Update fileUploadComponent.spec.ts

* [autofix.ci] apply automated fixes

* Update fileUploadComponent.spec.ts

* test update

* Update fileUploadComponent.spec.ts

* [autofix.ci] apply automated fixes

---------

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: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
Co-authored-by: Mike Fortman <michael.fortman@datastax.com>
2025-06-26 21:12:34 +00:00
Cristhian Zanforlin Lousa
65b71bec5b
feat: Clear handles from advanced fields on code update (#8754)
*  (frontend): add new function clearHandlesFromAdvancedFields to handle clearing handles from advanced fields when code is updated
📝 (frontend): update documentation and add tests for deleting handles from advanced fields when code is updated
🔧 (frontend): remove unused style for Outlook in styleUtils to clean up code
🔧 (frontend): add test for deleting handles from advanced fields when code is updated in general-bugs-delete-handle-advanced-input.spec

*  (frontend): add support for managing edges and nodes in the flowStore to improve data handling and flow visualization
♻️ (frontend): refactor cleanEdges function to accept an object with nodes, edges, componentId, and data parameters for better modularity and reusability

*  (codeAreaModal/index.tsx): Refactor import statements and function names for better clarity and organization
♻️ (flowStore.ts): Refactor cleanEdges function to accept nodes and edges as separate arguments instead of an object
♻️ (flowStore.ts): Update all calls to cleanEdges function to pass nodes and edges separately
♻️ (reactflowUtils.ts): Refactor clearHandlesFromAdvancedFields function to accept only necessary arguments and remove unnecessary logic
2025-06-26 20:41:09 +00:00
Lucas Oliveira
04f8f90649
feat: add Windsurf to MCP one-click install (#8749)
* Added Windsurf icon

* Added Windsurf as option to mcpServerTab

* Added Windsurf instalation on backend
2025-06-26 19:47:22 +00:00
Lucas Oliveira
8bac1094c9
fix: make not filled required fields be validated before sending to the backend (#8711)
* Added validation for nodes before building, make validation message appear as toast instead of build error

* Make subgraph validation not occur in flowStore

* Added function to search for connected nodes down or upstream

* Added validation before flow starts of the connected flows

* Catch error when sending message and restore chat value

* Made enter not behave as enter on chat input text area

* made sendMessage be async and throw errors

* Added build status error to the nodes that didn't make it past validation.

* Fixed flow not running when not every edge is showed

---------

Co-authored-by: Mike Fortman <michael.fortman@datastax.com>
2025-06-26 16:39:31 +00:00
Lucas Oliveira
2593e83e84
fix: changed design of Input Schema to improve usability (#8720)
* Added description and label for tweaks component

* Removed unused div

* Added edit node button size

* Added placeholder to parameter render component and reduced disabled opacity

* Changed texts and classes

* reduced opacity

---------

Co-authored-by: Mike Fortman <michael.fortman@datastax.com>
2025-06-26 15:23:36 +00:00
Lucas Oliveira
b08d080c67
fix: adds handling for WSL on installing MCP on Claude on Windows (#8738)
* Added handling for wsl isntallation of claude

* Fixed installed server not appearing

* Added message to restart

* fix formatting and error handling

* fixed lint
2025-06-26 14:28:17 +00:00
Lucas Oliveira
39af1ded5f
fix: implemented cycle check on isValidConnection (#8716)
* Implemented cycle check on isValidConnection

* Implemented loop check if the loop done results in a loopcomponent loop
2025-06-26 14:13:11 +00:00
Lucas Oliveira
605928d308
fix: updated timeout for blog writer (#8747)
Updated timeout for blog writer
2025-06-26 13:51:09 +00:00
Lucas Oliveira
866076cf06
fix: make not connected edges be cleared when entering flow (#8678)
* Fixed output not cleaning edges

* Added useEffect to select first output if none is selected

* updated useeffect condition

* Fixed edges connected being cleared

* added handleSelectOutput to dependencies

* Fixed loop disconnecting
2025-06-26 13:18:32 +00:00
April I. Murphy
996fdd4d0a
Docs: Add MCP to README, fix a few typos (#8691)
* Migrate PR 8379

* docstring typos

* Update README.md

Co-authored-by: Mendon Kissling <59585235+mendonk@users.noreply.github.com>

---------

Co-authored-by: Mendon Kissling <59585235+mendonk@users.noreply.github.com>
2025-06-26 12:22:14 +00:00
Cristhian Zanforlin Lousa
d2d774d11c
fix: Add JSON sanitization to handle NaN values in streaming requests (#8736)
🔧 (api.tsx): add a helper function sanitizeJsonString to replace NaN values with null in JSON strings for proper parsing
2025-06-25 19:04:51 +00:00
Deon Sanchez
08e428d376
fix: update Textarea component to prevent resizing in textOutputView (#8688) 2025-06-25 18:06:39 +00:00
Edwin Jose
38d5885fa3
refactor(agent): standardize memory handling and update chat history logic (#8715)
* update chat history

* update to agents

* Update Simple Agent.json

* update to templates

* ruff errors

* Update agent.py

* Update test_agent_component.py

* [autofix.ci] apply automated fixes

* update templates

* test fix

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Mike Fortman <michael.fortman@datastax.com>
2025-06-25 16:33:57 +00:00
Mike Fortman
927cdd0837
Fix: Update display time for very short operations and fix outputs and titles for tool calling executions (#8718)
* update display time for very short operations and fix outputs and titles

* [autofix.ci] apply automated fixes

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

* cleanup

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Edwin Jose <edwin.jose@datastax.com>
2025-06-24 23:07:19 +00:00
Cristhian Zanforlin Lousa
a40e87f3e0
fix: include folder name in default download filename (#8654)
*  (custom-get-download-folders.ts): update default filename to include folderName variable to provide more context and improve user experience

*  (custom-get-download-folders.ts): update folder name from "My Projects" to "Starter Project" for better clarity and consistency

* 🐛 (custom-get-download-folders.ts): fix issue where folderName could be undefined, causing incorrect filename for download folder
2025-06-24 20:26:04 +00:00
Deon Sanchez
91b983a00a
fix: flows title on dashboard are truncating too soon (#8696)
* fix: Adjust header component styles for improved layout consistency

* fix: Update ListComponent styles for improved layout and readability
2025-06-24 18:01:03 +00:00
Michele Dolfi
6631de2aae
feat: Docling components (#8394)
* initial DoclingComponent

Signed-off-by: Michele Dolfi <dol@zurich.ibm.com>

* Correct Docling icon style properties.

Signed-off-by: DKL <dkl@zurich.ibm.com>

* add file_path

Signed-off-by: Michele Dolfi <dol@zurich.ibm.com>

* add load from json and export to various formats

Signed-off-by: Michele Dolfi <dol@zurich.ibm.com>

* add chunking component

Signed-off-by: Michele Dolfi <dol@zurich.ibm.com>

* Update src/backend/base/langflow/components/docling/docling_inline.py

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

* add Docling Serve component

Signed-off-by: Michele Dolfi <dol@zurich.ibm.com>

* apply some suggestions

Signed-off-by: Michele Dolfi <dol@zurich.ibm.com>

* Update src/backend/base/langflow/components/docling/_utils.py

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

* Update src/backend/base/langflow/components/docling/docling_remote.py

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

* add check for DoclingDocument in list

Signed-off-by: Michele Dolfi <dol@zurich.ibm.com>

* fix import

Signed-off-by: Michele Dolfi <dol@zurich.ibm.com>

* add maximum poll timeout and better checks for the retry logic

Signed-off-by: Michele Dolfi <dol@zurich.ibm.com>

* add updated starter_projects

Signed-off-by: Michele Dolfi <dol@zurich.ibm.com>

* refactor _get_converter

Signed-off-by: Michele Dolfi <dol@zurich.ibm.com>

* return only DataFrame

Signed-off-by: Michele Dolfi <dol@zurich.ibm.com>

* remove LoadDoclingDocument

Signed-off-by: Michele Dolfi <dol@zurich.ibm.com>

* more options in the chunk component

Signed-off-by: Michele Dolfi <dol@zurich.ibm.com>

* move docling imports

Signed-off-by: Michele Dolfi <dol@zurich.ibm.com>

* [autofix.ci] apply automated fixes

* move utils to langflow.base

Signed-off-by: Michele Dolfi <dol@zurich.ibm.com>

---------

Signed-off-by: Michele Dolfi <dol@zurich.ibm.com>
Signed-off-by: DKL <dkl@zurich.ibm.com>
Co-authored-by: DKL <dkl@zurich.ibm.com>
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>
2025-06-24 17:54:55 +00:00
Gabriel Luiz Freitas Almeida
3a3e205f6f
feat(auth): update AUTO_LOGIN authentication to enforce API key or JWT requirement (#8513)
* feat(auth): update AUTO_LOGIN authentication to enforce API key or JWT requirement

* Removed deprecated warning messages and implemented explicit HTTP exceptions for missing API key or JWT in both API and WebSocket authentication methods.
* Enhanced error handling to ensure compliance with the new authentication requirements introduced in v1.5.

* fix(auth): refine error message for AUTO_LOGIN API key requirement

* Updated the error message in the API key security function to clarify that AUTO_LOGIN requires a valid API key, removing the mention of JWT for consistency with the latest authentication requirements.

* feat(auth): introduce SKIP_AUTH_AUTO_LOGIN setting for enhanced authentication flexibility

* Added a new configuration option `SKIP_AUTH_AUTO_LOGIN` to the AuthSettings class, allowing the application to bypass API key validation for auto login.
* Updated the API and WebSocket security functions to utilize this setting, improving error handling and providing a fallback for superuser credentials when authentication is skipped.

* refactor(auth): rename SKIP_AUTH_AUTO_LOGIN to skip_auth_auto_login for consistency

* Updated the `SKIP_AUTH_AUTO_LOGIN` setting in the `AuthSettings` class to `skip_auth_auto_login` to follow Python naming conventions.
* Adjusted references in the API and WebSocket security functions to use the new attribute name, ensuring consistent behavior across the authentication logic.

* feat(auth): add deprecation warning for SKIP_AUTH_AUTO_LOGIN removal

* Introduced a warning log in both API and WebSocket security functions to inform users that the `LANGFLOW_SKIP_AUTH_AUTO_LOGIN` feature will be removed in version 1.6, prompting necessary updates to authentication methods.

* feat(auth): enhance deprecation warnings for AUTO_LOGIN features

* Added constants for deprecation warning and error messages related to `LANGFLOW_SKIP_AUTH_AUTO_LOGIN` and `AUTO_LOGIN` requirements, improving code maintainability and clarity.
* Updated API and WebSocket security functions to utilize these constants for logging and exception handling, ensuring consistent messaging across authentication methods.

* fix(auth): update AUTO_LOGIN_ERROR message to include LANGFLOW_SKIP_AUTH_AUTO_LOGIN usage

* fix(auth): correct logic for API key validation in WebSocket security function

* Adjusted the conditional flow in the `ws_api_key_security` function to ensure that the API key is checked only when necessary, improving the clarity and correctness of the authentication logic.

* [autofix.ci] apply automated fixes

* feat(tests): add authentication token retrieval for starter projects integration tests

* Implemented a helper function to obtain a JWT token for API requests, enhancing the security of the integration tests.
* Updated the test for starter projects to include the token in API requests, ensuring proper authentication during testing.

* feat(auth): add MCP-specific user authentication and active user dependency

* Introduced `get_current_user_mcp` function for MCP-specific user authentication, allowing fallback to username lookup when no API key is provided.
* Added `get_current_active_user_mcp` dependency to manage active user checks for MCP, ensuring proper integration with the authentication flow.

* refactor(api): replace user dependency with CurrentActiveMCPUser in mcp project endpoints

* Updated project-related API endpoints to use CurrentActiveMCPUser for user authentication, enhancing clarity and consistency in user management.
* Removed unused imports and dependencies related to the previous user authentication method, streamlining the codebase.

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-06-24 13:29:27 +00:00
Lucas Oliveira
438088ac4d
fix: make notes size consistent when editing, add char limit to description, fix design of search bar on templates modal (#8679)
* Fixed template content component search bar

* Fixed size of notenode not applying to some instances

* Fixed generic node description not having char limit
2025-06-23 20:46:43 +00:00
Yuqi Tang
19cc82f45c
fix: update several other templates (#8569)
* Update Vector Store RAG.json

* fix: make starter projects auto refactor not remove selected output (#8400)

* Fixed bug where starter projects were refactored incorrectly

* fix: improve handling of selected outputs in custom component template builder

- Added checks to ensure selected output is valid before attempting to set its state.
- Enhanced code readability with comments explaining the logic for selecting outputs.

* Set selected output as the previous selected output

* Update base.py

---------

Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
Co-authored-by: Edwin Jose <edwin.jose@datastax.com>

* fix: made clean edges clean after changing dropdown of output (#8460)

fixed output considering all outputs not just selected one

* refactor(docker): remove --extra deploy flag from uv sync commands (#8485)

🔧 (build_and_push_with_extras.Dockerfile): remove unnecessary uv sync command options to improve build efficiency and reduce redundancy

Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>

* fix: refactor mcp and freeze tests to be less prone to flaky results (#8486)

* Fixed mcp test to be less prone to errors

* Fix freeze spec

* fix: made button disabled state more congruent, made edit flow details submit on enter (#8339)

* Changed textarea classes

* Changed flowsettingscomponent to use form

* changed edit flow settings to use form and to submit on enter

* Reset form data on close

* Updated disabled state to have lower opacity instead of to have set background

* Fixed loading state of button

* Fix: chat memory store issue and fix output types (#8463)

* fix chat memory

* update template

* update update outputs

* update update outputs

---------

Co-authored-by: Edwin Jose <edwin.jose@datastax.com>

* ci: update setup-uv to possibly fix caching (#8490)

* update templates

* update templates

* First round of template updates

* Update templates

* fix: Update SaaS, Social Media, and YouTube json file (#8441)

* update SaaS, Social Media, and YouTube json file

* fix: make starter projects auto refactor not remove selected output (#8400)

* Fixed bug where starter projects were refactored incorrectly

* fix: improve handling of selected outputs in custom component template builder

- Added checks to ensure selected output is valid before attempting to set its state.
- Enhanced code readability with comments explaining the logic for selecting outputs.

* Set selected output as the previous selected output

* Update base.py

---------

Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
Co-authored-by: Edwin Jose <edwin.jose@datastax.com>

* fix: made clean edges clean after changing dropdown of output (#8460)

fixed output considering all outputs not just selected one

* refactor(docker): remove --extra deploy flag from uv sync commands (#8485)

🔧 (build_and_push_with_extras.Dockerfile): remove unnecessary uv sync command options to improve build efficiency and reduce redundancy

Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>

* fix: refactor mcp and freeze tests to be less prone to flaky results (#8486)

* Fixed mcp test to be less prone to errors

* Fix freeze spec

* fix: made button disabled state more congruent, made edit flow details submit on enter (#8339)

* Changed textarea classes

* Changed flowsettingscomponent to use form

* changed edit flow settings to use form and to submit on enter

* Reset form data on close

* Updated disabled state to have lower opacity instead of to have set background

* Fixed loading state of button

* Fix: chat memory store issue and fix output types (#8463)

* fix chat memory

* update template

* update update outputs

* update update outputs

---------

Co-authored-by: Edwin Jose <edwin.jose@datastax.com>

* ci: update setup-uv to possibly fix caching (#8490)

* update json

* fix custom component

* revert change

---------

Co-authored-by: Lucas Oliveira <62335616+lucaseduoli@users.noreply.github.com>
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
Co-authored-by: Edwin Jose <edwin.jose@datastax.com>
Co-authored-by: Cristhian Zanforlin Lousa <cristhian.lousa@gmail.com>

* fix: templates (#8499)

* basic-prompting-template-updated

* show-system-message

* names

* blog-writer-tested

* financial-report-parser

* image-sentiment-analysis

* seo-keyword-generator

* seo-keyword-generator

* Merge branch 'fix-vector-search-template' into mendons-template-branch

---------

Co-authored-by: Eric Hare <ericrhare@gmail.com>

* Update Basic Prompting.json

* Update Blog Writer.json

* Further template updates

* Update Image Sentiment Analysis.json

* Update templates

* Update Financial Report Parser.json

* Update Market Research.json

* Update Market Research.json

* update several templates

* Update Image Sentiment Analysis.json

* Update Market Research.json

* Update image sentiment analysis template

* Update Market Research.json

* Update Custom Component Maker.json

* Update Custom Component Maker.json

* Update Hybrid Search RAG.json

* Update Hybrid Search RAG.json

* Update Hybrid Search RAG.json

* More template updates

* Update Financial Report Parser.json

* updated templates

* change custom component maker

* Update Twitter Thread Generator.json

* updates from main

* change model

* Update Research Translation Loop.json

* expanded output component to fix tests

* update template

* autofix

* fix error

* fix change back

* change back

* ci: Skip truncated values test for refactoring (#8670)

* refactor: simplify init target by removing cache cleanup and adding pre-commit hook (#8590)

* build: add pyyaml dependency

* refactor: simplify init command by removing cache cleaning and langflow run call

* refactor: simplify init target by removing cache cleanup and adding pre-commit hook

* refactor: update langchain_core.prompts import paths to use specific modules

---------

Co-authored-by: Edwin Jose <edwin.jose@datastax.com>

* feat: update structured output to multiline input and revise system prompt (#8585)

* Update structured_output.py

* [autofix.ci] apply automated fixes

* Update structured_output.py

* [autofix.ci] apply automated fixes

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

* update to prompt

* template updates

* Update src/backend/base/langflow/components/processing/structured_output.py

* [autofix.ci] apply automated fixes

* Update src/backend/base/langflow/components/processing/structured_output.py

* Update src/backend/base/langflow/components/processing/structured_output.py

* Update src/backend/base/langflow/components/processing/structured_output.py

* [autofix.ci] apply automated fixes

---------

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

* feat: add sessions endpoint with session management enhancements (#8596)

* 📝 (monitor.py): Add endpoint to get sessions and handle session_id encoding for API requests
📝 (use-get-messages-mutation.ts): Implement a mutation function to fetch messages with query parameters and handle session_id encoding for API requests
📝 (use-get-messages-polling.ts): Ensure proper encoding of session_id for API requests in polling mutation
📝 (use-get-messages.ts): Handle session_id encoding for API requests in messages query
📝 (new-modal.tsx): Implement functions to handle session deletion and proper encoding of session_id for API requests
📝 (utils.ts): Add functions to encode, decode, validate, format, and prepare session IDs for API requests

* 📝 (constants.ts): Add SESSIONS constant to API URLs for monitoring sessions
🔧 (use-delete-messages.ts): Add queryClient to UseRequestProcessor to invalidate sessions query
 (use-get-sessions-from-flow.ts): Introduce useGetSessionsFromFlowQuery to fetch sessions from flow
🔧 (use-rename-session.ts): Change refetchQueries to invalidateQueries for useGetSessionsFromFlowQuery
🔧 (custom-new-modal.tsx): Update import path for IOModal to playground-modal
🔧 (session-selector.tsx): Add setActiveSession function to handle setting active session
🔧 (sidebar-open-view.tsx): Add setActiveSession function to handle setting active session
♻️ (new-modal.tsx): Refactor IOModal into playground-modal and update functionality
♻️ (playground-modal.tsx): Refactor IOModal to handle playground-specific functionality
⬆️ (flowStore.ts): Add newChatOnPlayground state and setNewChatOnPlayground function
⬆️ (index.ts): Update FlowStoreType to include newChatOnPlayground and setNewChatOnPlayground

* 🔧 (pyproject.toml): update testpaths to point to the correct directory for tests
 (test_session_endpoint.py): add unit tests for sessions endpoint with flow_id filtering
♻️ (session-selector.tsx): refactor to trim editedSession before setting it
♻️ (sidebar-open-view.tsx): refactor to set visibleSession instead of activeSession

*  (use-get-sessions-from-flow.ts): Always include the flow ID as the default session if it's not already present
♻️ (playground-modal.tsx): Refactor setting sessions to include currentFlowId as the default session if not present, and handle visibility of sessions more efficiently

* ♻️ (use-get-messages-mutation.ts): remove unused imports and refactor code for better readability and maintainability

*  (test_session_endpoint.py): refactor test function names for better clarity and consistency

*  (create-new-session-name.ts): add function to generate a new session name based on the current date and time
🔧 (playground-modal.tsx): import createNewSessionName function to dynamically set a new session name when no session is visible

* [autofix.ci] apply automated fixes

*  (monitor.py): rename get_sessions endpoint to get_message_sessions for clarity and consistency
🔧 (constants.ts): remove unused SESSIONS constant from API URLs
🔧 (use-delete-messages.ts): remove commented out code and unnecessary comments
 (use-delete-sessions.ts): add functionality to delete sessions in frontend
🔧 (use-get-sessions-from-flow.ts): update API endpoint for getting sessions to match backend changes
🔧 (playground-modal.tsx): add functionality to delete sessions and associated messages in the UI, update UI optimistically, and handle errors appropriately

* [autofix.ci] apply automated fixes

* 🐛 (monitor.py): Fix type hinting issue in delete_messages function
📝 (monitor.py): Add comments and improve readability in test_messages_endpoints.py
📝 (session_endpoint.py): Update endpoint paths for consistency and clarity in test_session_endpoint.py

* [autofix.ci] apply automated fixes

* fix: update SQL statement to use col() for session_id filtering in get_message_sessions function

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>

* fix: implemented cached values and temporary MCP servers on MCP component (#8628)

* Added actionCount to fetch only servers without actionCount

* Updated queries and uses to use servers without action data first, and then to fetch them

* removed comment

* updated constants

* Added loading dropdown

* Make options persist

* Implemented new value format for McpComponent and implemented saving and removing temp Mcp Server if config is existent

* Changed value type

* Implemented cache and saving the server config

* Fixed mcp server test

* fix backend formatting

* fixed lint

* Added await

* Fixed save button not appearing when no servers are available

* added condition to only show save button when options is not null

* template autofix

* change template

* update text sentiment analysis

* change basic prompt back

* change image sentiment back

* update text sentiment and twitter

* Update Twitter Thread Generator.json

* Add back the input for the chat

* add change

* fix text sentiment

* update research translation

* Update Research Translation Loop.json

---------

Co-authored-by: Eric Hare <ericrhare@gmail.com>
Co-authored-by: Edwin Jose <edwin.jose@datastax.com>
Co-authored-by: Lucas Oliveira <62335616+lucaseduoli@users.noreply.github.com>
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
Co-authored-by: Cristhian Zanforlin Lousa <cristhian.lousa@gmail.com>
Co-authored-by: Mendon Kissling <59585235+mendonk@users.noreply.github.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-06-23 20:39:28 +00:00
Cristhian Zanforlin Lousa
2ad73df1b5
test: update backend config, frontend utilities, and test coverage (#8671)
*  (custom-get-download-folders.ts): update default filename to include folderName variable to provide more context and improve user experience

*  (custom-get-download-folders.ts): update folder name from "My Projects" to "Starter Project" for better clarity and consistency

* 📝 (.github/changes-filter.yaml): add new directory 'serialization' to components list for changes filtering
🐛 (general-bugs-truncate-results.spec.ts): fix typo in 'truncated' word and update timeout for better test reliability

* 🔧 (custom-get-download-folders.ts): Remove unnecessary conditional statement and update default filename for download to "flows.zip" for better clarity.
2025-06-23 18:57:46 +00:00
Cristhian Zanforlin Lousa
0895ebbdcb
feat: Add conditional API key display for auth and auto-login (#8684)
*  Add IS_AUTO_LOGIN constant to handle auto login feature in NodeInputField and TableNodeCellRender components
🔧 Add loginLangflow utility function to facilitate login process in tests

*  (NodeInputField/index.tsx): introduce useIsAutoLogin hook to simplify logic for determining auto login status
 (tableNodeCellRender/index.tsx): introduce useIsAutoLogin hook to simplify logic for determining auto login status
📝 (use-is-auto-login.ts): add custom hook useIsAutoLogin to encapsulate logic for determining auto login status
2025-06-23 18:53:08 +00:00
Cristhian Zanforlin Lousa
30a0f11448
fix: implement locked flow interaction restrictions (#8645)
* 📝 (handleRenderComponent/index.tsx): Add useShallow import for zustand/react/shallow to optimize re-renders
📝 (handleRenderComponent/index.tsx): Introduce isLocked state to handle locked flow functionality
📝 (handleRenderComponent/index.tsx): Update tooltip visibility based on isLocked state
📝 (handleRenderComponent/index.tsx): Update handle style based on isLocked state
📝 (PageComponent/index.tsx): Add useShallow import for zustand/react/shallow to optimize re-renders
📝 (PageComponent/index.tsx): Introduce isLocked state to handle locked flow functionality
📝 (PageComponent/index.tsx): Prevent edge click actions when flow is locked
📝 (PageComponent/index.tsx): Disable edge actions when flow is locked
📝 (PageComponent/index.tsx): Update edge actions based on isLocked state
📝 (lock-flow.spec.ts): Add test to simulate deleting edges when flow is locked

*  (lock-flow.spec.ts): add functionality to try connecting nodes and handle edge cases when connecting nodes in the flow diagram.
2025-06-23 18:52:26 +00:00
Lucas Oliveira
8f4d1cb902
fix: make json edit modal have fixed height and be readOnly if its on View mode (#8680)
Fixed dict area modal to not allow editing of a json when not on edit mode
2025-06-23 18:27:03 +00:00
Lucas Oliveira
eeb7f246fe
fix: make playground scroll not scroll down when not needed (#8676)
Fixed playground scroll

Co-authored-by: Carlos Coelho <80289056+carlosrcoelho@users.noreply.github.com>
2025-06-23 18:26:41 +00:00
Lucas Oliveira
b1993670ea
fix: added props to all icons and added width and height defs to node icon (#8649)
* Updated icons to include props

* Updated node icon to include width and height
2025-06-23 18:07:54 +00:00
Eric Hare
412fdd20cc
fix: Rebuild Templates and Broken Connections (#8386)
* Update Vector Store RAG.json

* fix: make starter projects auto refactor not remove selected output (#8400)

* Fixed bug where starter projects were refactored incorrectly

* fix: improve handling of selected outputs in custom component template builder

- Added checks to ensure selected output is valid before attempting to set its state.
- Enhanced code readability with comments explaining the logic for selecting outputs.

* Set selected output as the previous selected output

* Update base.py

---------

Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
Co-authored-by: Edwin Jose <edwin.jose@datastax.com>

* fix: made clean edges clean after changing dropdown of output (#8460)

fixed output considering all outputs not just selected one

* refactor(docker): remove --extra deploy flag from uv sync commands (#8485)

🔧 (build_and_push_with_extras.Dockerfile): remove unnecessary uv sync command options to improve build efficiency and reduce redundancy

Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>

* fix: refactor mcp and freeze tests to be less prone to flaky results (#8486)

* Fixed mcp test to be less prone to errors

* Fix freeze spec

* fix: made button disabled state more congruent, made edit flow details submit on enter (#8339)

* Changed textarea classes

* Changed flowsettingscomponent to use form

* changed edit flow settings to use form and to submit on enter

* Reset form data on close

* Updated disabled state to have lower opacity instead of to have set background

* Fixed loading state of button

* Fix: chat memory store issue and fix output types (#8463)

* fix chat memory

* update template

* update update outputs

* update update outputs

---------

Co-authored-by: Edwin Jose <edwin.jose@datastax.com>

* ci: update setup-uv to possibly fix caching (#8490)

* update templates

* update templates

* First round of template updates

* Update templates

* fix: Update SaaS, Social Media, and YouTube json file (#8441)

* update SaaS, Social Media, and YouTube json file

* fix: make starter projects auto refactor not remove selected output (#8400)

* Fixed bug where starter projects were refactored incorrectly

* fix: improve handling of selected outputs in custom component template builder

- Added checks to ensure selected output is valid before attempting to set its state.
- Enhanced code readability with comments explaining the logic for selecting outputs.

* Set selected output as the previous selected output

* Update base.py

---------

Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
Co-authored-by: Edwin Jose <edwin.jose@datastax.com>

* fix: made clean edges clean after changing dropdown of output (#8460)

fixed output considering all outputs not just selected one

* refactor(docker): remove --extra deploy flag from uv sync commands (#8485)

🔧 (build_and_push_with_extras.Dockerfile): remove unnecessary uv sync command options to improve build efficiency and reduce redundancy

Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>

* fix: refactor mcp and freeze tests to be less prone to flaky results (#8486)

* Fixed mcp test to be less prone to errors

* Fix freeze spec

* fix: made button disabled state more congruent, made edit flow details submit on enter (#8339)

* Changed textarea classes

* Changed flowsettingscomponent to use form

* changed edit flow settings to use form and to submit on enter

* Reset form data on close

* Updated disabled state to have lower opacity instead of to have set background

* Fixed loading state of button

* Fix: chat memory store issue and fix output types (#8463)

* fix chat memory

* update template

* update update outputs

* update update outputs

---------

Co-authored-by: Edwin Jose <edwin.jose@datastax.com>

* ci: update setup-uv to possibly fix caching (#8490)

* update json

* fix custom component

* revert change

---------

Co-authored-by: Lucas Oliveira <62335616+lucaseduoli@users.noreply.github.com>
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
Co-authored-by: Edwin Jose <edwin.jose@datastax.com>
Co-authored-by: Cristhian Zanforlin Lousa <cristhian.lousa@gmail.com>

* fix: templates (#8499)

* basic-prompting-template-updated

* show-system-message

* names

* blog-writer-tested

* financial-report-parser

* image-sentiment-analysis

* seo-keyword-generator

* seo-keyword-generator

* Merge branch 'fix-vector-search-template' into mendons-template-branch

---------

Co-authored-by: Eric Hare <ericrhare@gmail.com>

* Update Basic Prompting.json

* Update Blog Writer.json

* Further template updates

* Update Image Sentiment Analysis.json

* Update templates

* Update Financial Report Parser.json

* Update Market Research.json

* Update Market Research.json

* Update Image Sentiment Analysis.json

* Update Market Research.json

* Update image sentiment analysis template

* Update Market Research.json

* Update Custom Component Maker.json

* Update Custom Component Maker.json

* Update Hybrid Search RAG.json

* Update Hybrid Search RAG.json

* Update Hybrid Search RAG.json

* More template updates

* Update Financial Report Parser.json

* Update Custom Component Maker.json

* Template updates

* Update Custom Component Maker.json

* Template updates

* fix custom component

* Update Financial Agent.json

* More template updates

* finance report parser fix

---------

Co-authored-by: Yuqi Tang <yuqi.tang@datastax.com>
Co-authored-by: Edwin Jose <edwin.jose@datastax.com>
Co-authored-by: Lucas Oliveira <62335616+lucaseduoli@users.noreply.github.com>
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
Co-authored-by: Cristhian Zanforlin Lousa <cristhian.lousa@gmail.com>
Co-authored-by: Mendon Kissling <59585235+mendonk@users.noreply.github.com>
Co-authored-by: Mike Fortman <michael.fortman@datastax.com>
2025-06-23 16:53:55 +00:00
Lucas Oliveira
4a09655f2f
fix: implemented cached values and temporary MCP servers on MCP component (#8628)
* Added actionCount to fetch only servers without actionCount

* Updated queries and uses to use servers without action data first, and then to fetch them

* removed comment

* updated constants

* Added loading dropdown

* Make options persist

* Implemented new value format for McpComponent and implemented saving and removing temp Mcp Server if config is existent

* Changed value type

* Implemented cache and saving the server config

* Fixed mcp server test

* fix backend formatting

* fixed lint

* Added await

* Fixed save button not appearing when no servers are available

* added condition to only show save button when options is not null
2025-06-23 14:15:22 +00:00
Cristhian Zanforlin Lousa
043ba55718
feat: add sessions endpoint with session management enhancements (#8596)
* 📝 (monitor.py): Add endpoint to get sessions and handle session_id encoding for API requests
📝 (use-get-messages-mutation.ts): Implement a mutation function to fetch messages with query parameters and handle session_id encoding for API requests
📝 (use-get-messages-polling.ts): Ensure proper encoding of session_id for API requests in polling mutation
📝 (use-get-messages.ts): Handle session_id encoding for API requests in messages query
📝 (new-modal.tsx): Implement functions to handle session deletion and proper encoding of session_id for API requests
📝 (utils.ts): Add functions to encode, decode, validate, format, and prepare session IDs for API requests

* 📝 (constants.ts): Add SESSIONS constant to API URLs for monitoring sessions
🔧 (use-delete-messages.ts): Add queryClient to UseRequestProcessor to invalidate sessions query
 (use-get-sessions-from-flow.ts): Introduce useGetSessionsFromFlowQuery to fetch sessions from flow
🔧 (use-rename-session.ts): Change refetchQueries to invalidateQueries for useGetSessionsFromFlowQuery
🔧 (custom-new-modal.tsx): Update import path for IOModal to playground-modal
🔧 (session-selector.tsx): Add setActiveSession function to handle setting active session
🔧 (sidebar-open-view.tsx): Add setActiveSession function to handle setting active session
♻️ (new-modal.tsx): Refactor IOModal into playground-modal and update functionality
♻️ (playground-modal.tsx): Refactor IOModal to handle playground-specific functionality
⬆️ (flowStore.ts): Add newChatOnPlayground state and setNewChatOnPlayground function
⬆️ (index.ts): Update FlowStoreType to include newChatOnPlayground and setNewChatOnPlayground

* 🔧 (pyproject.toml): update testpaths to point to the correct directory for tests
 (test_session_endpoint.py): add unit tests for sessions endpoint with flow_id filtering
♻️ (session-selector.tsx): refactor to trim editedSession before setting it
♻️ (sidebar-open-view.tsx): refactor to set visibleSession instead of activeSession

*  (use-get-sessions-from-flow.ts): Always include the flow ID as the default session if it's not already present
♻️ (playground-modal.tsx): Refactor setting sessions to include currentFlowId as the default session if not present, and handle visibility of sessions more efficiently

* ♻️ (use-get-messages-mutation.ts): remove unused imports and refactor code for better readability and maintainability

*  (test_session_endpoint.py): refactor test function names for better clarity and consistency

*  (create-new-session-name.ts): add function to generate a new session name based on the current date and time
🔧 (playground-modal.tsx): import createNewSessionName function to dynamically set a new session name when no session is visible

* [autofix.ci] apply automated fixes

*  (monitor.py): rename get_sessions endpoint to get_message_sessions for clarity and consistency
🔧 (constants.ts): remove unused SESSIONS constant from API URLs
🔧 (use-delete-messages.ts): remove commented out code and unnecessary comments
 (use-delete-sessions.ts): add functionality to delete sessions in frontend
🔧 (use-get-sessions-from-flow.ts): update API endpoint for getting sessions to match backend changes
🔧 (playground-modal.tsx): add functionality to delete sessions and associated messages in the UI, update UI optimistically, and handle errors appropriately

* [autofix.ci] apply automated fixes

* 🐛 (monitor.py): Fix type hinting issue in delete_messages function
📝 (monitor.py): Add comments and improve readability in test_messages_endpoints.py
📝 (session_endpoint.py): Update endpoint paths for consistency and clarity in test_session_endpoint.py

* [autofix.ci] apply automated fixes

* fix: update SQL statement to use col() for session_id filtering in get_message_sessions function

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
2025-06-23 14:11:07 +00:00
Gabriel Luiz Freitas Almeida
8563d87729
ci: Skip truncated values test for refactoring (#8670) 2025-06-23 09:46:30 -03:00
Edwin Jose
4832093e99
refactor(setup): generalize tool/agent node logic and update starter templates (#8618)
* update several templates

* updated templates

* change custom component maker

* Update Twitter Thread Generator.json

* updates from main

* llm reset issue

* Update setup.py

* Update Custom Component Maker.json

* [autofix.ci] apply automated fixes

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

* udpate templates

* [autofix.ci] apply automated fixes

* Update setup.py

* Update Custom Component Maker.json

* [autofix.ci] apply automated fixes

* Update Custom Component Maker.json

* text fixes

---------

Co-authored-by: Yuqi Tang <yuqi.tang@datastax.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Mike Fortman <michael.fortman@datastax.com>
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
2025-06-20 18:51:35 +00:00
Gabriel Luiz Freitas Almeida
322e70ad49
test: add test id to frozen icon and streamline freeze functionality test (#8619)
* fix: add data-testid attribute to frozen icon in NodeOutputField component for improved testing

* refactor: simplify freeze.spec.ts by removing redundant component interactions and enhancing test clarity

- Removed unnecessary component interactions and waits to streamline the test flow.
- Updated assertions to ensure expected output values are validated correctly.
- Improved timeout settings for better reliability in test execution.

* refactor: enhance freeze.spec.ts by replacing timeout with waitForSelector for improved test reliability

- Updated the test to use waitForSelector instead of a fixed timeout, enhancing the robustness of the test execution.
- This change aims to ensure that the test waits for the specific element to be present before proceeding, reducing flakiness.

* Revert "refactor: enhance freeze.spec.ts by replacing timeout with waitForSelector for improved test reliability"

This reverts commit 42eccbfa0d7e7defba02ee3589535689556390bb.

* test: increase timeout for frozen icon selector to improve test reliability

* test: increase timeout for frozen icon selector to enhance reliability

* test: simplify frozen icon visibility check in freeze.spec.ts

* test: comment out frozen icon visibility check in freeze.spec.ts

* test: add assertion for initial output and enhance frozen icon visibility check in freeze.spec.ts

* test: replace fixed timeout with waitForSelector for improved frozen icon visibility check in freeze.spec.ts

* test: implement polling approach for frozen icon visibility check in freeze.spec.ts to enhance error handling and reliability

* [autofix.ci] apply automated fixes

* fix: add data-testid attribute to frozen icon in NodeOutputField component for improved testing

* refactor: simplify freeze.spec.ts by removing redundant component interactions and enhancing test clarity

- Removed unnecessary component interactions and waits to streamline the test flow.
- Updated assertions to ensure expected output values are validated correctly.
- Improved timeout settings for better reliability in test execution.

* refactor: enhance freeze.spec.ts by replacing timeout with waitForSelector for improved test reliability

- Updated the test to use waitForSelector instead of a fixed timeout, enhancing the robustness of the test execution.
- This change aims to ensure that the test waits for the specific element to be present before proceeding, reducing flakiness.

* Revert "refactor: enhance freeze.spec.ts by replacing timeout with waitForSelector for improved test reliability"

This reverts commit 42eccbfa0d7e7defba02ee3589535689556390bb.

* test: increase timeout for frozen icon selector to improve test reliability

* test: increase timeout for frozen icon selector to enhance reliability

* test: simplify frozen icon visibility check in freeze.spec.ts

* test: comment out frozen icon visibility check in freeze.spec.ts

* test: add assertion for initial output and enhance frozen icon visibility check in freeze.spec.ts

* test: replace fixed timeout with waitForSelector for improved frozen icon visibility check in freeze.spec.ts

* test: implement polling approach for frozen icon visibility check in freeze.spec.ts to enhance error handling and reliability

* [autofix.ci] apply automated fixes

*  (freeze.spec.ts): add a 1-second delay before making the final assertion to ensure the element is fully rendered before checking its visibility

*  (nodeToolbarComponent/index.tsx): add data-testid attribute to freeze button for better testing
🐛 (freeze.spec.ts): update test to use new data-testid for freeze button to ensure proper element selection

*  (nodeToolbarComponent/index.tsx): add functionality to take a snapshot when freezing all vertices in the flow.

*  (component_freeze.spec.ts): add test case for freezing a component to ensure user can freeze components in the application and verify the frozen state with polling approach for better error handling.

*  (component_freeze.spec.ts): refactor frozen icon visibility check to use waitForSelector for improved reliability and error handling, replacing the previous polling approach.

*  (component_freeze.spec.ts): update timeout values to improve test reliability and stability

*  (freeze.spec.ts): add test case for freezing a component in the application to ensure the functionality works as expected

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: cristhianzl <cristhian.lousa@gmail.com>
Co-authored-by: Yuqi Tang <yuqi.tang@datastax.com>
2025-06-20 18:24:05 +00:00
Lucas Oliveira
fcbb6d2825
fix: add max note node width (#8648)
Added max note width
2025-06-20 15:46:21 +00:00
Lucas Oliveira
0ea3a50b95
fix: adds add button visibility condition on ListSelectionComponent (#8646)
Fixed add button appearing on composio component
2025-06-20 15:14:08 +00:00
cristhianzl
e1c57d930c Revert "📝 (handleRenderComponent/index.tsx): Add useShallow import for zustand/react/shallow to optimize re-renders"
This reverts commit 9898d1cacd.
2025-06-20 10:45:07 -03:00
cristhianzl
9898d1cacd 📝 (handleRenderComponent/index.tsx): Add useShallow import for zustand/react/shallow to optimize re-renders
📝 (handleRenderComponent/index.tsx): Introduce isLocked state to handle locked flow functionality
📝 (handleRenderComponent/index.tsx): Update tooltip visibility based on isLocked state
📝 (handleRenderComponent/index.tsx): Update handle style based on isLocked state
📝 (PageComponent/index.tsx): Add useShallow import for zustand/react/shallow to optimize re-renders
📝 (PageComponent/index.tsx): Introduce isLocked state to handle locked flow functionality
📝 (PageComponent/index.tsx): Prevent edge click actions when flow is locked
📝 (PageComponent/index.tsx): Disable edge actions when flow is locked
📝 (PageComponent/index.tsx): Update edge actions based on isLocked state
📝 (lock-flow.spec.ts): Add test to simulate deleting edges when flow is locked
2025-06-20 10:43:56 -03:00
Lucas Oliveira
24e7acf972
fix: remove placeholder duplicate on inputs (#8521)
Made placeholder transparent
2025-06-18 21:33:21 +00:00
Mike Fortman
50d58609a4
refactor: Remove Flow description from project view (#8620)
remove description
2025-06-18 17:03:57 +00:00
Deon Sanchez
ea02f639ff
fix: code snippet allows horizontal scroll (#8564)
* fix: add overflow-hidden class to BaseModal.Content in CodeAreaModal for improved layout

* fix: update BaseModal.Content in CodeAreaModal to use overflowHidden prop for better layout control
2025-06-18 15:26:50 +00:00
Mike Fortman
ddc17d4c77
fix: Match front and backend prompt variable behavior (#8522)
* fix handling of braces in front and back end

* add tests

* ruff check fix

* [autofix.ci] apply automated fixes

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

* [autofix.ci] apply automated fixes

* address pr comments and switches to use formatter

* remove code fence that isn't working

* comment

* [autofix.ci] apply automated fixes

* text fix

* style fix

* test fix

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-06-18 14:24:39 +00:00
Gabriel Luiz Freitas Almeida
6ada07a61f
refactor: remove conditional voice mode support from backend and frontend (#8597)
* revert changes that made voice mode conditional to the presence of webrtcvad

* refactor: lazy-load webrtcvad dependency

* refactor: remove try-except block and directly import voice_mode_router

* [autofix.ci] apply automated fixes

* feat: add LRU caching to voice activity detector initialization

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-06-18 12:23:31 +00:00
Edwin Jose
6dd5ebe33e
fix: Set status properly for Type Convert (#8599)
* Update converter.py

* [autofix.ci] apply automated fixes

*  (freeze.spec.ts): update URL in test case to use a more specific and relevant link for testing purposes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Eric Hare <ericrhare@gmail.com>
Co-authored-by: cristhianzl <cristhian.lousa@gmail.com>
2025-06-17 20:16:33 +00:00
Mike Fortman
35fa3fd85c
fix: Have markdown playground content take up the full width (#8525)
* markdown width fix

* template clean

*  (freeze.spec.ts): add a new utility function runChatOutput to handle running chat output in tests for better code organization and reusability.

---------

Co-authored-by: Cristhian Zanforlin Lousa <cristhian.lousa@gmail.com>
Co-authored-by: Eric Hare <ericrhare@gmail.com>
2025-06-17 19:06:45 +00:00
Gabriel Luiz Freitas Almeida
4d3eae63ac
feat: conditionally render voice button based on voice mode state (#8561)
* chore: update webrtcvad dependency and add optional audio support

- Updated webrtcvad version requirement to >=1.9.4 in pyproject.toml and uv.lock.
- Moved webrtcvad to optional dependencies under the new 'audio' category in both pyproject.toml files for better modularity.
- Ensured compatibility with existing dependencies while enhancing documentation for optional audio features.

* fix: handle optional import of voice_mode_router in API initialization

- Updated the API router initialization to conditionally include the voice_mode_router if it is available, improving modularity and preventing import errors.
- Adjusted the import statement for voice_mode_router to handle ImportError gracefully, ensuring the application remains robust in its absence.

* feat: add voice mode flag to API configuration

- Introduced a new function `get_voice_mode_enabled` to check for the availability of the `webrtcvad` library, enhancing the API's capability to support voice mode features.
- Updated the `ConfigResponse` schema to include `voice_mode_enabled` flag, allowing clients to query the status of voice mode support.
- Integrated the voice mode feature flag into the `get_config` endpoint response, improving the configurability of the API.

* test: skip voice mode tests if webrtcvad is not installed

- Added a conditional import for the webrtcvad library in the voice mode test suite.
- Implemented a pytest marker to skip tests when webrtcvad is unavailable, enhancing test robustness and preventing unnecessary failures.

* feat: add voice mode state management to flows manager store

- Introduced `voiceModeEnabled` state and `setVoiceModeEnabled` action in the flows manager store to manage the voice mode feature.
- Updated the `ConfigResponse` interface and `useGetConfig` hook to integrate the new voice mode state, allowing for dynamic configuration updates.
- Enhanced the API's configurability by ensuring the voice mode state is properly set based on the API response.

* feat: conditionally render voice button based on voice mode state

- Integrated `voiceModeEnabled` from the flows manager store to control the visibility of the VoiceButton component.
- The VoiceButton will now return null if voice mode is not enabled, enhancing the user interface by preventing unnecessary rendering.

* fix: ensure boolean conversion for voice mode state in config hook

- Updated the `setVoiceModeEnabled` function in the `useGetConfig` hook to explicitly convert the `voice_mode_enabled` value to a boolean, ensuring consistent handling of the voice mode state based on API responses.

* refactor: conditionally import voice_mode_router in API initialization

- Updated the API router to conditionally include the voice_mode_router based on its availability, enhancing modularity and preventing import errors.
- Adjusted the __init__.py file to dynamically add voice_mode_router to the __all__ list if the import is successful, improving the API's robustness.

* chore: revert mcp version update

* refactor: reorder router initialization and add audio flag to backend install task

* feat: add audio module to backend installation command in VS Code tasks

* ci: add audio extras to uv sync in frontend tests
2025-06-17 15:23:12 +00:00