opencode icon indicating copy to clipboard operation
opencode copied to clipboard

feat: add PWA support and mobile UI improvements

Open athal7 opened this issue 3 weeks ago • 4 comments

Summary

  • PWA support with service worker caching and web manifest
  • Mobile UI improvements for iOS/Android browsers
  • Touch-friendly controls and keyboard handling

Features

  • Service worker with intelligent caching (stale-while-revalidate)
  • Web app manifest for installable PWA experience
  • iOS meta tags and safe area inset support for notched devices
  • Virtual keyboard detection for proper layout adjustments
  • Project reordering via move up/down menu options on mobile
  • Scroll-to-bottom button when not at conversation end

Related Issues

  • Closes #5126 - Mobile-friendly web UI
  • Relates to #6536 - Mobile App feature request
  • Relates to #6200 - Message box overflow on mobile viewports
  • Relates to #7530 - Cannot type in terminal on mobile browser
  • Relates to #6257 - Easier scrolling (scroll-to-bottom button)

Demo

Before

https://github.com/user-attachments/assets/6ac2c8c7-f6d8-4e45-bac1-c5af17bfda97

After

https://github.com/user-attachments/assets/8e4f286a-84ab-4e2d-9e06-60a60b5fbd01

athal7 avatar Jan 07 '26 21:01 athal7

The following comment was made by an LLM, it may be inaccurate:

No duplicate PRs found

github-actions[bot] avatar Jan 07 '26 21:01 github-actions[bot]

Great work on this PWA support PR, this is really valuable! ✨ Quick small thought: adding Web Push support would let users get notifications with the PWA closed, which would be a nice little enhancement. Fyi, https://github.com/tiann/hapi already has this Web Push capability implemented for reference. Just a suggestion, no obligations at all!

Jovines avatar Jan 13 '26 07:01 Jovines

Thanks for the suggestion! I've added Web Push notification support in the latest commit:

  • Service worker now handles push events and shows notifications
  • Added notificationclick handler to focus/open the app when tapped
  • Server endpoints for push subscription management (/push/subscribe, /push/unsubscribe)
  • Auto-subscribes when notification permission is granted

This allows notifications to be delivered even when the PWA is closed.

athal7 avatar Jan 13 '26 13:01 athal7

Haha thanks for the quick implementation! Looks awesome!

Jovines avatar Jan 13 '26 17:01 Jovines