Skip to content

Fix #49: Add PWA support to make web-tail installable#97

Merged
mishankov merged 2 commits into
mainfrom
issue-49-pwa
Feb 26, 2026
Merged

Fix #49: Add PWA support to make web-tail installable#97
mishankov merged 2 commits into
mainfrom
issue-49-pwa

Conversation

@mishankov
Copy link
Copy Markdown
Owner

Summary

  • Implemented Progressive Web App (PWA) functionality for the web interface
  • App is now installable on mobile and desktop devices
  • Added offline support via service worker
  • Configured proper PWA manifest and icons

Changes

PWA Infrastructure

  • Plugin: Integrated vite-plugin-pwa with Workbox for service worker generation
  • Manifest: Created web manifest with app metadata (name, description, theme colors)
  • Icons: Generated PWA-compliant icons:
    • pwa-192x192.png - Standard PWA icon
    • pwa-512x512.png - High-res PWA icon with maskable variant
    • apple-icon-180.png - Apple touch icon for iOS devices

Code Changes

  • client/vite.config.ts: Configured VitePWA plugin with:
    • Service worker generation with auto-update
    • Workbox for precaching (15 static assets)
    • Manifest configuration with proper scope and start URL
    • Dev mode support for testing
  • client/index.html: Added PWA meta tags:
    • Manifest link
    • Theme color
    • Apple touch icon link
    • Meta description
  • client/src/main.ts: Added service worker registration:
    • Registers SW on app load
    • Handles offline ready and refresh events
    • Automatic updates

PWA Features

Installability: Meets all PWA install criteria
Offline Support: Service worker caches static assets
Standalone Mode: Runs like a native app when installed
Auto-updates: Service worker updates automatically
iOS Support: Apple touch icon for iOS home screen

Build Integration

  • Client build generates PWA assets (manifest, service worker, icons)
  • Server embeds PWA-enabled frontend via Go embed
  • All PWA files included in final distribution

Test plan

  • Client build succeeds with PWA assets generated
  • Server build succeeds with embedded PWA frontend
  • Manifest.webmanifest created with correct metadata
  • Service worker (sw.js) and Workbox generated
  • Icons created in required sizes
  • Manifest linked in HTML head
  • No build errors or warnings

Testing in Browser

To test PWA installation:

  1. Run cd client && bun run build
  2. Run go run ./server from project root
  3. Open http://localhost:4444 in Chrome/Edge
  4. Look for install button in address bar
  5. Install and verify standalone mode
  6. Test offline functionality (disconnect network)

Closes #49

🤖 Generated with Claude Code

mishankov and others added 2 commits February 25, 2026 16:16
Implemented Progressive Web App (PWA) functionality for the web interface
to enable installation and offline capabilities:

Changes:
- Added vite-plugin-pwa with Workbox configuration to client
- Created web manifest with app metadata (name, description, theme)
- Generated PWA icons (192x192, 512x512) and Apple touch icon (180x180)
- Added manifest link and PWA meta tags to index.html
- Registered service worker in main.ts for automatic updates
- Configured precaching for static assets (15 entries)

PWA features:
- Installable on mobile and desktop devices
- Standalone display mode for app-like experience
- Offline support via service worker caching
- Automatic service worker updates
- Apple iOS installation support

Build:
- Client builds successfully with PWA generation
- Server embeds PWA-enabled frontend
- All PWA assets included in dist output

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@mishankov mishankov merged commit 4fd2bdf into main Feb 26, 2026
6 checks passed
@mishankov mishankov deleted the issue-49-pwa branch February 26, 2026 19:52
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.

PWA

1 participant