You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Document and validate PWA, Web Push, badge, tunnel, and deployment configuration #1729
Web Push requires operator-generated VAPID credentials, HTTPS outside localhost, correct reverse-proxy handling for service-worker assets, and user-visible installation steps. Hosted UI tunnel deployments also need clear guidance because the PWA origin is app.propr.dev while the API may be a per-instance t-<id>.propr.dev origin.
Requirements
Add all Web Push environment variables to .env.example with secret-handling guidance.
Validate incomplete or malformed VAPID configuration in propr check and launcher validation.
Explain that the public key is browser-visible while the private key must stay secret.
Document iOS/iPadOS 16.4+ Home Screen installation and notification permission flow.
Document badge behavior and browser support as progressive enhancement.
Document hosted UI/tunnel origin behavior and subscription ownership.
Document required reverse-proxy paths and cache headers for sw.js, the manifest, icons, and config.js.
Add troubleshooting steps for denied permission, expired subscriptions, missing badges, and tunnel connectivity.
Add release verification steps for Chromium, Android, iOS/iPadOS, and desktop browsers.
Acceptance Criteria
propr check reports a clear failure when only one VAPID key is configured.
No documentation suggests committing or logging the private key.
Self-hosted and hosted-tunnel instructions clearly distinguish UI and API origins.
The docs link to WebKit's official iOS/iPadOS Web Push explanation.
Operators can verify manifest, worker, VAPID config, subscription creation, push delivery, deep linking, and badge count from the documented checklist.
Treat Web Push configuration as an operational contract, not merely frontend documentation. Add validation to the same orchestrator and doctor paths operators already use. A dedicated PWA guide keeps platform instructions discoverable, while deployment and Web UI integration pages retain concise links and proxy requirements.
File: .env.example
Why this file: This is the canonical runtime configuration contract used by CLI, launcher, API, and deployment docs.
--- a/.env.example+++ b/.env.example@@ -120,6 +120,32 @@+# --- PWA Web Push -----------------------------------------------------------+# Web Push is optional. The Inbox and installed PWA work without it, but lock-+# screen notifications require all three VAPID values. Generate one key pair per+# ProPR installation and keep it stable; rotating it requires browsers to enroll+# again.+#+# The public key is intentionally sent to authenticated browsers during push+# enrollment. The private key is a server secret: never commit, log, or expose it+# through runtime UI config.+# WEB_PUSH_VAPID_SUBJECT=mailto:[email protected]+# WEB_PUSH_VAPID_PUBLIC_KEY=+# WEB_PUSH_VAPID_PRIVATE_KEY=+#+# A task in an active state for longer than this threshold is surfaced as stalled.+# Default: 2700000 (45 minutes).+# NOTIFICATION_STALLED_AFTER_MS=2700000
File: docker/launcher/orchestrator.mjs
Why this file: Launcher and CLI startup validation must agree about whether the server has a complete, usable VAPID configuration.
--- a/docker/launcher/orchestrator.mjs+++ b/docker/launcher/orchestrator.mjs@@ -210,6 +210,9 @@ export function resolveConfig(env = process.env, overrides = {}) {
+ const webPushVapidSubject = get('WEB_PUSH_VAPID_SUBJECT');+ const webPushVapidPublicKey = get('WEB_PUSH_VAPID_PUBLIC_KEY');+ const webPushVapidPrivateKey = get('WEB_PUSH_VAPID_PRIVATE_KEY');@@ -260,6 +263,7 @@+ webPushVapidSubject, webPushVapidPublicKey, webPushVapidPrivateKey,@@ -1080,6 +1084,27 @@ export function validateEnv(cfg) {
+ const vapidValues = [cfg.webPushVapidSubject, cfg.webPushVapidPublicKey, cfg.webPushVapidPrivateKey];+ const configuredVapidValues = vapidValues.filter(Boolean).length;+ if (configuredVapidValues > 0 && configuredVapidValues < vapidValues.length) {+ // Partial configuration is worse than disabled push because the UI could+ // appear enrollable while the dispatcher cannot sign deliveries.+ errors.push('Web Push VAPID configuration is incomplete. Set WEB_PUSH_VAPID_SUBJECT, WEB_PUSH_VAPID_PUBLIC_KEY, and WEB_PUSH_VAPID_PRIVATE_KEY together, or unset all three to disable push.');+ }+ if (cfg.webPushVapidSubject && !/^(mailto:|https:\/\/)/.test(cfg.webPushVapidSubject)) {+ errors.push('WEB_PUSH_VAPID_SUBJECT must be a mailto: or https:// contact URI.');+ }
File: packages/cli/src/commands/checkCommands.ts
Why this file:propr check should surface push readiness alongside other environment configuration results.
--- a/packages/cli/src/commands/checkCommands.ts+++ b/packages/cli/src/commands/checkCommands.ts@@ -480,6 +480,19 @@ export async function runChecks(options: RunChecksOptions = {}) {
+ const pushParts = [cfg.webPushVapidSubject, cfg.webPushVapidPublicKey, cfg.webPushVapidPrivateKey].filter(Boolean).length;+ emit(pushParts === 0+ ? {+ name: 'Web Push', status: 'warn', group: 'Configuration',+ detail: 'disabled — configure VAPID keys to enable lock-screen notifications',+ }+ : pushParts === 3+ ? {+ name: 'Web Push', status: 'ok', group: 'Configuration',+ // Never print key material; configuration presence is sufficient for+ // the doctor report and safe to include in CI logs.+ detail: 'VAPID subject and key pair are configured',+ }+ : {+ name: 'Web Push', status: 'fail', group: 'Configuration',+ detail: 'VAPID configuration is incomplete',+ fix: 'Set subject, public key, and private key together, or unset all three.',+ });
File: docs/docs/features/pwa-mobile.md (new file)
Why this file: Users and operators need one end-to-end guide for installation, enrollment, Inbox behavior, action safety, and troubleshooting.
# Mobile PWA, Inbox, and Web Push
ProPR can be installed as a Progressive Web App. The installed app provides a mobile Inbox for plans, tasks, pull requests, indexing failures, and system alerts. Web Push is optional: the Inbox works without it.
## Install### iPhone and iPad
Web Push for Home Screen web apps is supported on iOS and iPadOS 16.4 and newer and does not require Apple Developer Program membership. See WebKit's official explanation: https://webkit.org/blog/13878/web-push-for-web-apps-on-ios-and-ipados/1. Open ProPR in Safari.
2. Use Share → Add to Home Screen.
3. Launch ProPR from the new Home Screen icon.
4. Sign in, open More → Settings → Notifications, and select Enable push on this device.
5. Accept the system permission prompt.
Safari does not expose Home Screen Web Push enrollment to an ordinary browser tab, so install and launch the app before enabling it.
### Android and desktop
Use the browser's Install action, then enable push under Settings → Notifications.
## Inbox actions
Notifications deep-link to the affected plan, task, repository, or system panel. Safe navigation actions may be shown on the notification itself. Stop, follow-up, refine, and approve/execute actions run only in the foreground app. Stop and approve/execute require confirmation.
## Icon badges
When supported, the installed icon shows the authenticated user's unread Inbox count. Badging is progressive enhancement: unsupported browsers still show the same unread count in the Inbox navigation tab.
## Server configuration
Set all three VAPID values or leave all three unset:
~~~bash
WEB_PUSH_VAPID_SUBJECT=mailto:[email protected]
WEB_PUSH_VAPID_PUBLIC_KEY=public-key
WEB_PUSH_VAPID_PRIVATE_KEY=private-key
Keep the key pair stable. The public key is shared with browsers; the private key must remain in the server .env and must never be committed or logged.
Hosted UI tunnels
With the hosted UI, the service worker and PWA installation belong to https://app.propr.dev. The authenticated API and subscription registration may use the selected https://t-<id>.propr.dev tunnel. Keep the selected tunnel available across login redirects as described in the Hosted UI Tunnel guide.
Reverse proxy requirements
Serve these UI paths without an authentication redirect:
/manifest.webmanifest
/sw.js
/icons/*
Serve /sw.js with Cache-Control: no-cache so browser update checks see new worker versions. Do not rewrite /config.js to the SPA shell. Continue forwarding /api/* and /socket.io/* to the API service.
Troubleshooting
Permission denied: change the site's notification permission in browser or operating-system settings; browsers generally will not prompt again automatically.
Enable button missing on iOS: confirm iOS/iPadOS 16.4+ and launch from the Home Screen icon.
Push stopped after browser-data cleanup: disable and re-enable push to create a new subscription.
Badge stale: open Inbox and refresh; ProPR reconciles the badge to the server unread count.
Hosted UI cannot enroll: run propr tunnel verify and confirm the selected tunnel remains available after login.
### File: `docs/sidebars.ts`
**Why this file:** Make the new guide discoverable in the feature navigation.
~~~diff
--- a/docs/sidebars.ts
+++ b/docs/sidebars.ts
@@ -30,6 +30,7 @@
+ 'features/pwa-mobile',
File: docs/docs/operations/deployment.md
Why this file: Production operators need proxy and secret requirements near the existing deployment instructions.
--- a/docs/docs/operations/deployment.md+++ b/docs/docs/operations/deployment.md@@ -200,6 +200,13 @@+- Serve `/manifest.webmanifest`, `/sw.js`, and `/icons/*` from the UI container.+- Send `Cache-Control: no-cache` for `/sw.js` so installed clients discover updates.+- Do not cache authenticated `/api/*`, OAuth, or `/config.js` responses in the service worker or reverse proxy.+- Configure all three `WEB_PUSH_VAPID_*` variables to enable push; keep the private key in `.env` only.++For installation, iOS/iPadOS requirements, notification preferences, and troubleshooting, see [Mobile PWA, Inbox, and Web Push](../features/pwa-mobile.md).
File: docs/docs/operations/web-ui-integration.md
Why this file: Contributors extending the UI need the service-worker caching and action-safety rules.
--- a/docs/docs/operations/web-ui-integration.md+++ b/docs/docs/operations/web-ui-integration.md@@ -80,6 +80,12 @@+The PWA service worker caches only static shell assets. Never add `/api/*`, `/socket.io/*`, OAuth routes, runtime `config.js`, task logs, prompts, or diffs to its cache. Notification payloads contain short lock-screen-safe summaries and deep links; detailed data is fetched after normal authentication. Workflow mutations such as stop and approve/execute must open the foreground UI and require confirmation.
Activity
propr-dev commentedon Aug 2, 2026
Suggested Implementation:
Implementation Approach
Treat Web Push configuration as an operational contract, not merely frontend documentation. Add validation to the same orchestrator and doctor paths operators already use. A dedicated PWA guide keeps platform instructions discoverable, while deployment and Web UI integration pages retain concise links and proxy requirements.
File:
.env.exampleWhy this file: This is the canonical runtime configuration contract used by CLI, launcher, API, and deployment docs.
File:
docker/launcher/orchestrator.mjsWhy this file: Launcher and CLI startup validation must agree about whether the server has a complete, usable VAPID configuration.
File:
packages/cli/src/commands/checkCommands.tsWhy this file:
propr checkshould surface push readiness alongside other environment configuration results.File:
docs/docs/features/pwa-mobile.md(new file)Why this file: Users and operators need one end-to-end guide for installation, enrollment, Inbox behavior, action safety, and troubleshooting.
Keep the key pair stable. The public key is shared with browsers; the private key must remain in the server
.envand must never be committed or logged.Hosted UI tunnels
With the hosted UI, the service worker and PWA installation belong to
https://app.propr.dev. The authenticated API and subscription registration may use the selectedhttps://t-<id>.propr.devtunnel. Keep the selected tunnel available across login redirects as described in the Hosted UI Tunnel guide.Reverse proxy requirements
Serve these UI paths without an authentication redirect:
/manifest.webmanifest/sw.js/icons/*Serve
/sw.jswithCache-Control: no-cacheso browser update checks see new worker versions. Do not rewrite/config.jsto the SPA shell. Continue forwarding/api/*and/socket.io/*to the API service.Troubleshooting
propr tunnel verifyand confirm the selected tunnel remains available after login.File:
docs/docs/operations/deployment.mdWhy this file: Production operators need proxy and secret requirements near the existing deployment instructions.
File:
docs/docs/operations/web-ui-integration.mdWhy this file: Contributors extending the UI need the service-worker caching and action-safety rules.
propr-dev commentedon Aug 25, 2026
🤖 AI processing has started for this issue using codex agent with gpt-5.6-sol model.
I'll analyze the problem and work on a solution. This may take a few minutes.
Processing Details:
codexgpt-5.6-sol1729/gpt-5.6-sol-document-and-validate-pwa-20260825-0103-4uv1716-epic-failed-to-3m8issue-1729-20260825-0103-gpt-5.6-sol-4uv🔍 Track Task Execution
fix(ai): Resolve issue #1729 - Document and validate PWA, Web Push, b…
[1729 by GPT-5.6 Sol] Document and validate PWA, Web Push, badge, tun…
[Epic] PWA & Web push (#1731)