Skip to content

Add PWA shell and offline chat support - #170

Merged
llbbl merged 4 commits into
masterfrom
feature/issue-121-pwa
Sep 14, 2026
Merged

llbbl merged 4 commits into
masterfrom
feature/issue-121-pwa

Conversation

@llbbl

@llbbl llbbl commented Sep 13, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • Adds an installable Vue and Svelte PWA shell with manifest, icons, and offline fallback.
  • Adds service-worker caching, offline message handling, install/status UX, and push subscription collection.
  • Adds documentation and automated asset, feature, integration, and browser coverage.

Changes

PWA shell and offline behavior

  • vite.config.js, src/sw.js, src/js/pwa.js: Configure the service worker, app-shell caching, network-first message handling, offline queue, and install/status behavior.
  • public/manifest.webmanifest, public/pwa-*.png, public/-touch-icon-.png, public/maskable-icon-*.png, public/pwa-icon.svg, public/offline.html: Add install metadata, icons, and the offline fallback page.
  • app/Views/chat/svelteView.php, app/Views/chat/vueView.php, src/svelte/, src/vue/, src/css/chat.scss: Integrate PWA metadata and offline-tolerant chat UX.

Push subscriptions

  • app/Contracts/PushSubscriptionRepository.php, app/Controllers/Api/V1/PushSubscriptionsController.php, app/Models/PushSubscriptionModel.php, app/Database/Migrations/2026-09-13-000000_create_push_subscriptions_table.php: Persist authenticated subscriptions and expose the subscription endpoint.
  • app/Config/Routes.php, app/Config/Services.php: Wire the endpoint and repository service.

Documentation, tests, and build support

  • docs/pwa.md: Document PWA setup, caching, offline behavior, and push subscriptions.
  • tests/Tests/Feature/PushSubscriptionsTest.php, tests/Tests/Integration/PushSubscriptionIntegrationTest.php, tests/Tests/Unit/PwaAssetsTest.php: Cover the subscription API, persistence, and PWA assets.
  • e2e/support/chat-scenarios.ts, playwright.config.ts: Stabilize the browser workflow with the pinned Corepack package manager and robust API payload capture.
  • package.json, pnpm-lock.yaml, Dockerfile, .gitignore, tests/_support/IntegrationTestCase.php, public/favicon.ico: Update dependencies, build/runtime support, test setup, ignore rules, and PWA iconography.

Test plan

  • corepack pnpm check
  • corepack pnpm build
  • corepack pnpm e2e — 6 passed
  • vendor/bin/php-cs-fixer fix --dry-run --diff --sequential
  • composer test — 173 tests, 527 assertions
  • composer test:integration — 11 tests, 65 assertions
  • composer analyse
  • composer audit — no security vulnerability advisories
  • corepack pnpm audit --audit-level moderate — no known vulnerabilities
  • Confirm .github/workflows/mutation.yml remains manual-only via workflow_dispatch

Notes

  • Lighthouse/PWA installability verification is documented in docs/pwa.md as a manual production-build check for the authenticated Vue and Svelte pages; no LHCI gate is added in this PR.

Closes #121

@socket-security

socket-security Bot commented Sep 13, 2026 •

Copy link
Copy Markdown

@llbbl
llbbl merged commit 3c0a5c4 into master Sep 14, 2026
7 checks passed
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.

Add PWA support: service worker, manifest, installable, offline-tolerant

1 participant