Repository navigation
feat: mobile sweep (Home/Reuse/Submissions) + beat-stall alert for stats refresh - #469
Merged
Merged
Conversation
…ats refresh Two things from the post-stats-audit follow-ups. Mobile sweep — audited every top-level page at phone width; most already use useIsMobile or responsive auto-fit grids. Three real breaks fixed: - Home: 5rem top padding wasted the top of small screens (→ 2rem on mobile via useIsMobile); the stat cards were a ragged flex-wrap row (flex:1, no basis) → responsive grid (auto-fit minmax(140px,1fr)), clean 2-up at phone width. - Reuse: the fleet table had no overflow wrapper (its Coverage/OwlProfile siblings do) → wrapped in overflowX:auto + minWidth so it scrolls instead of pushing the page wide. - Submissions: same unwrapped-table fix. Desktop layouts unchanged — every new style is gated on isMobile or is an equivalent responsive grid. R4 — beat-stall alert for the public-stats refresh. refresh_public_stats_cache now stamps a `stats:public:refreshed_at` marker on every successful refresh; a new admin health check `_check_public_stats()` flags it stale after 15 min (~4x the 4-min cadence) and surfaces as services.public_stats in /admin/overview with a "Home Stats" card. This catches a stalled stats refresh specifically — the task erroring, or beat dead — even while the generic 60s beat heartbeat is still fine. Tests: 3 new admin-health unit tests (fresh/stale/missing), overview shape now asserts public_stats, refresh test updated for the second Redis write. Full frontend suite green (378); backend unit suite green bar 3 pre-existing Postgres-integration build_index tests unrelated to this change. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two post-audit follow-ups from the stats-surface work.
Mobile sweep
Audited every top-level page at phone width. Most already use
useIsMobileor responsiveauto-fitgrids; three real breaks fixed:5remtop padding wasted the top of small screens (→2remon mobile); the stat cards were a raggedflex-wraprow (flex:1, no basis) → responsive gridauto-fit minmax(140px,1fr), clean 2-up at phone width.overflowX:auto+minWidthso it scrolls instead of widening the page.Desktop layouts unchanged — every new style is gated on
isMobileor is an equivalent responsive grid.R4 — beat-stall alert for the stats refresh
refresh_public_stats_cachenow stamps astats:public:refreshed_atmarker on every successful refresh. A new admin health check_check_public_stats()flags it stale after 15 min (~4× the 4-min cadence) and surfaces asservices.public_statsin/admin/overview, with a "Home Stats" card in the admin panel. This catches a stalled stats refresh specifically — the task erroring, or beat dead — even while the generic 60s beat heartbeat still looks fine.Testing
public_stats; the refresh test handles the second Redis write.build_indextests that fail identically onmain(need a live DB) — unrelated.🤖 Generated with Claude Code