Skip to content

feat(failures): show passing groups and an empty state - #159

Merged
lewisjared merged 2 commits into
mainfrom
feat/failures-empty-state
Oct 25, 2026
Merged

lewisjared merged 2 commits into
mainfrom
feat/failures-empty-state

Conversation

@lewisjared

@lewisjared lewisjared commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

Adds a "Show passing groups" toggle to the failures page, and lists models without failures in the model picker so a model like ACCESS-ESM1-6 can be picked. When nothing matching the filters is failing, the page shows an empty state with how many groups passed and a button to show them.

  • Each diagnostic card lists its passing groups 25 at a time, fetched only once the section is expanded.
  • The toggle is kept in the URL as passing=true, alongside the existing model, era, reason and day filters.
  • /executions/ gains exact provider_slug and diagnostic_slug filters, because the _contains filters can match other diagnostics (annual-cycle matches regional-historical-annual-cycle).
  • The reason and day filters describe failures, so they do not narrow the passing groups.

The screenshots use the production API, which lacks the new slug filters, so the expanded list there includes another diagnostic's groups (the g118 keys belong to enso-characteristics).

Empty state for ACCESS-ESM1-6 in CMIP7

Model picker listing ACCESS-ESM1-6 with no failures

Passing groups expanded on a diagnostic card

Adds a "Show passing groups" toggle that lists each diagnostic's passing execution groups, loaded on expand. Models without failures now appear in the model picker, so picking one shows an empty state with how many of its groups passed. The executions list gains exact provider_slug and diagnostic_slug filters for this.
@coderabbitai

coderabbitai Bot commented Oct 25, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Walkthrough

The execution-groups API and generated client now support exact provider and diagnostic slug filters. The failures page adds a passing-groups view, includes models without failures in its counts, and shows aggregate success totals and links to passing execution groups.

Changes: Execution failures and passing groups

Layer / File(s) Summary
Exact-slug execution-group filters
backend/src/ref_backend/api/routes/executions.py, backend/tests/test_api/test_routes/test_executions.py, frontend/src/client/*
The route accepts provider and diagnostic slug filters, and the test checks exact slug matching. Generated client types and documentation include these filters. Generated metric-value documentation now lists scalar and series as options.
Failure-page filters and model counts
frontend/src/components/failures/failureFilters.tsx, frontend/src/components/failures/useFailures.ts, frontend/src/lib/failures.ts, frontend/src/lib/failures.test.ts, frontend/src/routes/_app/executions.failures.tsx
The failures page adds a passing-mode search parameter and checkbox. Model counts include models without failures. Helpers calculate aggregate totals and tests cover the helper results.
Passing-group results and empty states
frontend/src/components/failures/{diagnosticFailuresCard,failuresEmptyState,openGroupLink,passingGroups}.tsx, frontend/src/routes/_app/executions.failures.tsx, changelog/159.feature.md
The page displays passing diagnostics in passing mode. Diagnostic cards can show paginated passing groups. Empty states can show group totals and offer the passing view.

Sequence Diagram(s)

sequenceDiagram
  actor User
  participant FailuresPage
  participant DiagnosticFailuresCard
  participant PassingGroups
  participant list_recent_execution_groups
  participant ExecutionGroupFilter
  User->>FailuresPage: Select passing mode
  FailuresPage->>DiagnosticFailuresCard: Pass the selected era
  DiagnosticFailuresCard->>PassingGroups: Render the passing-group list
  PassingGroups->>list_recent_execution_groups: Request groups with provider and diagnostic slugs
  list_recent_execution_groups->>ExecutionGroupFilter: Pass slug and success filters
  ExecutionGroupFilter-->>list_recent_execution_groups: Return matching groups
  list_recent_execution_groups-->>PassingGroups: Return execution groups
Loading

Possibly related PRs

  • Climate-REF/ref-app#147: Introduced the execution-group filter and loader that this change extends with provider and diagnostic slug filters.

Priority: Normal

Change: Feature

Merge Risk: Low · up to 82754

These errors can temporarily hide passing groups or models without failures. Both are recoverable, so the change is mergeable with follow-up error handling.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 70.59% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 17 functions across 14 files. (1 skipped:… Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly and concisely describes the main changes: showing passing groups and adding an empty state on the failures page.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 70.59% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 17 functions across 14 files. (1 skipped: 1 unsupported.)

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

Finishing Touches: 💡 1
📝 Generate docstrings: 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2


Review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 4b52022f-b35b-44fa-a086-494380c9b46b
Commits

Reviewing files that changed from the base of the PR and between 7bd72c1 and 8275468.

Files selected for processing: 15
  • backend/src/ref_backend/api/routes/executions.py
  • backend/tests/test_api/test_routes/test_executions.py
  • changelog/159.feature.md
  • frontend/src/client/@tanstack/react-query.gen.ts
  • frontend/src/client/sdk.gen.ts
  • frontend/src/client/types.gen.ts
  • frontend/src/components/failures/diagnosticFailuresCard.tsx
  • frontend/src/components/failures/failureFilters.tsx
  • frontend/src/components/failures/failuresEmptyState.tsx
  • frontend/src/components/failures/openGroupLink.tsx
  • frontend/src/components/failures/passingGroups.tsx
  • frontend/src/components/failures/useFailures.ts
  • frontend/src/lib/failures.test.ts
  • frontend/src/lib/failures.ts
  • frontend/src/routes/_app/executions.failures.tsx

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

Comment on lines +72 to +74
if (error) {
return <p className="text-sm text-destructive">{apiErrorMessage(error)}</p>;
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor · Stability & Availability · Quick win

Keep loaded groups visible when a later page fails.

If “Load More” fails, the infinite query can report a next-page error while retaining earlier pages. This early return hides those pages and removes the pagination control. Show the error beside the loaded groups and let the user retry the failed page. Reserve the full-list error state for a failed initial load. (tanstack.com)

Comment on lines +61 to +64
const models = useQuery({
...modelsListOptions({ query: { mip_era: mipEra } }),
staleTime: 5 * 60 * 1000,
});

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor · Functional Correctness · Quick win

🔎 Supported by static analysis

Script executed:

sed -n '57,85p' frontend/src/components/failures/useFailures.ts
sed -n '100,115p' frontend/src/routes/_app/executions.failures.tsx
rg -n 'refetchOnWindowFocus|retry:|QueryClient|queryClient' frontend/src

Repository: Climate-REF/ref-app

Length of output: 7160


Script executed:

sed -n '45,68p' frontend/src/main.tsx
sed -n '1,120p' frontend/src/components/failures/useFailures.ts
rg -n -F --glob '*.tsx' -e 'modelCounts' -e 'modelOptions' -e 'selectedModel' -e 'models' frontend/src/routes/_app/executions.failures.tsx frontend/src/components/failures
sed -n '115,230p' frontend/src/routes/_app/executions.failures.tsx
sed -n '1,110p' frontend/src/routes/_app/executions.failures.tsx
rg -n -F --glob '*.ts' --glob '*.tsx' -e 'retryUnlessNotFound' -e 'refetchOnWindowFocus' -e 'refetchOnReconnect' frontend/src

Repository: Climate-REF/ref-app

Length of output: 13162


Handle the failed models query as a recoverable picker error.

When modelsListOptions exhausts its retries, models.data remains unavailable and withModelsWithoutFailures omits models with no failures. The catalogue and unsuccessful execution results remain usable. A page reload or normal React Query refetch can recover the models query.

Add models to the page error and retry handling without hiding the loaded failure results.

Suggested fix
-  const failed = [catalog, unsuccessful].filter(
+  const failed = [catalog, unsuccessful, models].filter(

@lewisjared
lewisjared merged commit 6a4d7dd into main Oct 25, 2026
6 checks passed
@lewisjared
lewisjared deleted the feat/failures-empty-state branch October 25, 2026 22:45
lewisjared added a commit that referenced this pull request Oct 25, 2026
fix(failures): error paths from #159 and updating dots
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