fix(ratewise): 654/655/656 批次修復——導向豁免、FAQ 目錄、離線 manifest - #672
Merged
Conversation
- RememberedHomeRoute 深連結豁免由參數白名單改為 isDeepLinkEntry 通用豁免(issue 654) - ?converter=legacy 等 URL override 不再被 persisted multi 導向劫持;擇通用豁免避免白名單漂移 - RateWise 偏好寫入沿用同一豁免契約,帶參數進站不覆寫 lastConverterView - 單元測試補 8 項 query 豁免矩陣與 converter=legacy override 解析斷言 測試:vitest run RememberedHomeRoute.test.tsx(21 passed);pre-commit hooks 全數通過 Co-authored-by: Cursor <cursoragent@cursor.com>
- 錨點 id 由 seo-metadata SSOT 序位派生(faq-qN,對齊指南頁 step-N 慣例)掛 scroll-mt safe-area - TOC 對齊指南頁 rail 模式:桌面 sticky 側欄、行動摺疊;整段包在 nav 導覽 chrome 內(issue 655) - heading outline 與可見內容文字零變動;hash 深連結與 TOC 側跳自動展開目標 details - 新增 FAQ.test.tsx 驗收:錨點齊全、TOC 連結有效、無新增 heading、深連結展開 測試:vitest run FAQ.test.tsx(5 passed);pre-commit hooks 全數通過 Co-authored-by: Cursor <cursoragent@cursor.com>
- manifest route 由 NetworkOnly 改為自訂 network-first handler(issue 656) - 線上永遠走網路:no-cache+ETag 條件請求行為不變,成功回應寫入 manifest-cache - 僅離線/網路失敗時回退 runtime cache 副本;無副本維持原錯誤不吞錯 - 不引入 Workbox NetworkFirst,保持 navigation 防回歸斷言有效 - sw.test.ts 補 3 項 handler 行為測試並更新 manifest 策略守門 測試:vitest run sw.test.ts(49 passed);pre-commit hooks 全數通過 Co-authored-by: Cursor <cursoragent@cursor.com>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Contributor
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
Contributor
|
✅ SEO 審計通過!所有 2026 標準驗證項目都符合要求。
|
This was referenced Jul 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
三個獨立小 issue 的批次修復,單一 PR、三個獨立 commit(每 commit 對應一個 issue,含各自 changeset 與 002 條目)。
Closes #654
Closes #655
Closes #656
Commit 對照表
fix(ratewise): 記住畫面導向豁免任何帶參數深連結isDeepLinkEntry通用豁免(任何帶 query 進站皆豁免 remembered redirect);RateWise 偏好寫入共用同一契約。issue 驗收允許白名單方案,擇通用豁免因更不易漂移(新增 URL 參數不需回頭補白名單);trade-off:帶utm_*等追蹤參數進站亦不還原 multi,屬深連結語意的一致行為feat(ratewise): 常見問題頁新增目錄與每題錨點深連結faq-qN,對齊指南頁step-N慣例)+scroll-mtsafe-area(1rem 慣例,對齊 #658 去 sticky 後語意);TOC 對齊指南頁 rail 模式(桌面 sticky 側欄、行動摺疊);hash 深連結與 TOC 側跳自動展開目標detailsfix(ratewise): 離線時 manifest 回退快取副本消除請求失敗NetworkOnly改為自訂 network-first handler:線上永遠走網路(no-cache+ETag 條件請求行為不變,AGENTS.md 假陽性註記行為保留),僅離線回退manifest-cache副本;不引入 WorkboxNetworkFirst以保持 navigation 防回歸斷言驗收證據
#654(單元測試+實機)
?converter=legacy且使用者設定 v2 時 override 解析為 legacy/進站 → 落/multi(記憶不回歸);persisted multi+/?converter=legacy→ 停留/?converter=legacy(v1 單幣別)#655(單元測試+三視口截圖)
FAQ.test.tsx5 項:21 錨點齊全、TOC 連結(行動+桌面 ×21)皆指向有效錨點、TOC 位於nav內且零新增 heading(SSG heading outline 不變)、hash 進站/hashchange 自動展開details頂緣 = 16px(scroll-mt1rem),open=true<nav>導覽 chrome 內——verify-visible-text-parity.mjs正規化規則會剝除<nav>,故可見內容文字節點集合零變動screenshots/,依 QA 規則不入 repo):faq-toc-mobile-390.png(行動摺疊展開)、faq-anchor-jump-mobile-390.png(錨點跳轉)、faq-toc-tablet-768.png、faq-toc-desktop-1440.png(sticky 側欄)#656(sw 單元測試+實機離線)
sw.test.ts補 3 項 handler 行為測試(線上寫入 cache/離線回退副本/無副本不吞錯)+策略守門更新,49 passedfetch('manifest.webmanifest')離線回 200(manifest-cache副本);唯一失敗為外部 CDN 匯率(離線預期);證據manifest-offline-reload-ok.pngfetch(request),瀏覽器 HTTP 層 no-cache+ETag 條件請求照舊Test plan
gh pr checks --watch)Made with Cursor