8000 feat(workflows): draw an automation's workflow on the canvas, with action and decide nodes by adeelahmad · Pull Request #576 · adeelahmad/lense · GitHub
[go: up one dir, main page]

Skip to content

feat(workflows): draw an automation's workflow on the canvas, with action and decide nodes - #576

Merged
adeelahmad merged 2 commits into
mainfrom
claude/project-thread-li6m25
Oct 18, 2026
Merged

adeelahmad merged 2 commits into
mainfrom
claude/project-thread-li6m25

Conversation

@adeelahmad
8000 Copy link
Copy Markdown
Owner

Requested by Adeel · project thread

Description

Before: the workflow canvas drew pipeline and recording workflows only. An automation's workflow (scope event, with action and decide nodes) could be saved and tried over the API, but not drawn or edited in the web app.

After: the canvas opens event workflows. The palette has an Actions section with every action from GET /api/v1/automations/actions; an action node's settings are drawn from that action's params with SchemaForm (#566), with the {{ variable picker, Wait first and a badge saying whether it runs on its own or asks you first. A Decide node takes its options one a line and gets one port per option plus unsure. The canvas checks what the backend would reject before saving: an unknown action, a required param left empty, a bad delay, a decide node with too few options or a reserved name, a node that isn't for automations, and the leaf rule (nothing wired after an action that reaches outside Lens or waits). Try on a sample runs the graph on a kind's sample activity and lists what each action would do.

Motivation and Context

Workflow studio M11 (Studio UI), Build step 6: "Canvas: event scope with action and decide nodes". The builder's "This automation branches; edit it in the canvas" link (next PR) opens here.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change; ! in the title)

Checklist:

  • The title is a Conventional Commit.
  • My code follows the code style of this project (make hooks checks it on commit).
  • I added or updated tests (workflow-canvas.test.ts "automation workflows (scope event)", 6 tests; automation-nodes-ui.test.tsx, 3 tests).
  • My change requires documentation updates: docs/automations.md (On the canvas), docs/processing.md, README, docs/requirements.md.
  • CHANGELOG: n/a, the title says it.

Local CI (ci/local-ci.sh HEAD --jobs frontend,pre-commit): Next.js pass, pre-commit pass. Rebased on main: kept #562's Entity filter node beside the new ones.

Also fixes main's red requirements hook: #400 shipped in v0.15.0 but the README still listed it as in progress, so it moves to the assistant's built paragraph with its checks in docs/requirements.md (separate commit).

Done questions (AGENTS.md)

  • Goal: one part of M11; merged on green.
  • Agents: agents already draw, save and try these graphs through the workflows and automations APIs and MCP tools; this adds the person's view.
  • Zero setup: nothing to install or set.
  • Fewest clicks: a new event workflow starts as What happened → Send a message to you; dropping an action from the palette sets it up.
  • Configurable: n/a, no new settings.
  • Light: frontend only, no new dependency.
  • Private and secure: n/a, no new surface; the same checks as the API, and an action that reaches outside Lens still asks first.
  • Cost: a try is a dry run; the decide node's model calls are logged by the backend as before.
  • User decides: the badge says what asks first; nothing changes defaults.
  • Upgrades: n/a, no stored data changes.
  • Honest: docs and README call the canvas built and the builder still planned.
  • Tests added, docs updated; no generated files change.
  • Open: JSON Schema for action params; no new dependencies.
  • Reported in the project thread.
  • Reuse: the existing canvas, SchemaForm, the actions catalog and tryWorkflow.

Generated by Claude Code

…tion and decide nodes

Event workflows open on the workflow canvas: What happened starts them, the
palette lists every action in the catalog, an action node's settings are
drawn from its params by SchemaForm with a badge for whether it asks first,
Decide gets a port per option and unsure, the canvas checks the leaf rule
and settings as the backend does, and Try on a sample runs the graph on a
kind's sample and says what each action would do.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AjJqXgjj1cNdKGRQbX5frb
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AjJqXgjj1cNdKGRQbX5frb
@adeelahmad adeelahmad self-assigned this Oct 18, 2026
@adeelahmad
adeelahmad merged commit cf961f3 into main Oct 18, 2026
10 checks passed
@adeelahmad
adeelahmad deleted the claude/project-thread-li6m25 branch October 18, 2026 08:15
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

0