Skip to content

fix(platform): show activity summary read failures - #4384

Merged
yannickmonney merged 2 commits into
mainfrom
fix/audit-activity-summary-read-error
Oct 12, 2026
Merged

yannickmonney merged 2 commits into
mainfrom
fix/audit-activity-summary-read-error

Conversation

@yannickmonney

@yannickmonney yannickmonney commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

Show a retryable read failure for audit activity summaries instead of rendering fabricated zero totals when the request fails. Cached summary data remains visible during a failed refetch. Failure and Retry labels are localized in English, German and French.

The earlier review's two merge findings are addressed: the audit-page fixture returns a genuine successful empty summary with the query-state fields, and the manual automation register records summary failure/retry coverage in a focused row. Rebased onto 1819124, retaining main's mounted EN/DE/FR count regression and current filter coverage.

Validation on this source: 24 targeted activity-view, audit-page and query-hook tests pass, including the previously failing category-filter test; 33 platform message tests pass. The full platform typecheck, scoped type-aware lint, formatting, conflict-marker guard, manual-reference lint and diff check pass. React Doctor reports 100. Component tests use synthetic query replies; they do not claim a live HTTP failure/recovery run. Native source and full merge-queue CI remain required.

Closes #3855
Closes #3856

@yannickmonney

Copy link
Copy Markdown
Contributor Author

Independent review for TALE-901, TALE-286 and TALE-359. Exact head: c70797402632998edeaaafc3e5b71f068383a5f1 (not the implementer).

Verdict: changes required before merge. The read-failure behavior works, but this head introduces a failing existing UI test; it must not be attributed to the known red main.

  • P2 — PR-caused UI failure: audit-logs-page.test.tsx:242, “shows the category filter only on the Audit and Errors tabs”, now cannot find Activity's Filter button. Its summary mock returns { data: undefined, isLoading: false }; the new data || isLoading guard removes the whole inner view. Reproduced with one worker: 22/23 tests pass across the activity view, page and query-hook files. Replacing only the activity component with its parent revision makes the unchanged page suite pass 15/15. Update that test's mock to a genuine successful empty summary (with the new query-state fields), rather than restoring fabricated totals in production. CI UI shard 2/4 has this same failure; UI aggregate inherits it.
  • Main-caused Lint: use-compact-age.test.ts:89:58, “Avoid passing children using a prop”, introduced by ancestor 1994b8a86. That file is unchanged by this PR. Both failing leaf jobs actually executed (Turbo cache misses: lint 4e7600ce664a1ada, UI 65ebf3638800caa0). All Unit shards and aggregate pass on this head; the initial report of red main Unit does not describe this PR's result.
  • Coverage documentation: this exact head contains no automation.md change. Consequently there is no new line to collide with another PR. The existing row describes the period-filter behavior, not summary read failures. Add the failure/retry coverage to that existing row or a focused row, as the repository contract requires new behavior to have a manual box or automation reference. This can stay a small, focused update.

Observed behavior: an uncached failure renders the shared destructive Alert (role=alert, live announcement) and a native, accessible Retry button, without zero cards or normal empty panels. Successful empty data still renders four zero totals, both empty panels, and the period filter. Cached totals remain visible alongside a failed-refetch alert; recovery removes the alert. An uncached retry's loading state hides the failure under the existing loading treatment and recovery renders actual data. A review-only component-state probe passed 9/9, including rendered EN/DE/FR failure and Retry labels. Cached retry has no separate busy/disabled Retry indicator because isFetching is not consumed; the probe verifies retention and recovery, not a live HTTP round trip.

Issues #3855 and #3856 have identical titles, reproduction, root cause, expected behavior and evidence; closing both from this fix is justified. Both remain open at review time; no issue status was changed.

Verification used existing dependencies and /opt/node/bin/node, one worker, and a review-only config extending vitest.ui.config.ts with server.fs.allow for the shared Inter font. Original targeted suite: 22 pass / 1 fail as above; parent-component control: 15 pass; independent lifecycle/locales probe: 9 pass. Scoped oxlint --type-aware, oxlint --type-aware --type-check, and oxfmt --check pass on the changed TSX files. Oxfmt excludes YAML by repository policy; all three catalogs were parsed and their new keys checked. CI Type check and Format also pass. No whole-platform suite, dependency installation, push, merge, rerun or status change.

Task-service fallback: workspace_status returned unavailable / not_granted, so TALE-286 and TALE-359 could not be read/commented through that service. This PR comment carries their requested exact-head verdict.

CI snapshot (2026-10-05T19:16:57.299163+00:00): all Unit, Type check, Format, Browser, Backend integration, and all four Playwright shards plus CI ready (E2E) pass. CI ready (Checks) fails solely because Lint and UI fail; its error lists lint, test-ui, and test-ui-shards. Remaining queued deployment jobs: Smoke test, Scan platform, Validate images. Those jobs have no failure logs or verdict yet; this review does not claim complete green CI.

@yannickmonney
yannickmonney force-pushed the fix/audit-activity-summary-read-error branch from 783a39f to dc3a496 Compare October 11, 2026 22:51
@yannickmonney
yannickmonney added this pull request to the merge queue Oct 11, 2026
@yannickmonney
yannickmonney removed this pull request from the merge queue due to a manual request Oct 12, 2026
@yannickmonney
yannickmonney added this pull request to the merge queue Oct 12, 2026
@yannickmonney

Copy link
Copy Markdown
Contributor Author

Independent review note for TALE-287 (request changes on the acceptance gate; the merge decision stays with the merger)

From agent #2, Independent Review (3f9fdcee), TALE-359 run 633d2879, 2026-10-12 02:22Z. Exact head dc3a49601ff76c4fa2427320fa5ad15412cf29c0, base 18191249c77c.

  • Changed lines: no defect found. The @tale/ui Alert with Retry is correct, the summary view renders only with data or while loading, and the EN/DE/FR keys are added.
  • Open acceptance items for TALE-287 (native receipt 1443cdd0):
    • None of these is asserted at this head:
      • cached values survive a failed refetch;
      • "No activity in this period." is absent on failure;
      • the view recovers after Retry.
    • The new component test has not executed at this head: UI, Browser and Backend integration were skipped in PR CI. A merge-group run would execute it.
    • There is no real-browser evidence (AGENTS.md rule 8).
  • Minor:
    • The alert says "Try again." next to a "Retry" button.
    • With no cached data, the period filter disappears together with the view.
  • Ownership: TALE-286 appears to be the canonical task for this PR. Fleet has been asked to bind one task, so the PR isn't accepted twice.

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: Audit activity summary turns a failed read into zero totals Bug: Audit activity summary turns a failed read into zero totals

1 participant