feat(chat): create workflow artifacts from chat#2794
Merged
Conversation
This comment has been minimized.
This comment has been minimized.
|
✅ No security or compliance issues detected. Reviewed everything up to 38c0493. Security Overview
Detected Code Changes
|
- Run button and selected-action inputs in the embedded workflow artifact - Collapsible action toolbar that shrinks to a pill and expands on hover - Compact run view with Events/Input/Result tabs and inline result viewing - Condensed single-row run header (status + trigger + duration) when embedded
This comment has been minimized.
This comment has been minimized.
Contributor
There was a problem hiding this comment.
1 issue found across 13 files
Confidence score: 5/5
- This PR looks low risk to merge: the only reported concern is a low-severity (3/10) maintainability issue rather than a concrete runtime bug or regression.
frontend/src/components/workspace-chat/artifacts/workflow-artifact-view.tsxintroduces events-panel logic that duplicates existing builder events-sidebar behavior, which could increase long-term drift and update overhead.- Pay close attention to
frontend/src/components/workspace-chat/artifacts/workflow-artifact-view.tsx- duplicated events-sidebar logic may diverge from builder behavior over time.
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
Extract the last-execution resolution, loading/empty/error states, and events tab construction shared by the builder events sidebar and the embedded workflow artifact into events-shared, removing the duplicated panel logic between them.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2eb8ed830a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
The workflow artifact type had no query invalidator, so chat-created workflows did not appear in already-mounted dashboards or workflow/subflow pickers until the 5-minute workflow-list stale window lapsed. Invalidate the workflow list and detail queries when a workflow artifact streams in, matching the case/table/agent entries.
This file contains hidden or 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
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.

Summary
Verification
uv run ruff check packages/tracecat-registry/tracecat_registry/core/workflow.py packages/tracecat-registry/tracecat_registry/sdk/workflows.py tracecat/artifacts/bindings.py tracecat/chat/tools.py tracecat/workflow/executions/internal_router.pyuv run basedpyright packages/tracecat-registry/tracecat_registry/core/workflow.py packages/tracecat-registry/tracecat_registry/sdk/workflows.py tracecat/artifacts/bindings.py tracecat/chat/tools.py tracecat/workflow/executions/internal_router.pypnpm -C frontend exec biome check src/components/builder/canvas/canvas.tsx src/components/workspace-chat/artifacts/artifact-content.tsx src/components/workspace-chat/artifacts/workflow-artifact-view.tsxpnpm -C frontend run typecheckSummary by cubic
Create and preview workflows directly from chat with a new
workflowartifact that embeds the canvas, run controls, and a compact run viewer. Adds thecore.workflow.create_workflowtool and API, and keeps workflow lists in sync when chat creates a new workflow.New Features
core.workflow.create_workflowtool (enabled in chat defaults); binds results toworkflowartifacts with id/title and a default swatch color.WorkflowArtifactView: lazy-loaded artifact with embeddedWorkflowCanvas, a hover-expand actions pill, Manual Run, and a compact Events/Input/Result (+Interaction) viewer with a single-row run header; auto-focuses events on run and shares viewer logic with the builder for consistency.embeddedmode toWorkflowCanvaswith fit tuned for small graphs and a collapsible toolbar that shrinks to a pill and expands on hover.POST /internal/workflows(workflow:createscope; returns id/title) and SDKWorkflowsClient.create_workflow(...).Bug Fixes
workflowartifact streams in so chat-created workflows appear immediately in dashboards and pickers.Written for commit 38c0493. Summary will update on new commits.