feat: add PWA support and mobile UI improvements
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
The following comment was made by an LLM, it may be inaccurate:
No duplicate PRs found
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!
Thanks for the suggestion! I've added Web Push notification support in the latest commit:
- Service worker now handles
pushevents and shows notifications - Added
notificationclickhandler 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.
Haha thanks for the quick implementation! Looks awesome!