Skip to content

feat: mobile sweep (Home/Reuse/Submissions) + beat-stall alert for stats refresh - #469

Merged
micheldumontier merged 1 commit into
mainfrom
feat/mobile-sweep-and-beat-alert
Nov 23, 2026
Merged

micheldumontier merged 1 commit into
mainfrom
feat/mobile-sweep-and-beat-alert

Conversation

@micheldumontier

Copy link
Copy Markdown
Contributor

Two post-audit follow-ups from the stats-surface work.

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); 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 widening the page.
  • 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 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 (~4× the 4-min cadence) and surfaces as services.public_stats in /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

  • 3 new admin-health unit tests (fresh/stale/missing); overview shape now asserts public_stats; the refresh test handles the second Redis write.
  • Full frontend suite 378 passed; backend unit suite green bar 3 pre-existing Postgres-integration build_index tests that fail identically on main (need a live DB) — unrelated.

🤖 Generated with Claude Code

…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>
@micheldumontier
micheldumontier merged commit c177dd7 into main Nov 23, 2026
5 checks passed
@micheldumontier
micheldumontier deleted the feat/mobile-sweep-and-beat-alert branch November 23, 2026 13:49
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