Skip to content

[1721 by GPT-5.6 Sol] Add the installable PWA shell, manifest, icons, and safe service worker - #1933

Merged
propr-dev[bot] merged 1 commit into
1716-epic-failed-to-3m8from
1721/gpt-5.6-sol-add-the-installable-pwa-s-20260824-1058-f1o
Aug 24, 2026
Merged

propr-dev[bot] merged 1 commit into
1716-epic-failed-to-3m8from
1721/gpt-5.6-sol-add-the-installable-pwa-s-20260824-1058-f1o

Conversation

@propr-dev

@propr-dev propr-dev Bot commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

AI Implementation Summary

Closes #1721

Branch: 1721/gpt-5.6-sol-add-the-installable-pwa-s-20260824-1058-f1o
Commits: ✅ Changes committed (968ca09)


AI Processing Completed

Execution Details:

Summary:
Implemented the installable PWA shell.

  • Added manifest.webmanifest with standalone mode, theme colors, icons, and shortcuts.
  • Generated branded 192px, 512px, maskable, and Apple touch icons.
  • Added iOS/PWA metadata to index.html.
  • Added a static-shell-only service worker with strict API, Socket.IO, OAuth, config.js, cross-origin, and non-GET exclusions.
  • Added secure push URL validation, GitHub PR-only external links, window focusing/deep linking, local dismissal, navigation-only mutating actions, and app badges through the standardized WorkerNavigator API used by WebKit and W3C.
  • Added production/secure-context-only registration.

Validation passed:

  • 48 test files, 389 tests
  • Focused PWA suite: 20 tests
  • Typecheck and lint
  • Production build
  • Manifest/icon dimension and served-asset checks

A live Chromium DevTools installability audit wasn’t possible because the workspace has no Chromium executable.

Detailed Logs:

  • Conversation: 134 messages
  • Session: 01a0336d-1e2d-7ef1-9a2f-f6833b9c2ae4

Log files stored at:

  • conversation: /tmp/claude-logs/issue-1721-2026-08-24T11-18-08-783Z-conversation.json
  • output: /tmp/claude-logs/issue-1721-2026-08-24T11-18-08-783Z-output.txt
Latest Conversation Messages

This PR was created automatically by ProPR after processing issue #1721.


💡 Need changes?

Comment on this PR to request refinements — the AI agent monitors comments and will update the implementation based on your feedback. Keep iterating until you're satisfied!

…t, icons, an

Implemented by ProPR AI using gpt-5.6-sol model.

Implementation completed successfully.
@propr-dev

propr-dev Bot commented Aug 24, 2026

Copy link
Copy Markdown
Contributor Author

/ultrafix
Triggered automatically by Planner execution settings.

@propr-dev propr-dev Bot added the ultrafix label Aug 24, 2026
@propr-dev

propr-dev Bot commented Aug 24, 2026

Copy link
Copy Markdown
Contributor Author

🔄 Ultrafix loop started (goal: 8/10, max cycles: 10)

First action: /review

💡 Tip: Remove the ultrafix label from this PR to stop further ultrafix cycles.

@propr-dev

propr-dev Bot commented Aug 24, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ AI Code Review Complete requested by @propr-ultrafix

Posted 1 review:

View Task Details

@propr-dev

propr-dev Bot commented Aug 24, 2026

Copy link
Copy Markdown
Contributor Author

🔍 AI Code Review — claude:claude-sonnet-5

Overall Evaluation

This PR implements the installable PWA shell described in issue #1721: a web app manifest, branded icons, iOS/PWA meta tags, a static-shell-only service worker with careful exclusions for API/Socket.IO/OAuth/config.js traffic, push-notification handling with URL sanitization, and a production/secure-context-gated registration module. The implementation is unusually thorough for a first PWA pass — the service worker treats every untrusted input (push payload URLs, action names, badge counts, event IDs) as adversarial and validates it against an explicit allowlist of app routes and GitHub PR URLs, and it deliberately excludes credentialed/mutating/cross-origin traffic from interception. Test coverage is substantial: a VM-based harness exercises the real service-worker.js file end-to-end (install pre-caching, fetch-interception boundaries, push sanitization, notification click/dismiss/badge flows) in addition to a focused registration-gating test suite. All current head checks pass and no regressions were found in the changed control/data paths I traced (fetch exclusion logic vs. App.tsx routes, vite.config.ts proxy paths, LoginPage.tsx/proprApi.ts OAuth and logout navigation, and the webPushDispatcher.ts/serviceWorker.js push-payload contract all line up correctly).

✅ Security-conscious push/notification handling — safeOpenUrl/safeActionUrl/isGithubPullRequestUrl in propr-ui/public/service-worker.js restrict deep links and action URLs to same-origin app routes or github.com/*/pull/*, and mutating notification actions are proven (by test) to only navigate rather than perform the action, matching the PR's stated security goals.
✅ Thorough exclusion of sensitive/auth traffic — isSensitiveRequestUrl in propr-ui/public/service-worker.js correctly excludes /api/, /socket.io/, config.js, /login, /logout, and OAuth-callback query patterns from interception, verified against the unchanged LoginPage.tsx/proprApi.ts OAuth and logout flows.
✅ Solid test coverage of new behavior — propr-ui/src/serviceWorker.test.ts and propr-ui/src/serviceWorkerRegistration.test.ts exercise install pre-caching, fetch boundary decisions, push sanitization, badge updates, and environment-gated registration with concrete assertions rather than smoke tests.

No regressions or violations of the PR's own objective/invariants were found that require a code change before merge. The PR is ready to merge as-is; the items below are optional hardening/follow-ups rather than blockers.

Merge blockers

No merge blockers.

Suggestions

These are optional follow-ups and are not sent to /fix.

S1: 🟢 Cache never rotates stale hashed assets across deploys

CACHE_NAME in propr-ui/public/service-worker.js is the static string propr-shell-v1, and removeOldShellCaches only deletes caches whose name differs from CACHE_NAME. Because the service-worker file's own bytes typically don't change on a normal app deploy (only the built index.html and its hashed /assets/* references change), the SW won't re-install and won't prune old hashed asset entries from the same cache — they accumulate indefinitely until the cache name itself is bumped. This doesn't break correctness (browsers evict via storage quotas, and serveNavigation always re-fetches index.html online), but tying CACHE_NAME to a build identifier (e.g. a build hash) would keep the cache bounded and predictable.

S2: 🟢 Install pre-cache is all-or-nothing

precacheShell() in propr-ui/public/service-worker.js wraps all PRECACHE_URLS fetches in a single Promise.all, so a transient failure fetching any one asset (e.g. a shortcut icon or logo-loading.png) fails the entire install step and the worker never activates for that attempt. Since installation is retried on the next page load, this is self-healing, but using Promise.allSettled (or treating non-critical icons as best-effort) would make first-time installability more resilient to transient network blips.

S3: 🟢 Possible double badge decrement on notification interaction

handleNotificationClick explicitly calls event.notification.close() and then decrements the badge; notificationclose also decrements the badge independently. Depending on whether the browser fires notificationclose after a programmatic .close() called from within a notificationclick handler (behavior is not fully consistent across implementations), a single notification interaction could decrement the badge count twice. This is exactly the kind of edge case the PR description flags as unverifiable without a live Chromium installability/DevTools audit — worth a manual check before relying on badge accuracy.

S4: 🟢 App route allowlist duplicates App.tsx routes

APP_ROUTE_PATTERNS in propr-ui/public/service-worker.js is a hand-maintained regex mirror of the routes declared in propr-ui/src/App.tsx. If a future route is added to the router but not to this list, push deep links/actions targeting it will silently fall back to / instead of navigating correctly. Consider generating or testing this list against the actual route table to prevent drift.

S5: 🟢 No live installability audit performed

The PR description acknowledges a live Chromium DevTools installability audit wasn't possible in the execution environment. Given the manifest/icon/service-worker pieces all look correct on inspection, this is not a blocker, but a manual "Add to Home Screen" verification in a real browser before wide rollout would give higher confidence than the unit-test harness alone (which mocks the SW globals rather than running in an actual service worker context).

Score

No actionable findings were identified, changed behavior is well-tested, and all current-head checks pass; remaining items are optional hardening for long-term cache hygiene and edge-case verification.
Score: 8/10


🤖 Review Details

  • Model: Claude Sonnet 5
  • Time: 3m 35s
  • Tokens: 61,480 (40,693 in / 20,787 out)
  • Cost: $0.31

View Task


💡 Next step: Comment /fix to address F# merge blockers only.
F# IDs increment across review comments and remain permanent, so selectors such as /fix F3 F5 stay unambiguous across cycles. Suggestions require a separate ordinary follow-up request.

🤖 Review by ProPR

@propr-dev propr-dev Bot removed the ultrafix label Aug 24, 2026
@propr-dev
propr-dev Bot merged commit 26f8a12 into 1716-epic-failed-to-3m8 Aug 24, 2026
20 checks passed
@propr-dev
propr-dev Bot deleted the 1721/gpt-5.6-sol-add-the-installable-pwa-s-20260824-1058-f1o branch August 24, 2026 11:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants