Skip to content

feat(platform): compare two versions of an automation - #4797

Merged
yannickmonney merged 3 commits into
mainfrom
feat/automation-version-compare
Oct 11, 2026
Merged

yannickmonney merged 3 commits into
mainfrom
feat/automation-version-compare

Conversation

@yannickmonney

Copy link
Copy Markdown
Contributor

What

What changed between two versions of an automation, on a page of its own (…/versions/$version, org and project routes) — the product side of the diff components that landed in #4704.

  • Header: the version and its message, who saved it and how, a Restores vN badge, the Live badge; Open in editor, the version's deploy or rollback button (the Versions tab's one-click deploy, with its Undo and refusals), and in a menu Restore as new version and Download YAML.
  • Compare with (?from=): the version before by default; the version before, the live one and the one it was based on come first, then every other, newest first. Chips count the nodes added, removed, changed and renamed and name the other parts that changed.
  • Graph (?view=graph, the default on a wide screen): both versions on one chart through mergeFlowGraphs — added, removed, changed (with the fields that changed at the box's foot) and renamed (its old name) boxes, and the lines only one version draws. The switch shows either version's own chart with the changes brought forward. Selecting a box (?node=) opens its changes beside the chart; Start shows the inputs that changed, End the output.
  • Changes (the default on a phone): every change by where it is — Start: run inputs, Nodes, End: output, Tests, Package data. Code, prompts and conditions compare line by line in the editor's own language, JSON value by value; an added or removed node, input or test shows its whole definition as YAML. Show on the graph selects the change's box.
  • YAML: the two versions' source, unified or side by side.
  • States: identical versions (and "only the message is different"), the first version compared with nothing, a version that is not there.
  • From the Versions tab: a row opens its comparison; the row menu adds What changed and Compare with live; a Deployments row opens what that deploy changed against the version it replaced; the live card links Compare vN with vM.

Also

  • @tale/ui/change-list: an item can opt out of the row action (activatable: false) when what it changed has nowhere else to show — a test on a page whose graph shows only nodes. Guide and browser test updated.
  • One read for a stored version that skips while there is none (useAutomationAtVersion; useDeployedAutomation is its alias), one download hook shared by the Versions tab and the comparison, compareVersionLink/versionsTabLink helpers, and the change flags shared with the Versions table.

Verification (local)

  • Platform tsc, oxlint (changed files and the whole automations feature + dashboard routes), i18n guards, server tests of the touched areas, UI suites, the automations browser tests (incl. a new one drawing a comparison in Chromium: marks, summaries, the old name, picking a box, the side switch); @tale/ui tsc + unit + the change-list and flow-diff browser tests; docs and ui-docs tests; format check, lint:links, lint:manual, knip.
  • Unit tests: the comparison helpers on real engine diffs (flags, field words, canvas marks, rename references, the options order), the Changes sections and their graph targets, the page (header, deploy/rollback, views, the node panel, identical, first, missing, axe), the address parsing and links.
  • Live on a local stack: v3 against v2 (one node added, the output's line moved), v4 against v3 (a node removed; its panel), v7 against v6 (a rename with its old name, a code change, a required input added, a test's input changed — Start's panel lists the inputs), v5 (a restored copy) against v3 (no differences, only the message), v1, a missing v9, and the phone default (Changes).

An item can say that what it changed has nowhere else to be shown
(`activatable: false`), such as a test on a page whose graph shows only
nodes: its open row offers no action, and a row without details is plain
text rather than a control. The guide says when to set it.
Each version gets a page of its own (`…/versions/$version`, org and
project routes) that says what it changed against another version, the
one before it unless Compare with names another (`?from=`), offering the
version before, the live one and the one it was based on first:

- The header names the version, its message, who saved it and how, and
  offers Open in editor, its deploy or rollback button (the Versions
  tab's one-click deploy) and, in a menu, restore and the YAML download.
- Graph draws both versions on one chart, every box marked added,
  removed, changed (with the fields that changed) or renamed (with its
  old name), the lines only one version draws signed; either version's
  own chart is a switch away, and a picked box opens its changes beside
  the chart, Start's being the inputs and End's the output.
- Changes lists every change under Start, Nodes, End, Tests and Package
  data, code compared line by line in the editor's language and JSON
  value by value, each node, input and output one click from its box.
- YAML compares the two versions' source.

Identical versions, the first version and a version that is not there
each say so. On the Versions tab a row opens its comparison, the menus
add What changed and Compare with live, a deploy opens what it changed
against the version it replaced, and the live card links its comparison.
The workflow editor page in English, German and French gains "Compare two
versions" — the header and its actions, Compare with and the chips, the
Graph, Changes and YAML views and the box panel, the phone default,
identical versions and the first one — and says where a Versions row, a
Deployments row and the live card lead now.

AUTO-F148–F153 and AUTO-A22 cover the comparison by hand; the automation
reference names what unit and browser tests own.
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