* chore: Update changes-filter.yaml to include component_index.json in various sections
* chore: remove update-component-index workflow file
* chore: add update component index job to autofix workflow
* chore: Update changes-filter.yaml to include docker paths
Added docker-related paths to the changes filter configuration, ensuring that changes in the docker directory, uv.lock, pyproject.toml, and backend source files are tracked appropriately.
* chore: Update docker_test workflow trigger to use workflow_call
Modified the GitHub Actions workflow for testing Docker images to trigger on workflow_call instead of push events, streamlining the CI process for Docker-related changes.
* chore: Enhance CI workflow to include Docker testing
Added a new job for testing Docker images in the CI workflow, ensuring that Docker-related changes are validated. Updated conditions to include Docker outputs in the path filter and CI success summary.
* chore: Update changes-filter.yaml to include frontend paths
Added frontend source paths and .dockerignore to the changes filter configuration, ensuring that changes in the frontend directory are tracked alongside existing Docker-related paths.
* Add comprehensive coverage check workflow
Created a dedicated workflow that runs code coverage before PR approval:
🚀 Coverage Runs Early:
- Triggers: Push to branches + PR events (opened, sync, ready_for_review)
- Smart filtering: Only runs when backend code changes
- Fast feedback: Unit tests only for quick coverage results
📊 Comprehensive Reporting:
- CodeCov integration with proper flags and naming
- PR comments with coverage status and links
- Workflow summary with coverage percentage
- Coverage artifacts (XML + HTML) saved for review
⚡ Intelligent Execution:
- Path filtering: src/backend/**, pyproject.toml, uv.lock
- Branch filtering: main, develop, feature/**, fix/**, hotfix/**
- Draft protection: Skips draft PRs
- Dynamic naming: Different names for push vs PR contexts
🎯 Benefits:
- Developers get immediate coverage feedback on push
- Reviewers see coverage context during PR review
- Coverage issues caught before approval, not after
- Continuous monitoring of coverage trends across branches
This replaces the previous "coverage after approval" approach with
"coverage before approval" - exactly what was requested!
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Remove all restrictions from coverage workflow
- Coverage now runs on ANY push to ANY branch
- Coverage runs on ANY PR with ANY changes
- No path filtering - runs regardless of what files changed
- No branch filtering - runs on all branches
- Ensures coverage runs on every PR as requested
* move test to be run when we submit pr
* Configure CI to run tests before PR approval
- Remove 'lgtm' label requirement from CI trigger
- Run tests immediately on PR opened/synchronized events
- Add ci.yml to path filters to trigger tests when workflow changes
- Coverage and tests now run before approval for early feedback
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* add labeled
---------
Co-authored-by: Claude <noreply@anthropic.com>
* chore: add jest-junit dependency for improved test reporting
- Updated package.json and package-lock.json to include jest-junit version 16.0.0, enhancing test reporting capabilities in the project.
* chore: enhance Jest configuration for improved test coverage and CI reporting
- Added coverage collection settings, including coverage thresholds and report formats.
- Configured CI-specific options for Jest, including the use of jest-junit for test reporting and adjusted worker settings for better performance in CI environments.
* chore: update frontend test command for CI mode to ensure proper environment variable usage
- Modified the test command in the Makefile to set CI=true for accurate test execution in CI environments.
* chore: enhance frontend CI workflow with test reporting and coverage uploads
- Replaced the frontend dependency installation step with a command to run unit tests in CI mode.
- Added steps to publish test results using junit report and to comment on pull requests with coverage summaries.
- Implemented artifact upload for coverage reports to improve visibility and tracking of test coverage over time.
* chore: add frontend dependency installation step to CI workflow
- Introduced a step to install frontend dependencies using npm ci in the GitHub Actions workflow.
- This enhancement ensures that all necessary packages are available before running frontend unit tests, improving the reliability of the CI process.
* chore: update junit report action version in CI workflow
- Upgraded the junit report action from v5 to v5.5.1 in the GitHub Actions workflow to leverage the latest features and improvements for test result reporting.
* chore: add Jest unit test workflow for frontend
- Introduced a new GitHub Actions workflow to run Jest unit tests for the frontend.
- The workflow includes steps for checking out the repository, setting up the Node.js environment, running tests, publishing test results, adding coverage comments on pull requests, and uploading coverage reports.
- This enhancement improves the CI process by ensuring comprehensive testing and reporting for frontend components.
* chore: integrate Jest unit tests into CI workflow
- Added a new job to the CI workflow to run frontend unit tests using Jest.
- Updated the changes filter to include Jest test files, ensuring they are recognized during the CI process.
- This enhancement improves the testing coverage and reliability of the frontend components.
* ✨ (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.
* 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>
* ✨ (tests): update tag value from "@starter-project" to "@starter-projects" for consistency across test files.
* 📝 (changes-filter.yaml): add new path "src/backend/base/langflow/custom/**" to starter-projects section
♻️ (changes-filter.yaml): remove path "src/backend/base/langflow/components/**" from components section and add it to starter-projects section
♻️ (changes-filter.yaml): add new path "src/backend/base/langflow/custom/**" to components section
* 🐛 (component.py): fix a bug where the status was not being returned when there is only one output in the component
* 🔧 (ci.yml): Expand path filter outputs for more comprehensive CI testing
* fix docstring placement
* ✨ (group.spec.ts): update click event modifiers to use "ControlOrMeta" for better cross-platform compatibility
* ✨ (changes-filter.yaml): add new directory "src/backend/base/langflow/graph/" to starter-projects for processing in the build pipeline.
* 🔄 Refactor graph data structures from sets to lists for performance and compatibility
* 🔧 Optimize RunnableVerticesManager predecessor checks and type hints
---------
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
* 📝 (firecrawl_crawl_api.py): update StrInput to MultilineInput for better handling of URL input
📝 (firecrawl_scrape_api.py): update StrInput to MultilineInput for better handling of URL input
* [autofix.ci] apply automated fixes
* ✨ (firecrawl_crawl_api.py): introduce StrInput class to langflow.io module for handling string inputs in the API
* [autofix.ci] apply automated fixes
* ✨ (changes-filter.yaml): add new directories to components list for langflow schema and utils to be included in changes filtering
* ✨ (changes-filter.yaml): add new directory "src/backend/base/langflow/graph/" to components list for changes filtering in the workspace.
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
chore: Update changes-filter.yaml to include new lock files and project structure
- Added 'uv.lock' and 'src/backend/base/uv.lock' to the changes filter.
- Included 'src/backend/base/pyproject.toml' for tracking changes in the base directory.
- Adjusted paths to ensure proper monitoring of relevant files in the backend.
* ♻️ (index.tsx): Remove unused getRandomKeyByssmm function to clean up code and improve maintainability
📝 (index.tsx): Update key prop in SidebarMenuItem component to use index instead of getRandomKeyByssmm function for better performance and readability
* 📝 (select-options.tsx): Refactor SelectOptions component to improve readability and maintainability by restructuring the JSX elements and adding proper classNames
📝 (index.tsx): Introduce state for hoveredFolderId to track the currently hovered folder in the SideBarFoldersButtonsComponent for better user interaction and visual feedback. Update SidebarMenuItem to include onMouseEnter and onMouseLeave events to set and clear the hoveredFolderId state respectively. Update SidebarMenuButton className to conditionally apply background color based on the hoveredFolderId state.
* 📝 (.github/changes-filter.yaml): Add new path to starter-projects test category
🔧 (index.tsx, inputFileComponent): Add data-testid attribute to input element for testing purposes
🔧 (index.tsx, popover): Increase padding-right value for password input field
🔧 (Vector Store.spec.ts): Update test to click on correct element with data-testid attribute for file upload
🔧 (Vector Store.spec.ts): Remove redundant code related to filling input field and clicking on button
* 🔧 (index.tsx): Update styles for inputComponent popover to improve layout and alignment.
* Update TypeScript CI workflow: streamline suite selection and dependency setup
- Set default test suites to an empty array to dynamically determine suites based on changes.
- Ensure compact JSON output for test suites.
- Simplify Node.js and Playwright setup by using built-in caching and custom actions.
- Add UV_CACHE_DIR environment variable for caching.
* Expand test coverage paths in changes-filter.yaml configuration
* starting realocating components FE
* tagging tests
* 📝 (.github/workflows/typescript_test.yml): remove unnecessary comment before the Playwright test execution step to improve readability and maintainability
* 📝 (.github/changes-filter.yaml): Update paths in changes-filter.yaml to categorize different sections of the project for testing purposes
🔧 (.github/workflows/typescript_test.yml): Refactor workflow to use paths-filter action for determining test suites based on changes in different project sections
* ✨ (changes-filter.yaml): reorganize and update paths for test categories, starter projects, components, workspace, api, and database
✨ (components): add new components for GradientWrapper, pageLayout, and paginatorComponent
🔧 (MainPage): update import path for PageLayout component
🔧 (SettingsPage): update import path for PageLayout component
🔧 (StorePage): update import path for PageLayout component
* ✨ (frontend): Update import paths for components to use common directory instead of core directory for better organization and consistency
🔧 (frontend): Remove duplicate import of PaginatorComponent in various files and import it from the common directory to reduce redundancy and improve maintainability
* 🔧 (changes-filter.yaml): remove unnecessary release section from changes-filter.yaml
🔧 (typescript_test.yml): refactor workflow to support input suites and release flag for test runs
* 📝 (changes-filter.yaml): remove unnecessary entries from components section and add missing entries to workspace section for better organization and filtering of changes
🔧 (changes-filter.yaml): update changes-filter.yaml to include missing utils files in the frontend/src/utils directory
🔧 (typescript_test.yml): remove redundant code block that sets SUITES variable to default values as it is no longer needed due to changes in the changes-filter.yaml file
* ✨ (actionsMainPage-shard-1.spec.ts): Update test tags to remove unnecessary tags for better organization and clarity
📝 (store-shard-2.spec.ts): Update test tags to remove unnecessary tags for better organization and clarity
📝 (generalBugs-shard-4.spec.ts): Update test tags to remove unnecessary tags for better organization and clarity
📝 (generalBugs-shard-9.spec.ts): Update test tags to remove unnecessary tags for better organization and clarity
📝 (deleteComponents.spec.ts): Update test tags to remove unnecessary tags for better organization and clarity
📝 (deleteFlows.spec.ts): Update test tags to remove unnecessary tags for better organization and clarity
✨ (dragAndDrop.spec.ts): Refactor drag and drop test to improve readability and maintainability
✨ (flowPage.spec.ts): Refactor save test in Flow Page to improve readability and maintainability
✨ (store-shard-0.spec.ts): Refactor Store test to improve readability and maintainability
✨ (store-shard-1.spec.ts): Refactor Store test to improve readability and maintainability
✨ (store-shard-3.spec.ts): Remove unnecessary tags from test descriptions to improve clarity and consistency
✨ (userSettings.spec.ts): Remove unnecessary tags from test descriptions to improve clarity and consistency
✨ (general-bugs-shard-3909.spec.ts): Remove unnecessary tags from test descriptions to improve clarity and consistency
📝 (frontend): Update test tags in regression tests to remove unnecessary tags for better organization and clarity
📝 (frontend): Update test file paths in tsconfig.json to match the new file structure for consistency and maintainability
* [autofix.ci] apply automated fixes
* [autofix.ci] apply automated fixes
* Update paths-filter action to v3 and adjust filter configuration file
* Add logging to matrix setup in TypeScript test workflow
* Refactor decisionFlow.spec.ts to improve test setup and execution flow
* Refactor import paths for genericIconComponent and shadTooltipComponent in PlaygroundButton component
* feat: add release input to CI workflows for enhanced deployment control
* Fix: Correct 'release' input type in CI workflow configuration
* [autofix.ci] apply automated fixes
* Refactor Blog Writer test: streamline setup and interaction steps
* Refactor test cases to improve modal handling and streamline API key input logic
* Add test grep pattern to GitHub Actions workflow for targeted test execution
- Introduced `test_grep` output in the `determine-test-suite` job to generate a grep pattern based on changed files or input suites.
- Updated Playwright test execution to use the generated grep pattern, allowing for more targeted test runs.
- Enhanced the `Set Matrix` step to include tag processing for test filtering.
* Enhance tag filtering in test workflow with regex lookaheads
* Fix syntax for default suite input in GitHub Actions workflow
* Update GitHub Actions to handle empty suite input for release builds
* Escape regex lookaheads and quotes for GitHub Actions in test workflow
* Update regex pattern and quote escaping in TypeScript test workflow
* Use single quotes for echo command in GitHub Actions script
* Refactor tag handling in GitHub Actions to use OR logic for grep patterns
* 🔧 (FlowPage/index.tsx): Remove unnecessary empty line to improve code readability and consistency
* 📝 (FlowPage/index.tsx): add missing line break for better code readability
* Refactor import path and reorder CSS classes for consistency in UpdateAllComponents component
* [autofix.ci] apply automated fixes
* Update import path for PaginatorComponent in AdminPage index.tsx
* ✨ (logs.spec.ts): introduce a new variable 'modalCount' to keep track of the number of modals opened in the test suite
* 📝 (filterSidebar.spec.ts): remove unnecessary test steps related to filter removal and sidebar interactions to simplify and improve test focus on main functionality
* ✅ (logs.spec.ts): add tests to ensure proper interaction with logs feature in the frontend application
* ✅ (similarity.spec.ts): add a test tag for release and components to categorize the test case
💡 (similarity.spec.ts): add a comment to explain the purpose of the test case and the condition for skipping the test
* ✅ (decisionFlow.spec.ts): add missing newline before async function declaration to improve code readability
* ✅ (textInputOutput.spec.ts): skip the test for TextInputOutputComponent to exclude it from the test suite temporarily
---------
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
* Update changes-filter.yaml to include new component and starter project paths
* Update CI path filters and conditions for frontend and component changes
* Add astra integration tests to CI
* Add astra integration tests to CI
* revert whitespace changes
* update filter
* Swap to using a scheduled job rather than filter