Commit graph

130 commits

Author SHA1 Message Date
Cristhian Zanforlin Lousa
28c4e7365c
test: add database-loaded API keys and outdated component detection for starter templates (#6615)
* add outdated starter projects tests

* add api keys loaded from db values

*  (Custom Component Generator.spec.ts): add initialGPTsetup function to setup GPT integration
📝 (Custom Component Generator.spec.ts): update test to handle existing API key and log a message if API key is already added
2025-02-17 14:26:11 +00:00
Cristhian Zanforlin Lousa
0a631a68c2
fix: Update path filters, test tags and backend processing (#6613)
*  (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>
2025-02-14 11:20:08 -03:00
Mendon Kissling
9ba0c9ce13
fix: update documentation links for Custom Component to use the correct URL (#6145)
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
2025-02-06 22:39:05 +00:00
Cristhian Zanforlin Lousa
8531e1b58d
feat: Update node name and description UX editing (#5920)
*  (NodeName/index.tsx): add cursor-grab class to improve user experience when dragging the node
 (NodeName/index.tsx): add nodrag class to prevent text selection when dragging the node
 (NodeStatus/index.tsx): add nodrag class to prevent text selection when dragging the node
 (GenericNode/index.tsx): add nopan, nodelete, nodrag, noflow classes to improve node dragging behavior

* 📝 (NodeDescription/index.tsx): Update cursor style to 'auto' for better user experience
📝 (NodeName/index.tsx): Update cursor style to 'auto' for better user experience
📝 (NodeOutputfield/index.tsx): Add cursor style 'pointer' to improve interactivity

*  (NodeDescription/index.tsx): Add support for editing node description when selected and editNameDescription is true
 (NodeName/index.tsx): Add support for editing node name when selected and editNameDescription is true
🔧 (GenericNode/index.tsx): Introduce useAlternate hook to handle toggling editNameDescription state
📝 (use-alternate.tsx): Add custom hook useAlternate to handle toggling boolean state
🔧 (style/index.css): Add new CSS variable --zinc-foreground for styling purposes
🔧 (tailwind.config.mjs): Add new tailwind color variable "zinc-foreground" for styling purposes

* 📝 (NodeDescription/index.tsx): Remove unnecessary setInputDescription call and update useEffect dependencies for better performance
📝 (NodeDescription/index.tsx): Update className for Textarea component to improve styling and readability
📝 (NodeDescription/index.tsx): Update className for generic-node-desc-text to improve styling and cursor behavior
📝 (NodeName/index.tsx): Remove unnecessary setInputName call and update useEffect dependencies for better performance
📝 (NodeName/index.tsx): Update className for span element to improve cursor behavior and styling
📝 (GenericNode/index.tsx): Add useRef for node element and implement useChangeOnUnfocus hook for better handling of focus events
📝 (GenericNode/index.tsx): Update className for pencil icon based on editNameDescription state for better visual feedback
📝 (GenericNode/index.tsx): Add editNameDescription to dependencies of useCallback to prevent unnecessary re-renders
📝 (GenericNode/index.tsx): Add editNameDescription to dependencies of useEffect to handle changes in editNameDescription state
📝 (use-change-on-unfocus.tsx): Implement custom hook useChangeOnUnfocus for handling focus events and state changes

* Refactor NodeDescription to remove old logic and variables

* Refactor NodeName component to remove unnecessary logic and variables

* [autofix.ci] apply automated fixes

*  (NodeDescription/index.tsx): Add functionality to edit node description and handle events like blur, key down, and double click for sticky notes
📝 (NoteNode/index.tsx): Introduce useAlternate hook to toggle edit mode for node description in NoteNode component

* ♻️ (NoteNode/index.tsx): refactor useAlternate hook usage to simplify code and improve readability

* 🔧 (GenericNode/index.tsx): refactor className to conditionally apply translate-x styles based on showNode state for improved UI responsiveness

* 📝 (NodeDescription/index.tsx): Refactor handleBlurFn and handleKeyDownFn to improve code readability and maintainability
📝 (NodeName/index.tsx): Refactor handleBlur and handleKeyDown functions for better code organization and readability
📝 (GenericNode/index.tsx): Update toggleEditNameDescription prop to setEditNameDescription for consistency and clarity
📝 (use-change-on-unfocus.tsx): Remove unnecessary handleEscape function and handleBlur event listener for better code simplicity and performance

* 📝 (NodeDescription/index.tsx): Update CSS class name to use 'focus-border-primary' instead of 'focus-border-black' for consistency and clarity
📝 (GenericNode/index.tsx): Add data-testid attribute to save and edit name description buttons for testing purposes
📝 (edit-name-description-node.spec.ts): Add test to verify user can edit name and description of a node in the UI

*  (GenericNode/index.tsx): Add functionality to show and hide toolbar with animation based on node selection status
📝 (get-class-toolbar-transform.ts): Create helper function to determine transform classes for toolbar animation based on showToolbar and showNode status

*  (NodeDescription/index.tsx): add setHasChangedNodeDescription prop to update parent component when node description changes
 (NodeName/index.tsx): add setHasChangedNodeDescription prop to update parent component when node name changes
 (GenericNode/index.tsx): add hasChangedNodeDescription state and setHasChangedNodeDescription function to track changes in node description and update parent component
📝 (edit-name-description-node.spec.ts): add wait for sidebar custom component button and timeout to improve test reliability

*  (group.spec.ts): Update click event on "title-Group" element to improve user interaction
🐛 (group.spec.ts): Fix click event on "save-name-description-button" element to properly save changes
🐛 (general-bugs-save-changes-on-node.spec.ts): Increase timeout for selectors to prevent test failures due to slow loading
🐛 (general-bugs-save-changes-on-node.spec.ts): Fix random value generation to ensure consistent length
🐛 (general-bugs-save-changes-on-node.spec.ts): Fix click event on "add-component-button-text-output" element to add component correctly
🐛 (general-bugs-save-changes-on-node.spec.ts): Fix timeout for selector to prevent test failures due to slow loading
🐛 (general-bugs-save-changes-on-node.spec.ts): Fix verifyTextareaValue function to properly verify textarea values

---------

Co-authored-by: anovazzi1 <otavio2204@gmail.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-02-05 14:02:57 +00:00
Raphael Valdetaro
a3fe2fec90
refactor(components): Rename Parse Data component to Data to Message (#5547)
* refactor(components): Rename Parse Data component to Data to Message

* Refactor: enhance Data to Message description

* Refactor: enhance Data to Message description

* feat: add required to template and data inputs

* [autofix.ci] apply automated fixes

* fix: Update element selectors in freeze.spec.ts

* [autofix.ci] apply automated fixes

* refactor: rename test IDs for processing data in frontend tests

Updated test IDs from "processingParse Data" to "processingData to Message" across multiple test files to improve clarity and consistency in the test suite. This change enhances the readability of the tests related to data processing components.

* refactor: update ParseDataComponent to improve clarity and consistency

- Renamed the display name and description of the ParseDataComponent from "Data to Message" to "Parse Data" to better reflect its functionality.
- Changed the icon from "message-square" to "braces" for a more appropriate visual representation.
- Updated input fields to make 'required' status consistent across multiple starter projects, changing 'required' from true to false for 'data' and 'template' inputs.
- Enhanced code readability by modifying the structure and comments within the component's implementation across various JSON files.

* refactor: update ParseDataComponent across multiple starter projects

- Changed the display name and description of the ParseDataComponent from "Parse Data" to "Data to Message" for better clarity.
- Updated the icon from "braces" to "message-square" to better represent the component's functionality.
- Made input fields 'data' and 'template' required across all affected JSON files to ensure proper data handling.
- Enhanced code readability and consistency in the implementation of the ParseDataComponent across various starter projects.

*  (freeze.spec.ts): Update test descriptions and selectors to match changes in the application functionality related to data processing and messaging
 (stop-building.spec.ts): Update test description and selector to match changes in the application functionality related to data processing and messaging
 (fileUploadComponent.spec.ts): Update test description and selector to match changes in the application functionality related to data processing and messaging
 (loop-component.spec.ts): Update test description and selector to match changes in the application functionality related to data processing and messaging

* fix broken tests

---------

Co-authored-by: Eric Hare <ericrhare@gmail.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Edwin Jose <edwin.jose@datastax.com>
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
Co-authored-by: anovazzi1 <otavio2204@gmail.com>
Co-authored-by: cristhianzl <cristhian.lousa@gmail.com>
2025-01-22 12:22:53 +00:00
Cristhian Zanforlin Lousa
e34f39ac75
test: update data-testid attributes for chat memory and OpenAI model elements (#5823)
* 🐛 (generalBugs-shard-9.spec.ts): fix incorrect test selector for elementChatMemoryOutput to match updated element ID
🐛 (generalBugs-shard-3.spec.ts): fix incorrect test selector for elementsOpenAiOutput to match updated element ID

* 📝 (refreshButton.tsx): add data-testid attribute to RefreshButton component for testing purposes
🐛 (Vector Store.spec.ts): fix import statement to include 'expect' in Playwright test file
🐛 (Vector Store.spec.ts): remove unnecessary test.skip block for ASTRA_DB_API_ENDPOINT
🐛 (Vector Store.spec.ts): fix selectors and interactions for refresh buttons and dropdown options in Playwright test file

*  (freeze-path.spec.ts): refactor test cases to use a new helper function moveSlider for interacting with slider elements in a more efficient and readable way
2025-01-21 20:45:10 +00:00
Cristhian Zanforlin Lousa
64d82d407a
test: Update test selectors in frontend regression tests (#5835) 2025-01-21 07:24:57 -08:00
Cristhian Zanforlin Lousa
9dc6c24180
feat: change Text to Message type with backend and frontend support (#5652)
*  (inputs.py): Update default prompt input types to include "MessageTextInput" for improved user experience
📝 (styleUtils.ts): Add color definition for "MessageTextInput" node to enhance visual representation in the frontend

* 📝 (text.py): Update input_types for "Value" to include "Message" for better clarity
📝 (memory.py): Update input_types for "Session ID" to include "Message" for consistency
📝 (message.py): Update input_types for "Session ID" to include "Message" for uniformity
📝 (self_query.py): Update input_types for "Query" to only include "Message" for consistency
📝 (create_data.py): Update input_types for fields to only include "Message" for consistency
📝 (update_data.py): Update input_types for fields to only include "Message" for consistency
📝 (inputs.py): Update DEFAULT_PROMPT_INTUT_TYPES to only include "Message" for consistency
📝 (styleUtils.ts): Remove "MessageTextInput" from nodeColors and nodeColorsName for consistency

* 📝 (model.py): update display name from "Text" to "Message" for better clarity
📝 (url.py): update display name from "Text" to "Message" for better consistency
📝 (memory.py): update display name from "Text" to "Message" for better understanding
📝 (text.py): update display name from "Text" to "Message" for better semantics
📝 (llm_math.py): update display name from "Text" to "Message" for improved readability
📝 (runnable_executor.py): update display name from "Text" to "Message" for better context
📝 (sql_generator.py): update display name from "Text" to "Message" for clearer communication
📝 (text.py): update display name from "Text" to "Message" for better consistency
📝 (parse_data.py): update display name from "Text" to "Message" for enhanced understanding
📝 (wikidata_api.py): update display name from "Text" to "Message" for improved semantics
📝 (test_cycles.py): update display name from "Text" to "Message" for better clarity

* [autofix.ci] apply automated fixes

* 🔧 (App.css): change width property value to fit-content to improve layout responsiveness

* fix: resolve merge conflicts and clean up URLComponent implementation in starter projects

- Removed conflicting sections in the JSON files for 'Custom Component Maker' and 'Graph Vector Store RAG'.
- Ensured the URLComponent class is correctly defined with methods for URL validation and content fetching.
- Updated input and output definitions for better clarity and functionality.

* 🐛 (freeze.spec.ts): fix incorrect test selectors for handle-textinput-shownode and handle-parsedata-shownode elements to match updated element IDs

* 📝 (NodeOutputfield/index.tsx): Add id prop to InspectButton component for better identification
🔧 (freeze-path.spec.ts, freeze.spec.ts, stop-building.spec.ts, decisionFlow.spec.ts, similarity.spec.ts, textInputOutput.spec.ts, generalBugs-shard-5.spec.ts, fileUploadComponent.spec.ts): Update test selectors to match changes in UI components for better test accuracy

*  (duckduckgo.spec.ts): update the test to click on a specific element with the test ID "output-inspection-data-duckduckgosearch" instead of "output-inspection-data" to match the updated frontend implementation.

*  (youtube-transcripts.spec.ts): update selector for clicking on transcript element to match changes in the frontend code, ensuring the test remains accurate

---------

Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-01-20 20:36:46 +00:00
Cristhian Zanforlin Lousa
d9a52d5cb8
feat: Enhance FlowMenu name editing experience (#5729)
*  (FlowMenu/index.tsx): improve user experience by enhancing the flow name editing functionality in the appHeaderComponent's FlowMenu component

*  (FlowMenu/index.tsx): add data-testid attribute to span element for flow name in MenuBar component
🐛 (edit-flow-name.spec.ts): fix test cases to use correct data-testid value for input element in edit-flow-name feature

*  (store-shard-2.spec.ts): update selectors to match changes in the frontend code for better test accuracy and reliability
 (edit-flow-name.spec.ts): update selectors to match changes in the frontend code for better test accuracy and reliability
 (flowSettings.spec.ts): update selectors to match changes in the frontend code for better test accuracy and reliability
 (general-bugs-move-flow-from-folder.spec.ts): update selectors to match changes in the frontend code for better test accuracy and reliability

*  (FlowMenu/index.tsx): add useEffect hook to set flow name when currentFlow is present and not editing name

* fix errors

*  (youtube-transcripts.spec.ts): update timeout values for page.waitForSelector to improve test performance and reliability

*  (sliderComponent): Add cn utility function to improve classnames handling in SliderComponent
📝 (floatComponent.spec.ts): Update test descriptions and values for NVIDIA related components
♻️ (sliderComponent.spec.ts): Refactor code to replace FloatInput with SliderInput and update import statements and values for temperature slider

*  (youtube-transcripts.spec.ts): skip the test for youtube transcripts component to prevent it from running during test suite execution
2025-01-20 19:41:49 +00:00
VICTOR CORREA GOMES
420cd92faa
feat(component): API Request Component Overhaul (#5007)
* style: Add icon property to WebhookComponent class

* style: Update input components in APIRequest class

* fix pr

* [autofix.ci] apply automated fixes

* remove debug print statement from api_request component

* remove debug print statement from api_request component

* feat: add dynamic cURL mode to APIRequestComponent

- Add cURL command parsing and field population
- Implement dynamic UI updates based on cURL input
- Support JSON body and headers extraction from cURL
- Add real-time refresh for cURL mode toggle

* refactor(APIRequestComponent): improve HTTP methods and cURL handling

- Add DELETE method support
- Enhance cURL parameter handling and UI visibility
- Fix JSON decode error handling with specific exception
- Update method visibility for DELETE requests

* style: Update input components in APIRequest class

* [autofix.ci] apply automated fixes

* remove debug print statement from api_request component

* remove debug print statement from api_request component

* feat: add dynamic cURL mode to APIRequestComponent

- Add cURL command parsing and field population
- Implement dynamic UI updates based on cURL input
- Support JSON body and headers extraction from cURL
- Add real-time refresh for cURL mode toggle

* refactor(APIRequestComponent): improve HTTP methods and cURL handling

- Add DELETE method support
- Enhance cURL parameter handling and UI visibility
- Fix JSON decode error handling with specific exception
- Update method visibility for DELETE requests

* [autofix.ci] apply automated fixes

* git commit -m "ui(api-request): adjust field visibility and requirements

- Move query_params to advanced section
- Make URL field required"

* feat(api): enhance curl parsing and update unit tests

- Improve MultilineInput handling in APIRequestComponent for curl commands
- Update parse_curl unit test to match expected data structure
- Ensure consistent format for headers and body in test assertions

* [autofix.ci] apply automated fixes

* fix(api-request): improve UI/UX and fix initial field visibility

- Fix body field flickering on component load
- Enhance URL/cURL field toggle behavior

*  (filterSidebar.spec.ts): add tests for clicking on edit button modal, show headers button, and closing the modal to ensure correct behavior and visibility of elements

* 📝 (dictComponent/index.tsx): update data-testid attribute to dynamically set based on editNode value for better testability
📝 (nestedComponent.spec.ts): update test data and selectors to match changes in dictComponent/index.tsx for accurate testing

* refactor(api_request): improve component UX and field handling

- Update tool_mode placement to align with main branch changes
- Remove temporary required field validation to prevent UI conflicts
- Add field clearing logic when switching between cURL and URL modes
- Update component description to be more concise

* git commit -m "fix: resolve merge conflicts with upstream in api request component

* fix: resolve merge conflicts with upstream in api request component

* Delete src/backend/tests/unit/test_data_components.py

BREAKING CHANGE: Removed test_data_components.py as it has been replaced by test_api_request_component.py

* git commit -m "test(api-request): update test_parse_curl to match TableInput format

* style(test_api-request): apply ruff formatting rules

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Cristhian Zanforlin Lousa <cristhian.lousa@gmail.com>
Co-authored-by: Edwin Jose <edwin.jose@datastax.com>
2025-01-20 16:23:59 +00:00
Cristhian Zanforlin Lousa
5c3c680c41
refactor: Enhance InputList Component UI/UX (#5726)
* [LFOSS-74]: input list UI improvements

*  (frontend): Add new component 'DeleteButtonInputList' to improve user experience by providing a button to delete items in a list
📝 (frontend): Comment out unused code related to duplicating input items for now, to be revisited in a future release
📝 (frontend): Add a comment to indicate that the 'DropdownMenuInputList' feature will be added back in a future release
📝 (frontend): Update CSS styling for 'hit-area-icon' class to adjust size to h-7 and w-7 for consistency
📝 (frontend): Adjust color values in CSS to improve visual appearance, changing smooth-red to a new shade

*  (keypairListComponent/index.tsx): simplify conditional styling logic for list items to improve readability and maintainability

* 📝 (delete-button-input-list.tsx): Remove unused imports and update function parameter type for removeInput to specify React.MouseEvent
📝 (delete-button-input-list.tsx): Update button className and IconComponent className for better styling and readability
📝 (delete-button-input-list.tsx): Update ICON_STROKE_WIDTH constant value from 1.25 to 1.5 for better icon appearance
📝 (index.tsx): Update InputListComponent to render DeleteButtonInputList component conditionally based on value length
📝 (constants.ts): Update ICON_STROKE_WIDTH constant value from 1.25 to 1.5 for better icon appearance
📝 (inputListComponent.spec.ts): Update test cases to use updated test IDs for delete buttons and adjust expected input values to match changes in component behavior

* [autofix.ci] apply automated fixes

* 🔧 (applies.css): adjust positioning of input-slider-text to fix alignment issue and improve user experience

* 🐛 (button-input-list.tsx): fix button position by adjusting translate-x value to align properly on the page

*  (index.tsx): add visual indicator for focused input element in the list to improve user experience

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
2025-01-20 13:25:55 +00:00
Gabriel Luiz Freitas Almeida
f5d9d53264
fix: update Tavily component in Instagram Copywriter and Market Research projects and tests (#5789) 2025-01-18 17:07:23 -08:00
Edwin Jose
aa5a4a505c
refactor: Deprecate Subflow and Flow as Tool component in favor of RunFlow (#5678)
* depreciated subflow and flow as tool

* 🐛 (filterSidebar.spec.ts): update test cases to reflect changes in sidebar item names by adding [Deprecated] suffix

---------

Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
Co-authored-by: cristhianzl <cristhian.lousa@gmail.com>
2025-01-17 23:36:41 +00:00
Cristhian Zanforlin Lousa
36b3289da2
test: Update API key requirements and test configurations for frontend tests (#5752) 2025-01-17 06:17:26 -08:00
Cristhian Zanforlin Lousa
40925e89a5
feat: add UI/UX improvements on InputListComponent (#5644)
* [LFOSS-74]: input list UI improvements

* [autofix.ci] apply automated fixes

* Refactor dropdown menu icon size class

* Refactor button input list component to improve code structure and remove unnecessary div element ensuring the plus icon has the same size as ... icon

* [autofix.ci] apply automated fixes

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

* revert changes to keep the plus icon bigger than ... but with right positioning

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: anovazzi1 <otavio2204@gmail.com>
2025-01-13 16:11:59 +00:00
Cristhian Zanforlin Lousa
e2ff7b314b
feat: enhance URL component with improved description and render parameters (#5623)
* [LFOSS-74]: new input list UI

* [LFOSS-93]: node colors

* 📝 (Graph Vector Store RAG.json): Update description of ChatInput class to improve clarity and consistency
📝 (Graph Vector Store RAG.json): Update description of URLComponent class to improve clarity and consistency
📝 (select-items.tsx): Change noteDataType import to NoteDataType for consistency and clarity
📝 (dropdown-menu.tsx): Add RenderIcons component to display keyboard shortcuts for actions
📝 (index.tsx): Change parameter type from React.MouseEvent to KeyboardEvent for removeInput and handleDuplicateInput functions
📝 (use-overlap-shortcuts.tsx): Create custom hook to handle keyboard shortcuts with support for multiple key variations and modifiers

* 📝 (backend): Remove unnecessary metadata for URLComponent in multiple files
📝 (frontend): Refactor input components to use listAddLabel instead of metadata in multiple files

* ♻️ (NodeInputField/index.tsx): Remove unused 'metadata' variable to clean up the code and improve readability

* [autofix.ci] apply automated fixes

* merge fix

* [autofix.ci] apply automated fixes

* fix tests

* 🐛 (generalBugs-shard-5.spec.ts): fix incorrect comments numbering connections
💡 (generalBugs-shard-5.spec.ts): add clarifying comments for connection steps in the test case

* 🐛 (generalBugs-shard-5.spec.ts): fix filling delimiter in popover-anchor-input to resolve UI bug
📝 (generalBugs-shard-5.spec.ts): update test cases to improve test coverage and accuracy

*  (NodeOutputfield/index.tsx): Add top margin to improve spacing of NodeOutputField component
🔧 (generalBugs-shard-5.spec.ts): Remove commented out code related to input filling and waiting for visibility to clean up the test file and improve readability

* 🔧 (index.tsx): increase padding-right from 6 to 10 in input-edit-node class to improve spacing for better user experience

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-01-10 20:35:13 +00:00
Cristhian Zanforlin Lousa
febae4b589
feat: standardize node output icons with TextSearch and Chevrons (#5600)
*  (NodeInputField): Update styling to include padding-bottom when lastInput is true for better UI appearance
📝 (NodeOutputfield): Import TextSearch component from lucide-react library for future use
🔧 (RenderInputParameters): Simplify logic for determining lastInput in NodeInputField component
🔧 (GenericNode): Change icon displayed on HiddenOutputsButton based on showHiddenOutputs state
🔧 (GenericNode): Update tooltip content to include the number of hiddenOutputs when toggling visibility
🔧 (sliderComponent): Remove unnecessary padding-bottom from SliderComponent for better layout
📝 (constants.ts): Update tooltip text for better clarity and consistency with action names

*  (NodeOutputfield/index.tsx): Update import statement for IconComponent to include ForwardedIconComponent for better organization and clarity
🐛 (chatInputOutputUser-shard-0.spec.ts, chatInputOutputUser-shard-1.spec.ts): Fix references to 'ScanEye' icon to 'TextSearchIcon' for consistency and accuracy in tests
2025-01-10 18:29:00 +00:00
Lucas Oliveira
3e482dbc29
feat: allow flow name to be edited from the main page or by clicking header (#5525)
* Added flowData to allow changing flow name without being on the flow

* Added being able to edit the flow name just by clicking the name

* Added handleEdit and edit details option on flow dropdown

* Added flow settings modal to grid and list

* Added flowData type and select option

* Update src/frontend/src/components/core/appHeaderComponent/components/FlowMenu/index.tsx

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

* Update src/frontend/src/components/core/appHeaderComponent/components/FlowMenu/index.tsx

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

* Update src/frontend/src/components/core/appHeaderComponent/components/FlowMenu/index.tsx

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

* Fixed useCallback import

* Implemented details boolean to not show endpoint, changed title of flow settings modal

* Changed Flow Settings to Edit Details

* Changed Flow Settings modal description

* Fixed empty name not appearing, fixed naming conditions not considered

* 📝 (editFlowSettingsComponent/index.tsx): add data-testid attribute to input element for flow name for testing purposes
 (edit-flow-name.spec.ts): create test to ensure user can edit flow name by clicking on the header or main page, with various random names generated for testing purposes

* Fixed tests that used Flow Settings

* Fixed tests that rely on flow name to open edit details

* Fixed tests

---------

Co-authored-by: Cristhian Zanforlin Lousa <cristhian.lousa@gmail.com>
Co-authored-by: anovazzi1 <otavio2204@gmail.com>
2025-01-10 18:14:00 +00:00
Cristhian Zanforlin Lousa
af4fb3774e
feat: Revamp GlobalVariableModal (#5512)
* 📝 (GlobalVariableModal.tsx): Refactor GlobalVariableModal component to use Tabs component instead of Select for type selection and improve layout and styling of input fields and labels
🔧 (index.tsx): Add popoverWidth prop to InputComponent to allow setting the width of the popover in CustomInputPopover component
🔧 (index.tsx): Add popoverWidth prop to InputComponent in InputGlobalComponent to set the width of the popover to 315px

 (tabs-button.tsx): introduce new TabsButton component to handle tab functionality in UI components
📝 (tabs-button.tsx): add documentation for Tabs, TabsContent, TabsList, TabsTrigger components
📝 (components/index.ts): add popoverWidth property to InputComponentType to control the width of the popover in UI components

*  (GlobalVariableModal.tsx): Add ForwardedIconComponent to display an icon next to the modal header text for better visual representation
📝 (GlobalVariableModal.tsx): Update TabsTrigger components to include data-testid attribute for testing purposes

 (index.tsx): Introduce new components OptionBadge, CommandItemContent, and SelectionIndicator to improve code organization and reusability
♻️ (index.tsx): Refactor handleRemoveOption function to have a more descriptive parameter signature and improve readability
📝 (index.tsx): Add comments to clarify the purpose of handleOptionSelect function and improve code documentation
📝 (index.tsx): Add comments to describe the purpose of getInputClassName and getAnchorClassName functions for better code understanding

 (globalVariables.spec.ts): improve placeholder text for variable name and value fields for better user understanding and experience

* 🐛 (GlobalVariableModal.tsx): Fix disabled state logic for TabsTrigger components to correctly reflect initialData type
📝 (GlobalVariableModal.tsx): Update label for submit button to dynamically change based on the presence of initialData

* 🐛 (index.tsx): Fix issue where options were not being correctly memoized as a Set to prevent unnecessary re-renders. Update memoizedOptions to correctly memoize options as a Set.

* 📝 (userSettings.spec.ts): Update placeholder text for variable name and value fields to improve clarity and user experience.
2025-01-07 12:07:08 +00:00
anovazzi1
a57a49d48d
refactor: prevent tool mode on group component (#5522)
* Refactor nodeToolbarComponent to conditionally show tool mode button based on isGroup variable

* add toolModeGroup.spec.ts test

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-01-06 20:20:37 +00:00
Cristhian Zanforlin Lousa
2ed0b10679
fix(nightly): refactor freeze-path feature test (#5557) 2025-01-06 10:59:29 -08:00
Lucas Oliveira
ca8f3cad62
feat: add generic handle that inherits colors for multiple types (#5414)
* Fixed HandleTooltipComponent to use the type instead of passed color

* Fixed handle colors to use the connected edge color

* Changed color of generic handle

* Fixed edge color when clicking for generic handles

* Updated sidebar filter to contain more than one type

* fixed gradient generalBugs
2024-12-23 22:18:11 +00:00
Lucas Oliveira
bd7f913d28
fix: add minimized attribute to components and make chatinput and chatoutput start minimized by default (#5374)
* Added Minimized field to backend to make component start as minimized

* Added minimized as true to chat components

* Added showNode default value as the opposite of minimized

* Changed starter projects to new components

* [autofix.ci] apply automated fixes

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

* Fixed Freeze and DecisionFlow tests

* Fixed other tests that involved chatoutput and chatinput

* Restored tests that didnt fail

* Fixed stop playground test

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-12-23 22:09:22 +00:00
Lucas Oliveira
7d6d41aa87
refactor: update ReactFlow to v12 (#5317)
* 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>
2024-12-18 19:40:13 +00:00
anovazzi1
02fbb450db
feature: Add message feedback and update frontend interface (#5022)
* add style for message feedback

* add backend suprot to new feature

* update frontend interface and add handle function

* [autofix.ci] apply automated fixes

* Update tooltip content for bot messages

* Update evaluation icons styling

* Add custom thumb icons for thumbs up and thumbs down

* Add custom thumb icons for thumbs up and thumbs down

* Update thumb icons based on evaluation value

* [autofix.ci] apply automated fixes

* Update property name for positive feedback

* Update property name for positive feedback

* feat: Add data-testid attributes to helpful and not helpful buttons and update test of playground to include new functionality

* update test to include new message features
2024-12-17 19:09:06 +00:00
Cristhian Zanforlin Lousa
2a95b52e06
perf: Optimize component with memoization and selective store subscriptions (#5296)
*  (NodeOutputfield/index.tsx): Introduce memoization for IconComponent, Button components, and OutputComponent for performance optimization
🔧 (NodeOutputfield/index.tsx): Change the import of 'useEffect' to 'useCallback' for better performance and to prevent unnecessary re-renders
🔧 (NodeOutputfield/index.tsx): Refactor the 'NodeOutputField' component to use useMemo for selective store subscriptions and computed values to improve performance and avoid unnecessary recalculations
🔧 (NodeOutputfield/index.tsx): Refactor the 'handleUpdateOutputHide' function to use useCallback for better performance and to prevent unnecessary re-renders
🔧 (NodeOutputfield/index.tsx): Refactor the 'useEffect' hook to include dependencies and prevent unnecessary re-renders
🔧 (NodeOutputfield/index.tsx): Refactor the 'Handle' component to use useMemo for memoization and performance optimization

 (NodeOutputfield/index.tsx): Refactor NodeOutputField component to improve readability and maintainability by extracting button and tooltip components into separate reusable components, and optimizing the structure of the output field rendering.

📝 (RenderInputParameters/index.tsx): Move sortToolModeFields import to the top of the file for better organization and readability.

 (GenericNode/index.tsx): Introduce memoization to optimize rendering performance by memoizing components and values
🔧 (GenericNode/index.tsx): Add useCallback to handleUpdateCode and handleUpdateCodeWShortcut functions for better performance and prevent unnecessary re-renders

📝 (GenericNode/index.tsx): Refactor code to use useEffect and useCallback hooks for better performance and readability
📝 (GenericNode/index.tsx): Refactor code to improve component structure and readability by extracting repeated logic into separate functions using useCallback
📝 (GenericNode/index.tsx): Refactor code to optimize rendering logic and improve maintainability by using memoization with React.memo

 (sort-tool-mode-field.ts): introduce a new helper function sortToolModeFields to sort fields based on tool mode status and field order array

* 📝 (NodeOutputfield/index.tsx): add missing newline before ShadTooltip component for better code readability

 (handleRenderComponent/index.tsx): Add memoization to HandleContent component for performance optimization
♻️ (handleRenderComponent/index.tsx): Refactor HandleContent component to use useCallback and useMemo hooks for better code readability and maintainability

🔧 (handleRenderComponent/index.tsx): Refactor code to improve readability and maintainability by updating function signatures, using hooks more efficiently, and organizing code structure.

 (file.ts): refactor handleMouseDown function to use useCallback hook for better performance and memoization
♻️ (file.ts): refactor handleClick function to use useCallback hook for better performance and memoization

♻️ (handleRenderComponent/index.tsx): Refactor handleRenderComponent to improve code readability and maintainability by extracting callback functions into separate useCallback hooks and using memoization for validation function.

* improve memo in several components

*  (handleRenderComponent/index.tsx): add data-testid attribute to handle element for improved testing and accessibility

*  (toolbar-button.tsx): add data-testid prop to ToolbarButton component for better testing capabilities
📝 (index.tsx): add data-testid attribute to various ToolbarButton components for better testability

*  (NodeOutputfield/index.tsx): Add onClick event handler to the InspectButton component to trigger a function when the button is clicked.

*  (freeze.spec.ts): add test case for clicking on "Close" button in the modal to ensure proper functionality

* 📝 (nodeToolbarComponent/index.tsx): remove unnecessary dataTestId attribute from freeze-path-button to clean up code and improve readability

* 🐛 (GenericNode/index.tsx): Fix potential error when outputs is null or undefined by adding optional chaining
🐛 (auto-save-off.spec.ts): Update selector for "Saved" text to target the last occurrence
🐛 (auto-save-off.spec.ts): Update selector for "Unsaved changes will be permanently lost." text to handle dynamic rendering
🐛 (auto-save-off.spec.ts): Update selector for "NVIDIA" text to ensure it is not visible
🐛 (auto-save-off.spec.ts): Update drag and drop logic for NVIDIA model to ensure correct behavior
🐛 (auto-save-off.spec.ts): Update hover logic and add component button handling for NVIDIA model to ensure correct behavior

*  (parameterRenderComponent/index.tsx): Refactor ParameterRenderComponent to improve performance by memoizing components and props, and using useCallback and useMemo for better optimization.

📝 (ui/disclosure.tsx): Update imports and add new React hooks for better code organization and performance
📝 (ui/disclosure.tsx): Refactor DisclosureProvider component to use useCallback and useMemo for better performance
📝 (ui/disclosure.tsx): Refactor DisclosureTrigger component to use useCallback and useMemo for better performance
📝 (ui/disclosure.tsx): Refactor DisclosureContent component to use useCallback and useMemo for better performance
📝 (ui/disclosure.tsx): Refactor Disclosure component to use memo for better performance
📝 (ui/disclosure.tsx): Refactor DisclosureTrigger component to use memo for better performance
📝 (ui/disclosure.tsx): Refactor DisclosureContent component to use memo for better performance
📝 (ui/disclosure.tsx): Refactor DisclosureProvider component to use memo for better performance
📝 (nodeToolbarComponent/index.tsx): Refactor NodeToolbarComponent to use useCallback and useMemo for better performance

*  (use-handle-new-value.tsx): Memoize postTemplateValue and updateNodeState functions to prevent unnecessary re-renders and improve performance
📝 (use-handle-new-value.tsx): Memoize handleOnNewValue function to optimize performance by preventing unnecessary re-renders and improve code readability

---------

Co-authored-by: Lucas Oliveira <62335616+lucaseduoli@users.noreply.github.com>
2024-12-17 14:05:13 +00:00
anovazzi1
dffc2d51cd
feature: Improve Table customization to enhance ux on tool mode (#5216)
* refactor: Add field validation options to TableOptions

* refactor: Add field validation options and trigger text/icon to TableMixin

* refactor: Add field validation options and trigger text/icon to TableMixin

* refactor: Add field validation options and trigger text/icon to TableMixin

* update table trigger for toolmode usage

* Refactor table trigger and field validation options

- Updated the table trigger for toolmode usage
- Added field validation options and trigger text/icon to TableMixin
- Modified TableOptions to block certain actions and hide options

* Refactor TableOptionsTypeAPI field names for blocking actions

* Refactor TableOptions default values for blocking actions

* Refactor TableOptions default values for blocking actions

* Refactor TableOptions component to include tableOptions prop

* Refactor table selection and pagination options

* Refactor TOOL_TABLE_SCHEMA to disable sorting and filtering for the "name" and "description" fields

* Refactor TableOptions to allow blocking hiding of fields

* Refactor TableModal and TableNodeComponent to include support for block hiding columns

* Refactor Column model to include support for different edit modes

* Refactor TableOptions to include support for field parsers

* Refactor TableOptions to include support for field parsers and blocking hiding of fields

* Refactor TableOptions to include support for inline editing of fields

* Refactor App.css to style large text inputs and text areas in AgGrid

* update types

* Update table modal to prevent closing the the modal while editing cell

* Refactor string manipulation utilities to support parsing and transforming strings based on specified field parsers

* add inline input support

* Refactor TextModal component to remove close button in the footer

* add field parser in context

* format code

* format code

* Add disable_edit field to Column class

* Refactor TableNodeComponent to exclude columns with disable_edit field from being editable

* [autofix.ci] apply automated fixes

* Fix casing in selector text for "Open table" in tableInputComponent tests

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
2024-12-16 17:50:00 +00:00
Cristhian Zanforlin Lousa
977ba926c6
perf: Optimize component rendering with memoization and useCallback hooks (#5253)
*  (NodeDescription/index.tsx): Memoize Markdown component and description rendering for performance optimization
♻️ (NodeOutputfield/index.tsx): Memoize HandleRenderComponent and Handle instance with useMemo and memo for performance optimization
 (RenderInputParameters/index.tsx): Add new component RenderInputParameters to render input parameters with memoization for improved performance

📝 (GenericNode/index.tsx): Remove unused imports and functions, refactor sortToolModeFields to be exported, and optimize key generation and memoization for NodeOutputField component
📝 (flowSidebarComponent/index.tsx): Refactor event handlers to use useCallback for better performance
📝 (nodeToolbarComponent/index.tsx): Refactor event handlers to use useCallback for better performance and readability

* ♻️ (NodeDescription/index.tsx): Remove unnecessary comments and improve code readability by removing redundant comments
♻️ (NodeOutputfield/index.tsx): Remove unnecessary comments and improve code readability by removing redundant comments
♻️ (RenderInputParameters/index.tsx): Remove unnecessary comments and improve code readability by removing redundant comments
♻️ (index.tsx): Remove unnecessary comments and improve code readability by removing redundant comments

*  (decisionFlow.spec.ts): add @workflow tag to the test case for better categorization and organization.

* 📝 (GenericNode/index.tsx): Organize imports and update component import for better code structure and readability
📝 (GenericNode/index.tsx): Refactor renderOutputs function to improve code readability and maintainability
📝 (GenericNode/index.tsx): Refactor renderOutputParameter function to use OutputParameter component for consistency
📝 (GenericNode/index.tsx): Refactor output rendering logic to use OutputParameter component for better code structure
📝 (sidebarDraggableComponent/index.tsx): Update logic to remove cursor element only if it exists to prevent errors

*  (NodeOutputParameter/index.tsx): Add a new component for rendering output parameters in the frontend to improve modularity and reusability.
2024-12-13 22:24:45 +00:00
Cristhian Zanforlin Lousa
5cc331c4bc
test: increase timeout in Market Research tests (#5208)
 (Market Research.spec.ts): Remove unused functions and imports to clean up the code and improve maintainability
🔧 (Market Research.spec.ts): Increase timeout for page.waitForSelector to prevent timeout issues during test execution
2024-12-11 18:01:57 +00:00
Cristhian Zanforlin Lousa
ab68e13493
test: Add utility functions to streamline test setup and improve maintainability (#5168)
* 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.
2024-12-09 20:30:56 +00:00
anovazzi1
979aaa7cae
refactor: Remove unnecessary wait for timeout in Travel Planning Agent test (#5143)
* refactor: Remove unnecessary wait for timeout in Travel Planning Agent test
2024-12-07 14:54:27 +00:00
anovazzi1
678834dae8
refactor Improve Vector Store test (#5144)
* fix: Improve Vector Store test and use AsyncSession in memory
2024-12-07 01:26:00 +00:00
Cristhian Zanforlin Lousa
6d83bc13b4
fix: improve vector store test (#5121)
* 📝 (.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.
2024-12-06 16:33:47 +00:00
Cristhian Zanforlin Lousa
e4cf3e2b9b
test: Enhance frontend testability with data attributes and integration tests (#4948)
*  (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>
2024-12-04 16:49:16 +00:00
Cristhian Zanforlin Lousa
5407cad728
feature: Update HandleTooltipComponent text from "Select" to "Click" for better clarity (#5004) 2024-12-04 09:46:58 +00:00
anovazzi1
a30298f0e3
Refactor: remove timeouts and update selectors in linkComponent.spec.ts (#4917)
* fix: update timeouts and selectors in linkComponent.spec.ts
2024-11-29 17:24:55 +00:00
anovazzi1
5e2becdf32
refactor: improve timeouts for textAreaModalComponent (#4926)
refactor: Improve reliability and performance of keyPairListComponent.spec.ts test
2024-11-29 17:15:38 +00:00
anovazzi1
da09c6a2a1
Refactor: inputComponent.spec.ts to improve performance (#4858)
Refactor inputComponent.spec.ts to improve performance
2024-11-29 17:06:53 +00:00
anovazzi1
fd399e9692
fix: Update promptModalComponent.spec.ts to use waitForSelector instead of waitForTimeout (#4920)
- Replaced the usage of waitForTimeout with waitForSelector in promptModalComponent.spec.ts to improve reliability and stability of the tests.
2024-11-29 16:58:26 +00:00
anovazzi1
0240315020
Refactor: improve dropdownComponent (#4855)
Refactor dropdownComponent.spec.ts to improve code readability and reliability
2024-11-29 15:57:21 +00:00
anovazzi1
438c3afdc9
Improve test reliability and performance in toggleComponent.spec.ts (#4927)
refactor: Improve test reliability and performance in toggleComponent.spec.ts
2024-11-28 20:01:58 +00:00
anovazzi1
877d4dc0ed
Refactor: Improve performance of sliderComponent tests (#4923) 2024-11-28 17:41:52 +00:00
anovazzi1
17560245e2
Refactor: codeAreaModalComponent.spec.ts for improved test readability and maintainability (#4928)
* refactor: Update codeAreaModalComponent.spec.ts to improve test readability and maintainability

* [autofix.ci] apply automated fixes
2024-11-28 17:33:05 +00:00
Lucas Oliveira
79e3d3f50d
fix: removed beta from current date (#4901)
* Removed beta from current date

* [autofix.ci] apply automated fixes

* refactor: improve error message handling in CloudflareWorkersAIEmbeddings

* Fix filter sidebar test

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
2024-11-28 09:02:15 -08:00
anovazzi1
8b04954a0e
Refactor: Update TableOptions component to add data-testid attributes for buttons (#4925)
* Refactor: Update TableOptions component to add data-testid attributes for buttons

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-11-28 09:00:52 -08:00
Cristhian Zanforlin Lousa
ac69be2e8a
Fix: Disable the ComponentAsTool shortcut when the component code does not have tool_mode=True + regression tests (#4918)
 (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
2024-11-28 16:14:54 +00:00
anovazzi1
89e2224158
Refactor: update keyPairListComponent.spec.ts to improve test reliability and performance (#4874)
Refactor keyPairListComponent.spec.ts to improve test reliability and performance
2024-11-28 16:03:13 +00:00
anovazzi1
e777e397b9
Refactor: update nestedComponent test to improve performance (#4919)
fix: update nestedComponent test to use explicit timeouts

The nestedComponent test was updated to use explicit timeouts when waiting for certain elements to appear. This ensures that the test waits for the elements to be present before proceeding, preventing any potential race conditions or flakiness in the test results.
2024-11-28 11:58:04 -03:00
Cristhian Zanforlin Lousa
8fba3e1e3d
Fix: Unable to Click on Prompt in UI when It is empty and add regression test (#4904)
📝 (sanitizedHTMLWrapper/index.tsx): Update className from "m-1" to "m-1 w-full" for better styling
 (generalBugs-prompt.spec.ts): Add test for user to edit an empty prompt in the application
2024-11-27 21:04:47 +00:00
anovazzi1
8f68222b15
Refactor: improve inputListComponent to enable deletion of the first item (#4890)
* Refactor inputListComponent to improve enable deletion of the first item

* [autofix.ci] apply automated fixes

* Refactor codeAreaModalComponent.spec.ts to improve test reliability and remove unnecessary code
2024-11-27 20:36:30 +00:00