Skip to content

fix(platform): report automation history read failures - #4258

Merged
yannickmonney merged 4 commits into
mainfrom
fix/automation-history-read-errors
Oct 10, 2026
Merged

yannickmonney merged 4 commits into
mainfrom
fix/automation-history-read-errors

Conversation

@yannickmonney

@yannickmonney yannickmonney commented Oct 4, 2026 •

Copy link
Copy Markdown
Contributor

What changed

  • Treat a settled Runs read failure as an error, not an empty successful log;
    reuse ErrorDisplayCompact and retry only the failed query with refetch.
  • Current main replaced the old Versions tab with AutomationVersionPicker,
    which already handles failed reads. Lock that working behavior and add
    alert announcement and retry-focus handoff to both history surfaces.
  • Preserve the exact successful empty-history sentences and reuse the shared
    EN/DE/FR error controls without introducing message keys.
  • Add AUTO-B12 for live recovery, visible keyboard focus and narrow-layout
    wrapping; document the automated/manual split in the coverage reference.

Verification

  • Reproduced on origin/main d29a3c8fe: the Runs failure regression observes
    the successful empty sentence instead of an error/retry. Both successful
    empty-history controls and the Versions error/retry control pass there.
  • Focused jsdom: history, importing detail shell and editor — 75 tests pass
    across three files, using one worker. Includes failed initial and cached-empty
    reads, retry via Enter, successful recovery/focus, pending states, EN/DE/FR
    controls and axe checks of the error surface.
  • File-scoped oxlint --type-aware --type-check: three files, zero diagnostics.
  • Targeted oxfmt --check, manual-layer gate, automations check-guide, and
    git diff --check: pass.
  • No browser/full-stack run: this dispatch allows targeted jsdom only. Manual
    visual/live-network box is added but not claimed executed. CI and independent
    exact-head review remain required before merge.

Separate from run-timeline PR #4239; no shared UI, backend or schema changes.

Closes #3621

Current-main rebase

Replayed the previously accepted source ffcea33a20a3e769218aa7d08ec6c6dc9c496dda onto main d1373d84cd56972501403f62145ec52e6f65d44a, including the merged shared CI repair in #4625. The accepted feature payload and all current-main changes are preserved in one atomic commit. Configured commit and conflict checks pass; earlier behavioral proof remains recorded above. All seven native required checks and full merge-group validation remain required for this new source.

Maintenance replay: preserves the accepted feature payload on current main 7d178ca. Includes the merged #4649 Knip cleanup and the exact independently accepted one-line shared CLI inventory repair from #4654 (252f0df), which is still pending native merge on main. The fixed suite inventory keeps its discovery and source/compiled phase guards. Existing feature proof is retained; no fresh full-feature/full-workspace test or hosted-green claim. Native required checks remain mandatory.

@yannickmonney

Copy link
Copy Markdown
Contributor Author

Independent review — ACCEPT (code and targeted jsdom scope)

PR #4258 / TALE-166 / #3621, exact head 0a600b820ec6eeacd14db867799650cf50c35d22. Reviewer: Codex #12 31b27429, TALE-593; distinct from implementation author Codex #7 ecfaae72 / run d96333b9. Confirmed the head at the start and again immediately before posting. No blocking findings in the six-file diff against fetched main d29a3c8fe78cdba54d247fe82ea5195f702c0651.

Observed evidence

  • Independently ran the exact-head history regression plus its importing detail shell/editor suites: 75/75 tests pass across 3 files, jsdom, one worker, Node heap capped at 2 GiB. This includes initial and cached-empty failed reads, Enter activation calling refetch once, pending-state controls, recovery focus handoff, EN/DE/FR retry labels and error titles, and axe checks on each localized alert.
  • Successful empty responses preserve exactly “This automation has not run yet.” and “No versions saved yet.” Neither successful empty control exposes a retry. List and locale source files are unchanged.
  • Runs now branches on isError before passing data ?? [] to the list. Both error surfaces reuse ErrorDisplayCompact, expose role="alert", call the failed history query's own refetch, and hand focus to their stable named heading target through the shared focus-handoff hook. The Versions picker already had its error/retry branch on main; this PR adds announcement/focus and locks the existing behavior rather than resurrecting the retired Versions tab.
  • Baseline proof: copied only the PR's regression test into an isolated archive of fetched main and selected initial-failure + empty-success cases. Expected red: 1 failed, 3 passed, 12 deselected. The Runs failure case finds the successful empty sentence in the document and fails at line 72. Both empty-success controls and Versions error/retry pass on main.
  • git diff --check passes. Test output contains existing shell/editor act(...) and missing DirtyBlockerProvider warnings, without failed assertions. Initial environment attempts could not execute tests (Node absent from PATH, then Vite denied the shared dependency root); adding /opt/node/bin and a test-only filesystem allowance resolved them. Final assertions run against isolated exact-head source, including local UI/shared workspace packages.

Unrun / limits

No browser, real network outage/recovery, visual layout/contrast/visible-focus/phone-wrapping, or full-stack proof; AUTO-B12 remains unexecuted. Hook results and router links are fixtures, so the jsdom proof establishes rendered state, callback invocation and focus, not live transport recovery. No whole suites, workspace typecheck, lint/format/manual gates or SAST rerun; the author's receipts for those checks were read, not independently certified. CI was not rerun, cancelled, waited on or certified green. Acceptance is not merge readiness and does not clear protected task approvals.

No push, merge, source repair or task status change. GitHub's authenticated principal is also the PR's author; this comment is the independent ACCEPT record, not a self-issued formal GitHub approval.

Evidence retained in TALE-593's delivery box: head-tests.log, baseline-tests.log, regression.test.tsx, review.vitest.config.ts, pr.patch, pr-before.json, head-before-post.json, and report.md. Next owner: TALE-359 / the authorized merge coordinator for remaining manual/live-network and exact-head CI gates.

@yannickmonney
yannickmonney force-pushed the fix/automation-history-read-errors branch from da1019d to f958988 Compare October 9, 2026 23:50
# Conflicts:
#	services/platform/app/features/automations/components/automation-runs-tab.tsx
The runs table showed "This automation has not run yet." both while its
first page loaded and after its read failed. It now stays loading until the
first page answers, shows an announced error with Try again when a read
fails before any run arrived, keeps the runs on screen and stops paging
when a later page fails, and hands the retry's focus to the Runs heading
once the runs arrive.
Main minted AUTO-B21 and AUTO-B22 for run replays and comparisons, so the
history read failure box becomes AUTO-B23 and the suite costs 173 boxes.
@yannickmonney
yannickmonney merged commit a23f67f into main Oct 10, 2026
24 checks passed
@yannickmonney
yannickmonney deleted the fix/automation-history-read-errors branch October 10, 2026 15:24
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.

Bug: Failed automation history reads claim no runs or saved versions exist

1 participant