git:20260607.44659b6 to git:20260611.9d7f5e4

17 added, 17 removed. Audit A to A.

---
name: fec-pwa-implementation
- description: Use when adding or reviewing Progressive Web App capabilities such as installability, manifest metadata, Service Worker registration, Workbox caching, offline fallback, app update prompts, maskable icons, or iOS PWA compatibility. Do not use for general API caching or non-installable performance tuning; Chinese triggers include PWA, 离线, Service Worker.
+ description: Use when adding or reviewing Progressive Web App capabilities such as installability, manifest metadata, Service Worker registration, Workbox caching, offline fallback, app update prompts, maskable icons, or iOS PWA compatibility. Do not use for general API caching or non-installable performance tuning; Chinese triggers include PWA, offline, Service Worker.
---
- # PWA 实现
+ # PWA implementation
## Purpose
- 让 Web 应用具备可安装、离线兜底和可控更新能力。
+ Make web applications installable, offline and controllable to update.
## Procedure
- 1. 确认 PWA 是否值得做:面向移动端/桌面安装、弱网离线、重复访问场景时优先;纯内部后台、强实时流媒体或只需要普通缓存时不要强行 PWA。
- 2. 先补齐 manifest、图标、主题色和 HTML 引用;图标至少覆盖 192/512,Android 需 maskable,iOS 需 apple touch icon。
- 3. 注册 Service Worker,并设计更新提示;不要静默 `skipWaiting()` 后强刷用户页面。
- 4. 用 Workbox 或框架插件管理 precache/runtime cache;登录、支付、权限变更等敏感请求必须走网络。
- 5. 提供 offline fallback 页面和安装提示 UI,并验证首次加载、离线访问、更新激活、卸载重装。
+ 1. Confirm whether PWA is worth doing: priority is given to mobile/desktop installations, weak network offline, and repeated access scenarios; do not force PWA when it is purely internal backend, has strong real-time streaming media, or only requires ordinary caching.
+ 2. First complete the manifest, icon, theme color and HTML reference; the icon covers at least 192/512, Android needs to be maskable, and iOS needs apple touch icon.
+ 3. Register the Service Worker and design an update prompt; do not forcefully refresh the user page after silently `skipWaiting()`.
+ 4. Use Workbox or framework plug-in to manage precache/runtime cache; sensitive requests such as login, payment, and permission changes must go through the network.
+ 5. Provide offline fallback page and installation prompt UI, and verify initial loading, offline access, update activation, uninstallation and reinstallation.
- ## 详细参考
+ ## Detailed reference
- - 需要 manifest 字段、HTML 引用、图标要求、截图和 iOS 注意事项时,加载 [references/manifest-and-icons.md](references/manifest-and-icons.md)。
- - 需要 Service Worker 注册、Workbox 策略、Vite 集成、离线兜底和更新流程时,加载 [references/service-worker-workbox.md](references/service-worker-workbox.md)。
+ - Load [references/manifest-and-icons.md](references/manifest-and-icons.md) when manifest fields, HTML references, icon requirements, screenshots, and iOS notes are required.
+ - Load [references/service-worker-workbox.md](references/service-worker-workbox.md) when Service Worker registration, Workbox policy, Vite integration, offline backup and update process are required.
## Constraints
- - Service Worker 仅在 HTTPS 下工作(localhost 除外)。
- - 缓存策略必须区分页面、静态资源、API 与敏感操作;不要把登录、支付、权限接口缓存起来。
- - Service Worker 更新有生命周期延迟;用户可见刷新提示优先于强制刷新。
- - iOS PWA 能力弱于 Android,安装、推送和生命周期都要单独验证。
- - 缓存有配额和逐出机制,必须设置 max entries / max age。
+ - Service Worker only works under HTTPS (except localhost).
+ - The caching strategy must distinguish between pages, static resources, APIs and sensitive operations; do not cache login, payment, and permission interfaces.
+ - Service Worker updates have a lifecycle delay; user-visible refresh prompts take precedence over forced refreshes.
+ - iOS PWA capabilities are weaker than Android, and installation, push and life cycle must be verified separately.
+ - The cache has quotas and eviction mechanisms, and max entries / max age must be set.
## Expected Output
- 产出可安装的 Web 应用、离线 fallback、可见更新提示和明确缓存策略。验证 Lighthouse PWA、DevTools Application 面板、离线模式、更新发布和移动端安装流程。
+ Produce installable web apps, offline fallbacks, visible update prompts, and explicit caching policies. Validate Lighthouse PWA, DevTools Application panel, offline mode, update release and mobile installation process.