Skip to content

Read-only offline dashboard - #658

Merged
fredrivett merged 3 commits into
mainfrom
claude/slow-networks-mobile-pwa-pwn13f
Oct 25, 2026
Merged

fredrivett merged 3 commits into
mainfrom
claude/slow-networks-mobile-pwa-pwn13f

Conversation

@fredrivett

Copy link
Copy Markdown
Owner

What & why

Follow-up to #654–#657. When offline, show the user's last-loaded abode instead of the bare offline page.

  • Pages kept for a week (d606a67). The service worker already served cached page HTML when offline, but expired it after one day, so most offline launches landed on /~offline. It now keeps pages for 7 days (still max 32 entries, and still cleared when the signed-in user changes). Item images were already cached, so the grid comes back with its covers.
  • Offline page links to the saved dashboard. If the page asked for was never cached, "Open your saved abode" goes to /dashboard. When that isn't cached either, the offline page simply comes back.
  • Offline banner (6f315ce) across the signed-in app, driven by a new useIsOnline hook (useSyncExternalStore, assumed online during SSR). It says the page is as last loaded and that changes need a connection, and it fires offline_banner_shown.

Checklist

  • User-facing change → added/updated a PostHog event, or N/A: offline_banner_shown
  • User-facing or service change → docs updated, or N/A: README features (PWA line)
  • New error paths report via captureServerException / the error boundary, or N/A: N/A
  • New behavior is covered by tests, or N/A: offline-banner.test.tsx (hidden online; appears and disappears with connectivity; shows on a page loaded offline), the offline page link test, and a story
  • If this fixes a recurring defect, considered a guardrail via the learn skill, or N/A: N/A

Notes

  • Verified against a production build with Playwright, using a throwaway public page that renders the banner, since the dashboard needs a DB:
    • Online, the banner is hidden.
    • Offline, a reload serves the cached copy (same server timestamp), it hydrates, and the banner shows. No console errors.
    • An uncached page offline falls back to the offline page with the new link.
  • Not done: disabling mutation controls while offline. Saves and edits fail with their existing error toasts, which the banner explains.

Generated by Claude Code

The service worker already served cached page HTML offline, but expired
it after a day, so most offline launches got the bare offline page. Pages
now keep a week (still cleared when the signed-in user changes), and the
offline page links to the saved dashboard.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QU2jrSHDpWbeLWT9Sv5YyJ
An offline banner across the signed-in app explains the page is as last
loaded and that changes need a connection.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QU2jrSHDpWbeLWT9Sv5YyJ
@vercel

vercel Bot commented Oct 25, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
abode Ignored Ignored Preview Oct 25, 2026 9:27pm UTC

Request Review

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

All reported issues were addressed across 9 files

Reply with feedback, questions, or to request a fix.

View guided diff | Turn on auto-fix | Re-trigger cubic

Comment thread README.md Resolved
@fredrivett
fredrivett merged commit bf875e0 into main Oct 25, 2026
14 checks passed
@fredrivett
fredrivett deleted the claude/slow-networks-mobile-pwa-pwn13f branch October 25, 2026 21:33
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.

2 participants