feat(automation): screen-flow runtime — interactive screen nodes (suspend→render→resume)#1452
Merged
Merged
Conversation
…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>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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 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.
What
Completes the screen-flow arm of the automation engine. A
screennode with input fields now suspends the run on entry (reusing the ADR-0019 durable pause), surfaces aScreenSpecfor the client to render, and resumes with the collected values applied as bare flow variables (so downstream nodes read{new_assignee}etc.). Previouslyscreennodes were no-op pass-throughs — the showcase Reassign Wizard's input was never collected and itsapplystep failed.AutomationResult.screen,ResumeSignal.variables(bare vars),IAutomationService.getSuspendedScreen.ScreenSpecand suspends when fields are present (waitForInput:falseforces pass-through); suspend/resume threads the screen throughFlowSuspendSignal → SuspendedRun → paused result;resume()setssignal.variablesas bare vars;getSuspendedScreengetter. +2 unit tests.POST /api/v1/automation/:name/runs/:runId/resume(body{ inputs }) +GET …/runs/:runId/screen, wired in both the dispatcher route table (dispatcher-plugin) andhandleAutomation.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
FlowRunnerthat renders these screens (and wires the launch action to open it) ships as a separate objectui PR.