Commit graph

5,756 commits

Author SHA1 Message Date
Cristhian Zanforlin Lousa
d147a73c43
style: convert SVG attributes to React camelCase format (#5284)
📝 (AgentQL.jsx): Update attribute names from camelCase to PascalCase for consistency and better readability.
2024-12-16 05:12:09 -08: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
32a0707f9f
fix: simplify input field handling in InputListComponent (#5255)
* 🔧 (index.tsx): Remove unnecessary conditional rendering for addNewInput button and simplify the logic for onClick event handler to improve code readability and maintainability.

*  (button-input-list.tsx): Add a new component ButtonInputList to handle button input list functionality in the frontend
📝 (get-class-name.ts): Create a helper function getButtonClassName to generate button class names based on disabled state
📝 (get-test-id.ts): Create a helper function getTestId to generate unique test ids for input list buttons
🔄 (index.tsx): Refactor InputListComponent to use the new ButtonInputList component for handling button input list functionality in the frontend
2024-12-13 22:06:47 +00:00
Sergey Ryabov
ee31f152ad
feat: Add AgentQL integration (#4998)
AgentQL is a query language and a set of supporting developer tools designed to identify web elements and their data using natural language and return them in the shape you define.
Added AgentQL data extraction component. See: https://docs.agentql.com/rest-api/api-reference

This pull request introduces a new component, AgentQL, to both the backend and frontend of the project. The changes include the implementation of the AgentQL component, its integration into the frontend, and the addition of a new icon for AgentQL.

* feat: Add AgentQL integration

* upd: Update the logo

* upd: Update field type

* upd: Address feedback + better error handling

* upd: Change DictInput type & mark 'advanced' fields

* upd: Update wording

* upd: Update wording

---------

Co-authored-by: Edwin Jose <edwin.jose@datastax.com>
2024-12-13 13:38:09 -05:00
Cristhian Zanforlin Lousa
94fa92f718
fix: validateDOMNesting error on nodeToolbarComponent (#5212)
🐛 (use-patch-update-flow.ts): change 'locked' property to optional by using '?' to match interface definition
📝 (index.tsx): add 'asChild' prop to Button component to pass it down as a prop to the child component
2024-12-12 19:54:07 +00:00
Cristhian Zanforlin Lousa
3e099ac72e
fix: remove unused import and simplify key generation in SideBarFoldersButtonsComponent (#5227)
* ♻️ (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.
2024-12-12 15:42:09 +00:00
Vinícios Batista da Silva
3f9dab912c
feat: Restructure Youtube Transcripts component (#5118)
* feat: Restructure Youtube Transcripts component

- Changed the return type of the `build_youtube_transcripts` method from `Data` to `Message`.
- Updated the output name from "Data" to "Transcription" to reflect the new return type.
- Modified the return statements in `build_youtube_transcripts` to return `Message` objects instead of `Data`.

Co-authored-by: Vinícios Batista da Silva <vinicios.batsi@gmail.com>

* test(youtube-transcripts): enhance test stability by updating component ID and improving interaction checks

- Modified the component id in the test script to match the changes in the Youtube Transcripts component

Co-authored-by: Vinícios Batista da Silva <vinicios.batsi@gmail.com>

* fix: Fixed lint on line 180-181
Co-authored-by: Vinícios Batista da Silva <vinicios.batsi@gmail.com>

---------

Co-authored-by: Eric Hare <ericrhare@gmail.com>
2024-12-11 20:27:19 +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
dfcb3a5b04
fix: Resolve DOM validation & React lifecycle warnings (#5205)
📝 (frontend): Update AlertDropdown component to use 'asChild' prop for PopoverTrigger
📝 (frontend): Refactor ShadTooltip component to use forwardRef and add displayName
📝 (frontend): Update AppHeaderComponent to remove unnecessary aria-hidden attribute
📝 (frontend): Refactor SelectOptions component to improve code structure and readability
📝 (frontend): Update SideBarFoldersButtonsComponent to add getRandomKeyByssmm function and improve code structure

📝 (AWS.jsx): Update fill color condition to use stringToBool function for props.isdark
📝 (index.tsx): Convert isdark value to string before passing it to SvgAWS component
📝 (AstraDB.jsx): Update fill color condition to use stringToBool function for props.isdark

 (icons): Convert 'isdark' variable to string to ensure consistent type
♻️ (icons): Refactor 'fill-rule' and 'clip-rule' attributes to 'fillRule' and 'clipRule' for consistency
♻️ (nvidia): Refactor 'enable-background' attribute to 'enableBackground' for consistency
♻️ (nvidia): Refactor 'fill' attribute to use 'stringToBool' function for consistent boolean conversion
📝 (utils): Add 'stringToBool' function to convert string to boolean for reusability
2024-12-11 17:48:12 +00:00
anovazzi1
67abb679b3
fix: Refactor CSS class in newChatMessage component preventing wrong position of bullet points (#5206)
* refactor: Update CSS class in newChatMessage component
2024-12-11 16:42:30 +00:00
anovazzi1
5c334a74b3
refactor: Add displayLoadingMessage flag to MessagesStoreType and adjust chat view layout (#5062)
* refactor: Adjust chat view layout for responsiveness

The code changes in this commit adjust the layout of the chat view component to improve responsiveness. Specifically, the CSS classes for the chat container and input container have been modified to make them responsive on different screen sizes. This ensures that the chat view is displayed properly on both desktop and mobile devices.

Refactoring the layout in this way enhances the user experience by making the chat view more accessible and user-friendly across different devices.

* [autofix.ci] apply automated fixes

* feat: Add displayLoadingMessage flag to MessagesStoreType

* feat: Add displayLoadingMessage flag to MessagesStoreType

* feat: Add useMessagesStore to flowStore for displaying loading message

* refactor: Adjust chat view layout for responsiveness and loading message display

* [autofix.ci] apply automated fixes
2024-12-11 14:04:55 +00:00
Cristhian Zanforlin Lousa
5b29c32570
test: Add test IDs and improve UI wait handling in frontend tests (#5188)
📝 (header/index.tsx): add data-testid attribute to new-project-btn button for testing purposes
📝 (dragAndDrop.spec.ts): add comments and improve readability of the test code
📝 (lock-flow.spec.ts): add comments and improve readability of the test code, ensure UI updates are properly handled
2024-12-10 18:59:08 +00:00
Lucas Oliveira
db33b15ade
fix: changed truncation style for big folder and flow names on header (#5106)
Fix truncation and add width relation between name and folder name
2024-12-10 16:23:43 +00:00
Cristhian Zanforlin Lousa
22d8ac1da8
test: enhance drag-and-drop reliability and update test asset paths (#5186)
 (dragAndDrop.spec.ts): Update file paths for drag and drop tests to use the correct directory structure
🐛 (generalBugs-shard-12.spec.ts): Adjust mouse movement coordinates to fix drag and drop functionality
🐛 (generalBugs-shard-12.spec.ts): Update drag and drop logic to use hover and click actions for better test accuracy
🐛 (generalBugs-shard-3.spec.ts): Modify adjustScreenView function to include zoom level parameter for better control
🐛 (generalBugs-shard-3.spec.ts): Add missing waitForSelector for fit_view element to ensure visibility before clicking
🐛 (generalBugs-shard-7.spec.ts): Reduce timeout for blank-flow element to improve test speed
🐛 (generalBugs-shard-7.spec.ts): Add waitForSelector for fit_view and zoom_out elements to ensure visibility before interacting with them
2024-12-10 15:45:18 +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
Cristhian Zanforlin Lousa
240e5790f4
chore(ui): add text-foreground class to NodeStatus build element (#5162)
* 📝 (NodeStatus/index.tsx): add text-foreground class to span element to improve text styling in build status section

*  (NodeStatus/index.tsx): improve styling and readability by adding flex and text-foreground classes to status elements

*  (build-status-display.tsx): Add a new component 'BuildStatusDisplay' to improve code organization and readability in the NodeStatus component.
📝 (index.tsx): Refactor NodeStatus component to use the new 'BuildStatusDisplay' component for displaying build status, validation details, and last run time. This change enhances code maintainability and reduces duplication.
2024-12-09 20:13:28 +00:00
Lucas Oliveira
a07907f695
fix: make sending a message not change the value of chatinput node (#5103)
Removed attribution of message sent to the Chat Input node
2024-12-09 19:38:25 +00:00
Lucas Oliveira
dc0291fa8f
fix: make chatinput text appear on playground only if no sessions are present (#5117)
Changed newChatView to only set chat value if no messages are present on the flow

Co-authored-by: Cristhian Zanforlin Lousa <cristhian.lousa@gmail.com>
2024-12-09 18:37:14 +00:00
anovazzi1
b3e06aa215
Refactor: add data test id and improve wait times for element selectors in regression tests (#5138)
* fix: Improve wait times for element selectors in regression tests

* refactor: add data test id
2024-12-09 16:49:10 +00:00
anovazzi1
65ec6fd1e1
refactor: Improve wait times and visibility checks in userSettings.spec.ts (#5120)
* refactor: Improve wait times and visibility checks in userSettings.spec.ts
2024-12-09 16:40:22 +00:00
anovazzi1
bb703f6e0d
refactor: Improve page loading and element visibility in regression tests (#5134)
* fix: Improve page loading and element visibility in regression tests
2024-12-09 16:10:17 +00:00
anovazzi1
f673630fd4
Refactor: Improve wait times and selectors in sticky-notes.spec.ts (#5100)
* refactor: Improve wait times and selectors in sticky-notes.spec.ts
2024-12-09 16:01:12 +00:00
anovazzi1
c6ddb2905f
Refactor: update NodeDescription component to conditionally render character limit message (#5037)
* Refactor: Update NodeDescription component to conditionally render a character limit message

* [autofix.ci] apply automated fixes

* Refactor: update NoteNode inputClassName to remove unnecessary ring and focus styles (#5038)

refactor: Update NoteNode inputClassName to remove unnecessary ring and focus styles
Co-authored-by: Mike Fortman <michael.fortman@datastax.com>
2024-12-09 15:44:32 +00:00
anovazzi1
2c01cd5195
refactor: Remove unnecessary code for handling Enter (#5041)
refactor: Remove unnecessary code for handling Enter key in NodeDescription component

Co-authored-by: Mike Fortman <michael.fortman@datastax.com>
2024-12-09 15:34:40 +00:00
anovazzi1
4a4806d638
Refactor: Remove unnecessary code and comments in integration-side-bar.spec.ts (#5073)
fix: Remove unnecessary code and comments in integration-side-bar.spec.ts
2024-12-09 05:04:37 -08:00
anovazzi1
c9bedb21c9
refactor: Improve wait time for modals and elements in regression tests (#5141)
* feat: Improve wait time for modals and elements in regression tests

- Increase the timeout for waiting for modals and elements in regression tests to 3000ms.
- Replace the usage of `waitForTimeout` with `waitForSelector` for better reliability.

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-12-09 12:18:57 +00:00
anovazzi1
d338a3e86f
Refactor: Remove unnecessary wait times in store-shard-0.spec.ts (#5105) 2024-12-08 01:30:55 +00:00
anovazzi1
f97a326023
Refactor: Improve wait times and visibility checks in store-shard-3.spec.ts (#5108)
* Refactor: Improve wait times and visibility checks in store-shard-3.spec.ts
2024-12-07 21:44:13 -03:00
anovazzi1
b682a26c26
Refactor: Improve wait times and visibility checks in twoEdges.spec.ts (#5109) 2024-12-07 17:05:31 +00:00
anovazzi1
c26a2d82e8
Refactor: Improve wait times in regression test (#5137)
* fix: Improve wait times in regression test

Improve the wait times in the regression test to ensure that the necessary elements are loaded before interacting with them. This prevents potential timing issues and improves the reliability of the test.

Refactor the test code to use `waitForSelector` instead of `waitForTimeout` to wait for the modal title and sidebar custom component button to appear. Increase the timeout for the sidebar custom component button to 30 seconds to allow for slower loading times.

Also, add a comment to indicate that the wait for the animation to propagate is intentional.

This commit addresses the issues identified in the regression test and improves the overall stability of the test suite.
2024-12-07 16:54:27 +00:00
anovazzi1
d55b405a6c
refactor: Remove unnecessary wait timeouts in chatInputOutputUser-shard-2.spec.ts (#5127)
* chore: Remove unnecessary wait timeouts in chatInputOutputUser-shard-2.spec.ts
2024-12-07 15:30:48 +00:00
anovazzi1
aa7ebb4ae3
Refactor: remove timeouts from generalbugs-shard10 (#5140)
remove timeouts from generalbugs-shard10
2024-12-07 15:18:44 +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
7114061f67
refactor: Improve page loading and element visibility in regression tests (#5136)
fix: Improve page loading and element visibility in regression tests
2024-12-07 04:14:08 +00:00
anovazzi1
6d252d34c6
Refactor: improve YouTube Transcripts integration tests (#5129)
fix: improve YouTube Transcripts integration tests

Improve the integration tests for the YouTube Transcripts feature by adding explicit wait conditions for modals and elements. This ensures that the tests are more reliable and less prone to timing issues.
2024-12-07 03:43:23 +00:00
anovazzi1
47d7004fc0
Refactor: Improve test stability and reliability (#5135)
fix: Improve test stability and reliability

Improve the stability and reliability of the tests in the generalBugs-shard-2.spec.ts file.
- Use waitForSelector instead of waitForTimeout to ensure that the modal and data elements are present before proceeding.
- Increase the timeout value to 3000 milliseconds for better reliability.
- Add a comment to indicate the purpose of the timeout.

This commit addresses the issue of intermittent failures in the tests and enhances the overall test stability.
2024-12-07 03:19:17 +00:00
anovazzi1
39335a7e47
refactor: Improve flow creation and search performance in test (#5139)
feat: Improve flow creation and search functionality

Improve the flow creation and search functionality by adding explicit wait conditions for modals and search results. This ensures that the necessary elements are loaded before interacting with them, preventing potential errors or timeouts.

Refactor the code in the 'generalBugs-shard-8.spec.ts' file to include the following changes:
- Add a timeout of 3000ms for the modal title selector
- Add a timeout of 3000ms for the dataAPI request selector

These changes enhance the reliability and stability of the tests in the 'generalBugs-shard-8.spec.ts' file.
2024-12-07 03:07:28 +00:00
anovazzi1
589358a7bd
Refactor: Improve wait times and visibility checks in stop-button-playground.spec.ts (#5104)
* Refactor: Improve wait times and visibility checks in stop-button-playground.spec.ts
2024-12-07 02:57:04 +00:00
anovazzi1
5c8bab57f1
Refactor: improve starter project modal test (#5098)
Refactor: Add search input for templates in TemplateContentComponent
2024-12-07 02:47:30 +00:00
anovazzi1
fa2ac6b9f0
Refactor: update remove unnecessary wait timeouts in regression test (#5132)
* refactor: Remove unnecessary wait timeouts in regression test
2024-12-07 02:36:50 +00:00
anovazzi1
56bcb85e03
fix: Improve test and add improve timeouts (#5142)
* fix: Improve  test and add missing timeouts

The test in the generalBugs-shard-13.spec.ts file was improved to include missing timeouts for better stability and reliability.
2024-12-07 02:25:40 +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
anovazzi1
3f4c8fb3c8
refactor: Improve page loading and element selection in DuckDuckGo integration test (#5128)
* fix: Improve page loading and element selection in DuckDuckGo integration test
2024-12-07 00:13:12 +00:00
anovazzi1
4ff748876d
feature: Add interactive reader to dictAreaModal (#5122)
* feat: add interactive reader to dictAreaModal
2024-12-06 23:56:46 +00:00
anovazzi1
70bb9cbb29
Refactor: remove unnecessary wait in component-as-tool-shortcut test (#5130)
refactor: Remove unnecessary wait in component-as-tool-shortcut test
2024-12-06 23:47:00 +00:00
anovazzi1
479cc3fa64
Refactor: remove unnecessary wait timeouts in regression test (#5133)
* refactor: Remove unnecessary wait timeouts in regression test
2024-12-06 23:36:44 +00:00
anovazzi1
5a42c82fc4
refactor: Remove unnecessary wait timeouts in chatInputOutputUser-shard-1.spec.ts (#5126)
fix: Remove unnecessary wait timeouts in chatInputOutputUser-shard-1.spec.ts
2024-12-06 23:21:03 +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
Lucas Oliveira
156597d3d1
fix: redirect to previous page after login (#5102)
* Added redirect handling to autologin and Protected Route

* Redirect after login on ProtectedLoginRoute
2024-12-06 15:01:13 +00:00
Cristhian Zanforlin Lousa
b2691eebce
feat: enhance slider component with labels and improved input handling (#5065)
* 📝 (openai.py): Update temperature slider range from 0-1 to 0-2 with step 0.01 for more precise control
📝 (sliderComponent/index.tsx): Update step value for slider component from 0.1 to 0.01 for smoother and more accurate adjustments
📝 (sliderComponent/index.tsx): Update MAX_LABEL from "Wild" to "Creative" for better semantic representation
📝 (sliderComponent/index.tsx): Add cursor-grabbing style when slider thumb is being grabbed to improve user experience

* 📝 (sliderComponent/index.tsx): improve styling and structure of the SliderComponent by refactoring the display value element to use a div container with appropriate classes and styles.

* 📝 (App.css): Add styles to hide spin buttons in input[type=number] elements for better UX
🔧 (sliderComponent/index.tsx): Add input element to allow users to directly edit the slider value for improved user experience

*  (slider-labels.tsx): Add SliderLabels component to display min and max labels with icons in SliderComponent for better user experience
📝 (index.tsx): Remove sliderInput prop and refactor SliderComponent to improve code readability and maintainability
🔧 (applies.css): Add styling for input-slider-text class to improve consistency in SliderComponent styling

* 📝 (applies.css): update hover:ring value to use variable hover:ring-slider-input-border for consistency and maintainability
📝 (index.css): add variable --slider-input-border to define the color value for slider input border
🔧 (tailwind.config.mjs): add slider-input-border custom property to map to the defined color value in the CSS variables

*  (build-color-by-name.ts): add function to dynamically build color based on input values to customize UI
 (get-min-max-value.ts): add function to get minimum or maximum value based on input constraints
🔧 (index.tsx): update import path for getMinOrMaxValue function
🔧 (index.tsx): add buildColorByName function to dynamically set thumb color based on percentage
🔧 (index.tsx): add logic to dynamically set background color gradient based on thumb color and percentage
🔧 (index.tsx): add logic to dynamically set thumb background color based on percentage and color calculation
2024-12-06 13:02:59 +00:00