* fix: Update minZoom value in PageComponent to improve zoom functionality
* [autofix.ci] apply automated fixes
* fix: Add fitViewOptions to PageComponent for enhanced zoom control
* fix: update default zoom out level in adjustScreenView utility
Changed the default value of numberOfZoomOut from 3 to 1 in the adjustScreenView function to improve initial screen adjustment behavior.
* fix: update zoom out level in filterEdge test
Modified the filterEdge test to pass a specific zoom out level of 3 to the adjustScreenView function, ensuring consistent screen adjustments during test execution.
* chore: update .gitignore to exclude .qodo files
* fix tests
* fixed test
* fix loop on zoom out
* Remove unnecessary zoom out click in starter projects test to improve test accuracy.
---------
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: Lucas Oliveira <62335616+lucaseduoli@users.noreply.github.com>
Co-authored-by: Carlos Coelho <80289056+carlosrcoelho@users.noreply.github.com>
* Create file management feature flag
* Added file manager modal
* Open file manager modal on clicking button
* Added file dragger
* Changed drag files component to be like the design
* Optimize code
* Implemented Import Files component
* Implemented Recent Files component
* Added Import Files and Recent Files into File Manager modal and added necessary icons
* Added file rendering to be used on component
* Added rendering of files selected on component
* Added icons for Dropbox, GoogleDrive and Onedrive
* Added dropdown menu for selecting import source
* Added button to navigate to My Files
* Added Files page, with Import button and search
* Added files table
* Updated uv and package lock
* Added tooltip for file types
* Added cursor pointer to file dragger
* Added file options dropdown
* Added files context menu to files page
* Changed side of dropdown
* Implemented search on modal
* Added Inverted AWS icon
* Added Import Button as morphed button
* Modularized Morphing Menu
* Updated Files Renderer height
* Added File endpoint and types
* Added Download File mutation
* Added Get Files query
* Added Rename File mutation
* Added Upload File mutation
* Added Use Upload File hook
* Added drop of files on dragFilesComponent
* Changed upload and rename to refetch get
* Added delete endpoint
* Changed get files to return correctly
* Make FilesRendererComponent render with correct file type
* Get files from correct endpoint
* Exported sort by date
* Added file_path to input file component
* Added file_path to File Component Type
* Implement showing correct files in FIle component and removing and adding selected files
* Removed open
* Changed selected files to handle ID
* Handled sorting of recent results
* Added sort By Boolean aux function
* Updated to use path for selected files, and to not update the selected values when Files change
* Change delete to handle id on params
* Change upload file to return files IDs
* Added duplicate file
* Added void to download files without params
* Select uploaded files
* Added onUpload to select uploaded files
* Added context menu options
* Changed to handle selected files with path
* Changed recentFiles to handle selected files with path
* Changed FilesContextMenu params
* Turned updatedAt optional
* Added files to the Files Page
* Changed file icons
* used size as number and get type from path
* Added correct CardsWrapComponent to home page
* Fixed flows and components drop in home and empty pages
* Fixed files drop in files management
* Implemented types validation when uploading via modal
* Fixed types for files page(allow all)
* Filter files on modal by file types
* Implemented multiple files handling when list parameter is true on FileInput
* Hidden unused import feature
* Added value correction if component values are incongruent
* Fixed size validator
* Add new size validator to use-upload-file
* Changed icon for rename
* removed replace function
* Implemented renaming file
* Added v2 api support
* Added v2 api on file_management
* Changed duplicate and download to include file type
* Implemented renaming on clicking rename option on files page
* Implemented rename on modal
* Implemented empty state for search and no files
* Changed text of empty state
* Added variants to morphing menu
* Fixed design of import from button and file search
* Implemented modal height changes to keep initial height
* Replace rename icon
* Removed duplicate from modal
* Added min height
* Fixed height
* Delete unused state
* Fixed size of import from button
* Added successful upload toast
* Implement plus button when files are selected
* implemented progress on uploads
* Added error handling to uploaded file
* Added delete confirmation
* Added maxFIleSizeUpload to the dialog
* Implement file upload retry
* Readded import from to files
* Added empty state to file browser
* Added list on base file
* [autofix.ci] apply automated fixes
* Try to fix crash
* Add check on files page
* Added DragWrapComponent with dragging area and opacity
* Added DragWrapComponent to files page
* [autofix.ci] apply automated fixes
* Added test ids for making tests for files page
* Added example files for tests
* Added boolean on await bootstrap to not open modal
* Added files page tests
* Added the extension on the file names
* Added datatestid and made context menu close on delete
* Added search with types
* Add type to filetype
* Added datatestid
* Changed formatFileSize to show B instead of bytes
* Updated files page test to use random names
* Changed file upload test to test file management functionality
* Modularized generate filename
* Fixed files page test
* Added ignore to pyproject
* Dont retry and dont clear
* Enable file management feature flag
* Remove import from button
* Refetch files on open of dialog
* Added upload failed state to my files
* Made not upload extensionless files
* Add toast on delete file
* removed standalone upload button
* Increased padding
* Updated row hover color
* Update padding of component
* Fixed dash lines
* Fixed api routes on vite config
* added api v2 endpoints to docker compose
* Adds router v2 and v1 to parent router
* Adds trailing slash to file management endpoint
* Fixed dash array
* Readded px-5
* Refactor dispatch methods and cleanup code for improved readability in middleware and app setup
* [autofix.ci] apply automated fixes
* Feat: add a support for OpenSearch and AstraDB components to yield the langchain vector_store connection object (#6998)
* Added decorator, decorator test, and modified supported vector stores
* Renamed module file name to reflect that this is for generic use, not use for graph rag
* Updated docsstring
* Improved documentation and modification to UT to support graph rag
* Remove extra file from PR
* rollback vector store template
* [autofix.ci] apply automated fixes
---------
Co-authored-by: Nadir J <31660040+NadirJ@users.noreply.github.com>
Co-authored-by: cristhianzl <cristhian.lousa@gmail.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
* chore: Bump frontend package version and enhance test reliability (#7049)
* chore: bump frontend package version from 0.1.2 to 1.2.0 in package-lock.json
* test: enhance error message wait condition in generalBugs-shard-6.spec.ts
Updated the test to wait for the error message to appear with a minimum length of 20 characters, improving reliability in detecting error states. This change replaces the previous fixed timeout with a dynamic check, enhancing the robustness of the test.
* fix: Disable retries in usePostValidateComponentCode mutation (#7044)
♻️ (use-post-validate-component-code.ts): refactor usePostValidateComponentCode function to include retry and retryDelay options for better control over mutation behavior
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
* feat: Add updateHiddenOutputs helper function to manage output visibility (#6932)
✨ (update-hidden-outputs.ts): add a new helper function to update hidden outputs in the frontend CustomNodes module
♻️ (use-update-all-nodes.ts): refactor useUpdateAllNodes hook to update hidden outputs for all nodes in the frontend CustomNodes module
♻️ (use-update-node-code.ts): refactor useUpdateNodeCode hook to update hidden outputs for a specific node's code in the frontend CustomNodes module
♻️ (index.ts): refactor types in the flow module to include OutputFieldType for better type checking and consistency
* docs: fix syntax errors at build (#7047)
* docs-fix-linking-errors
* docs-fix-codehike-errors
* add-mit-license-field-to-package-json
* add-tailwind-config-file
---------
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
* chore: update test durations (#6975)
Co-authored-by: github-merge-queue <118344674+github-merge-queue@users.noreply.github.com>
* docs: revised README (#7052)
* revised README
* fixed links
* Update README.md
Co-authored-by: Mendon Kissling <59585235+mendonk@users.noreply.github.com>
* Update README.md
Co-authored-by: Mendon Kissling <59585235+mendonk@users.noreply.github.com>
* reverting
---------
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
Co-authored-by: Mendon Kissling <59585235+mendonk@users.noreply.github.com>
* test: Parameterize DeepSeek model component test correctly (#7019)
test: Parameterize DeepSeek model component test with temperature and max tokens
* fix: docker test trigger for poetry is wrong now is uv (#6743)
also delete useless actions yml for now
Signed-off-by: yihong0618 <zouzou0208@gmail.com>
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
* docs: Pull request draft workflow (#7046)
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
* feat: Sync flows from FS to DB if flow has fs_path (#7043)
* feat: Sync flows from FS to DB if flow has fs_path
* Changes following review
* Simplify flow_mtimes handling
* Move sync_flows_from_fs to setup.py
---------
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
* ci: fix false positive on ci sucess status (#6868)
ci: fix ci EXIT_CODE
* docs: api build and run examples update (#6904)
* run-endpoint-parameters
* docs: Update build flow API documentation with detailed examples and parameters
* table-cleanup
* cleanup
* Apply suggestions from code review
Co-authored-by: KimberlyFields <46325568+KimberlyFields@users.noreply.github.com>
* Apply suggestions from code review
* comments-from-code-review
* Update docs/docs/API-Reference/api-reference-api-examples.md
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
---------
Co-authored-by: KimberlyFields <46325568+KimberlyFields@users.noreply.github.com>
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
* build(deps): bump @babel/runtime-corejs3 from 7.26.9 to 7.26.10 in /docs (#7051)
Bumps [@babel/runtime-corejs3](https://github.com/babel/babel/tree/HEAD/packages/babel-runtime-corejs3) from 7.26.9 to 7.26.10.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.26.10/packages/babel-runtime-corejs3)
---
updated-dependencies:
- dependency-name: "@babel/runtime-corejs3"
dependency-type: indirect
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* feat: add a unified language model component. (#6994)
* add a unified language model component with a few providers
* [autofix.ci] apply automated fixes
* fix errors and add tests
* [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>
* fix: Rename AgentQL components and add prompt parameter (#6834)
* renamed components
* add prompt parameter
* [autofix.ci] apply automated fixes
* prevent both query and prompt
* ruff checks
* [autofix.ci] apply automated fixes
* amend conditional check
* change error message
* update templates
* [autofix.ci] apply automated fixes
* fix tags
* fix tags in news aggregator
---------
Co-authored-by: huwenjie912 <huwenjie912@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>
* ref: Refactor tracing service (#7011)
* Refactor tracing service
* Remove start, flush and stop
* fix: pass props to SvgAnthropicBox component (#7057)
* fix: pass props to SvgAnthropicBox component
* fix: pass props to SvgAnthropicBox component in light mode
---------
Co-authored-by: Edwin Jose <edwin.jose@datastax.com>
* fix: check if component is in tool mode as well to display Tool Mode switch (#7042)
feat: Enhance checkHasToolMode function to include tool mode detection
Updated the checkHasToolMode function to account for an additional condition where the template is considered to be in tool mode if it contains exactly three fields: _type, code, and tools_metadata. This improves the function's ability to accurately determine the tool mode status of a template.
* Fix: Text split issues related to separator (#6993)
* fixes text split issues related to separator
* [autofix.ci] apply automated fixes
* [autofix.ci] apply automated fixes (attempt 2/3)
* format error fix
* Update Vector Store RAG.json
* [autofix.ci] apply automated fixes
* 📝 (freeze.spec.ts): update test description to match the actual element being tested for better clarity and maintainability
* ✅ (stop-building.spec.ts): update test description to improve clarity and maintainability
✅ (stop-button-playground.spec.ts): add wait time before filling search input to ensure proper loading and interaction with the element
---------
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: cristhianzl <cristhian.lousa@gmail.com>
Co-authored-by: Ítalo Johnny <italojohnnydosanjos@gmail.com>
* docs: mcp integration (#6986)
* docs: Add MCP (Model Context Protocol) integration documentation
* docs: Update Astra DB MCP integration documentation
* docs: Update Astra DB MCP integration documentation with Cursor connection section
* docs: Update MCP integration guide with Datastax Astra DB connection details and prerequisites
* Apply suggestions from code review
Co-authored-by: KimberlyFields <46325568+KimberlyFields@users.noreply.github.com>
* docs-peer-reviews
* remove-cursor-integration
* code-review
* Apply suggestions from code review
Co-authored-by: April I. Murphy <36110273+aimurphy@users.noreply.github.com>
* docs: update MCP integration guide for clarity and consistency
---------
Co-authored-by: KimberlyFields <46325568+KimberlyFields@users.noreply.github.com>
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
Co-authored-by: April I. Murphy <36110273+aimurphy@users.noreply.github.com>
* feat: add regex pattern extractor component (#6015)
* feat: add regex pattern extractor component
* [autofix.ci] apply automated fixes
* fix: consistent schema and cleaner code style
* fix: type annotation in regex.py
* [autofix.ci] apply automated fixes
* Fix: regex component unit tests to match implementation behavior
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Ítalo Johnny <italojohnnydosanjos@gmail.com>
* docs: Add workflow to automate updates to docs/openapi.json (#7072)
Co-authored-by: Mendon Kissling <59585235+mendonk@users.noreply.github.com>
* docs: test and update google oauth integration (#6949)
* update-template
* update-integration-doc
* document-id
* Apply suggestions from code review
Co-authored-by: brian-f <brian.fisher@datastax.com>
---------
Co-authored-by: brian-f <brian.fisher@datastax.com>
* feat: add pokedex agent template (#6885)
* add-pokedex-agent-json
* update with the latest agent component
* Update Pokédex Agent.json
---------
Co-authored-by: Edwin Jose <edwin.jose@datastax.com>
* feat: apify starter template (#6784)
* add social media agent apify template
* example default values, update starter template
* revert package-lock.json
* format
* note-cleanup
* [autofix.ci] apply automated fixes
* updates to the components
* update the agent component
---------
Co-authored-by: Edwin Jose <edwin.jose@datastax.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>
* feat: Needle Search Tool With Template (#6648)
* feat: Needle Search Tool With Templte
* lint
* lint
* lint
* lint
* refactor: Use Langflow Agent instead of CrewAI Agent
* techdebt: adjust Needle component to use tool mode and remove tool component
* lint
* lint
* Update Invoice Summarizer.json
* Update Invoice Summarizer.json
* update to the component
* refactor: Use Needle icon svg
* make format
* component updates
* update with latest agent component
* updated a missing connection when updating the agent component
* update template
---------
Co-authored-by: Edwin Jose <edwin.jose@datastax.com>
* feat: New parser component with multiple input types and stringify add on (#6652)
* update to parser
* error handling
* solve lint error and added tests
* [autofix.ci] apply automated fixes
* [autofix.ci] apply automated fixes
* Update parser.py
* fix format errors
* [autofix.ci] apply automated fixes
* refactor: Remove hardcoded name attribute from ParserComponent
* Update src/backend/base/langflow/components/processing/parser.py
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
* error fix
* [autofix.ci] apply automated fixes
* feat: mark ParserComponent as beta
Added a beta flag to the ParserComponent to indicate its experimental status.
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
Co-authored-by: Ítalo Johnny <italojohnnydosanjos@gmail.com>
Co-authored-by: Rodrigo <rodrigosilvanader@gmail.com>
* [autofix.ci] apply automated fixes
* format
* remove console log
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* add space in docker compose
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* [autofix.ci] apply automated fixes
* Update package lock
* Removed unused file
* Fixed naming on handleChangeFiles
* Update src/frontend/src/pages/MainPage/pages/filesPage/index.tsx
Co-authored-by: Mike Fortman <michael.fortman@datastax.com>
* Used format file size
* updated file browser to My Files
* Updated cursor
* Added error on selecting no files
* Updated base FileInput name to Files
* Added truncate and tooltip to files
* [autofix.ci] apply automated fixes
* [autofix.ci] apply automated fixes (attempt 2/3)
* merge fix
* Update src/frontend/src/components/core/parameterRenderComponent/components/inputFileComponent/index.tsx
* Update src/frontend/src/modals/fileManagerModal/components/filesContextMenuComponent/index.tsx
* [autofix.ci] apply automated fixes
* [autofix.ci] apply automated fixes (attempt 2/3)
* [autofix.ci] apply automated fixes (attempt 3/3)
* Fixed files not maintaining state
* Update info position
* adjusted getCustomParameterTitle
* removed console.log
* updated utils.py
* Added upload file util
* Added check on upload-file to use old one if unavailable
* Use new upload file function in Document QA
* uploaded tests to use new UploadFile util
* updated general bugs to use new uploadFile
* updated upload-file
* Update file mixin to have temp file
* Update file component to not enable file management if temp file is true
* Put temp file as true for chat input
* Update starter projects
* Updated starter templates
* added tempFile condition on useEffect
* Fixed invalid size alert
* Fixed limit file test
* Fixed backend test
---------
Signed-off-by: yihong0618 <zouzou0208@gmail.com>
Signed-off-by: dependabot[bot] <support@github.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>
Co-authored-by: Pedro Pacheco <3083335+pedrocassalpacheco@users.noreply.github.com>
Co-authored-by: Nadir J <31660040+NadirJ@users.noreply.github.com>
Co-authored-by: cristhianzl <cristhian.lousa@gmail.com>
Co-authored-by: Mendon Kissling <59585235+mendonk@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-merge-queue <118344674+github-merge-queue@users.noreply.github.com>
Co-authored-by: Carter Rabasa <carter.rabasa@gmail.com>
Co-authored-by: yihong <zouzou0208@gmail.com>
Co-authored-by: Ronnie Miller <ronnie.miller@datastax.com>
Co-authored-by: Christophe Bornet <cbornet@hotmail.com>
Co-authored-by: Ítalo Johnny <italojohnnydosanjos@gmail.com>
Co-authored-by: KimberlyFields <46325568+KimberlyFields@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Rodrigo Nader <rodrigosilvanader@gmail.com>
Co-authored-by: Edwin Jose <edwin.jose@datastax.com>
Co-authored-by: wjwjtf <wenjie@tinyfish.io>
Co-authored-by: huwenjie912 <huwenjie912@gmail.com>
Co-authored-by: Eddie Ho <62191480+noodleslove@users.noreply.github.com>
Co-authored-by: April I. Murphy <36110273+aimurphy@users.noreply.github.com>
Co-authored-by: Raphael Valdetaro <79842132+raphaelchristi@users.noreply.github.com>
Co-authored-by: brian-f <brian.fisher@datastax.com>
Co-authored-by: Jakub Kopecký <me@kopecky.io>
Co-authored-by: Jan Heimes <45521680+JANHMS@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Mike Fortman <michael.fortman@datastax.com>
* refactor: simplify TaskService by removing Celery integration
* refactor: enhance AnyIO backend task management and error handling
* refactor: restructure flow building process and enhance event handling
* feat: implement QueueService for managing job queues and tasks
* feat: Add QueueService for managing job queues and task lifecycle
* feat!: Enhance flow building with QueueService integration for job management
* revert changes to async session
* feat: Integrate QueueService into lifespan management for task handling
* refactor: Enhance QueueService with robust lifecycle management and cleanup mechanisms
* refactor: Simplify docstring for get_queue_service function
* refactor: Update import statements in queue factory for clarity
* test: Improve chat endpoint tests with comprehensive build flow scenarios
* refactor: Streamline flow build event generation and queue management
* refactor: Improve flow build process with modular event handling and URL parameter management
* test: Enhance loop component tests with flow build and event handling utilities
* fix: Improve transaction logging with null flow_id handling and debug logging
* fix: Remove unnecessary db.refresh() in transaction logging
* feat: Add polling mode for build events with optional streaming
* feat: Add event delivery configuration option to settings
* feat: Implement polling for build events with configuration-driven streaming
* refactor: Enhance queue cleanup with improved logging and error handling
* test: Improve build event stream assertion with detailed error reporting
* test: Add benchmark test for build flow polling mechanism
* refactor: Remove redundant end event in flow event generation
* test: Update test_component_tool_with_api_key to use async flow
* Convert test method to async
* Update graph start method to use async_start()
* Add client parameter to test method
* Modify tool retrieval to use async method
* test: Add session ID generation in agent component test
* fix: Enhance error handling in LCAgentComponent for ExceptionWithMessageError
Add null checks to prevent potential AttributeError when handling agent message deletion
* test: Refactor test assertion for model name options in agent component
Simplify the assertion for checking "sonnet" in model name options by extracting the options to a variable first
* refactor: Improve type hints and imports in AnyIOTaskResult
* Add `__future__` import for type annotations
* Use conditional import for `Callable` and `TracebackType`
* Explicitly type `_traceback` attribute with `TracebackType | None`
* fix: Add null checks for event task in build events streaming
* refactor: Extract build and disconnect handling into separate modules
This commit separates the build and disconnect handling logic from the chat API module into dedicated files:
- Created `langflow/api/build.py` to house the flow generation and vertex building logic
- Created `langflow/api/disconnect.py` to manage the custom streaming response with disconnect handling
- Removed duplicate code from `langflow/api/v1/chat.py`
- Improved code organization and modularity
* refactor: Extract flow build and event handling methods in build API
This commit introduces two new methods in the build API to improve code organization and reusability:
- `start_flow_build()`: Centralizes the logic for creating a queue and starting a flow build task
- `get_flow_events_response()`: Handles retrieving flow events for both streaming and polling modes
The changes simplify the chat API endpoint implementations and reduce code duplication
* refactor: Deprecate /task endpoint and add informative error message
This commit marks the /task endpoint as deprecated and raises an HTTP 400 error with a clear message indicating the endpoint will be removed in a future version. The changes improve API clarity and guide users towards the recommended /run endpoint.
* refactor: Update log_transaction function return type annotation
Modify the return type hint for log_transaction to allow for potential None return, improving type safety and clarity in the transactions logging method.
* feat: Add configurable event delivery streaming option
Introduce support for configurable event delivery mode (streaming/polling) across frontend components:
- Add `shouldStreamEvents()` method in NodeStatus and IOModal
- Update flowStore to accept a `stream` parameter
- Modify buildFlowVerticesWithFallback to use the stream parameter directly
- Remove hardcoded polling logic in buildUtils
* fix: Add null check for flow_id in log_transaction function
Prevent logging transactions without a flow_id by returning None, ensuring data integrity and avoiding potential database errors
* chore: Update changes-filter to include chat API path
* fix: Add error handling and null checks in flow transaction deletion
Improve robustness of transaction and vertex build deletion by:
- Adding a null check for flow_id in delete_transactions_by_flow_id
- Wrapping deletion operations in try-except blocks to prevent failures
- Logging debug messages for any deletion errors
* fix: Remove redundant commit in vertex builds deletion
Remove unnecessary db.commit() from delete_vertex_builds_by_flow_id to prevent duplicate commits and simplify database transaction handling
* fix: Improve transaction logging with debug message and return value
Move debug logging from CRUD layer to utils to provide more context about logged transactions and ensure proper error handling
* fix: Improve error handling and transaction cleanup in active_user fixture
Enhance user and transaction cleanup process in test fixture by:
- Adding separate try-except blocks for transaction/vertex build deletion and user deletion
- Adding debug logging for potential errors during cleanup
- Ensuring proper session commits for each operation
* propagate parent task CancelledError instead of supressing it
Co-authored-by: Christophe Bornet <cbornet@hotmail.com>
* refactor: Rename queue service to job queue service
Restructure job queue management by:
- Renaming QueueService to JobQueueService
- Moving queue-related files to a new job_queue directory
- Updating import paths and service type references
- Enhancing job queue service with more robust async job management
* fix: Correct ServiceType enum reference for job queue service
Update the service type constant to match the recently renamed JobQueueService, ensuring consistent service type referencing across the application.
* refactor: Enhance JobQueueService with comprehensive logging and documentation
Improve the JobQueueService implementation by:
- Adding detailed docstrings with clear explanations of methods and attributes
- Implementing comprehensive logging throughout the service
- Enhancing error handling and logging for queue and task management
- Providing more context in log messages for debugging and monitoring
* docs: Improve stop method docstring for JobQueueService
Enhance the documentation for the stop method by:
- Providing a more detailed and precise description of the shutdown process
- Clarifying the steps involved in gracefully stopping the service
- Improving the explanation of resource cleanup and task cancellation
* fix: Properly handle task cancellation and propagate exceptions in JobQueueService
* fix: Enhance error handling and raise appropriate exceptions in JobQueueService methods
* improve docstring
Co-authored-by: Christophe Bornet <cbornet@hotmail.com>
* fix: Remove redundant exception raises in JobQueueService methods and improve cleanup logic
* fix: Improve logging during job cleanup and handle exceptions more appropriately
* feat: add utility to run tests with multiple event delivery modes
* feat: integrate withEventDeliveryModes utility in multiple test files
* refactor: replace status code assertions with httpx codes for clarity
* remove noqa comment and change argument name
Co-authored-by: Christophe Bornet <cbornet@hotmail.com>
* refactor: streamline event polling logic in get_flow_events_response
* refactor: use getattr for safer session attribute access
Co-author: @cbornet
* feat: add is_started method to JobQueueService
* refactor: modify JobQueueService start method and main.py queue service initialization
* feat: add ready state and teardown method to JobQueueService
* refactor: simplify job queue cleanup logic in JobQueueService
* refactor: improve error logging in active_user fixture
* refactor: improve AnyIO task management with TaskGroup and CancelScope
* refactor: Implement LimitedBackgroundTasks for controlled vertex build logging (#6312)
* feat: implement LimitedBackgroundTasks for controlled vertex build logging
* refactor: replace BackgroundTasks with LimitedBackgroundTasks in build_flow endpoint
* refactor: improve task cancellation error handling in JobQueueService
* refactor: Rename LimitedBackgroundTasks to LimitVertexBuildBackgroundTasks
* feat: Add EventDeliveryType enum for event delivery methods
* feat: Add polling constants for endpoint and streaming status
* refactor: Update buildFlowVerticesWithFallback to use polling constants
* refactor: Update event delivery handling to use EventDeliveryType enum
* [autofix.ci] apply automated fixes
* fix: Improve error handling for cancelled build tasks
Refactor generate_flow_events to properly handle and propagate CancelledError
- Remove unnecessary task creation and manual cancellation
- Directly await _build_vertex instead of creating a separate task
- Improve exception logging for cancelled tasks
- Ensure CancelledError is raised instead of being silently handled
* fix: trigger event_manager.on_end after error handling in generate_flow_events
---------
Co-authored-by: Christophe Bornet <cbornet@hotmail.com>
Co-authored-by: anovazzi1 <otavio2204@gmail.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
✨ (validate-raise-errors-components.spec.ts): add test to validate error messages on popups when an error is raised in custom components
📝 (add-custom-component.ts): add utility function to add custom components in tests for easier testing and validation of error messages
* Added xyflow and updated imports
* Fix changing node.width to node.measured.width
* Updated NodeType to follow new API
* Fixed note node data type
* Created AllNodeType to contain note node type
* Changed flow types to follow new type from reactflow 12
* Updated flowStore to work with new types
* Updated flowStore and reactFlowUtils to work with custom edge type
* Updated updateAllNodes to use new type
* Updated PageComponent to follow new names for node dragging and edge reconnect
* Made selected prop be optional
* Changed reactFlowInstance to have nodes and edges type
* Updated updateAllComponent to follow new types
* Updated ReactFlowUtils with new types
* Updated reactFlowUtils type
* Updated all reactFlowUtils to be generic
* Updated handleRenderComponent with Connection type
* Updated node description and name with null checks for names
* Added check if node is genericNode on nodeOutputField
* Updated note node type
* Updated nodestatus with selected null check
* Updated notenode with new node type
* Update NodeType imports to be AllNodeType
* Fix more lint issues
* Fixed react flow button css
* ✨ (freeze.spec.ts): add zoomOut utility function to handle zooming out in tests for better code reusability and readability
📝 (decisionFlow.spec.ts): import zoomOut utility function to handle zooming out in tests for better code reusability and readability
📝 (zoom-out.ts): create zoomOut utility function to handle zooming out in tests for better code reusability and readability
* 🐛 (generalBugs-shard-10.spec.ts): fix test to wait for the element with class "border-ring-frozen" to be visible before asserting its count
* 📝 (generalBugs-shard-10.spec.ts): remove unnecessary locator click on element with id 'react-flow-id' to improve test reliability and maintainability
* 📝 (SelectionMenuComponent): add data-testid attribute to differentiate error-group-node and group-node components
📝 (similarity.spec.ts): refactor dragTo calls to use targetPosition for better accuracy, replace zoom_out clicks with zoomOut function, updateOldComponents function to handle outdated components
📝 (generalBugs-shard-5.spec.ts): replace zoom_out clicks with zoomOut function, add waitForSelector for group-node before clicking, remove unnecessary mouse interactions
📝 (intComponent.spec.ts): replace zoom_out clicks with zoomOut function, click on div-generic-node component
📝 (keyPairListComponent.spec.ts): click on div-generic-node component, adjustScreenView function call
📝 (nestedComponent.spec.ts): remove unnecessary click on react-flow-id element
📝 (generalBugs-shard-7.spec.ts): replace zoom_out clicks with zoomOut function
* ✨ (stop-building.spec.ts): Add new utility functions to improve code modularity and readability
🔧 (stop-building.spec.ts): Refactor drag and drop operations to use utility functions for better maintainability
🔧 (stop-building.spec.ts): Refactor zoom out operations to use utility function for consistency
🔧 (stop-building.spec.ts): Refactor component positioning operations to use utility functions for clarity
🔧 (stop-building.spec.ts): Refactor outdated components and filled API keys handling to use utility functions for reusability
🔧 (stop-building.spec.ts): Refactor fit view operation to use utility function for consistency
* ✨ (generalBugs-shard-9.spec.ts): refactor test to use initialGPTsetup function for GPT setup instead of manual steps to improve code readability and maintainability
* ✨ (store-shard-2.spec.ts): Increase timeout for clicking "api-key-button-store" to 200000ms for better test stability
✨ (deleteComponents.spec.ts, deleteFlows.spec.ts, store-shard-1.spec.ts, store-shard-3.spec.ts): Increase timeout for clicking "api-key-button-store" to 200000ms for better test stability
✨ (store-shard-1.spec.ts, store-shard-3.spec.ts): Remove unnecessary waitForSelector and add timeout of 200000ms for clicking "api-key-button-store" for better test stability
* ✨ (fileUploadComponent.spec.ts): update dragTo method calls with targetPosition option to specify the position of the drag action
* ✨ (decisionFlow.spec.ts): add explicit wait for an element to be attached before interacting with it to improve test reliability
🐛 (sticky-notes.spec.ts): fix test by adding keyboard press to simulate pressing the Escape key to close a modal before checking text length
* ✅ (sticky-notes.spec.ts): update assertion to use 'toHaveCount' matcher for improved test readability and reliability
* Added function to make controls horizontal
* ✨ (sticky-notes.spec.ts): update selector for textMarkdown to improve test reliability and readability
---------
Co-authored-by: cristhianzl <cristhian.lousa@gmail.com>
* change tests to use utils libs
* 🔧 (frontend): add data-testid attribute to buttons in baseModal and secretKeyModal components
🔧 (frontend): add data-testid attribute to buttons in various test files for improved testing
🔧 (frontend): refactor awaitBootstrapTest function to remove skipNewFlow option and improve modal handling
* ✅ (userSettings.spec.ts): add a 1-second timeout before checking for the "Please save" text to ensure it is rendered on the page before interacting with it
* ✅ (userSettings.spec.ts): add comment to clarify waiting for API key creation to complete before proceeding to the next form element
* ✨ (freeze-path.spec.ts): refactor adjustScreenView function to accept a parameter for the number of zoom outs to perform, improving flexibility and reusability in test scenarios.
🔧 (freeze-path.spec.ts): replace adjustScreenView function with initialGPTsetup function for setting up initial GPT configuration in the test scenario.
* refactor: Improve wait time for modal in drag and drop test
* ✨ (dragAndDrop.spec.ts): update file path to read collection.json from the correct location
🐛 (dragAndDrop.spec.ts): increase timeout for waiting for "uploaded successfully" text to prevent test failures
* ✨ (dragAndDrop.spec.ts): Add tests for drag and drop functionality to ensure users can drag and drop collections and flows without crashing the application
📝 (simulate-drag-and-drop.ts): Add utility function to simulate drag and drop events in tests for improved test coverage and functionality
* add debouncing time on file upload
* [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>
* ✨ (ChatCodeTabComponent.tsx): add data-testid attribute to ChatCodeTabComponent for testing purposes
🔧 (TemplateCardComponent/index.tsx): add data-testid attribute with dynamic value for testing
🔧 (sidebarDraggableComponent/index.tsx): import convertTestName function and add data-testid attribute with dynamic value for testing
🔧 (Custom Component Generator.spec.ts): add test for Custom Component Generator with Playwright
🔧 (Image Sentiment Analysis.spec.ts): add test for Image Sentiment Analysis with Playwright
✅ (Instagram Copywriter.spec.ts, Market Research.spec.ts): Add integration tests for Instagram Copywriter and Market Research functionalities.
✨ (Prompt Chaining.spec.ts): Add integration test for Prompt Chaining feature
✨ (SEO Keyword Generator.spec.ts): Add integration test for SEO Keyword Generator feature
✨ (SaaS Pricing.spec.ts): Add integration test for SaaS Pricing feature
✨ (Twitter Thread Generator.spec.ts): Add integration test for Twitter Thread Generator feature
* ✨ (Custom Component Generator.spec.ts): Update environment variable name from OPENAI_API_KEY to ANTHROPIC_API_KEY for consistency and clarity
📝 (Custom Component Generator.spec.ts): Update test descriptions to reflect the correct environment variable names and requirements
📝 (Instagram Copywriter.spec.ts): Add support for TAVILY_API_KEY environment variable in tests and update test descriptions to reflect the change
* 📝 Add test utilities for updating components, adding new API keys, adjusting screen view, awaiting bootstrap test, and getting all response messages.
* 📝 (Custom Component Generator.spec.ts): Add waitForOpenModalWithChatInput utility function for better code organization and readability
📝 (Image Sentiment Analysis.spec.ts): Add buildDataTransfer utility function for better code organization and readability
📝 (Instagram Copywriter.spec.ts): Add waitForOpenModalWithChatInput utility function for better code organization and readability
📝 (Market Research.spec.ts): Add waitForOpenModalWithChatInput utility function for better code organization and readability
📝 (Prompt Chaining.spec.ts): Add waitForOpenModalWithChatInput utility function for better code organization and readability
📝 (SEO Keyword Generator.spec.ts): Add waitForOpenModalWithoutChatInput utility function for better code organization and readability
📝 (SaaS Pricing.spec.ts): Add waitForOpenModalWithoutChatInput utility function for better code organization and readability
📝 (Twitter Thread Generator.spec.ts): Add waitForOpenModalWithoutChatInput utility function for better code organization and readability
📝 (build-data-transfer.ts): Add buildDataTransfer utility function for better code organization and readability
📝 (wait-for-open-modal.ts): Add waitForOpenModalWithChatInput and waitForOpenModalWithoutChatInput utility functions for better code organization and readability
* 🔧 (ci.yml): add ANTHROPIC_API_KEY and TAVILY_API_KEY secrets for CI workflows
🔧 (nightly_build.yml): add ANTHROPIC_API_KEY and TAVILY_API_KEY secrets for nightly build jobs
🔧 (typescript_test.yml): add ANTHROPIC_API_KEY and TAVILY_API_KEY secrets for TypeScript test workflows
* feat: Add initialGPTsetup utility function for setting up GPT environment
This commit adds the initialGPTsetup utility function to the test/utils directory. The function is responsible for setting up the GPT environment by performing tasks such as adjusting the screen view, updating old components, removing old API keys, adding new API keys, and selecting the GPT model. The function accepts optional parameters to skip specific tasks if needed.
* change to utility function
* change to utility function
* change to utility function
* change to utility function
* change to utility function
* change to utility function
* change to utility function
* change to utility function
---------
Co-authored-by: anovazzi1 <otavio2204@gmail.com>
✨ (index.tsx): Add convertTestName function to generate data-testid attribute dynamically based on display_name
🔧 (use-shortcuts.tsx): Pass hasToolMode parameter to handleToolModeWShortcut function to conditionally activate tool mode
🔧 (index.tsx): Pass hasToolMode prop to NodeToolbarComponent to enable/disable tool mode functionality
🔧 (Vector Store.spec.ts): Import and use extractAndCleanCode function to extract and clean code content
🔧 (general-bugs-component-as-tool-shortcut.spec.ts): Import and use extractAndCleanCode function to extract and clean code content
📝 (extract-and-clean-code.ts): Add utility function extractAndCleanCode to extract and clean code content from HTML page