Skip to content

feat(platform): try the draft and show test runs on the canvas - #4815

Merged
yannickmonney merged 3 commits into
mainfrom
feat/automation-try-draft
Oct 11, 2026
Merged

yannickmonney merged 3 commits into
mainfrom
feat/automation-try-draft

Conversation

@yannickmonney

Copy link
Copy Markdown
Contributor

What

Try the draft before you save it, and lay a test's run over the canvas (P5 S10c1). Builds on the tests panel of #4811–#4813.

Try the draft

  • With unsaved changes, Test run first asks What runs: This draft (not saved) (the default) or Version n.
    • The dialog checks the input against the input schema of the one chosen. The draft may declare another.
    • A try runs once through /try with the draft as it is, in mock mode. It is kept nowhere and not listed under Runs.
    • A version runs as before, and its run takes a try off the canvas.
  • The try's run lies over the canvas in place of the last run, under an Unsaved test strip:
    • how it ended and when (Succeeded in 12 ms, Failed at Score, a time limit, a refusal);
    • The draft changed since this try. once the draft moves on;
    • Try again, with the same input and the draft as it is now (also ⌘⇧Enter / Ctrl+Shift+Enter in the canvas or inspector);
    • Hide result.
  • The strip's status is a polite live region ("Unsaved test: Failed at Score").
  • The try plays back step by step like a recorded run: the canvas now plays a record from a run that was never stored too.
  • A node's run tab reads Unsaved test (or In this test for a test's run). Start and End show the try's input and output.
  • Switching to another version takes the try off the canvas.

A test's run on the canvas

  • Show on the canvas, in a test's row menu and on its Result tab, lays the test's latest run over the canvas the same way.
    • The strip reads Test: {name} with the test's verdict (Passed in 4 ms, or its first failure), and Run to run it again. The canvas follows the new run.
    • It is offered only when the result keeps the run's steps.
  • A test's run detail keeps only its record, so its trace is read back from the record (transientTrace). A test checks this against the engine's own trace.
  • Steps a test stands in for carry their chip, Simulated output or Simulated failure:
    • on the static overlay (from the trace's bench mark);
    • in playback, through a new substitute on a node's own span in @tale/ui's flow playback.
  • The run page shows the same chips for a recorded test run.

Docs and manual

  • The editor page (EN/DE/FR) gains "Try the draft", with a new screenshot from the pipeline (automation-try-draft). The testing page gains "Show a test's run on the canvas". The ui-docs playback guide says a replayed run carries the chip.
  • Manual: AUTO-F174, AUTO-F175, AUTO-A27, and a reference row for the automated coverage.

Verification (local)

  • Platform tsc; oxlint on the changed files and the automations, routes and engine trees.

  • The whole server and PII projects: 87,724 of 87,724.

  • The whole platform UI suite: 7,542 of 7,542. Automations browser tests: 95 of 95.

  • @tale/ui unit (4,095) and browser (223, incl. the flow components), services/docs (709) and services/ui-docs (106) tests, i18n (637 with the capture manifest), lint:links, lint:manual, knip.

  • New tests:

    • a test's record read back as the engine's own trace, with bench marks and a failed step's message (transient-run.test.ts, engine-backed);
    • the projection keeping bench marks, the overlay's and the timeline's stand-in chips, and playback carrying the chip (derive-state.test.ts);
    • the banner, the dialog's What runs with each choice checked against its own schema, and the panel and inspector entry points;
    • two editor flows: trying the draft (with the changed draft, Try again, the ⌘⇧Enter shortcut and its guard while a try runs, Hide result) and a test's run from its row with the test's verdict;
    • in Chromium, a try's record playing with its chip, and another run laid in the same place opening on its own end (this one fails without its fix).
  • Live in Chromium on a local stack (Order discounts, desktop and 390 px), no console errors:

    • With a blank test added (a draft), Test run asked What runs with the draft chosen. A wholesale order ran.
    • The strip read Succeeded in 105 ms · 7:02 PM. Review ran on the canvas, the playback bar was there, and Review's tab read Unsaved test.
    • Another edit showed The draft changed since this try. Try again answered anew, and Hide result removed the strip.
    • Show on the canvas on the big order's test read Test: Big order gets 10% off · 2 fields the test checks are missing or different., with Review skipped.
    • At 390 px the strip wraps under its words and the page doesn't scroll sideways.
  • The live check found one bug, fixed here with a regression test: the playback clock kept the previous run's position when another run took its place ("806ms of 86ms"). It now opens each run on its own end.

  • Noted for later polish: at 390 px the playback bar's speed control is cut at the right edge, on the run page too.

A node's own span can say what stood in for its work; playback shows that chip on the node once the span starts, as the run overlay already did. The playback guide says so.
With unsaved changes, Test run asks what runs: the draft, tried once through /try and kept nowhere, or the saved version. The try lies over the canvas in place of the last run under an Unsaved test strip that says how it ended, notices a draft changed since, and offers Try again (also Mod-Shift-Enter) and Hide result; it plays back like a recorded run. A test's latest run can be laid over the canvas the same way from its row or its Result, with the test's verdict in the strip. Steps a test stands in for carry their chip, and a node's run tab says whose run it shows.
The editor page gains Try the draft, with a screenshot from the pipeline of a try on the order discounts; the testing page says how to lay a test's run over the canvas.
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