Say what is wrong with a rejected workflow definition #77

Merged
jared merged 1 commits from workflow-error-details into main 2026-11-23 14:06:48 -05:00
Owner

Closes #25. The error text in the form changes, so this needs your approval.

Workflow error, before and after

The fix

A definition with a bad goto or condition was rejected with only "Invalid workflow definition". The details were in a problems array that the UI never shows, because lt.api keeps only error.

The error now names the problems, for example Invalid workflow definition: step check: no step with id "notify". It lists up to five, then "and N more". problems is still returned for API clients.

The rest of #25 was already fixed by the UI rewrite

  • No native alert() or confirm() calls are left.
  • Errors from the server reach the user (e.message on every page).
  • A live-updates status indicator, plus a "reconnected" toast.
  • Modals trap focus and close on Escape.

Tests

  • Integration: the exact error message.
  • UI:
    • the server's reason shows in the Create form;
    • Escape closes the Run dialog.
  • Locally: integration 54/54, UI 40/40, unit 149/149, lint is clean.

🤖 Generated with Claude Code

Closes #25. **The error text in the form changes, so this needs your approval.** ![Workflow error, before and after](https://code.lotusguild.org/LotusGuild/pulse/raw/branch/pr-assets/pr-77/workflow-error.png) ## The fix A definition with a bad `goto` or condition was rejected with only "Invalid workflow definition". The details were in a `problems` array that the UI never shows, because `lt.api` keeps only `error`. The error now names the problems, for example `Invalid workflow definition: step check: no step with id "notify"`. It lists up to five, then "and N more". `problems` is still returned for API clients. ## The rest of #25 was already fixed by the UI rewrite - No native `alert()` or `confirm()` calls are left. - Errors from the server reach the user (`e.message` on every page). - A live-updates status indicator, plus a "reconnected" toast. - Modals trap focus and close on Escape. ## Tests - Integration: the exact error message. - UI: - the server's reason shows in the Create form; - Escape closes the Run dialog. - Locally: integration 54/54, UI 40/40, unit 149/149, lint is clean. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
jared added 1 commit 2026-11-23 14:00:37 -05:00
Say what is wrong with a rejected workflow definition (#25)
CI / Lint (eslint) (pull_request) Successful in 20s
CI / Test (jest) (pull_request) Successful in 22s
CI / Security (npm audit) (pull_request) Successful in 13s
CI / Scan (secrets, workflows, shell) (pull_request) Successful in 2m32s
CI / Integration (api) (pull_request) Successful in 3m24s
CI / UI screenshots (before/after) (pull_request) Successful in 6s
CI / UI (playwright) (pull_request) Successful in 1m53s
CI / Deploy (pull_request) Skipped
CI / Deploy worker (pull_request) Skipped
CI / Notify (pull_request) Skipped
e5d640dc1a
The server answered a bad goto or condition with "Invalid workflow
definition" and put the details in a problems array, which the UI never
shows (lt.api keeps only `error`). The error now names them, e.g.
"Invalid workflow definition: step check: no step with id "notify"" (up
to five, then "and N more"); problems stays for API clients.

The rest of #25 was already fixed by the UI rewrite; regression tests
now cover the server's reason in the form and Escape closing the Run
dialog.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jared merged commit 424309e3c3 into main 2026-11-23 14:06:48 -05:00
jared deleted branch workflow-error-details 2026-11-23 14:06:51 -05:00
Sign in to join this conversation.