Skip to content

feat(workflows): add Generate text node config panel and Run preview - #57

Closed
Silthus wants to merge 1 commit into
feat/workflows-llm-action-cdpfrom
feat/workflows-llm-action-frontend
Closed

Silthus wants to merge 1 commit into
feat/workflows-llm-action-cdpfrom
feat/workflows-llm-action-frontend

Conversation

@Silthus

@Silthus Silthus commented Aug 11, 2026 •

Copy link
Copy Markdown
Owner

Problem

The runtime from the layers below is unreachable: no builder surface offers the Generate text node, so an author cannot configure a prompt, declare output fields, or see what a run would produce.

Layer 3 of the Generate text stack. It ships the builder panel.

Changes

  • Adds an AI category to the workflow builder, gated on the new workflows-llm-action flag, with one node: Generate text.
  • The panel renders the prompt (existing templating input, untouched), output-field rows, and a model picker pinned to the backend's six ids.
  • Picking a variable for an output field derives an output_variable mapping with result_path: fields.<key>. Field edits regenerate only the rows they own; hand-added rows, including result_path: text for the raw generation, survive. One exported predicate decides ownership for both the regeneration and the "Set by this step" tag, so the tag and the delete rule cannot disagree.
  • Run preview replaces Pick from response on this template: it runs the real prompt against the real model (the tooltip says it spends AI credits), keeps output_variable in the dispatch, and renders generated text, extracted fields, and resulting variable values. Preview expiry after 25 seconds renders as a notice, not a node failure.
  • The node defaults to on_error: abort, carried through node creation, so a billed but failed generation never continues into a send with empty variables.
  • A second preview click while one is in flight is blocked; the button resets on success and error.

No screenshot: the panel needs a loaded workflow plus a seeded template-workflow-llm, which sync_hog_function_templates does not provide in this environment, and no Storybook story covers the workflow editor panel. The panel is not rendered anywhere until the flag is on; reviewing it live behind the flag is the verification this PR could not do itself.

How did you test this code?

  • Registry test: the category registers behind the flag with the right template id and on_error: abort.
  • Logic tests: derived-mapping regeneration preserving hand-added rows, the collision between the tag predicate and the delete predicate (the review's blocker), preview response splitting, mock_async_functions: false dispatch, stale-preview drop after switching nodes, the double-submit guard, and the deadline-versus-skip notice.
  • Model pin test: ids, order, and default match the backend list.
  • on_error carry-through is driven through the real drop path, not asserted on the registry entry.
  • Not run: visual verification, as above.

Automatic notifications

  • Publish to changelog?

Docs update

Docs, skills, and MCP updates ship in the next layer of this stack.

🤖 Agent context

Autonomy: Human-driven (agent-assisted)

Same orchestration: Opus 5 TDD implementation, three Fable 5 review lenses (12 findings, one blocker: a listener that wrote output_fields to the workflow and immediately reverted it through a second persist path), Opus fix pass, Fable confirmation. Skills invoked: /tdd, /implement, /writing-tests, /writing-user-facing-copy, /adopting-generated-api-types (review lens), /writing-pr-descriptions, /stacking-prs. Session decisions: all business logic lives in a kea logic per repo rule; preview-expiry detection matches the runtime's exact strings rather than a structural guess after a reviewer showed the structural rule mislabeled filter-skipped previews.

Adds an AI category to the workflow builder, gated on the
workflows-llm-action flag, with a Generate text node whose panel
renders the prompt, output-field rows that derive output_variable
mappings (result_path fields.<key>), and a six-model picker pinned
to the backend list.

Output-field rows regenerate their own mappings on every change while
hand-added rows survive; owned rows show as 'Set by this step' in the
Output variables accordion. The node defaults to on_error abort so a
billed but failed generation never continues into a send with empty
variables.

Run preview replaces Pick from response on this template: it runs the
real prompt against the real model, keeps output_variable in the
dispatch, and renders the generated text, extracted fields, and
resulting variable values, with a preview-level notice when the
25-second deadline passes.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011XmQejLq5BhgHigZJUK97C
@Silthus
Silthus force-pushed the feat/workflows-llm-action-frontend branch from 5da4f63 to 3a6dbd9 Compare August 13, 2026 05:52
@Silthus Silthus closed this Oct 27, 2026
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.

1 participant