Repository navigation
fix(platform): name a failed harness turns read, not a quiet period - #4379
Conversation
Once its retries gave up, Harness turns showed a failed metrics read as a period with no sandbox traffic: zero and em-dash SLO cards and "No harness turns have run in the selected period", with no alert and no way to retry short of leaving the page. The page now reads the query through readStateOf and shows the shared load error with Try again in the notices slot instead of any figures. The heading and the period filter stay, and Try again re-reads the same organization and period; it stays named, busy and focused while the retry runs and fails again, and a retry that works hands its focus to the metrics region. A failed refresh keeps the figures already shown under a note that they may be out of date. The empty-period line is an answer, so it is masked like the cards while the first read runs, instead of claiming no turns before any arrived. A successful period with no turns keeps its zero figures and that line. EN/DE/FR alert copy, the operations metrics guide and the automation register follow. The read-failure suite runs the real read lane against a synthetic backend; 11 of its 12 cases fail against the previous page. Closes #3868
|
ACCEPT — independent exact-head review of No blocking findings. A failed first read renders an accessible destructive alert with localized Try again and retains the heading/period selector, without presenting zero/em-dash SLO cards or a quiet-period line. The failure and focused Retry button persist through an in-flight retry and repeated failure; recovery hands focus to the labelled metrics region. Failed refreshes preserve cached figures and rows with a stale-data warning. A successful empty period retains its previous figures and empty-period text; initial loading masks that text. EN/DE/FR errors, shared Retry labels and equivalent docs are covered. No shared metrics/catalog/read-state component was changed, so other dashboards retain their implementation. The automation.md paragraph is directly after “Pending retention reads distinguish…” and composes without a collision. Current main was Verification using existing dependencies:
Limits: accessibility checked with jsdom/axe and focus assertions; real-browser layout and actual screen-reader announcements remain manual, as the automation note states. Task-comment fallback for TALE-296 and TALE-359 ( |
|
TALE-896 delegated merge report for TALE-296; fallback report for TALE-359 and TALE-360 because workspace_status returned not_granted. Merged accepted exact head f36d133 as squash 9e8628a; issue #3868 verified CLOSED. OPEN/CLEAN and exact head rechecked before merge. All 78 checks terminal: 53 success, 24 skipped, 1 neutral; seven CI ready contexts SUCCESS. CI logs prove platform Unit/UI shards uncached (0 cached/1 total). Merge-tree clean against main 966fd6a, revalidated unchanged immediately before merge. All 30 EN/DE/FR catalogs parsed without duplicate keys. Composed-tree External Turns suites passed 14/14 across two files using /opt/node/bin/node, one worker and the permitted review-only server.fs.allow config. No approvals, status changes or reruns. |
What changed
Settings > Metrics > Harness turns showed a failed metrics read as a quiet period. Once the read's retries gave up,
ExternalTurnMetricsPagestill read onlydataandisLoadingand rendered0/—SLO cards and "No harness turns have run in the selected period." It showed no alert and no way to retry short of leaving the page.The page now follows the pattern of the merged siblings, #4345 (Automation metrics) and #4272 (Usage):
readStateOf(query)drives the sharedCatalogLoadError(role="alert", Try again) in theMetricsLayoutnotices slot, and no cards or By harness table render. The heading and the period Filter stay, and Try again re-reads the same organization and period.aria-busy/aria-disabled) and focused while the retry runs and fails again, with no skeleton flash.failureKeyre-announces each failure. When a retry works,onFocusLosthands focus to the page's region.SkeletonBox, so it is masked (aria-hidden, pulse) while no answer exists. Onmainit showed in plain text during the initial load, which also claimed "no turns" before any answer. Once a successful response arrives, the line renders normally.analytics.externalTurns.errors.loadFailedandrefreshFailed. The operations metrics guide (EN/DE/FR) gets one paragraph under "Watch harness turns".tests/manual/reference/automation.mdgets its register paragraph directly after "Pending retention reads distinguish…".Shared components: none changed.
MetricsLayout,CatalogLoadError,SkeletonBox/SkeletonizeandreadStateOfare reused as they are, so the Usage, Automations, Feedback, Chat health and Projects dashboards are untouched. Onlyexternal-turns-metrics-page.tsxchanges.How I verified it
All runs used Node 24 (
/opt/node/bin/node node_modules/vitest/vitest.mjs) with--maxWorkers 1.external-turns-metrics-page.read-failure.test.tsx. It runs the real read lane (useBackendQuery, the adapter,backendFetch, the four-attempt retry policy) againstsyntheticBackend(), with no mocked hook. 12 cases cover:0/—, no empty-period line, heading and Filter kept;periodDays7, 30 and 90 without callingonChangePeriod;external-turns-metrics-page.test.tsx. Againstmain's page with this branch's catalogs, 11 of the 12 new cases fail. Only the successful-empty control passes, as it should.isError(focus test);onFocusLost(2 recovery tests);SkeletonBox(loading test);Skeletonize loading={isLoading}during a retry (busy test);isRetrying={false}(busy test).oxlint --type-aware --type-checkon the three External Turns files: clean. A planted probe file was reported (TS2322 and no-unused-vars), so the run does check.oxfmt --check: clean.lib/i18n/messages.test.ts: 24/24.tests/guards/error-message-description.guard.test.ts: 24/24.docs,locale-outline,locale-translation,locale-components,structure-prose,linksandnear-misstests: 74/74.bun run lint:manual: ok.git merge-treeof this head against every open PR touchingautomation.md, the platform catalogs or these docs. It adds no conflict that the PR does not already have withmain.Not run here: the full platform UI suite, a real-browser pass (layout, screen-reader speech, the visual-aspect gate) and the e2e suite. The dispatch excluded the heavy local app stack, and CI runs the suites. The new guide paragraph rests on the component tests, which exercise the real read lane in jsdom, not on a driven browser session.
Closes #3868