Skip to content

fix(platform): make testing and versions accessible and polished - #4847

Merged
yannickmonney merged 4 commits into
mainfrom
feat/automation-testing-polish
Oct 12, 2026
Merged

yannickmonney merged 4 commits into
mainfrom
feat/automation-testing-polish

Conversation

@yannickmonney

@yannickmonney yannickmonney commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

What

The last two slices of P5 (S14 design detail, S15 accessibility and performance) over everything the testing and versioning work added. Builds on #4843.

S14 — detail

  • The Runs tab gets a row menu, like the versions and deployments tables: Open run, and for an author Save as test…, which opens the editor on Tests with the dialog for that run (the project's shell when the table is the project's). The three tables share one RowMenu (it keeps the click out of the row and returns focus to its button), so what the version tables had is the same everywhere.
  • The playback bar wraps on a phone. Below sm the scrubber takes a row of its own under the buttons, the time and the speed, instead of shrinking to nothing between them. A browser test at 390 px holds every control inside the bar and the scrubber over 300 px wide.
  • EN/DE/FR: the row menu's strings, and the testing guide names it. Manual: AUTO-F180.

S15 — what the audit found

The audit ran on a local stack over 14 surfaces (Tests dock, test inspector and a failed result, run dialog, step-test dialog, Versions, Deployments, the comparison's Graph / Changes / YAML, the Runs tab and its menu, the run page's playback bar, the version picker), each in light and dark at 1440 px, 390 px, 320 px, 200 % zoom (720 × 450 at two device pixels), reduced motion and forced colours: axe (WCAG 2.2 AA + best practices), horizontal overflow, running animations, and contrast arithmetic for what axe could not decide. A control page with three planted faults is reported every time, so the harness is known to see. It found four real problems; each was reproduced by a test that fails without the change.

  • Tab out of a code field inside a modal landed on the dialog itself. In the step-test dialog Esc, Tab from the first field went to the dialog, then Close, then back to the field: the second field, Cancel and Test node could not be reached forwards. Root cause: the field's keyboard legend was removed from the document while the field blurred, and a modal's focus scope reads a removal while nothing is focused as a lost focus and puts focus on the dialog. The legend is always mounted now and shown by opacity. An editable field also carries tabindex="0", so a focus scope and axe both see it as a stop; a scrolling dialog body of fields no longer fails scrollable-region-focusable at 200 % zoom. Two browser tests (forwards, backwards) in a real ResponsiveDialog fail on the old code and pass now.
  • In a contrast theme (forced colours) the current choice was invisible. The open tab of an underlined strip and of the editor's dock, the page strip's line, the chosen option of a segmented control and of a pill strip, a pressed day chip and the slider's track and fill each drew as their neighbours, because the theme repaints tints and shows a transparent border. Each keeps a system colour now (Highlight with HighlightText, Canvas, CanvasText). forced-colors.browser.test.tsx emulates the theme in Chromium and its seven checks (one per primitive) all fail before the change.
  • Keyboard focus was invisible in a contrast theme. The design system draws focus as a ring (a box-shadow) and turns the browser's own outline off; a contrast theme drops box-shadows, so on a button, a tab and a test row nothing showed where the keyboard was (56 focus-visible:outline-none recipes in @tale/ui alone). One rule in the existing forced-colors block of globals.css gives whatever has :focus-visible a 2 px Highlight outline in that mode; nothing changes anywhere else. The browser test walks four Tab stops (button, tab, the tab's panel, a result row) and fails without the rule.
  • The wire schema of the tests pulled the value diff into the cold load. automation-tests.ts imported reportText from the engine's expect module. reportText lives with the text helpers it is made of (storable-text.ts), and check-entry-budget.ts now also forbids the editor's own screens, message topics, the engine, the value and text diffs, the test-result list, the docked panels and the flow components in the cold load (checked against the real build's source maps with a negative control). Cold load: 875 → 874 KB gzip over 7 modules; the code editor's lazy view 204 of 230 KB.

Manual: AUTO-A28 (a dialog of code fields by keyboard), AUTO-A29 (a contrast theme, focus outline included), AUTO-P4 (fifty tests); reference rows for the automated halves.

Budgets (§23), measured

Budget Measured
/try of a 10-node mock draft, p50 server time ≤ 300 ms run 12 ms p50 / 27 ms p95; request 51 ms p50 / 96 ms p95 (40 calls, straight to the backend)
a 20-test suite ≤ 3 s 114 ms p50 with each run's detail, 56 ms without (12 calls each)
p95 API latency under a 20-test suite loop a cheap read: 18 ms p95 alone; 150 ms p95 (17 ms p50, 214 ms max) while two streams ran 20-test suites flat out (142 suites in 15 s; the bench bucket reset every 400 ms, so the limiter did not shape it — in production it admits about six suites a minute)
Tests list of 50 rows renders < 16 ms React commit of 50 rows with a row menu each: 15 ms p50 in React's development build in Chromium on a loaded machine (95 ms p95); the production bundle opens the dock with 50 rows in 120 ms click to paint, and 30 ArrowDown presses leave no task over 50 ms
structural diff < 5 ms per pair 1.0 ms slowest of 186 corpus pairs, 0.09 ms median (the corpus test holds it)
CodeDiff over 5 000 changed lines: first 2 000 + "Show the remaining" held by the existing browser test
DataDiff lazy for values over 64 KB a 1.5 MB value mounts in 220 ms as 16 elements (collapsed); 360 KB in 53 ms
no new code in the entry chunk see above

The request numbers above are taken straight to the backend (localhost:3125), with Playwright's request client. Through the dev or preview server on localhost:3120 the same client measured about 308 ms a request, and that is the client, not the proxy: Playwright's happy-eyeballs connect waits a fixed 300 ms after its first attempt before it tries the next address, and the dev/preview server listens on IPv4 only, so the refused ::1 attempt costs the 300 ms on every localhost request (127.0.0.1:3120 answers in 1.6 ms; curl and Chromium show the proxy adding about 1 ms). It affects only a request client that resolves localhost that way, never a person in a browser. Fifty tests in the editor on the production bundle: Run all answers every row after 0.67–0.79 s.

Left as it is

  • The dark theme with forced colours reports 11 axe contrast violations; axe reads the authored dark colours against the forced canvas. The rendering is black on white (the darkest pixel of the muted labels is 0, and the crop is identical to the light one), so it is not a defect.
  • Unfixed because no testing or versioning surface uses them: the theme switcher, the Switch (its thumb's position carries the state), a selected table row (its checkbox does).
  • An arrow key in the Tests list re-renders all rows once. The first render is at the budget in a development build and well under it in production; memoizing the rows is a possible follow-up, not needed to hold the budget.

Verification (local)

  • The whole local gate on the tree rebased onto 363c476b51: platform tsc, oxlint (changed files, type-aware), the server and PII projects (88,101 tests), the UI suite (7,659), the automations browser tests (95), packages/ui (tsc, the unit project 4,100, the browser project 683), packages/shared (939), services/docs (713), services/ui-docs (tsc, 106 tests), the format check, lint:links, lint:manual, a production build with check-entry-budget, knip.
    • The machine's load average was 27–38 from other sessions. The first whole run of the packages/ui browser project failed one test, which read the completion list's box before CodeMirror had placed it (top 0); it passes alone and in two earlier whole runs, and the test waits for the placement now (own commit). A later whole run timed out three unrelated tests (a dialog picker, a flow-canvas hover, the editor's load-failure fallback); each passes alone, and the project passes whole with three workers: 77 files, 683 tests.
  • Live in Chromium on the capture stack (order-discounts, weekly-digest): the Runs row menu (Open run; Save as test… opens the editor with the dialog; a click in the menu keeps the list; Escape returns focus to the button) at 1440 and 390 px; the playback bar at 390 px with nothing cut off at either edge; the keyboard path through the Tests dock end to end (Tab to Tests, Enter, Tab into the list, ↑ ↓ Home End, Enter into the inspector, Escape back to the row, Escape to the Tests button); the step-test dialog's Tab order before and after the fix; the audit above before and after (zoom 200 %: 14 surfaces, no violations in either theme; forced colours: none in the light theme).

Correction (2026-10-12)

The audit above did not cover the desktop inspector. Its locator in my script matched the dashboard's own sidebar, so only the phone's sheet had been audited and "no violations on the test inspector" held for that sheet alone. Re-audited with the locator fixed, over the node, Start, End, test and failed-test inspectors, in English, German and French, in light, dark, forced colours and on a phone: one finding, a skipped heading level (the page's title straight to the inspector's title, on a wide screen), fixed in #4862. No contrast, name, label, overflow or clipped-text finding in any of them.

The Runs tab gets a row menu like the version and deployment tables:
Open run, and for an author Save as test, which opens the editor on
Tests with the dialog for that run. The menu is one shared RowMenu now,
so its focus return and click containment are the same everywhere.

The playback bar wraps on a phone: the scrubber takes its own row under
the buttons, the time and the speed, instead of shrinking to nothing
between them.

Docs (EN/DE/FR) name the new menu; the manual suite gains AUTO-F180.
An accessibility and performance pass over what the testing and
versioning work added, from an axe audit in both themes at desktop,
phone, 320 px and 200 % zoom, a keyboard walk, forced colours and
timings on a production build.

- Tab out of a code field inside a modal dialog landed on the dialog
  itself, so the next field and the dialog's buttons could not be
  reached forwards (the step-test dialog's Cancel and Test node among
  them). The keyboard legend was removed from the document while the
  field blurred, and the modal's focus scope reads a removal while
  nothing is focused as a lost focus. The legend now stays mounted and
  is shown by opacity. An editable field also carries tabindex 0, so a
  focus scope and axe both see it as a stop; a scrolling dialog body of
  fields no longer fails scrollable-region-focusable.
- In a contrast theme (forced colours) the open tab of an underlined
  strip and of the editor's dock, the page strip's line, the chosen
  option of a segmented control and of a pill strip, a pressed day chip
  and the slider's track and fill all drew as their neighbours. Each
  keeps a system colour for its state now.
- The wire schema of the tests read reportText from the engine's
  expect module, which pulled the value diff into the cold load.
  reportText lives with the text helpers it is made of, and
  check-entry-budget also forbids the editor's screens, topics, engine,
  diffs, test-result list, docked panels and flow components there.

Manual: AUTO-A28, AUTO-A29 and AUTO-P4.
A contrast theme (forced colours) drops box-shadows, and the design
system draws focus as a ring, a box-shadow, with the browser's own
outline turned off: on a button, a tab and a test row nothing was left
to show where the keyboard was. Whatever takes keyboard focus gets an
outline in the system's highlight colour in that mode only; nothing
changes anywhere else.

The browser test walks the Tab stops of a button, a tab, its panel and
a result row and fails without the rule. AUTO-A29 says it; AUTO-P4 no
longer claims a read latency that was not measured.
CodeMirror places the completion list a frame after it appears. The
phone-width sheet test read its box at once, so a busy machine saw it
unplaced (top 0) and failed a test that passes alone; it waits for the
placement now.
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