Skip to content

feat(convert): add PWA support for offline use and installability#52

Open
thewtex wants to merge 2 commits into
mainfrom
pwa
Open

feat(convert): add PWA support for offline use and installability#52
thewtex wants to merge 2 commits into
mainfrom
pwa

Conversation

@thewtex

@thewtex thewtex commented Feb 19, 2026

Copy link
Copy Markdown
Member

Configure vite-plugin-pwa with generateSW strategy and autoUpdate
behavior so the app at convert.fidnii.io can be installed and works
offline. Precaches the app shell (~5 MB) and uses runtime caching for
WASM pipeline files (StaleWhileRevalidate) and the Web Awesome CDN
stylesheet (CacheFirst). Moves favicon assets into public/ and replaces
the broken site.webmanifest with an auto-generated manifest.

Configure vite-plugin-pwa with generateSW strategy and autoUpdate
behavior so the app at convert.fidnii.io can be installed and works
offline. Precaches the app shell (~5 MB) and uses runtime caching for
WASM pipeline files (StaleWhileRevalidate) and the Web Awesome CDN
stylesheet (CacheFirst). Moves favicon assets into public/ and replaces
the broken site.webmanifest with an auto-generated manifest.
Copilot AI review requested due to automatic review settings February 19, 2026 01:18
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Feb 19, 2026

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
fidnii-convert 10ccc3d Commit Preview URL

Branch Preview URL
Feb 19 2026, 02:29 AM

Copilot AI 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.

Pull request overview

This PR adds Progressive Web App (PWA) support to the convert example application, enabling offline functionality and installability. The changes configure vite-plugin-pwa to generate a service worker that precaches the app shell and implements runtime caching strategies for WebAssembly pipeline files and external CDN resources.

Changes:

  • Configures vite-plugin-pwa with app manifest, precaching, and runtime caching strategies
  • Registers service worker with autoUpdate mode for seamless updates
  • Moves favicon assets to public/ directory and removes broken site.webmanifest in favor of auto-generated manifest
  • Adds proper meta tags for PWA support (description, theme-color) and CORS attribute for CDN stylesheet

Reviewed changes

Copilot reviewed 6 out of 14 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
vite.config.ts Adds VitePWA plugin with manifest config, workbox precaching patterns, and runtime caching for WASM/CDN
package.json Adds vite-plugin-pwa and workbox-window dependencies
main.ts Registers service worker with immediate activation using virtual:pwa-register
vite-env.d.ts Adds type reference for vite-plugin-pwa/client
index.html Adds PWA meta tags (description, theme-color) and crossorigin attribute for CDN stylesheet
converter.ts Removes unnecessary @ts-expect-error comment for import.meta.env
public/favicon/* Adds/moves favicon assets (ico, png files) to public directory
favicon/site.webmanifest Removes broken static manifest (replaced by auto-generated one)

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread examples/convert/package.json
Comment thread examples/convert/vite.config.ts
Comment thread examples/convert/vite.config.ts
Add a CacheFirst runtime caching rule for mri.nii.gz so the sample
data is available offline after first download.
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