Skip to content

feat(pwa): add service worker, manifest, and offline banner (#103) - #144

Merged
truthixify merged 7 commits into
wraith-protocol:developfrom
Meme11030:feat/pwa-service-worker-103
Aug 6, 2026
Merged

feat(pwa): add service worker, manifest, and offline banner (#103)#144
truthixify merged 7 commits into
wraith-protocol:developfrom
Meme11030:feat/pwa-service-worker-103

Conversation

@Meme11030

Copy link
Copy Markdown
Contributor
  • Install vite-plugin-pwa@0.21.1 + workbox packages
  • Add public/manifest.webmanifest with full PWA metadata
  • Generate 10 icon sizes (72–512px) including maskable variants for Android adaptive icons and iOS home screen
  • Create src/sw/app-sw.ts: unified service worker that merges Workbox precaching/routing with existing Stellar notification background sync (replaces manual stellar-notification-sw.ts reg)
  • Configure injectManifest strategy:
    • NetworkFirst for Stellar RPC, Horizen RPC, Horizon REST
    • CacheFirst for Google Fonts (CSS + files)
    • Precache 198 app assets (4 MiB limit for large SDK chunks)
  • Add src/components/OfflineBanner.tsx: accessible offline state indicator using navigator.onLine + online/offline events
  • Wire OfflineBanner into App.tsx layout (between Header and TelemetryBanner)
  • Update index.html: manifest link → /manifest.webmanifest, dual theme-color meta (dark/light), iOS PWA meta tags
  • Remove manual SW registration from main.tsx (handled by injectRegister: auto via registerSW.js)
    closes PWA + service worker (offline-friendly) #103

…rotocol#103)

- Install vite-plugin-pwa@0.21.1 + workbox packages
- Add public/manifest.webmanifest with full PWA metadata
- Generate 10 icon sizes (72–512px) including maskable variants
  for Android adaptive icons and iOS home screen
- Create src/sw/app-sw.ts: unified service worker that merges
  Workbox precaching/routing with existing Stellar notification
  background sync (replaces manual stellar-notification-sw.ts reg)
- Configure injectManifest strategy:
  - NetworkFirst for Stellar RPC, Horizen RPC, Horizon REST
  - CacheFirst for Google Fonts (CSS + files)
  - Precache 198 app assets (4 MiB limit for large SDK chunks)
- Add src/components/OfflineBanner.tsx: accessible offline state
  indicator using navigator.onLine + online/offline events
- Wire OfflineBanner into App.tsx layout (between Header and
  TelemetryBanner)
- Update index.html: manifest link → /manifest.webmanifest,
  dual theme-color meta (dark/light), iOS PWA meta tags
- Remove manual SW registration from main.tsx (handled by
  injectRegister: auto via registerSW.js)
@vercel

vercel Bot commented Jul 26, 2026

Copy link
Copy Markdown

@Meme11030 is attempting to deploy a commit to the truthixify's projects Team on Vercel.

A member of the Team first needs to authorize it.

@drips-wave

drips-wave Bot commented Jul 26, 2026

Copy link
Copy Markdown

@Meme11030 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@truthixify

Copy link
Copy Markdown
Contributor

build failing on prettier drift in src/sw/app-sw.ts. Run pnpm format and push.

@truthixify

Copy link
Copy Markdown
Contributor

The build job fails at pnpm install --frozen-lockfile, which means pnpm-lock.yaml in your PR does not match package.json. Run pnpm install locally (which updates the lockfile) and commit the updated pnpm-lock.yaml.

@Meme11030

Copy link
Copy Markdown
Contributor Author

@truthixify i have fixed it please merge my pr and i look forward working with you in the next wave
i really appreciate
much gratitude

@Meme11030

Copy link
Copy Markdown
Contributor Author

Gm gm @truthixify im still waiting for your feedback

@truthixify

Copy link
Copy Markdown
Contributor

Gm gm @truthixify im still waiting for your feedback

There is a conflict, resolve the conflict and make CI pass then your PR will be merged

@truthixify

truthixify commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

CI fails at pnpm install --frozen-lockfile. The lockfile does not match the added Workbox dependencies. Please run pnpm install on this branch and push the updated pnpm-lock.yaml.

- Run pnpm install to add 6 workbox packages to lockfile:
  workbox-cacheable-response, workbox-expiration, workbox-precaching,
  workbox-routing, workbox-strategies, workbox-window (all ^7.4.1)
- Add missing OfflineBanner import to App.tsx (was used but not imported
  after develop merge overwrote the original App.tsx changes)

Fixes CI frozen-lockfile failure.
@Meme11030

Copy link
Copy Markdown
Contributor Author

@truthixify confirm the pr now sir

@truthixify
truthixify merged commit a314896 into wraith-protocol:develop Aug 6, 2026
1 of 2 checks passed
@truthixify

Copy link
Copy Markdown
Contributor

Merged. Thanks @Meme11030. PWA build is green. Vercel is non-blocking.

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.

PWA + service worker (offline-friendly)

2 participants