Skip to content

feat(workflows): add workflow editor - #6248

Draft
tellaho wants to merge 23 commits into
mainfrom
tho/workflow-editor-foundation
Draft

feat(workflows): add workflow editor#6248
tellaho wants to merge 23 commits into
mainfrom
tho/workflow-editor-foundation

Conversation

@tellaho

@tellaho tellaho commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Category: new-feature
User Impact: Users can create, edit, duplicate, and deep-link to workflows in a responsive visual editor without losing unsupported YAML or unsaved work.
Problem: Workflow editing was split across disconnected surfaces and lacked reliable URL state, lifecycle protection, and parity between Form and YAML modes. Solution: This adds a route-addressable editor foundation with stable pane identity, guarded dirty exits, lossless Form/YAML transitions, responsive workflow and channel controls, and matching reaction-filter execution support.

File changes

crates/buzz-workflow/src/lib.rs
Apply reaction trigger filters during workflow execution and cover target-message gating.

crates/buzz-workflow/src/schema.rs
Extend the reaction trigger schema with the editor-owned filter field.

desktop/src/app/navigation/useAppNavigation.ts
Add navigation helpers for explicit workflow create, edit, and duplicate editor modes.

desktop/src/app/routes/WorkflowsRouteScreen.tsx
Coordinate route state with the shared workflow library and editor dialog.

desktop/src/app/routes/lazyWorkflowsRouteScreen.ts
Share one lazy route component across workflow route entry points to avoid loading flashes.

desktop/src/app/routes/workflows.$workflowId.tsx
Parse workflow editor modes and pane deep links for workflow-specific URLs.

desktop/src/app/routes/workflows.tsx
Parse library-level create state and render the shared workflow route screen.

desktop/src/features/channels/ui/ChannelManagementSheet.tsx
Add a Canvas-style Workflows ingress below Canvas, including channel-scoped loading, error, empty, and list states plus open/create actions.

desktop/src/features/channels/ui/ChannelWorkflowsSection.tsx
Render the channel workflow list and New workflow action without pushing the existing settings sheet past its file-size ceiling.

desktop/src/features/workflows/ui/ChannelCombobox.tsx
Adopt the final channel presentation, portalled scrolling, and one-shot create-flow opening behavior.

desktop/src/features/workflows/ui/CreateWorkflowDialog.tsx
Remove the superseded create-only dialog in favor of the unified workflow editor.

desktop/src/features/workflows/ui/WorkflowCard.tsx
Open workflow cards in the detail and run-history modal while preserving explicit edit and duplicate actions.

desktop/src/features/workflows/ui/WorkflowDetailDialog.tsx
Present workflow Trigger/Steps in the shared modal chrome, with top-chrome ingress to a responsive right-side run-history inspector and an explicit edit action.

desktop/src/features/workflows/ui/WorkflowDialog.tsx
Unify create, edit, and duplicate lifecycle handling with URL panes, generated-name synchronization, dirty-exit guards, stale-write preservation, and protected webhook-secret handoff.

desktop/src/features/workflows/ui/WorkflowFormBuilder.tsx
Build the responsive Form/YAML editor shell, stable step selection, insertion and removal behavior, and lossless canonical-YAML synchronization.

desktop/src/features/workflows/ui/WorkflowStepCard.tsx
Align workflow step controls and presentation with the final editor interaction model.

desktop/src/features/workflows/ui/WorkflowUnavailableDialog.tsx
Show a non-disclosing loading or unavailable state for missing and inaccessible workflow links, with retry and close actions.

desktop/src/features/workflows/ui/WorkflowWebhookSecretDialog.tsx
Obscure one-time webhook secrets by default and require explicit confirmation before any close or navigation discards them.

desktop/src/features/workflows/ui/WorkflowsScreen.tsx
Connect library state and workflow actions to the route-addressable editor.

desktop/src/features/workflows/ui/WorkflowsView.tsx
Restore the responsive workflow library, create tile, cards, loading states, and shared action menu.

desktop/src/features/workflows/ui/workflowEditorPane.test.mjs
Cover pane parsing, serialization, and stable step-ID reconciliation.

desktop/src/features/workflows/ui/workflowEditorPane.ts
Define explicit trigger and stable step pane URL state.

desktop/src/features/workflows/ui/workflowFormTypes.test.mjs
Cover lossless Form/YAML round trips and actionable fallback for unsupported fields.

desktop/src/features/workflows/ui/workflowFormTypes.ts
Own canonical workflow YAML conversion while preserving supported trigger and step fields.

desktop/src/shared/ui/PortalledScrollArea.tsx
Provide bounded scrolling for popovers rendered outside their dialog container.

desktop/src/shared/ui/popover.tsx
Allow workflow popovers to use the shared portalled scroll container.

desktop/tests/e2e/channels.spec.ts
Cover Workflows placement beneath Canvas, channel workflow listing and opening, and channel-preselected workflow creation.

desktop/tests/e2e/workflows.spec.ts
Exercise library actions, deep links, create/edit/duplicate lifecycle, dirty exits, responsive editor behavior, YAML safety, stale updates, and one-shot channel selection.

Reproduction steps

  1. Open Workflows and confirm the responsive card library, create tile, card action menu, and card-to-detail/run-history modal navigation.

  2. Open ?view=create; confirm the channel chooser opens once, the trigger inspector stays hidden until a channel is selected, and closing the chooser does not make it reopen after unrelated edits.

  3. Create a workflow, switch between Form and YAML, add and remove steps, refresh a pane deep link, and confirm the selected trigger or stable step remains addressable.

  4. Edit or duplicate a workflow, make an unsaved change, and confirm close, Escape, browser navigation, and route target changes require discard confirmation while pane-only navigation does not.

  5. Enter unsupported YAML and confirm Form mode gives an actionable fallback without rewriting the definition; verify reaction triggers preserve and execute their filter.

  6. Open a channel’s settings, select Workflows below Canvas, open an existing workflow, then use New workflow and confirm that channel is preselected.

Screenshots

Workflow library and actions

Workflow library with action menu

Workflow editor — wide

Wide workflow editor

Workflow editor — narrow inspector overlay

Narrow workflow editor with inspector overlay

Verification

Verified at exact pushed head 820cc1a09a828f95908076fefc72c7722184e94b:

  • Push hooks passed: destination-org policy, branch skew, differential file-size gate, Desktop check, Desktop TypeScript typecheck, and Desktop tests
  • Formatting/lint passed for all eight files in the channel-settings ingress commit
  • Working tree clean; local and remote branch heads match

Additional workflow E2E evidence from the immediately preceding equivalent implementation tree, before extracting the list UI into its own module to satisfy the file-size gate:

  • Full relevant workflow E2E suite: 28/28 passed
  • Focused channel workflow E2E passed, covering ingress placement, list/open behavior, and channel-preselected creation
  • TypeScript/Vite E2E build passed with only existing chunk-size and dynamic-import warnings

Related issue

None found. Closest prior work: #231.

Co-authored-by: Taylor Ho <taylorkmho@gmail.com>
Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
Co-authored-by: Taylor Ho <taylorkmho@gmail.com>
Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
Co-authored-by: Taylor Ho <taylorkmho@gmail.com>
Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
Co-authored-by: Taylor Ho <taylorkmho@gmail.com>
Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
Co-authored-by: Taylor Ho <taylorkmho@gmail.com>
Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
Co-authored-by: Taylor Ho <taylorkmho@gmail.com>
Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
@tellaho
tellaho force-pushed the tho/workflow-editor-foundation branch from 7183d58 to 76a8c2a Compare August 18, 2026 18:40
Co-authored-by: Taylor Ho <taylorkmho@gmail.com>
Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
Co-authored-by: Taylor Ho <taylorkmho@gmail.com>
Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
Co-authored-by: Taylor Ho <taylorkmho@gmail.com>
Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
Co-authored-by: Taylor Ho <taylorkmho@gmail.com>
Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
@tellaho tellaho changed the title feat(workflows): add URL-addressable workflow editor feat(workflows): add workflow editor Aug 18, 2026
Co-authored-by: Taylor Ho <taylorkmho@gmail.com>
Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
@tellaho
tellaho marked this pull request as ready for review August 18, 2026 21:58
@tellaho
tellaho requested a review from a team as a code owner August 18, 2026 21:58
Co-authored-by: Taylor Ho <taylorkmho@gmail.com>
Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
Co-authored-by: Taylor Ho <taylorkmho@gmail.com>
Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
Co-authored-by: Taylor Ho <taylorkmho@gmail.com>
Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
Co-authored-by: Taylor Ho <taylorkmho@gmail.com>
Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
Co-authored-by: Taylor Ho <taylorkmho@gmail.com>
Signed-off-by: Taylor Ho <taylorkmho@gmail.com>

@jedwards27 jedwards27 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

:bot: Jude’s code review agent

Requesting changes at exact head b59375b5d71da234b26727baa9223456cf6351e3.

[P1] The editor teaches a trigger condition that cannot execute

desktop/src/features/workflows/ui/WorkflowFormBuilder.tsx:58-72 suggests contains(text, "deploy"), but the executor registers str_contains(...) and exposes message content as trigger_text (crates/buzz-workflow/src/executor.rs:203-223,232-242,289-300). The working syntax is already used in WorkflowStepCard.tsx:378 and desktop/tests/e2e/workflows.spec.ts:260: str_contains(trigger_text, "deploy").

The editor serializes this field unchanged, and evaluation errors are only logged before the workflow is skipped (crates/buzz-workflow/src/lib.rs:904-927). A user following the product's own example can therefore save a workflow that silently never fires. Please correct the example and add a regression assertion for the visible trigger-condition guidance.

[P1] The PR's changed Desktop smoke test is deterministically failing

desktop/tests/e2e/navigation.spec.ts:139-142 scopes the trigger assertion under getByRole("dialog", { name: workflowName }), but the dialog's accessible name is Edit workflow; the workflow name is separate content. The trigger node is rendered, yet the locator cannot reach it. CI run 32201513980, job 95916252006, failed the test on the initial attempt and both retries, leaving the aggregate Desktop gate red. Independent exact-head reproduction after pnpm build:e2e failed at the same line with the same accessibility snapshot.

Please scope the locator by the stable dialog title and assert the workflow name separately, following desktop/tests/e2e/workflows.spec.ts:812-815, then rerun the required smoke gate.

Validation at this exact head and clean worktree:

  • cargo test -p buzz-workflow — 156 passed, 2 ignored
  • just desktop-test — 5045 passed
  • just desktop-typecheck — passed
  • targeted changed smoke test — failed reproducibly as described above

The reaction-trigger schema/runtime expansion was traced through crates/buzz-workflow/src/schema.rs:45-52 and crates/buzz-workflow/src/lib.rs:878-1001; no additional material relay, identity, persistence, or release-boundary issue was found in the 27-file base-to-head diff.

Co-authored-by: Codex <noreply@openai.com>
Co-authored-by: Taylor Ho <taylorkmho@gmail.com>
Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
@tellaho
tellaho force-pushed the tho/workflow-editor-foundation branch from dd89361 to 967283c Compare August 19, 2026 05:17
Co-authored-by: Taylor Ho <taylorkmho@gmail.com>
Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
Co-authored-by: Taylor Ho <taylorkmho@gmail.com>
Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
Co-authored-by: Taylor Ho <taylorkmho@gmail.com>
Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
Co-authored-by: Taylor Ho <taylorkmho@gmail.com>
Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
@tellaho
tellaho marked this pull request as draft August 19, 2026 08:28
Co-authored-by: Taylor Ho <taylorkmho@gmail.com>
Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
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.

2 participants