PR 5/6: React Migration — PWA Support & Analytics#46
Open
devanshi-gpta wants to merge 1 commit into
Open
Conversation
- Configure vite-plugin-pwa with autoUpdate registration - Add web app manifest (name, icons, theme color, display mode) - Add Workbox runtime caching: NetworkFirst for API requests - Create usePageTracking hook using useLocation() for GA page views - Wire tracking hook into AppRoutes component - Build produces sw.js, workbox runtime, and manifest.webmanifest Co-Authored-By: Devanshi Gupta <devanshi.gupta@cognition.ai>
🤖 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
Fifth PR in the 6-part Angular→React migration. Adds Progressive Web App support via
vite-plugin-pwaand a page-view tracking hook.PWA configuration (
vite.config.ts):VitePWA({ registerType: 'autoUpdate' })— service worker auto-updates on new buildsConduit — RealWorld Example App,#5CB85Ctheme, standalone display, portrait orientationNetworkFirstforapi.realworld.show/api/*with 50-entry / 5-min cachePage tracking (
src/hooks/usePageTracking.ts):usePageTracking()hook listens touseLocation()changesgtag('config', ...)withpage_pathon each navigationAppRoutescomponent inApp.tsxBuild output now includes
sw.js,workbox-*.js,registerSW.js, andmanifest.webmanifest.Link to Devin session: https://app.devin.ai/sessions/6215127f80d4463cad3055cf81b87f0c
Requested by: @devanshi-gpta
Devin Review