Text and formatting tweaks across the app - #89
Conversation
…P era - `SourceDatasetType` is a plain enum, so `str()` on it produced `SourceDatasetType.CMIP7`. `dataset_type_label` now renders the short name the API is meant to expose. - Adds `execution_groups_by_mip_era` to the execution statistics, so the dashboard can say how much of the ensemble is CMIP7.
The header was a card holding roughly 600px of prose before any content, with dead space beside the title. It now reads as a band: - Title, blurb and the catalog and feedback links sit outside any card. - The what's-available list keeps only the two points the theme tabs and the catalog link do not already make. - Getting started is a compact numbered panel rather than a five step list. - Shortens the data health warning to one sentence and renders it as a note. This copy is shared, so the homepage gets the shorter version too.
Both pages wrapped their title and description in the card that also held the filters and the table. This matches the diagnostics catalog instead, where the header stands above the card. The resource usage link moves up to the title row.
Both controls scope the same results, so they belong on the same row. `MipEraScope` takes an `actions` slot for controls of that kind, and the toggle's state lifts to the route.
Large counts ran together as `954217 scalars`, so every figure in the stat cards is now locale formatted. The total execution groups card says how the total splits across CMIP6 and CMIP7.
The table showed the slug and the dataset type, so the facets a reader actually scans for were buried in the slug. Dataset type renders as a badge now that the API sends the short name.
The toggle only flipped between light and dark, so there was no way back to following the OS once a pick was stored. `useTheme` now keeps the pick and the resolved theme apart, and the button names the current mode. Fixes the no-flash script, which resolved a stored "system" to light.
`Explorer 0.6.2` read as one token.
✅ Deploy Preview for climate-ref ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
Warning Review limit reachedNext included review available in 29 minutes. View limit detailsLimit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (8)
📝 WalkthroughWalkthroughThe change adds MIP-era execution statistics, short dataset type labels, CMIP-specific dataset columns, three theme modes, shared page headers, and relocated plain-language controls across the dashboard and Data Explorer. ChangesData reporting and dataset metadata
Theme mode selection
Explorer and page layout
Sequence Diagram(s)sequenceDiagram
participant Browser
participant ThemeInit
participant useTheme
participant Navbar
Browser->>ThemeInit: load stored theme mode
ThemeInit->>Browser: apply initial theme
Navbar->>useTheme: read mode and cycle
Navbar->>useTheme: cycle mode
useTheme->>Browser: persist mode and apply resolved theme
sequenceDiagram
participant Dashboard
participant ExecutionStatsAPI
participant MIPEraQuery
participant Database
Dashboard->>ExecutionStatsAPI: request execution statistics
ExecutionStatsAPI->>MIPEraQuery: calculate counts by MIP era
MIPEraQuery->>Database: query execution groups by dataset type
Database-->>MIPEraQuery: grouped counts
MIPEraQuery-->>ExecutionStatsAPI: return era counts
ExecutionStatsAPI-->>Dashboard: render formatted counts
Merge Risk: 🔵 Low · up to The dashboard’s new CMIP-era figures can be misleading because they may include superseded versions and briefly display zero while data loads. Release notes also misdescribe CMIP6-only links and non-exclusive era memberships. These are bounded reporting and documentation issues that should be corrected before release. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Title checkExplanation The title is concise and relates to substantial text and formatting changes across the application. It does not identify other major changes, such as layout restructuring, theme cycling, or execution statistics, but it still gives a valid high-level summary. Full details: Docstring CoverageExplanation Docstring coverage is 51.52% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 33 functions across 22 files. (5 skipped: 5 unsupported.) ✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
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. Comment |
The title block was repeated across the diagnostics, datasets, executions and explorer pages. Also tightens the review's smaller points. - Names the explorer's feature list for what it holds, and drops the unused `setTheme`. - Removes a spaced hyphen from a comment, and rewraps the data health warning on clause boundaries rather than at a column.
- Moves the resource usage header out of its card, which the other list pages had already left. - Uses the app's own `SourceTypeBadge` for the dataset type rather than a plain outline badge. - Shares the theme query the explorer already suspends on, so the plain language toggle no longer appears a beat after the bar it sits in. - Restores the toggle's active styling, which the era selector beside it also has. - Says in the changelog that this fills in the More Info column, since the link was built from the string the enum repr had been leaking into.
Only the CMIP sources carry experiment, source and variable, so obs4mips got three permanently blank columns. The table now takes the source type it is showing and picks its columns from it. Also rewords the execution group caption. The two era counts are memberships rather than a breakdown, because a group with no CMIP input lands in neither and one holding both lands in both.
- Counts the execution groups per era in one grouped query rather than one count per era. - Builds the dataset table's two column sets once, from named parts, so the reference is stable across renders and nothing is reassembled by position. - Moves the CMIP source test in beside the other source type knowledge. - Folds the dashboard's local digit grouping into `formatCount`, which used `String`. The resource usage page prints grouped digits now too. - Persists the theme next to the state change rather than in an effect that fired on mount. - Drops `text-sm` from the shared header's action slot, so it no longer sizes every caller's buttons.
There was a problem hiding this comment.
Actionable comments posted: 5
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Team
Run ID: 15574510-7c8e-4021-b20e-1b83913aa2b7
📒 Files selected for processing (27)
backend/src/ref_backend/api/routes/executions.pybackend/src/ref_backend/core/mip_eras.pybackend/src/ref_backend/models/datasets.pybackend/src/ref_backend/models/executions.pychangelog/89.feature.mdchangelog/89.fix.mdchangelog/89.improvement.mdfrontend/index.htmlfrontend/src/client/types.gen.tsfrontend/src/components/app/navbar.tsxfrontend/src/components/app/pageHeader.tsxfrontend/src/components/app/versionInfo.tsxfrontend/src/components/charts/mipEraBar.tsxfrontend/src/components/dashboard/executionStats.tsxfrontend/src/components/datasets/datasetColumns.tsxfrontend/src/components/datasets/datasetTable.tsxfrontend/src/components/explorer/thematicContent.tsxfrontend/src/content/data-health-warning.mdxfrontend/src/hooks/useTheme.tsfrontend/src/lib/format.tsfrontend/src/lib/sourceTypes.tsfrontend/src/routes/_app/datasets.index.tsxfrontend/src/routes/_app/diagnostics.index.tsxfrontend/src/routes/_app/executions.index.tsxfrontend/src/routes/_app/executions.resources.tsxfrontend/src/routes/_app/explorer/route.tsxfrontend/src/routes/_app/explorer/themes.tsx
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.
The diagnostics catalog had vertical padding but no horizontal, and the explorer sat in a full width block rather than the container, so three pages started their title in three places. All four now share the container, the padding and the vertical rhythm.
`execution_groups_per_era` counted every diagnostic version, while the total beside it counts only the promoted version, so the caption could disagree with the number above it. Also holds the caption at the loading placeholder until the response arrives, rather than showing zero for both eras, and stops the changelog reading the two counts as a breakdown.
|
@coderabbitai review |
|
Names the diagnostics as the current ones rather than v1, and links them to the Zenodo record. Also repairs the same link on the introduction page, where `10.5281/zenodo.14284374` had been mangled into `http://10.0.20.161/zenodo.14284374`, a private address that goes nowhere.
|
@coderabbitai approve |
✅ Action performedComments resolved and changes approved. |
Works through a list of text and formatting problems found while using the app. Most commits stand alone, so they read best one at a time.
Two changes go beyond formatting and are worth a closer look.
SourceDatasetTypeis a plain enum, sostr()on it producedSourceDatasetType.CMIP7. The API now sends the short name. This changes thedataset_typefield of every dataset response, so anything matching on the old string breaks. It also fills in the More Info column, because the link was built by testing forcmip6in a string that never contained it.The Data Explorer header was picked from three prototypes and then reviewed, so it has had more thought than the diff suggests. The losing variants are on the local
prototype/explorer-headerbranch.One thing on the original list is not fixed here. The reported full page reload on theme swap could not be reproduced, and nothing in the code reloads on a theme change, though the rewritten
useThememay have changed the behaviour anyway. More Info stays blank for CMIP7 rows, since the backend only knows a lookup URL for CMIP6.Summary by CodeRabbit