Skip to content

UI async workflow runs + output streaming - #1062

Merged
erasta merged 7 commits into
masterfrom
ui-async-out
Aug 26, 2026
Merged

UI async workflow runs + output streaming#1062
erasta merged 7 commits into
masterfrom
ui-async-out

Conversation

@erasta

@erasta erasta commented Aug 26, 2026

Copy link
Copy Markdown
Collaborator

No description provided.

erasta added 7 commits August 19, 2026 18:38
  POST /start_workflow starts the run and returns a token; the run button
  polls GET /workflow_status/{token} every 500ms until done, then shows the
  output. run() is unchanged; start()/poll() wrap it with a single job slot
  (busy while a run is in progress, not_found for unknown tokens). Poll time
  is logged server-side.
  Move the run token out of RunWorkflowButton into a shared
  useWorkflowRunStore keyed by workflow name, so every button for a
  workflow reflects the same run: all disable and show a spinner while it
  runs, and completion/errors reach each one.

  Polling moves to a WorkflowRunPoller mounted once in App, which owns the
  useEffect loop and the run snackbars, so a run survives a button
  unmounting. The button now only starts the run and reads the store.
  Server: PipeTee.snapshot() reads the buffer without waiting for the end;
  poll() returns partial output while running, final text when done. Flatten
  the runner's single-run state (token/status/output/error/tee) instead of a
  _job dict, with a str-based RunStatus enum.

  Client: store setRunOutput; poller writes output on every running poll;
  the output dialog shows the growing log with a "Running…" hint.

  Tests: partial output mid-run (server), poller updates while running,
  dialog partial/final/error states.
@erasta erasta changed the title UI async output UI async workflow runs + output streaming Aug 26, 2026
@erasta
erasta merged commit 9f72d0e into master Aug 26, 2026
@erasta
erasta deleted the ui-async-out branch August 26, 2026 15:08
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