-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
8726 workflow add a test button in workflow code step #9016
8726 workflow add a test button in workflow code step #9016
Conversation
…code-step Remove useless backend call
57f83a7
to
f12418a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Summary
This PR adds test functionality to workflow code steps, including a test button and test tab interface for executing and viewing serverless function results.
- Added new
ServerlessFunctionExecutionResult
component in/packages/twenty-front/src/modules/serverless-functions/components/
to display test execution status, duration, and output - Implemented
useTestServerlessFunction
hook in/packages/twenty-front/src/modules/serverless-functions/hooks/
for managing test execution state and handling responses - Removed
CodeIntrospectionService
and related files in favor of simpler schema handling withBASE_TYPESCRIPT_PROJECT_INPUT_SCHEMA
- Added comprehensive test coverage for serverless function utilities in
/packages/twenty-front/src/modules/serverless-functions/utils/__tests__/
- Refactored tab state management across components to use
useTabList
hook directly instead of Recoil state
77 file(s) reviewed, 59 comment(s)
Edit PR Review Bot Settings | Greptile
packages/twenty-front/src/modules/action-menu/components/CmdEnterActionButton.tsx
Show resolved
Hide resolved
packages/twenty-front/src/modules/action-menu/components/CmdEnterActionButton.tsx
Show resolved
Hide resolved
...wenty-front/src/modules/object-record/record-field/form-types/hooks/useTextVariableEditor.ts
Outdated
Show resolved
Hide resolved
packages/twenty-front/src/modules/serverless-functions/constants/IndexFilePath.ts
Show resolved
Hide resolved
...enty-front/src/modules/serverless-functions/components/ServerlessFunctionExecutionResult.tsx
Show resolved
Hide resolved
packages/twenty-server/src/modules/workflow/workflow-builder/types/output-schema.type.ts
Show resolved
Hide resolved
0ca4ed8
to
4136651
Compare
9ac1ed5
to
3d0c160
Compare
...wenty-front/src/modules/serverless-functions/utils/getDefaultFunctionInputFromInputSchema.ts
Show resolved
Hide resolved
packages/twenty-front/src/modules/ui/layout/show-page/components/ShowPageSubContainer.tsx
Outdated
Show resolved
Hide resolved
...ules/workflow/workflow-actions/components/WorkflowEditActionFormServerlessFunctionFields.tsx
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great job! I only gave a look to the first half of the Pull Request. I wrote a few comments.
...wenty-front/src/modules/object-record/record-field/form-types/hooks/useTextVariableEditor.ts
Outdated
Show resolved
Hide resolved
packages/twenty-front/src/modules/serverless-functions/constants/IndexFilePath.ts
Outdated
Show resolved
Hide resolved
packages/twenty-front/src/modules/serverless-functions/hooks/useTestServerlessFunction.ts
Outdated
Show resolved
Hide resolved
packages/twenty-front/src/modules/serverless-functions/hooks/useTestServerlessFunction.ts
Outdated
Show resolved
Hide resolved
...wenty-front/src/modules/serverless-functions/utils/getDefaultFunctionInputFromInputSchema.ts
Show resolved
Hide resolved
packages/twenty-front/src/modules/serverless-functions/utils/getFunctionInputFromSourceCode.ts
Outdated
Show resolved
Hide resolved
...ront/src/modules/workflow/workflow-actions/components/WorkflowEditActionFormDeleteRecord.tsx
Show resolved
Hide resolved
packages/twenty-front/src/modules/serverless-functions/hooks/useTestServerlessFunction.ts
Show resolved
Hide resolved
.../modules/settings/serverless-functions/components/tabs/SettingsServerlessFunctionTestTab.tsx
Outdated
Show resolved
Hide resolved
...y-front/src/modules/workflow/workflow-actions/components/WorkflowEditActionFormSendEmail.tsx
Show resolved
Hide resolved
...ules/workflow/workflow-actions/components/WorkflowEditActionFormServerlessFunctionFields.tsx
Outdated
Show resolved
Hide resolved
packages/twenty-server/src/modules/workflow/workflow-builder/types/output-schema.type.ts
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work! Thank you!
As discussed, removing the "Test" button from the "Code" would be great. I think it doesn't provide the best UX as the code and the test parts are separate, making it hard to know the arguments used when launching a test from the "Code" tab.
...rc/modules/workflow/workflow-actions/components/WorkflowEditActionFormServerlessFunction.tsx
Outdated
Show resolved
Hide resolved
...rc/modules/workflow/workflow-actions/components/WorkflowEditActionFormServerlessFunction.tsx
Show resolved
Hide resolved
packages/twenty-front/src/modules/ui/layout/right-drawer/components/RightDrawerFooter.tsx
Outdated
Show resolved
Hide resolved
...rc/modules/workflow/workflow-actions/components/WorkflowEditActionFormServerlessFunction.tsx
Outdated
Show resolved
Hide resolved
...rc/modules/workflow/workflow-actions/components/WorkflowEditActionFormServerlessFunction.tsx
Outdated
Show resolved
Hide resolved
...rc/modules/workflow/workflow-actions/components/WorkflowEditActionFormServerlessFunction.tsx
Outdated
Show resolved
Hide resolved
8794909
to
96103f0
Compare
96103f0
to
1c19366
Compare
3ab11cb
to
2a938f1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Amazing! Approving.
- Fixed icon shrinking on tabs. The introduction of EllipsisDisplay takes 100% of the width, thus shrinking the icons. - Removed scroll wrapper tablist. This was removed in #9016 but reintroduced in #9089. This reintroduction made the dark border below the active tab disappear. - Used Avatar for icon and logo rendering following the changes made in #9093
Enregistrement.de.l.ecran.2024-12-11.a.15.09.10.mov