Repository navigation
Description
Problem
The new automation Versions and Tests views (#4795, #4797, #4801, #4808, #4811–#4819) handle most failed reads well: live version card, history tables, version picker. Four reads, though, turn a failure into a false result with no error and no Try again. Paths are under services/platform/app/features/automations/ at main aec031867.
| # | Read that fails | Code | What the user is told |
|---|---|---|---|
| 1 | The earlier version on the compare page (/versions/5 compares with v4 by default) |
components/versions/version-compare-page.tsx:171: before = … (beforeQuery.data ?? null), and beforeQuery.isError is never read. fromMissing (:252-255) only catches coded refusals (isMissingAutomationRead, lib/errors.ts:263-270), so a 5xx or network failure ends loading (:249-251) and the diff runs with before = null. diffAutomationDocuments treats null as a first version: every node, test and field "added" (lib/engine/core/diff/automation.ts:799-809). |
Every node, test and input of v5 is "Added", under a heading and picker that still say "v4 → v5". The YAML view's left side is empty. A reviewer comparing before a deploy or rollback gets a wrong diff (medium). |
| 2 | A version's stored test report (editor Tests panel) | hooks/use-automation-tests.ts:150: const report = reportQuery.data ?? null;. The hook never reads reportQuery.isError, error or refetch, and it is the only consumer of useAutomationTestReport. With a null report each test's outcome is none and its status is not-run (lib/automation-tests/test-results.ts:184, :200). |
Every test says "Not run yet", coverage reads "Covers 0 of N paths" and every path "Not tested", while the Versions tab shows "Tests failed" for the same version. After a refused deploy, the alert "One of its tests fails. Tests shows which." sits over a list with no failing test (medium). |
| 3 | The automation itself on the Versions tab | components/automation-versions-tab.tsx:81-82: latestVersion = automationQuery.data?.latestVersion ?? …version. When it is undefined, the restore dialog isn't mounted (:160-172), but version-history-table.tsx:336 still shows Restore as new version on every row (version !== latestVersion). |
Restore is offered on every row, the newest included, and clicking it does nothing. Per the sweep's notes, the compare page reads the same latestQuery (version-compare-page.tsx:202-203) and loses the Live badge. No error is shown, although the editor tab reports the same failure (low). |
| 4 | The member directory ("Saved by", "By", bylines) | hooks/use-actor-label.ts:60: if (members === undefined) return { kind: 'pending', api };. The comment says this covers "loading, or failed", and nothing ever resolves the failed case. |
The Versions "Saved by" and Deployments "By" columns, the live card byline and the compare page byline pulse forever, and screen readers hear an empty cell (low). |
Tests: none of the new component tests fails these reads. The QueryClient retries uncoded failures three times and refetches them on window focus (router.tsx:30-47), so a transient fault can heal on a refocus, but none of these views says that anything failed.
Expected
-
(1) Treat a failed before-read like the after-read (
:235-247): an error with Try again, and no diff. -
(2) Expose the report read state from
useAutomationTests. Show "Couldn't load the test results" with Try again instead ofnot-run. -
(3) Hide or disable Restore until the latest version is known, or show the read error as the editor does.
-
(4) Give
useActorLabela failed state with a plain fallback, and offer a retry. -
Regression: for each view, a component test where the read fails (500 after retries) and must show an error with Try again:
- the compare page must not render "Added" chips;
- the Tests panel must not say "Not run yet";
- Restore must not open a dead menu item;
- "Saved by" must not pulse.
On
aec031867all four fail.
Severity and owner
- Severity: medium, because of (1) and (2): both give a false account of what changed or what was tested, right where an author decides to deploy or roll back. (3) and (4) are low.
- Owner: platform (automations), the author of the versions and tests work.
- Related: the same class as bug(platform): a run step’s items list stays empty under its count when the items read fails, with no Try again #4745, bug(platform): an automation’s model picker says "No models found" when the model roster fails to load #4765 and bug(platform): "Runs without approval" says an automation makes no approval-gated write when its read fails #4766 (failed read shown as an empty or false result), and i18n(platform): automation refusals (65 server sentences) and cron errors reach German and French authors in English #4524 (server sentences shown verbatim; addendum there).
- Found by: Review A (TALE-358), 2026-10-12 04:15 Zurich occurrence, as a changed-cell sweep of the 42-merge batch. Static reading at
aec031867: rows 1, 2 and 4 and row 3's Versions tab path were verified at the cited lines; the compare-page part of row 3 is from the sweep's notes. Nothing was run, because Review A's stack is BLOCKED.
Activity
fix(platform): show failed version, test and member reads with Try again
fix(platform): show failed version, test and member reads with Try again