Skip to content

feat: add pwa, service worker, and offline support - #61

Merged
suradet-ps merged 1 commit into
mainfrom
feat/phase-5-pwa-offline
Aug 2, 2026
Merged

feat: add pwa, service worker, and offline support#61
suradet-ps merged 1 commit into
mainfrom
feat/phase-5-pwa-offline

Conversation

@suradet-ps

Copy link
Copy Markdown
Owner

Phase 5: Offline-First

What changed

  • PWA icons: Replaced navy/blue icons with orange brand theme (#ff6b35), added PNG fallbacks (192, 512)
  • Manifest: Updated site.webmanifest with proper fields (lang, categories, theme_color)
  • Service worker: Hand-written sw.js with cache strategies
    • CacheFirst for static assets, images, fonts, and Pagefind search index
    • NetworkFirst for HTML pages and API calls
  • Offline indicator: Calm, non-intrusive banner that appears when offline
  • Dynamic theme-color: meta tag updates based on active theme

Acceptance criteria (from ROADMAP)

  • Reading, searching, and navigating all work with the network fully off
  • The service worker caches and serves correctly
  • The offline indicator appears and disappears cleanly

Verification

  • Lint: ✅
  • Tests: 37/37 ✅
  • Type check: ✅
  • Build: 100 pages ✅

PWA icons and manifest:
- Replace navy/blue icons with orange brand theme (#ff6b35)
- Add PNG icons (192x192, 512x512) for broader PWA compatibility
- Update site.webmanifest with proper fields (lang, categories, theme_color)

Service worker:
- Add hand-written sw.js with cache strategies (CacheFirst for static,
  NetworkFirst for HTML/API, CacheFirst for Pagefind search index)
- Register SW from BaseLayout
- Cache app shell, fonts, images, and search index

Offline indicator:
- Add OfflineIndicator.astro component (calm, non-intrusive banner)
- Shows when navigator.onLine is false, hides on reconnect

Additional improvements:
- Update theme-color meta to match orange brand color
- Add dynamic theme-color update based on active theme
- Mark Phase 5 items complete in ROADMAP.md
@vercel

vercel Bot commented Aug 2, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
rxdevnotes Ready Ready Preview Aug 2, 2026 1:56pm

@suradet-ps
suradet-ps merged commit 9b507f9 into main Aug 2, 2026
7 checks passed
@suradet-ps
suradet-ps deleted the feat/phase-5-pwa-offline branch August 2, 2026 13:59
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