Phase 7: PWA (service worker and manifest) - #685
Open
devin-ai-integration[bot] wants to merge 1 commit into
Open
Phase 7: PWA (service worker and manifest)#685devin-ai-integration[bot] wants to merge 1 commit into
devin-ai-integration[bot] wants to merge 1 commit into
Conversation
…setup Co-Authored-By: Paul Abboud <abboudpaul112@gmail.com>
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Phase 7 of the Angular → React migration (stacked on #684).
vite-plugin-pwa(WorkboxgenerateSW) replacesServiceWorkerModule+ngsw-worker.js, andngsw-config.jsonis deleted.vite.config.tsbecomes a function config so the plugin can be switched off outside builds, matching Angular'senabled: environment.production:Two deliberate differences from the ngsw config:
navigateFallback: 'index.html'is what makes deep links like/item/123work offline; ngsw got this from itsindexoption.NetworkFirst(10s timeout, 100 entries, 1 day) — ngsw had nodataGroups, so feeds were dead offline. The app shell renders and falls back to its loader/error state when nothing is cached.The manifest and icons need no move: icons already live in
public/assets/icons/from Phase 1, and the plugin emitsmanifest.webmanifestplus the<link rel="manifest">tag thatindex.htmlwas missing.src/manifest.jsonis now unused and gets deleted with the rest of the Angular tree in Phase 8.Verification
npm run buildemitsdist/sw.js+dist/workbox-*.jswith 43 precached entries. Offline checked againstvite preview: registered the SW, killed the server, then reloaded — the shell still renders (screenshot below is/item/1with the server down, showing the cached chrome and the loader since the API is unreachable). Note this VM's interactive Chrome leaves service workers stuck inSTARTING, so the offline run was driven through a headless Chromium instead;navigator.serviceWorker.controllerwas non-null before the server was killed.Remaining
Phase 8: delete the Angular sources (
src/app/,src/main.ts,src/environments/,src/manifest.json,src/index.html), README/CI updates, and the final end-to-end pass.Devin-Org: engineering
Link to Devin session: https://app.devin.ai/sessions/f5e6c49cc7f344bf80df57ffee2e7939
Requested by: @abboudp
Note
Devin errored when opening this Pull Request as abboudp.
As a fallback, Devin opened this PR as itself.
Devin Review