Skip to content

feat(platform): count a version's tests at save and deploy - #4823

Merged
yannickmonney merged 1 commit into
mainfrom
feat/automation-version-test-words
Oct 11, 2026
Merged

yannickmonney merged 1 commit into
mainfrom
feat/automation-version-test-words

Conversation

@yannickmonney

Copy link
Copy Markdown
Contributor

What

A version's tests in words, and what a save and a deploy say about them (P5 S10d). Builds on #4811–#4819.

  • A version row says how its tests went. In the version picker and in the Versions tab's Tests column: 2 of 3 tests passed, with the act that checked them and when, such as checked on save · Oct 11, 2026, 3:42 PM, checked on deploy or checked by hand.
    • A check kept without counts (older versions) shows the bare verdict, and claims no act.
    • The Tests panel's own line reads Checked for a check whose act was not recorded, instead of "by hand".
  • A save that runs tests says so. The app's save answer carries the counts (tests: {passed, failed, total}; the engine's save already ran them). While it runs, the dialog's button reads Saving and running tests…, and afterwards a polite status says Saved version 4 · 1 of 2 tests passed. Failing tests are no failed save: no error toast.
  • A deploy its tests refuse stays on the page. When the version on screen is refused with AUTOMATION_TESTS_FAILING and there is no unsaved draft:
    • the Tests panel opens (the deploy gate already kept its verdict and report on the version; the refusal refreshes the reads at once, and the write's hint says the same);
    • the alert This version was not deployed says how many tests fail (One of its tests fails. Tests shows which.), and goes when another version is on screen;
    • focus goes to the first test that did not pass, one that could not run included (the gate counts it). Below lg the list is in a sheet, so the focus waits a frame for it. A reader typing somewhere keeps their place, and a report that never comes disarms the move after 10 s.
    • With a draft on screen the existing dialog still says it.
  • The deploy hook asks the page about a refusal as the page is when the answer comes. It called the onRefused of the render that started the deploy, so an edit begun while the gate ran the tests (up to a minute) was mistaken for a clean screen: the Tests panel opened beside a draft and took focus from the field. It reads the page's callbacks through a ref now, as the undo already did.
  • On a phone the Tests list is a modal sheet, which hides the alert from a screen reader; the sheet carries the refusal in its own description (notice).
  • automationErrorFailedTests reads the count from the refusal's report.

Docs and manual

  • The editor page (EN/DE/FR): the Tests column, the save that runs tests, the deploy its tests refuse. The testing page: each version keeps its last check.
  • Manual: AUTO-F179, 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,746 of 87,746. The whole platform UI suite: 7,592 of 7,592. Automations browser tests: 95 of 95. services/docs tests: 709 of 709. lint:links, lint:manual, knip, the format check.

    • An earlier run of the server project had one red, lib/engine/core/record/travels.test.ts ("counts two million reads", 320 ms against a 250 ms bound): a timing bound that fails under the full parallel load, passed alone (31 of 31) and passed in the final run. This branch doesn't touch the engine.
  • New tests:

    • the row words in en, de and fr against the real catalogs, including a check kept without counts and one with zero tests (version-tests.test.ts);
    • the picker's icon name and the Versions table's Tests column (version-list.test.tsx, version-history-table.test.tsx);
    • the editor: a refused deploy opens Tests with focus on the first test that did not pass (once the check is listed, not before; a test that could not run counts; a typing reader keeps focus), counts the failures in the alert or says it without a count, drops the alert with its version, leaves a refusal to the dialog when a draft began meanwhile, says a save runs tests and then says how many passed with no toast;
    • the deploy hook asks the page as it is when the answer comes (fails against the old hook), and the deploy adapter refreshes the reads on a refusal for failing tests only;
    • the Tests sheet's description with and without a notice, and the editor on a phone;
    • the save route's answer carries the counts, and none for a document without tests;
    • automationErrorFailedTests reads the count and answers nothing for a refusal without one.
  • Live in Chromium on a local stack (a two-version automation: v1 passes and is live, v2 saved with one failing test), at 1440 and 390 px:

    • Deploy v2 was refused once: the alert read This version was not deployed / One of its tests fails. Tests shows which., the Tests panel opened and focus was on the failed test's row. Desktop opened no dialog; at 390 px the Tests sheet opened and focus was on the same row.
    • The version picker's tests icons read 1 of 2 tests passed · checked on deploy · October 11, 2026 11:32 PM (v2) and 2 of 2 tests passed · … (v1); the Versions table's Tests column showed the counts with the act and date beneath.
    • A save with the response held back showed the button Saving and running tests…, and afterwards the status read Saved version 3 · 1 of 2 tests passed with the failing test saved all the same.
    • The only console errors were the refused deploy's own 409 and mutation log.
  • The live check found one blemish, fixed here: the "checked on deploy · October 11, 2026 11:32 PM" line broke inside the date in the table's narrow column; it is now balanced, so it breaks after the act.

Review

An independent read of the commit found, and this PR fixes: the stale onRefused closure; the focus move missing a test that could not run, and staying armed when no failing row came; the alert outliving its version; a ?? 1 that invented a count; a stale quoted label in the FR testing guide; a version-list test that depended on the time zone; two sheets that could stack on a phone. The phone's modal Tests sheet now carries the refusal in its description, so a screen reader hears it.

A version row in the picker and on Versions now says how many of its
tests passed at its last check and which act made it, such as "2 of 3
tests passed · checked on deploy"; a check whose act was not recorded
claims none, in the Tests panel too.

A save that runs tests says so on its button ("Saving and running
tests…") and then politely says how many passed: the app's save answer
carries the counts, and failing tests are no failed save. A deploy its
tests refuse opens Tests and moves focus to the first test that did not
pass, with the alert saying how many fail and dropping when another
version is on screen; with a draft on screen the dialog still says it.

The deploy hook now asks the page about a refusal as the page is when
the answer arrives, not as it was at the click, so an edit begun while
the gate ran the tests is not mistaken for a clean screen. A refusal
for failing tests also refreshes the reads at once instead of waiting
for the stream.

Docs (EN/DE/FR) and the manual box AUTO-F179 follow.
@yannickmonney
yannickmonney merged commit 1819124 into main Oct 11, 2026
@yannickmonney
yannickmonney deleted the feat/automation-version-test-words branch October 11, 2026 22:05
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