🐛 (index.tsx): Fix issue where setEditFolderName was being called with undefined or empty folders array, causing a crash. Added a check to ensure folders array is not empty before setting edit folder names.
* ✅ (dropdownComponent.spec.ts): add missing test case for dropdownComponent to improve test coverage and ensure functionality
🔧 (dropdownComponent.spec.ts): update test case to include additional interactions with the page to simulate user behavior and improve test robustness
* ✅ (dropdownComponent.spec.ts): update mouse wheel scroll distance to 800 to improve test reliability
📝 (dropdownComponent.spec.ts): add additional wait time to ensure stability in test execution
* 🔧 (dropdownComponent.spec.ts): remove unnecessary code related to hovering and scrolling in the dropdown component test to improve test readability and maintainability
* 📝 (langflow): Add support for configuring auto saving interval for Langflow
📝 (langflow): Update ConfigResponse and Settings to include auto_saving_interval
📝 (frontend): Update useGetConfigQuery and useSaveConfig to handle auto_saving_interval
📝 (frontend): Update useAutoSaveFlow and flowsManagerStore to handle auto saving interval
* 📝 (util.py): add support for setting auto_saving_interval in update_settings function to allow customization of auto-saving interval
* 🐛 (users.py): Fix issue where user password was not being updated correctly
📝 (constants.ts, authContext.tsx, index.tsx): Add LANGFLOW_REFRESH_TOKEN constant and update related code to support refresh token functionality
📝 (userManagementModal/index.tsx): Update form reset logic and handle input values correctly
📝 (LoginPage/index.tsx, LoginAdminPage/index.tsx): Update login function to include refresh token parameter
📝 (components/index.ts, auth.ts): Update inputHandlerEventType to support boolean values
✨ (auto-login-off.spec.ts): Add end-to-end test for user login functionality with auto_login set to false, CRUD operations for users, and verification of user flows visibility based on permissions.
* ✨ (auto-login-off.spec.ts): improve test description for better clarity and understanding
📝 (auto-login-off.spec.ts): add comments to clarify the purpose of intercepting requests and performing CRUD operations
* 🐛 (users.py): fix comparison of password to check for None using 'is not None' instead of '!= None' for better accuracy
* Added refresh flows mutation
* Changed places that used refreshFlows to use the mutation
* removed old refreshFlows
* removed readFlowsFromDatabase api call
* Removed unused API calls from API.ts
* Removed getFlowFromDatabase call
* feat: Add NodeIcon component for displaying icons in GenericNode
This commit adds a new component called NodeIcon to the GenericNode module. The NodeIcon component is responsible for displaying icons based on the data type of the node. It uses the nodeIconsLucide object from the styleUtils module to map the data type to the corresponding icon name. The component also handles the display of emojis as icons by checking if the icon is an emoji using the emoji-regex library. The icon color is determined based on the data type using the nodeColors object from the styleUtils module. The NodeIcon component is used in the GenericNode component to render the icon of the node.
* [autofix.ci] apply automated fixes
* feat: Remove useIconNodeRender hook from CustomNodes
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
* Added Validate endpoint
* Added API Code Validate type
* Added post validate code hook
* Used mutation instead of API call to validate code
* Removed validate code api call
* move css class for improve of the UI/UX
* [autofix.ci] apply automated fixes
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
* feat: Add data-testid attribute to main page title
The code changes add a `data-testid` attribute to the main page title in the `PageLayout` component. This attribute can be used for testing purposes.
* refactor: Update page load timeout in end-to-end test
Reduce the page load timeout in the end-to-end test for Basic Prompting to improve test efficiency. The timeout is decreased from 2000ms to 1000ms.
* refactor: Decrease page load timeout in end-to-end test
Reduce the page load timeout in the end-to-end test for Basic Prompting to improve test efficiency. The timeout is decreased from 2000ms to 1000ms.
* refactor: Decrease page load timeout in end-to-end test
* refactor: Update page load timeout in end-to-end test
* refactor: Decrease page load timeout in end-to-end test
* refactor: Decrease page load timeout in end-to-end test
* refactor: Decrease page load timeout in end-to-end test
* refactor: Decrease page load timeout in end-to-end test
* refactor: Decrease page load timeout in end-to-end test
* refactor: Decrease page load timeout in end-to-end test
* refactor: Decrease page load timeout in end-to-end test
Reduce the page load timeout in the end-to-end test for Basic Prompting to improve test efficiency. The timeout is decreased from 2000ms to 1000ms.
* improve tests decreasing and removing time outs
* 🐛 (ComposioAPI.py): Fix issue where build_config was not being updated correctly when api_key is not empty
* 🐛 (GenericNode/index.tsx): Fix potential null pointer exception by adding non-null assertion operator to info property access
✨ (generalBugs-shard-11.spec.ts): Add end-to-end tests to ensure users can use ComposIO without api_key error and connect tools successfully
* ✨ (index.tsx): Add data-testid attribute to the save button for testing purposes
✨ (auto-save-off.spec.ts): Add end-to-end test for manually saving a flow when auto_save is off
* ⬆️ (auto-save-off.spec.ts): decrease wait time from 5000ms to 3000ms for improved test efficiency
* moving auto-save-off test to scheduled folder
* feat: add useGetDownloadFileMutation hook for downloading files
This commit adds a new hook called useGetDownloadFileMutation to handle the downloading of files in the frontend. The hook takes in the path and filename as parameters and uses the fetch API to download the file. It then creates a URL object for the downloaded file and sets it as the href of a dynamically created anchor element. Finally, it triggers a click event on the anchor element to initiate the file download. The URL object is revoked after the download is complete.
* feat: add use-download-files hook for downloading files on chat
This commit adds a new hook called use-download-files to handle the downloading of files in the frontend. The hook takes in the path and filename as parameters and uses the fetch API to download the file. It then creates a URL object for the downloaded file and sets it as the href of a dynamically created anchor element. Finally, it triggers a click event on the anchor element to initiate the file download. The URL object is revoked after the download is complete.
* [autofix.ci] apply automated fixes
* feat: refactor file download handling in chat view
Refactor the file download handling in the chat view by introducing a new hook called `use-download-files`. This hook takes in the path and filename as parameters and uses the fetch API to download the file. It creates a URL object for the downloaded file and sets it as the href of a dynamically created anchor element. Finally, it triggers a click event on the anchor element to initiate the file download. The URL object is revoked after the download is complete.
* remove console.log
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Cristhian Zanforlin Lousa <72977554+Cristhianzl@users.noreply.github.com>
* refactor: Update lazy loading imports in routes.tsx
The code changes in `routes.tsx` refactor the lazy loading imports by removing unnecessary code duplication and reorganizing the import statements. This improves the readability and maintainability of the code.
* [autofix.ci] apply automated fixes
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
* ✨ (use-icons-status.tsx): Add data-testid attribute to Loading component for testing purposes
✨ (index.tsx): Add data-testid attribute to stop building button for testing purposes
✨ (stop-building.spec.ts): Add end-to-end test to ensure user can stop a building process
* ✨ (stop-building.spec.ts): Add additional tests to ensure the user can stop a building process successfully and verify the button functionality.
* test(stop-building.spec.ts): Comment out wait timeouts
---------
Co-authored-by: anovazzi1 <otavio2204@gmail.com>
* categoring tests
* ✨ (actionsMainPage-shard-1.spec.ts): Add end-to-end tests for selecting and deleting items, searching flows, and searching components on the main page to ensure proper functionality and user experience.
* 📝 (frontend/tsconfig.json): update file paths in include section to match the correct directory structure for scheduled-end-to-end tests.
* 🔧 (typescript_test.yml): update path in the command to change directory to run end-to-end tests in the frontend folder
📝 (typescript_test.yml): improve comments for better readability and understanding of the workflow logic
* add yml configuration to choose folder to run CI
* 🔧 (ci.yml): Fix formatting issues and add support for running tests in a specific folder
📝 (ci.yml): Update job dependencies to improve readability and maintainability of the workflow configuration
* ♻️ (typescript_test.yml): refactor matrix values for shardIndex and shardTotal to reduce redundancy and improve readability
* categoring tests
* ✨ (actionsMainPage-shard-1.spec.ts): Add end-to-end tests for selecting and deleting items, searching flows, and searching components on the main page to ensure proper functionality and user experience.
* 📝 (frontend/tsconfig.json): update file paths in include section to match the correct directory structure for scheduled-end-to-end tests.
* 🔧 (typescript_test.yml): update path in the command to change directory to run end-to-end tests in the frontend folder
📝 (typescript_test.yml): improve comments for better readability and understanding of the workflow logic
* add yml configuration to choose folder to run CI
* 🔧 (ci.yml): Fix formatting issues and add support for running tests in a specific folder
📝 (ci.yml): Update job dependencies to improve readability and maintainability of the workflow configuration
* ♻️ (typescript_test.yml): refactor matrix values for shardIndex and shardTotal to reduce redundancy and improve readability
* 🐛 (fileUploadComponent.spec.ts): fix file path for file upload to correctly locate the test file in the assets folder
* changing test_folder
* ✨ (fileUploadComponent.spec.ts): update file path for file upload test to match new file location in the project structure
* fix input on playwright command
* remove env definition from vite
* add get config query
* add save config hook to add info to autosaving and axios
* Use save config hook to get info
* Create autoSaving variable on flowsManagerStore
* Adds autoSaving from store into every place that used the env variables
* fix wrong url
---------
Co-authored-by: anovazzi1 <otavio2204@gmail.com>
* Added new confirmation modal for saving
* Fixed save button
* fixed header classes
* updated docs link
* Added different message to auto saving
* Changed tooltip to appear in saved text, not in button
* Changed tooltip back to previous when auto saving is enabled
* changed auto_save to auto_saving
* Fixed build not appearing and icons
* Changed modal when autosave is enabled
* 🐛 (menuBar/index.tsx): fix condition for disabling save button to include isBuilding flag to prevent saving during build process
* fix current flow not being updated on set nodes and edges and fix modal not letting user leave when flow is empty
* Removed console log
* Fix add flow not adding the flow that comes from the backend
---------
Co-authored-by: cristhianzl <cristhian.lousa@gmail.com>
Co-authored-by: Cristhian Zanforlin Lousa <72977554+Cristhianzl@users.noreply.github.com>
* feat: Add TableNodeComponent for rendering table data in ParameterRenderComponent
* refactor: Set default formatter type for columns in FormatColumns function
* [autofix.ci] apply automated fixes
* refactor: Improve object rendering in ObjectRender component
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
* Changed the data type of number field from string to number
* [autofix.ci] apply automated fixes
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
* refactor: add card store component
* refactor: use StoreCardComponent for displaying store cards
* refactor: Remove unused code
* refactor: Update Collection card to fit only to the my collection case
* [autofix.ci] apply automated fixes
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
* add separated component for prompt modal
* refactor: rename promptAreaModal to promptModal and update type import
* refactor: update promptComponent to use PromptModal instead of GenericModal
* refactor: update textarea-primary class in applies.css
* refactor: add ComponentTextModal for displaying and editing text areas
Add a new component, ComponentTextModal, for displaying and editing text areas. This component includes a textarea input, a title, and an icon. It also supports password visibility toggling. The ComponentTextModal is used within a BaseModal component and includes a save button for finishing the editing process. This commit refactors the code to add the ComponentTextModal and its related functionality.
* refactor: Add ComponentTextModal for displaying and editing text areas
* delete genericModal component and their references
* [autofix.ci] apply automated fixes
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
* Removed unused code
* Separated folder sidebar from common sidebar
* Removed useOnFileDrop from common sidebar
* Added folderSidebarComponent that fetches the folders
* Added useOnFileDrop and SIdebarFoldersButton
* Make auth context not get folders
* Make delete folder refetch get folders
* Make folder mutations refetch the getFolder
* Create getFolder query
* Removed unused functions from useFolderStore
* Make isLoading from application depend only on flows
* Make main page not refetch folders
* Change types of folders store
* removed getFolders refetch on duplicateFolders
* Added loading from query into ComponentsComponent
* Made the flow page get the flows and types if they're not available
* Made the loading be the isLoading only
* Removed unused function
* Make cards appear even if it didnt load
* Removed setLoading of various pages
* Fixed loading happening every time the flow changes
* Added skeleton instead of loading on folders
* Added routing to contain folderId on both flows and initial page
* remove redirect of useFileDrop
* remove folderid getting from state
* removed setAllFlows
* chore: Remove unused variables and functions in useDuplicateFlows hook
* Added refetch of folders when the flow is deleted or added
* Changed redirectToLastLocation to redirect to last folder also
* Added upload flow to folder tanstack and refetched folders on upload
* Added loading of current folder on display of empty component
* Removed refetching folder on file drop
* Removed unused code
* Fixed add new flow from header not redirecting correctly
* Fixed unused code
* Added undefined on setting current flow as empty
* Added disable top bar and make it be displayed on the top of an empty folder
* Fixed select all checked when deleting all flows
* add onEscapeKeyDown
* refactor: Add ConfirmationModal to CodeAreaModal for better user experience
* refactor: Update CodeAreaModal to use ReactAce for code editing
* fix closing o x modal
* refactor: Update CodeAreaModal to use ReactAce for code editing
* [autofix.ci] apply automated fixes
* decompose object
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
* fixed patch update flow
* fixed update flow patch to receive id by payload
* created save flow hook with auto save and manual save functions
* fix poetry lock
* added auto save check with environment variable
* removed unused user
* separated autosave and put the flow as a creation with nodes and edges
* removed set nodes that skipped saving
* implemented auto save hook
* removed autosave from setNodes and setEdges
* added auto save hook and saved on viewport move and added useEffect to save on nodes and edges changed
* changed type of setNodes
* removed unused var
* removed deletion of empty flow
* Added saving of flow on button when autoSave is disabled
* disable saving when the nodes are empty
* removed save loading as false when the access token is renewed
* implemented useDebounce
* added save loading to save flow hook
* removed setting nodes and edges on fetching, since they are set when the current flow is updated
* removed unused var
* use debounce hook to save flow
* set nodes and edges on current flow id change
* removed useplaygroundeffect
* removed unused import
* put set save loading before the If
* removed flow cleaning and inputs setting, since the inputs and outputs are set on the ResetFlow function
* updated to use ResetFlow function to update everything regarding flow
* removed flow pool get on resetFlow, for it to be fetched only if the user is inside the flow
* updated packagelock
* Changed router to outlet on app.tsx to use createRouter
* Created authSettingsGuard to guard the general settings
* Fixed routes to use createBrowserRouter to allow the use of useBlocker
* Changed index.tsx to use RouterProvider and the router just created
* Changed flowStore to have a local flow state
* Implemented setting the current flow state when saving the flow
* Added the update of current flow when auto saving
* changed current flow to use the current flow from Flow Store instead of Flows Manager Store
* Changed codeTabsComponent Tweaks check to show if its checked
* Removed unused variables
* Removed browser router from context wrapper
* Removed unused console.log
* Changed initialSetup to just run when opening the modal
* changed confirmationModal to have destructiveCancel and to only call onCancel if the other buttons were not pressed
* Created a SaveChangesModal that confirms if the user wants to save their changes
* Get folder by id when folder id changes too
* Changed reset flow calls to store whole flow
* Added check if user is exiting page to prevent him when there are unsaved changes
* Added new types on ConfirmationModalType
* Implement save on clicking the save button on the header
* added save component shortcut to use save shortcut as save flow
* added save component shortcut on shortcutsStore type
* changed save shortcut to save component on node toolbar
* added save shortcut to header menubar
* changed shortcuts name to be compatible with existing ones
* changed shortcuts to be backwards compatible
* changed save to changes to maintain retrocompatibility
* changed save_component to save to maintain retrocompatibility
* Changed time difference to unsaved changes
* changed the toolbar select item to get the right save shortcut
* Changed save flow to use current flow from useFlowStore instead of the previous saved flow
* changed changesNotSaved to include flow name and metadata
* Added way of saving the flow settings just locally instead of directly to database
* Changed shareModal to save flow with hook
* removed old auto saving on connect
* Removed save functions from flowsManagerStore
* refactor: Remove unused imports and state variables in EditFlowSettings component
* use current flow not saved one and refactored page to not receive flow
* added check of isFlowPage to display the menubar
* Added checks to render playground if API key is valid and if Flows exists
* Added check to not display X on chat on playground page
* Updated flows variable to be undefined by start to prevent things from loading before flows initialize
* Implemented log builds parameter to not allow the builds to be logged if user not on flowPage
* feat: add error handling for Flow build
The code changes in `buildUtils.ts` add error handling for the Flow build process. It includes a new case for handling errors in the switch statement, which displays the error message and triggers the `onBuildError` function. This change ensures that errors during the Flow build are properly handled and the build process is stopped.
* feat: enhance error handling in build_flow to capture and report HTTP exceptions in the flow building process
* feat: Export needsLayout function for layout handling in reactflowUtils, enhancing node position verification
* feat(layoutUtils): Enhance ELK layout options for improved graph rendering and add debug logs for layout verification
* feat: Update PageComponent to fit view when viewport is at (0,0)
The PageComponent in the FlowPage now fits the view when the viewport is at (0,0). This improves the initial display of the page and enhances the user experience.
* feat(uploadFlow): Integrate processDataFromFlow to handle flows during upload, improving data processing efficiency
* feat(constants): Update NODE_WIDTH from 384 to 400 for improved component layout and consistency in the user interface
* refactor(layoutUtils): Remove debug console logs from getLayoutedNodes
* fix: add 'nowheel' class to Textarea component for enhanced user experience in textarea interactions
* refactor: replace Input with Textarea in TextAreaComponent for improved user experience and aesthetics
* refactor: Update TextAreaComponent to dynamically adjust the number of rows based on the content length for improved user experience
* [autofix.ci] apply automated fixes
---------
Co-authored-by: anovazzi1 <otavio2204@gmail.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>