Skip to content

Fix PWA installability and update contributor docs links#1261

Open
EstevesAndre wants to merge 3 commits intoagent0ai:developmentfrom
psilodigital:fix/pwa-service-worker-scope
Open

Fix PWA installability and update contributor docs links#1261
EstevesAndre wants to merge 3 commits intoagent0ai:developmentfrom
psilodigital:fix/pwa-service-worker-scope

Conversation

@EstevesAndre
Copy link

@EstevesAndre EstevesAndre commented Mar 14, 2026

Summary

This PR restores working PWA behavior and fixes stale contributor documentation links.

Target branch: development
Source branch: fix/pwa-service-worker-scope

Problem

PWA support was present in changelog/release notes, but installability/runtime behavior was broken in practice.
Contributor docs also had outdated links and an incomplete local dependency step.

Root Causes

  • Service worker registration used js/sw.js (scope under /js/ instead of /)
  • webui/js/sw.js was empty, so no real SW behavior existed
  • Manifest/app metadata needed stronger installability wiring
  • Documentation had stale references (development.md, websocket-infrastructure.md)
  • Local dev setup instructions missed requirements2.txt (needed for override pins used in Docker)

Changes

PWA fixes

  • Added a real root service worker: webui/sw.js
  • Kept compatibility shim: webui/js/sw.js imports /sw.js
  • Registered service worker with root scope in app shell
  • Switched manifest reference to absolute path
  • Added/installability metadata in HTML/manifest
  • Added PNG app icons and Apple touch icon:
    • webui/public/icon-192.png
    • webui/public/icon-512.png
    • webui/public/apple-touch-icon.png
  • Updated webui/js/manifest.json with id, scope, and PNG icons

Docs fixes

  • Fixed stale links in:
    • docs/guides/contribution.md
    • docs/developer/architecture.md
    • docs/setup/dev-setup.md
  • Updated local setup instructions to include:
    • pip install -r requirements2.txt
      so local development matches Docker dependency behavior.

Validation

  • Added/ran focused regression test:
    • python3 -m pytest tests/test_pwa_wiring.py
  • Confirmed PWA wiring expectations in app/login/manifest and service worker files.

Notes

This PR fixes repo-side PWA and docs issues.
Live installability on VPS still depends on secure origin/browser policy (https:// or localhost).

@EstevesAndre EstevesAndre changed the title Fix PWA installability and service worker scope Fix PWA installability and update contributor docs links Mar 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant