Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
0f582fa to
8574c7c
Compare
There was a problem hiding this comment.
Pull request overview
This PR implements PWA (Progressive Web App) installation support for Cleanuparr by adding service worker registration, updating the web manifest with required icons and metadata, and ensuring both frontend and backend manifest endpoints are aligned. The changes enable users to install the application on their devices as a standalone app.
Changes:
- Added service worker registration in index.html with a minimal service worker implementation
- Updated web manifest with proper PWA metadata (description, theme colors) and added 192x192 and 512x512 icon sizes
- Synchronized backend-generated manifest endpoint to match frontend manifest configuration
Reviewed changes
Copilot reviewed 4 out of 6 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| code/frontend/src/index.html | Added inline script to register service worker for PWA functionality |
| code/frontend/public/sw.js | Created minimal service worker with empty fetch event listener to enable PWA installation |
| code/frontend/public/manifest.webmanifest | Added 192x192 and 512x512 icon entries to meet PWA requirements |
| code/frontend/public/icons/icon-512x512.png | New 512x512 icon for PWA splash screens and app stores |
| code/frontend/public/icons/icon-192x192.png | New 192x192 icon for PWA home screen and various contexts |
| code/backend/Cleanuparr.Api/DependencyInjection/ApiDI.cs | Updated manifest endpoint with description, theme colors, and 128x128 icon entry |
Comments suppressed due to low confidence (1)
code/backend/Cleanuparr.Api/DependencyInjection/ApiDI.cs:148
- The icon paths in the backend-generated manifest use relative paths (e.g., "icons/128.png"), but when the application is served from a subdirectory using BASE_PATH, these relative paths may not resolve correctly.
The backend manifest endpoint should construct absolute icon URLs using the basePath variable, similar to how start_url is set. For example: src = $"{basePath}/icons/128.png" (with proper handling to avoid double slashes when basePath is "/").
new {
src = "icons/128.png",
sizes = "128x128",
type = "image/png"
},
new {
src = "icons/icon-192x192.png",
sizes = "192x192",
type = "image/png"
},
new {
src = "icons/icon-512x512.png",
sizes = "512x512",
type = "image/png"
}
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
No description provided.