-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Fix use as draft #9718
Merged
Merged
Fix use as draft #9718
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Contributor
martmull
commented
Jan 17, 2025
•
edited
Loading
edited
- remove delete serverless function when archiving workflow version
- update copy serverless function to reset serverless function to old version
- remove createNewWorkflowVersion and use createDraftFromWorkflowVersion
- fix step update issue and optimistic rendering when generate draft from active version
martmull
force-pushed
the
fix-use-as-draft
branch
from
January 17, 2025 15:56
e4ed9e5
to
63fa5b7
Compare
martmull
force-pushed
the
fix-use-as-draft
branch
from
January 20, 2025 13:55
1165aaa
to
de3e80e
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 refactors workflow version management by replacing the manual creation process with a dedicated draft creation system.
- Replaced
useCreateNewWorkflowVersion
withuseCreateDraftFromWorkflowVersion
in/packages/twenty-front/src/modules/workflow/hooks/useGetUpdatableWorkflowVersion.ts
- Modified
createDraftFromWorkflowVersion
mutation in/packages/twenty-front/src/modules/workflow/graphql/mutations/createDraftFromWorkflowVersion.ts
to returnworkflowVersionId
- Changed serverless function handling in
/packages/twenty-server/src/modules/workflow/common/workspace-services/workflow-version-step.workspace-service.ts
to reset to old versions instead of copying - Added
WorkflowVersionDTO
in/packages/twenty-server/src/engine/core-modules/workflow/dtos/workflow-version.dto.ts
to standardize version responses - Updated workflow step hooks to work with version IDs instead of full version objects for better optimistic updates
20 file(s) reviewed, 10 comment(s)
Edit PR Review Bot Settings | Greptile
...ges/twenty-front/src/modules/workflow/hooks/__tests__/useGetUpdatableWorkflowVersion.test.ts
Outdated
Show resolved
Hide resolved
...ges/twenty-front/src/modules/workflow/hooks/__tests__/useGetUpdatableWorkflowVersion.test.ts
Outdated
Show resolved
Hide resolved
packages/twenty-front/src/modules/workflow/hooks/useCreateDraftFromWorkflowVersion.ts
Outdated
Show resolved
Hide resolved
packages/twenty-front/src/modules/workflow/workflow-steps/hooks/__tests__/useDeleteStep.test.ts
Outdated
Show resolved
Hide resolved
packages/twenty-front/src/modules/workflow/workflow-steps/hooks/useDeleteStep.ts
Show resolved
Hide resolved
packages/twenty-front/src/modules/workflow/workflow-steps/hooks/useDeleteStep.ts
Show resolved
Hide resolved
packages/twenty-server/src/engine/core-modules/workflow/dtos/workflow-version.dto.ts
Show resolved
Hide resolved
...twenty-server/src/engine/metadata-modules/serverless-function/serverless-function.service.ts
Outdated
Show resolved
Hide resolved
...er/src/modules/workflow/common/workspace-services/workflow-version-step.workspace-service.ts
Outdated
Show resolved
Hide resolved
...ages/twenty-server/src/modules/workflow/workflow-status/jobs/workflow-statuses-update.job.ts
Outdated
Show resolved
Hide resolved
thomtrp
reviewed
Jan 21, 2025
packages/twenty-server/src/engine/core-modules/workflow/dtos/workflow-version.dto.ts
Outdated
Show resolved
Hide resolved
...twenty-server/src/engine/metadata-modules/serverless-function/serverless-function.service.ts
Outdated
Show resolved
Hide resolved
...twenty-server/src/engine/metadata-modules/serverless-function/serverless-function.service.ts
Outdated
Show resolved
Hide resolved
...ages/twenty-server/src/modules/workflow/workflow-status/jobs/workflow-statuses-update.job.ts
Outdated
Show resolved
Hide resolved
martmull
force-pushed
the
fix-use-as-draft
branch
from
January 21, 2025 14:22
988f0a2
to
7fa5c55
Compare
thomtrp
approved these changes
Jan 21, 2025
...twenty-server/src/engine/metadata-modules/serverless-function/serverless-function.service.ts
Outdated
Show resolved
Hide resolved
...twenty-server/src/engine/metadata-modules/serverless-function/serverless-function.service.ts
Show resolved
Hide resolved
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.