Repository navigation
feat(failures): show passing groups and an empty state - #159
Conversation
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.
Walkthrough
Priority: Change: Feature Merge Risk:
|
There was a problem hiding this comment.
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
Files selected for processing: 15-
backend/src/ref_backend/api/routes/executions.pybackend/tests/test_api/test_routes/test_executions.pychangelog/159.feature.mdfrontend/src/client/@tanstack/react-query.gen.tsfrontend/src/client/sdk.gen.tsfrontend/src/client/types.gen.tsfrontend/src/components/failures/diagnosticFailuresCard.tsxfrontend/src/components/failures/failureFilters.tsxfrontend/src/components/failures/failuresEmptyState.tsxfrontend/src/components/failures/openGroupLink.tsxfrontend/src/components/failures/passingGroups.tsxfrontend/src/components/failures/useFailures.tsfrontend/src/lib/failures.test.tsfrontend/src/lib/failures.tsfrontend/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.
-
| if (error) { | ||
| return <p className="text-sm text-destructive">{apiErrorMessage(error)}</p>; | ||
| } |
There was a problem hiding this comment.
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)
| const models = useQuery({ | ||
| ...modelsListOptions({ query: { mip_era: mipEra } }), | ||
| staleTime: 5 * 60 * 1000, | ||
| }); |
There was a problem hiding this comment.
🔎 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(
fix(failures): error paths from #159 and updating dots
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.
passing=true, alongside the existing model, era, reason and day filters./executions/gains exactprovider_sluganddiagnostic_slugfilters, because the_containsfilters can match other diagnostics (annual-cyclematchesregional-historical-annual-cycle).The screenshots use the production API, which lacks the new slug filters, so the expanded list there includes another diagnostic's groups (the
g118keys belong to enso-characteristics).