Commit graph

9,775 commits

Author SHA1 Message Date
cristhianzl
922711740c (typescript_test.yml): update shard configuration to include 6 shards
 (index.tsx): add data-testid attribute to checkbox component
 (basicExamples.spec.ts): add waitForSelector for send icon to improve test stability
 (chatInputOutputUser.spec.ts): add waitForSelector for send icon to improve test stability
 (deleteComponentFlows.spec.ts): add waitForSelector for various elements to improve test stability
 (generalBugs.spec.ts): add waitForSelector for send icon to improve test stability
2024-06-26 22:22:51 -03:00
cristhianzl
b833746609 fix tests on CI 2024-06-26 20:58:21 -03:00
cristhianzl
b645d17c87 🔧 (typescript_test.yml): add OPENAI_API_KEY to environment variables in CI
 (basicExamples.spec.ts): refactor API key check to run at the start of tests
2024-06-26 20:30:27 -03:00
cristhianzl
6e16a6e83b moving tests 2024-06-26 17:48:12 -03:00
cristhianzl
4e35645dfe 💡 (NewFlowCardComponent, undrawCards): add console.error statements for debugging flow data 2024-06-26 17:46:56 -03:00
cristhianzl
b68d3c57dc (tests): update test selectors to use test IDs for model selection
 (tests): add waitForTimeout to ensure stability in end-to-end tests
2024-06-26 16:23:27 -03:00
cristhianzl
8153c863e6 (tests): add model selection step in end-to-end tests
Add steps to select "gpt-4o" model in various end-to-end tests to ensure
consistency and accuracy in test execution.
2024-06-26 16:11:37 -03:00
cristhianzl
ca62f1a31f (index.tsx): add data-testid attribute to shared button for testing
 (store.spec.ts): update test selector to use new data-testid attribute
♻️ (textInputOutput.spec.ts): refactor element selection and interaction logic for clarity and maintainability
2024-06-26 15:27:58 -03:00
cristhianzl
2ede00b668 (basicExamples.spec.ts): comment out end-to-end test steps for Vector Store RAG 2024-06-26 14:56:17 -03:00
cristhianzl
dad0aa282f Merge branch 'dev' into cz/fixTestsCI 2024-06-26 12:06:00 -03:00
cristhianzl
326353cb6d (playwright.config.ts): update retries and workers configuration for CI
💡 (textAreaWrapper): add data-testid attribute for better test targeting
 (actionsMainPage.spec.ts): add waitForSelector for better test stability
 (basicExamples.spec.ts): replace waitForTimeout with waitForSelector
 (basicExamples.spec.ts): use data-testid for chat input for consistency
 (memoryChatbot.spec.ts): replace waitForTimeout with waitForSelector
 (memoryChatbot.spec.ts): use data-testid for chat input for consistency
 (documentQA.spec.ts): replace waitForTimeout with waitForSelector
 (documentQA.spec.ts): use data-testid for chat input for consistency
 (vectorStoreRAG.spec.ts): replace waitForTimeout with waitForSelector
 (vectorStoreRAG.spec.ts): use data-testid for chat input for consistency

 (tests): add waitForSelector to ensure elements are loaded before interaction

 (tests): add waitForSelector for 'fit view' button in end-to-end tests
2024-06-26 11:47:48 -03:00
Gabriel Luiz Freitas Almeida
9923f51abd
Merge branch 'dev' into fix_group_graph 2024-06-26 04:43:32 -07:00
Gabriel Luiz Freitas Almeida
462a854445
Merge branch 'dev' into fix_self_stop 2024-06-26 04:01:42 -07:00
Gabriel Luiz Freitas Almeida
4e5a1414f7
Merge branch 'dev' into fix_group_graph 2024-06-26 04:00:59 -07:00
Gabriel Luiz Freitas Almeida
a2d8b831e7
Merge branch 'dev' into fix_self_stop 2024-06-26 03:39:15 -07:00
Gabriel Luiz Freitas Almeida
4056cddd5a
Merge branch 'dev' into fix_group_graph 2024-06-26 03:39:02 -07:00
cristhianzl
b49e8dac9a ♻️ (playwright.config.ts): increase workers from 1 to 3 to improve test parallelism
 (basicExamples.spec.ts): add waitForSelector for 'fit view' to ensure element is loaded

 (basicExamples.spec.ts): add waitForSelector for 'built successfully' to ensure element is loaded

 (chatInputOutput.spec.ts): add waitForSelector for 'extended-disclosure' to ensure element is loaded

 (codeAreaModalComponent.spec.ts): add waitForSelector for 'extended-disclosure' to ensure element is loaded

 (dropdownComponent.spec.ts): add waitForSelector for 'extended-disclosure' to ensure element is loaded

 (fileUploadComponent.spec.ts): add waitForSelector for 'extended-disclosure' to ensure element is loaded

 (filterEdge.spec.ts): add waitForSelector for 'extended-disclosure' to ensure element is loaded

 (filterEdge.spec.ts): update test expectations for 'disclosure-agents' to be visible

 (floatComponent.spec.ts): add waitForSelector for 'extended-disclosure' to ensure element is loaded

 (flowPage.spec.ts): add waitForSelector for 'extended-disclosure' to ensure element is loaded

 (folders.spec.ts): add waitForSelector for 'icon-ChevronLeft' to ensure element is loaded

 (folders.spec.ts): update folder name input and visibility check to improve reliability

 (generalBugs.spec.ts): add waitForSelector for 'extended-disclosure' to ensure element is loaded

 (tests): replace waitForTimeout with waitForSelector in end-to-end tests

Replace `waitForTimeout` with `waitForSelector` to improve test reliability and reduce flakiness.
2024-06-25 22:14:17 -03:00
Gabriel Luiz Freitas Almeida
5bdd035dc3 refactor: Add field_validator for files in MessageBase model 2024-06-25 21:48:50 -03:00
Gabriel Luiz Freitas Almeida
2637e8e349
Merge branch 'dev' into migrate_monitor_to_db 2024-06-25 17:32:00 -07:00
Gabriel Luiz Freitas Almeida
12f35f298b refactor: Update add_messages and add_messagetables functions to return Message objects 2024-06-25 20:22:58 -03:00
Gabriel Luiz Freitas Almeida
0bfb702736 refactor: Remove unused imports and optimize get_messages function 2024-06-25 20:22:58 -03:00
Gabriel Luiz Freitas Almeida
76fffe5990 ♻️ (service.py): remove unused code related to adding and retrieving messages in MonitorService 2024-06-25 20:22:58 -03:00
Gabriel Luiz Freitas Almeida
3204af1263 📝 (memory.py): Refactor get_messages function to use SQLAlchemy select statement for better performance and readability
📝 (memory.py): Refactor delete_messages function to use SQLAlchemy delete statement for better performance and readability
📝 (monitor/schema.py): Update MessageModel to use UUID type for id and flow_id for consistency and better data handling
2024-06-25 20:22:58 -03:00
Gabriel Luiz Freitas Almeida
a857375016 refactor: Remove unused imports in authContext.tsx 2024-06-25 20:22:58 -03:00
Gabriel Luiz Freitas Almeida
7be4f88678 refactor: ignore type error 2024-06-25 20:22:58 -03:00
Gabriel Luiz Freitas Almeida
22609eac70 chore: Fix issue with message timestamp conversion in MessageBase model 2024-06-25 20:22:58 -03:00
ogabrielluiz
cd73904095 Apply Prettier formatting 2024-06-25 20:22:58 -03:00
Gabriel Luiz Freitas Almeida
988d2cf10b fix: Refactor monitor.py messages endpoints 2024-06-25 20:22:58 -03:00
Gabriel Luiz Freitas Almeida
1105e61200 Refactor add_messages function to separate message addition and commit logic 2024-06-25 20:22:58 -03:00
Gabriel Luiz Freitas Almeida
8fbf026476 Fix issue with message timestamp conversion in MessageBase model 2024-06-25 20:22:57 -03:00
Gabriel Luiz Freitas Almeida
f5fec47f76 chore: Add error handling for message not found in update_message endpoint 2024-06-25 20:22:57 -03:00
anovazzi1
6d9e2e4350 format code 2024-06-25 20:22:57 -03:00
anovazzi1
35d80fe978 fix fetch data to work even with autologin true 2024-06-25 20:22:57 -03:00
Gabriel Luiz Freitas Almeida
3bb5f9d5e7 refactor: Update messages endpoints to use database table 2024-06-25 20:22:57 -03:00
Gabriel Luiz Freitas Almeida
c1c478e8c4 refactor: Update add_messages function to use database session
This commit refactors the add_messages function in memory.py to use a database session for adding messages to the monitor service. Instead of directly calling the monitor_service.add_message method, the messages are now added using a session object. This change ensures that the messages are properly persisted in the database and improves the reliability of the application.
2024-06-25 20:22:57 -03:00
Gabriel Luiz Freitas Almeida
2b0765d41b feat: Add message table to the database
This commit adds a new table called "message" to the database. The table includes columns for timestamp, sender, sender_name, session_id, text, id, flow_id, and files. The "message" table is created using Alembic migration. This addition allows for storing and retrieving messages in the application.
2024-06-25 20:22:57 -03:00
cristhianzl
a0117f5794 💡 (hooks): add TypeScript types to hook parameters for better type safety
💡 (use-dropdown-options.tsx): add TypeScript types to function parameters

💡 (use-api-keys.tsx): add TypeScript types to function parameters

💡 (use-handle-delete-key.tsx): add TypeScript types to function parameters

💡 (use-preload-images.tsx): add TypeScript types to function parameters

💡 (use-patch-password.tsx): add TypeScript types to function parameters

💡 (use-patch-profile-picture.tsx): add TypeScript types to function parameters

💡 (use-save-key.tsx): add TypeScript types to function parameters

💡 (use-scroll-to-element.tsx): add TypeScript types to function parameters

💡 (use-messages-table.tsx): add TypeScript types to function parameters

💡 (use-remove-messages.tsx): add TypeScript types to function parameters

💡 (use-updateMessage.tsx): add type annotations to setSuccessData and setErrorData for better type safety and code clarity
2024-06-25 20:02:23 -03:00
cristhianzl
b7ff822ae2 💡 (hooks): add TypeScript types to hook parameters for better type safety
💡 (index.tsx): add non-null assertion operator to playground variable
♻️ (use-on-file-drop.tsx): add type annotations for folderId and folderChangeCallback
♻️ (use-auto-resize-text-area.tsx): add type annotations for value and inputRef
♻️ (use-drag-and-drop.tsx): add type annotations for setIsDragging, setFiles, currentFlowId, and setErrorData
♻️ (use-focus-unlock.tsx): add type annotations for lockChat and inputRef
♻️ (use-upload.tsx): add type annotations for uploadFile, currentFlowId, setFiles, and lockChat
♻️ (use-column-defs.tsx): add type annotation for myData
♻️ (use-row-data.tsx): add type annotations for myData and open
♻️ (index.tsx): remove commented-out code
♻️ (use-filtered-flows.tsx): add type annotations for flowsFromFolder, searchFlowsComponents, and setAllFlows
💡 (index.tsx): add non-null assertion operator to flowsFromFolder variable
2024-06-25 20:02:15 -03:00
cristhianzl
3db91f890b (hooks): add custom hooks for card component
- Add `useDataEffect` to handle data-related side effects
- Add `useInstallComponent` to manage component installation logic
- Add `useLikeComponent` to handle like functionality
- Add `useDragStart` to manage drag start events
- Add `usePlaygroundEffect` to handle playground-related side effects

 (cardComponent): add custom hooks for data, install, like, drag start, and playground effects
♻️ (cardComponent): rename state variables for consistency and readability
 (MainPage): add CollectionCard component to handle card rendering and interactions

 (index.tsx): add CollectionCard component to ComponentsComponent
♻️ (index.tsx): refactor to use CollectionCard instead of inline code
2024-06-25 20:01:52 -03:00
Gabriel Luiz Freitas Almeida
8ea8c7e836 fix: vertex_id is now set correctly when it is a group flow 2024-06-25 19:09:18 -03:00
italojohnny
0abfe43533 fix condition stop 2024-06-25 19:03:41 -03:00
Gabriel Luiz Freitas Almeida
2ed4d54f99
Add check-format script and update lint-js.yml (#2357)
* chore: Add check-format script to package.json for code formatting consistency

* chore: Update lint-js.yml to use npm run check-format instead of npm run format
2024-06-25 14:46:51 -07:00
cristhianzl
4faf84ebee ♻️ (flows.py): rename loop variable flow to _flow to avoid shadowing and improve readability 2024-06-25 13:42:01 -07:00
cristhianzl
946638c268 ♻️ (flows.py): rename loop variable flow to _flow to avoid shadowing and improve readability 2024-06-25 16:32:17 -03:00
cristhianzl
b05455a9b8 refactor: Ensure flow names are unique by appending a number if necessary 2024-06-25 19:25:14 +00:00
Gabriel Luiz Freitas Almeida
4365e3d2d8 chore: Update package versions in pyproject.toml files 2024-06-25 15:31:29 -03:00
Gabriel Luiz Freitas Almeida
4ed879ff56 Refactor telemetry service payload field names for consistency 2024-06-25 15:31:29 -03:00
Gabriel Luiz Freitas Almeida
0f8cd9e572 chore: Update authContext imports and remove duplicate imports 2024-06-25 15:31:29 -03:00
Cristhian Zanforlin Lousa
4077135ba7 Updating Tests and Fixing Related Bugs (#2319)
* 🐛 (tableNodeCellRender): fix templateValue check to use Object.keys
 (textAreaComponent): add Case component for conditional rendering
♻️ (editNodeModal): remove commented-out useEffect code
 (basicExamples.spec): update test selectors and increase timeout values

 (filterEdge.spec.ts): update test IDs to match new naming conventions

 (inputListComponent.spec.ts, intComponent.spec.ts): update test IDs and streamline test steps for consistency and clarity

 (keyPairListComponent.spec.ts): update test ID for model element
 (keyPairListComponent.spec.ts): add steps to test editing model options and saving changes

*  (tests): update end-to-end tests for chat input/output and modal components

- Update test selectors for better accuracy
- Add keyboard interaction in chatInputOutputUser.spec.ts
- Improve file handling in chat image upload test
- Refine prompt modal component tests for better validation
- Enhance twoEdges.spec.ts with additional view controls

* ♻️ (tests): refactor repeated click actions into reusable function in e2e tests

*  (tests): replace waitForTimeout with waitForSelector in end-to-end tests

*  (typescript_test.yml): add --debug flag to Playwright test command for better debugging

*  (typescript_test.yml): enable trace option in Playwright tests for better debugging

*  (typescript_test.yml): reduce Playwright test workers from 2 to 1 to improve stability
 (textInputOutput.spec.ts): add waitFor visibility checks to ensure elements are visible before interaction

*  (tests): update paths for test assets to correct locations
 (tests): add waitForSelector to ensure elements are loaded before interaction

*  (typescript_test.yml): increase Playwright workers from 1 to 2 to speed up tests
 (chatInputOutputUser.spec.ts): increase timeout for AI response to 100000ms
 (chatInputOutputUser.spec.ts): correct file path for image upload test
 (deleteComponentFlows.spec.ts): change waitFor to target last checkbox-component
 (store.spec.ts): increase timeout for share button to 100000ms

* 🐛 (flows.py): ensure flow names are unique by appending a number if necessary

* Apply Ruff formatting

---------

Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
Co-authored-by: Cristhianzl <Cristhianzl@users.noreply.github.com>
2024-06-25 10:21:38 -07:00
Cristhian Zanforlin Lousa
2fe2024a58 Fix lint error version of tailwind css plugin (#2323)
⬆️ (package.json): update prettier-plugin-tailwindcss to version 0.6.5
♻️ (package.json): reorder @types/lodash dependency for consistency

Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
2024-06-25 10:21:38 -07:00