Skip to content

Add PWA support with offline download#10

Merged
oliks merged 3 commits into
add-playwright-testsfrom
add-pwa-support
Apr 2, 2026
Merged

Add PWA support with offline download#10
oliks merged 3 commits into
add-playwright-testsfrom
add-pwa-support

Conversation

@oliks
Copy link
Copy Markdown
Owner

@oliks oliks commented Apr 1, 2026

Summary

Progressive Web App support with explicit offline download for individual tests.

PWA

  • Web app manifest for "Add to Home Screen" on iOS/Android
  • Service worker caching app shell and static assets
  • PWA icons (192x512) in regular and maskable variants
  • Standalone display mode — no browser chrome when installed

Offline Download

  • "Download for offline" button on home page test cards (only in PWA mode)
  • Only shows for tests that have been opened at least once
  • Single bulk POST request fetches all questions at once (no request spam)
  • Questions cached individually under TestRunner API URLs for seamless offline use
  • Attachment images downloaded and cached
  • Progress bar with status during download
  • "Available offline" badge with trash icon to remove cached data

API

PWA:
- Web app manifest for home screen install
- Service worker caching app shell and static assets
- PWA icons (192, 512) in regular and maskable variants
- Apple Web App and theme-color meta tags

Offline download:
- "Download for offline" button on home page test cards
- Only shows when running as installed PWA
- Only shows for tests that have been opened (known question IDs)
- Single bulk POST request to fetch all questions at once
- Individual questions cached under TestRunner API URLs
- Attachment images downloaded and cached sequentially
- Progress bar with status during download
- "Available offline" badge with trash icon to remove

API:
- POST /api/subject/questions — bulk endpoint accepting IDs in body
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 1, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
openatpl Ready Ready Preview, Comment Apr 1, 2026 10:01am

- Bulk POST /api/subject/questions: filtered IDs, all questions, validation, large lists
- PWA assets: manifest.json, service worker, all icon variants
- Cache test runner pages on visit for offline replay
- Cache Next.js RSC flight responses for client navigation
- Pre-cache test page URL during offline download
- Pass testHref to download function
@oliks oliks merged commit 5f0b2aa into add-playwright-tests Apr 2, 2026
3 checks passed
@oliks oliks deleted the add-pwa-support branch April 2, 2026 13:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant