Skip to content

Fix workflow run ouput format #10302

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

Merged
merged 8 commits into from
Feb 19, 2025
Merged

Fix workflow run ouput format #10302

merged 8 commits into from
Feb 19, 2025

Conversation

Devessier
Copy link
Contributor

@Devessier Devessier commented Feb 18, 2025

  • Adapt the frontend to use the new output format

@Devessier Devessier force-pushed the fix-workflow-run-ouput-format branch from 5cf0cd0 to 37db4dc Compare February 18, 2025 17:36
@Devessier Devessier marked this pull request as ready for review February 19, 2025 10:46
Copy link
Contributor

@greptile-apps greptile-apps bot left a 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 the workflow run output format across the frontend and backend to improve workflow execution tracking and visualization.

  • Changed WorkflowRunOutput type in /packages/twenty-front/src/modules/workflow/types/Workflow.ts to include a flow object with trigger and steps, making stepsOutput optional
  • Simplified WorkflowRunVisualizerEffect in /packages/twenty-front/src/modules/workflow/workflow-diagram/components/WorkflowRunVisualizerEffect.tsx to use workflow run output directly
  • Added optional chaining for stepsOutput access in /packages/twenty-server/src/modules/workflow/workflow-executor/workspace-services/workflow-executor.workspace-service.ts to prevent runtime errors
  • Re-enabled 'Flow' tab for workflow run views in /packages/twenty-front/src/modules/object-record/record-show/hooks/useRecordShowContainerTabs.ts
  • Updated test cases in /packages/twenty-front/src/modules/workflow/workflow-diagram/utils/__tests__/generateWorkflowRunDiagram.test.ts to reflect new output format

8 file(s) reviewed, 2 comment(s)
Edit PR Review Bot Settings | Greptile

Comment on lines +198 to +200
title: 'Flow',
position: 0,
Icon: IconSettings,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

logic: Both workflowRunOutput and workflowRunFlow tabs have position 0, which could cause unpredictable tab ordering

Comment on lines +253 to +256
attemptCount: 1,
result: undefined,
error: '',
},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

style: Empty error string treated as failure state. Consider using undefined for consistency with other error cases.

@@ -231,7 +231,7 @@ export class WorkflowVisualizerPage {

async closeSidePanel() {
const closeButton = this.#page.getByTestId(
'page-header-close-command-menu-button',
'page-header-command-menu-button',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why this renaming?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My change concerns the e2e tests, and I'm not responsible for the renaming. However, I think it's due to Raphaël's recent changes on the Cmd+K close button. I assume the Open and Closed states are now the same button, hence a more global test id. (close-button -> button)

@Devessier Devessier merged commit 77caf36 into main Feb 19, 2025
47 checks passed
@Devessier Devessier deleted the fix-workflow-run-ouput-format branch February 19, 2025 14:11
Copy link
Contributor

Thanks @Devessier for your contribution!
This marks your 75th PR on the repo. You're top 1% of all our contributors 🎉
See contributor page - Share on LinkedIn - Share on Twitter

Contributions

Copy link

sentry-io bot commented Feb 20, 2025

Suspect Issues

This pull request was deployed and Sentry observed the following issues:

  • ‼️ TypeError: Cannot read properties of undefined (reading 'trigger') /object/workflowRun/7fd35dd3-1d6b-4b2a-a2bd-7d9... View Issue

Did you find this useful? React with a 👍 or 👎

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants