Skip to content

fix(pwa): 修復 Safari PWA 離線顯示「無法打開網頁」問題 - #90

Closed
s123104 wants to merge 2 commits into
mainfrom
claude/fix-pwa-offline-safari-P0rtE
Closed

fix(pwa): 修復 Safari PWA 離線顯示「無法打開網頁」問題#90
s123104 wants to merge 2 commits into
mainfrom
claude/fix-pwa-offline-safari-P0rtE

Conversation

@s123104

@s123104 s123104 commented Jan 8, 2026

Copy link
Copy Markdown
Contributor
  • navigateFallback 路徑修正:使用動態路徑 ${base}index.html
  • HTML 快取策略優化:networkTimeoutSeconds 5s→2s(Safari 友好)
  • navigateFallbackDenylist 簡化:排除所有帶副檔名請求
  • offline.html 改用相對路徑,避免 base path 問題
  • 更新 additionalManifestEntries revision

claude added 2 commits January 8, 2026 02:06
- navigateFallback 路徑修正:使用動態路徑 ${base}index.html
- HTML 快取策略優化:networkTimeoutSeconds 5s→2s(Safari 友好)
- navigateFallbackDenylist 簡化:排除所有帶副檔名請求
- offline.html 改用相對路徑,避免 base path 問題
- 更新 additionalManifestEntries revision
- postbuild-mirror-dist.js: staticFiles 新增 offline.html
- 根因:SW 預快取 offline.html 但檔案未鏡像到 /ratewise/
- 導致:/ratewise/offline.html 404 → SW 安裝失敗 → 無離線能力
- 修復:確保離線備援頁面正確鏡像到子路徑

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9b4d58d3b7

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread apps/ratewise/vite.config.ts
@github-actions

github-actions Bot commented Jan 8, 2026

Copy link
Copy Markdown
Contributor

📊 PR 檢查結果

✅ 品質檢查

  • Lint: ✅ 通過
  • Format: ✅ 通過
  • TypeScript: ✅ 通過
  • Tests: ✅ 通過
  • Build: ✅ 成功

📦 建置資訊

  • Bundle Size: 4.00 KB
  • Test Coverage: 87.62%

🤖 Automated by GitHub Actions

@s123104

s123104 commented Jan 8, 2026

Copy link
Copy Markdown
Contributor Author

@codex 評論

@github-actions

github-actions Bot commented Jan 8, 2026

Copy link
Copy Markdown
Contributor

🔦 Lighthouse CI 報告

類別 分數 狀態
🚀 Performance 99
♿ Accessibility 100
✨ Best Practices 96
🔍 SEO 100

📊 查看完整報告


門檻:所有類別 ≥ 85 分(軟性警告,不阻擋 PR)

@chatgpt-codex-connector

Copy link
Copy Markdown

摘要

測試

  • pnpm -r typecheck
  • prettier --check .

View task →

@s123104

s123104 commented Jan 8, 2026

Copy link
Copy Markdown
Contributor Author

已合併至 refactor/pwa-offline-best-practices 分支,並統一合併到 main

@s123104 s123104 closed this Jan 8, 2026
s123104 pushed a commit that referenced this pull request Jan 8, 2026
- 合併 PR #89 (offline.html 鏡像) 和 #90 (Safari 修復) 優點
- 參考 Context7 Workbox 官方文檔簡化配置
- 移除 60+ 行冗長註解,保留關鍵信息
- 優化 runtimeCaching 策略註解格式
- health-check.mjs 新增 offline.html 檢查

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
s123104 pushed a commit that referenced this pull request Jan 8, 2026
合併 refactor/pwa-offline-best-practices 分支:
- 整合 PR #89#90 的優點
- 參考 Workbox 官方文檔優化配置
- 清理冗長註解,提升可讀性

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@s123104
s123104 deleted the claude/fix-pwa-offline-safari-P0rtE branch February 2, 2026 01:44
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.

2 participants