Skip to content
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

Add Workflow Run show page #7719

Merged
merged 8 commits into from
Oct 21, 2024
Merged

Add Workflow Run show page #7719

merged 8 commits into from
Oct 21, 2024

Conversation

Devessier
Copy link
Contributor

@Devessier Devessier commented Oct 15, 2024

In this PR:

  • Display a workflow version visualizer for the version of the workflow the run was executed on.
  • Display the output of the run as code.
CleanShot.2024-10-15.at.14.33.44.mp4

@Devessier
Copy link
Contributor Author

Devessier commented Oct 15, 2024

Will have to update the PR when #7715 lands.

Done 👍

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 adds a Workflow Run show page, introducing components to display workflow version visualizers and run outputs.

  • Added WorkflowRunOutputVisualizer in packages/twenty-front/src/modules/workflow/components/WorkflowRunOutputVisualizer.tsx to render workflow run outputs as formatted JSON
  • Implemented WorkflowRunVersionVisualizer in packages/twenty-front/src/modules/workflow/components/WorkflowRunVersionVisualizer.tsx to display workflow version visualizers
  • Created useWorkflowRun hook in packages/twenty-front/src/modules/workflow/hooks/useWorkflowRun.tsx for fetching workflow run data
  • Modified ShowPageRightContainer in packages/twenty-front/src/modules/ui/layout/show-page/components/ShowPageRightContainer.tsx to include new 'Output' and 'Flow' tabs for workflow runs
  • Added WorkflowRun and WorkflowRunOutput types in packages/twenty-front/src/modules/workflow/types/Workflow.ts to support new workflow run functionality

6 file(s) reviewed, 4 comment(s)
Edit PR Review Bot Settings | Greptile

@Devessier Devessier force-pushed the add-workflow-execution-show-page branch from a231211 to 6359fc5 Compare October 16, 2024 15:19
}

return (
<StyledSourceCode>
Copy link
Contributor

Choose a reason for hiding this comment

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

I think you could use the <CodeEditor component here. See an example in readonly CodeEditor usage in packages/twenty-front/src/modules/settings/serverless-functions/components/tabs/SettingsServerlessFunctionTestTab.tsx line 99

Suggested change
<StyledSourceCode>
<CodeEditor
files={[
{
content: workflowRun.output,
language: 'json',
path: 'result.any',
},
]}
currentFilePath={'result.any'}
options={{ readOnly: true, domReadOnly: true }}
/>

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Great idea! I made the change. It looks like that, now:

CleanShot 2024-10-17 at 14 00 15@2x

Copy link
Contributor

@martmull martmull left a comment

Choose a reason for hiding this comment

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

One required change then LGTM

language="json"
height={200}
onChange={setSettingsServerlessFunctionInput}
options={{ readOnly: true, domReadOnly: true }}
Copy link
Contributor

Choose a reason for hiding this comment

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

warning, this is editable, not readonly

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for catching this. It's fixed.

Copy link
Contributor

@martmull martmull left a comment

Choose a reason for hiding this comment

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

LGTM

@Devessier Devessier force-pushed the add-workflow-execution-show-page branch from b6f3056 to 3262ff2 Compare October 21, 2024 09:28
@Devessier Devessier force-pushed the add-workflow-execution-show-page branch from 3262ff2 to 8c1c579 Compare October 21, 2024 09:32
@Devessier Devessier merged commit e7eeb3b into main Oct 21, 2024
13 checks passed
@Devessier Devessier deleted the add-workflow-execution-show-page branch October 21, 2024 10:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants