Skip to content

feat(automation): screen-flow runtime — interactive screen nodes (suspend→render→resume) - #1452

Merged
xuyushun441-sys merged 2 commits into
mainfrom
feat/screen-flow-runtime
Jun 1, 2026
Merged

xuyushun441-sys merged 2 commits into
mainfrom
feat/screen-flow-runtime

Conversation

@xuyushun441-sys

Copy link
Copy Markdown
Collaborator

What

Completes the screen-flow arm of the automation engine. A screen node with input fields now suspends the run on entry (reusing the ADR-0019 durable pause), surfaces a ScreenSpec for the client to render, and resumes with the collected values applied as bare flow variables (so downstream nodes read {new_assignee} etc.). Previously screen nodes were no-op pass-throughs — the showcase Reassign Wizard's input was never collected and its apply step failed.

  • spec: AutomationResult.screen, ResumeSignal.variables (bare vars), IAutomationService.getSuspendedScreen.
  • service-automation: screen executor builds the ScreenSpec and suspends when fields are present (waitForInput:false forces pass-through); suspend/resume threads the screen through FlowSuspendSignal → SuspendedRun → paused result; resume() sets signal.variables as bare vars; getSuspendedScreen getter. +2 unit tests.
  • runtime: POST /api/v1/automation/:name/runs/:runId/resume (body { inputs }) + GET …/runs/:runId/screen, wired in both the dispatcher route table (dispatcher-plugin) and handleAutomation.
  • docs/design/screen-flow-runtime.md — the protocol.

Verification (headless, end-to-end)

Showcase Reassign Wizard against the running backend:
launch → { status:'paused', runId, screen:{nodeId:'collect', fields:[new_assignee]} } → resume { inputs:{ new_assignee:'casey@example.com' } } → completed → task reassigned (sam→casey).

Tests: service-automation 107 ✓, runtime 329 ✓, spec 6609 ✓.

Follow-up

The objectui FlowRunner that renders these screens (and wires the launch action to open it) ships as a separate objectui PR.

…pend→render→resume)

A `screen` node with input fields now suspends the run on entry (reusing the
ADR-0019 durable pause), surfaces a ScreenSpec for the client to render, and
resumes with the collected values applied as bare flow variables so downstream
nodes read them via `{var}`. Completes the screen-flow arm of the engine that
previously left `screen` nodes as no-op pass-throughs (the showcase Reassign
Wizard's input was never collected → `apply` failed).

- spec: AutomationResult.screen, ResumeSignal.variables (bare vars),
  IAutomationService.getSuspendedScreen.
- service-automation: screen executor builds the ScreenSpec + suspends when
  fields present (waitForInput:false forces pass-through); suspend/resume
  threads screen through FlowSuspendSignal → SuspendedRun → paused result;
  resume() applies signal.variables as bare vars; getSuspendedScreen getter.
  +2 unit tests.
- runtime: POST /automation/:name/runs/:runId/resume + GET .../screen, wired in
  both the dispatcher route table and handleAutomation.
- docs/design/screen-flow-runtime.md.

Verified headless end-to-end: showcase Reassign Wizard launch → pause at screen
→ resume with new_assignee → task reassigned. objectui FlowRunner ships next.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@vercel

vercel Bot commented Jun 1, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
spec Ready Ready Preview, Comment Jun 1, 2026 6:50am

Request Review

Move the Reassign wizard action to `list_item` (+ keep `list_toolbar`) and
relabel to "Reassign…" so the row's recordId flows into the screen flow — the
wizard collects `new_assignee` and writes it back to that task. Exercises the
screen-flow runtime end-to-end in the showcase.

This branch was successfully deployed

1 active deployment
Preview — b0b7f4cf Deployed Jun 1, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size/m tests tooling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants