Skip to content

fix(status): keep uptime bars inside cards on mobile - #1236

Merged
kody-bot merged 3 commits into
mainfrom
cursor/fix-status-bars-mobile-overflow-5500
Aug 5, 2026
Merged

kody-bot merged 3 commits into
mainfrom
cursor/fix-status-bars-mobile-overflow-5500

Conversation

@kentcdodds

@kentcdodds kentcdodds commented Aug 5, 2026 •

Copy link
Copy Markdown
Member

Summary

On iPhone-width viewports, the 90-day uptime bars on status.heykody.dev overflowed past the card edge (reported in https://x.com/i/status/2084909856432275934).

Each bar had min-width: 2px with a 2px gap, so 90 days needed ~358px while the card content area is only ~321px after page/card padding. Bars now shrink (min-width: 0) and the row clips inside the card.

Also unblocks Workers CI: getMailboxInboundDueAt was clamping stale delivery due-ats with wall-clock Date.now() even when sweeps injected a frozen now, so once real time passed the fixture’s created_at+48h the due-owners test failed.

Test plan

  • Unit test asserts CSS no longer pins bars to 2px min-width and sets overflow clipping
  • After deploy: open status.heykody.dev at ~390px width and confirm bars stay inside cards
  • Workers CI green (inbound due-owners sweep test)
System recap — extends existing primitives (medium risk)

Mode: recap · Base: main @ 865304b0 · Head: 17dd55bd

Classification: extends — status page CSS for mobile bar fit; inbound due-at clamp honors injected sweep clock.

Primitives touched

Primitive Group Impact
status-page surfaces extends — bar/card CSS so uptime rows no longer overflow on mobile
(email inbound due owners) — extends — getMailboxInboundDueAt / sweep hint use injectable now

System map

Status worker HTML CSS plus a small inbound due-at clock consistency fix needed for CI.

Legend: green = composes · amber = extended · red = new · gray = context.

flowchart LR
	statusPage["status-page<br/>Public status page"]:::extended
	browser["Browser<br/>mobile viewport"]:::untouched
	browser -->|"GET /"| statusPage
	classDef extended fill:#9a6700,color:#fff
	classDef untouched fill:#57606a,color:#fff
Loading

Before / after

Before: .bar { min-width: 2px } + gaps made the 90-day flex row wider than the card on iPhone widths. Separately, due-at clamping ignored sweep now.

After: bars may shrink (min-width: 0), .bars / .card clip overflow; due-at clamp uses the same clock as the sweep.

Risk and invariants

  • Risk: medium (public status surface + inbound due hint path).
  • Invariants: status page remains independently deployed; due-at wall-clock behavior unchanged when now is omitted.

Docs / decisions

  • None required.
Open in Web Open in Cursor 

Summary by CodeRabbit

  • Bug Fixes
    • Improved status page responsiveness on narrow screens.
    • Prevented horizontal overflow in cards, charts, and legends.
    • Allowed chart bars and legend text to adapt gracefully to limited space.
    • Improved the accuracy and consistency of inbound email due-time scheduling.

90 day bars used min-width:2px plus gaps, which overflowed card padding on
iPhone-width screens. Allow bars to shrink and clip the row instead.

Co-authored-by: Kent C. Dodds <me+github@kentcdodds.com>
@coderabbitai

coderabbitai Bot commented Aug 5, 2026 •

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 28863a34-1fc0-4592-a06d-e2bd92df304f

📥 Commits

Reviewing files that changed from the base of the PR and between c1d4b12 and 970a155.

📒 Files selected for processing (6)
  • packages/worker/src/email/inbound-due-owners.ts
  • packages/worker/src/email/mailbox-do.ts
  • packages/worker/src/email/mailbox-inbound-commands.ts
  • packages/worker/src/email/mailbox-maintenance-commands.ts
  • packages/worker/src/email/mailbox-types.ts
  • packages/worker/src/email/reconcile-inbound-deliveries.ts

📝 Walkthrough

Walkthrough

The status page now supports narrow layouts by shrinking chart content, hiding overflow, and wrapping legend text. Inbound due-work calculations now accept and propagate an optional reference timestamp.

Changes

Responsive status layout

Layer / File(s) Summary
Responsive chart CSS and validation
packages/status/status-page.ts, packages/status/status-page.node.test.ts
Cards and chart containers allow narrower content and hide overflow. 90-day bars can shrink below 2px. Legend text can wrap. Tests verify these rules.

Time-aware inbound scheduling

Layer / File(s) Summary
Clock propagation through inbound due-work
packages/worker/src/email/inbound-due-owners.ts, packages/worker/src/email/mailbox-types.ts, packages/worker/src/email/mailbox-do.ts, packages/worker/src/email/mailbox-inbound-commands.ts, packages/worker/src/email/mailbox-maintenance-commands.ts, packages/worker/src/email/reconcile-inbound-deliveries.ts
Inbound due-time lookup accepts an optional Date. The RPC input accepts an optional timestamp and parses finite values before passing them to the lookup. Reconciliation and maintenance provide explicit timestamps.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
  participant ReconcileInboundDeliveries
  participant MailboxCoreRpc
  participant MailboxInboundCommands
  participant InboundDueOwners
  ReconcileInboundDeliveries->>MailboxCoreRpc: pass now as ISO timestamp
  MailboxCoreRpc->>MailboxInboundCommands: forward ownerId and optional now
  MailboxInboundCommands->>InboundDueOwners: call getMailboxInboundDueAt with Date
  InboundDueOwners-->>MailboxInboundCommands: return due timestamp or null
Loading

Possibly related PRs

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the primary status page fix for mobile uptime bar overflow.
Description check ✅ Passed The description explains the issue, summarizes both changes, documents testing, and includes system impact details.
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.
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch cursor/fix-status-bars-mobile-overflow-5500

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.

@kody-bot
kody-bot marked this pull request as ready for review August 5, 2026 13:36
@kody-bot

kody-bot commented Aug 5, 2026

Copy link
Copy Markdown
Member

bugbot run

@cursor

cursor Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Skipping Bugbot: Unable to authenticate your request. Please make sure Bugbot is properly installed and configured for this repository.

@github-actions

github-actions Bot commented Aug 5, 2026 •

Copy link
Copy Markdown
Contributor

🔎 Preview deployed: https://kody-pr-1236.kody-a99.workers.dev

Worker: kody-pr-1236
D1: kody-pr-1236-db
KV: kody-pr-1236-oauth-kv

Mocks:

@kentcdodds

Copy link
Copy Markdown
Member Author

Bugbot run

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit c1d4b12. Configure here.

cursoragent and others added 2 commits August 5, 2026 13:52
getMailboxInboundDueAt used wall-clock Date.now() for the stale-delivery
floor, so sweeps that pass a frozen now could still clamp to wall time
once created_at+48h fell behind the real clock (broke CI on 2026-08-05).

Co-authored-by: Kent C. Dodds <me+github@kentcdodds.com>
Prefer an optional Date parameter over a defaulted required one so
undefined callers type-check cleanly.

Co-authored-by: Kent C. Dodds <me+github@kentcdodds.com>
@kody-bot
kody-bot merged commit 7ed1432 into main Aug 5, 2026
10 checks passed
@kody-bot
kody-bot deleted the cursor/fix-status-bars-mobile-overflow-5500 branch August 5, 2026 14:00
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.

3 participants