chore(ratewise): 生產治理 rebased on main(取代 #411)#433
Open
s123104 wants to merge 48 commits into
Open
Conversation
- 修正測試檔動態 import type annotation 警告 - 新增生產治理 spec 與 implementation plan - 恢復 RateWise lint 0 warning 品質閘門 測試:pnpm --filter @app/ratewise lint;pnpm --filter @app/ratewise typecheck
- 將內部展示與測試頁排除於 production route surface - 補 route surface 測試,避免 prerender 與 app shell 漂移 - 同步 TypeScript / Node SEO path SSOT,並新增 changeset 測試:route surface、seo public surface、prerender、typecheck、build
- 將 unhandled rejection 改為集中分類 - 限制 production hydration suppression,避免遮蔽真錯誤 - 補 chunk、history 404 與 generic fetch 分類測試 測試:errorClassification、chunkLoadRecovery、sw、pwa recovery、typecheck
- 將核心無障礙與離線體驗納入可執行驗證 - 加入 scheduled production governance workflow - 將趨勢圖 latency budget 改為明確手動與排程 gate 測試:accessibility e2e、offline indicator e2e、trend latency e2e、typecheck、workflow prettier
- 拆分 live data、deterministic generation 與 artifact verify scripts - 移除本機 Lighthouse 與 tsbuildinfo 產物追蹤 - 同步 README、AGENTS 與 CLAUDE 的 artifact policy 測試:build-scripts vitest、verify:artifacts、generate:deterministic、typecheck、prettier
- 將幣別落地頁 route registration 收斂到 registry - 補齊 SEO paths、page entry 與 routes 消費的 parity tests - 同步 production route surface 測試期望與稽核紀錄 測試:currency route registry vitest、seo paths vitest、route surface vitest、verify:ssot、typecheck
- 將 color-scheme 測試改為確認 production 不輸出 internal-only HTML - 同步 002 稽核紀錄 測試:prerender vitest、pnpm test、build:ratewise
- prebuild 不再刷新 tracked live rate data - refresh:fallback-rates 更新 build-time fallback snapshot - runtime fallback 改讀 build-time snapshot SSOT 測試:pnpm test;typecheck;build;format;diff check
- 多幣別三態切換改用 pair-level availability - 修正換錢所反向 TWD 與 spot-only label 漂移 測試:focused MultiConverter/useCurrencyConverter vitest;ratewise typecheck - pnpm format;git diff --check;pnpm test;pnpm --filter @app/ratewise build
- 提升多幣別匯率資訊文字對比 - 讓主要滾動區域可鍵盤聚焦 - 補上 AppLayout 回歸測試並同步 changeset 與 002 紀錄 測試:pnpm --filter @app/ratewise typecheck 測試:pnpm --filter @app/ratewise exec vitest run AppLayout.safe-area.test.tsx MultiConverter.test.tsx 測試:pnpm --filter @app/ratewise build 測試:Playwright 多幣別 accessibility desktop/mobile 測試:pnpm format;git diff --check
- 修正 GA4 E2E 對建置 runtime 的誤判 - 修正 Firefox offline 測試呼叫 Chromium-only CDP 的失敗 測試:pnpm --filter @app/ratewise test:e2e;pnpm --filter @app/ratewise typecheck
- 線上遠端匯率來源全失敗且無快取時改用 build-time snapshot - 更新 RateWise 與 exchangeRateService 回歸測試 測試:pnpm --filter @app/ratewise test;pnpm --filter @app/ratewise typecheck
- SSG 金額頁注入改讀 build-time fallback snapshot - 補上 clean checkout 與 prerender 回歸測試保護 測試:vitest build-scripts/prerender;typecheck;build(無 public/rates.json)
- 更新 build-time fallback snapshot 至最新台銀快照 - 修正刷新腳本說明與幣別數量輸出 測試:build-scripts vitest;typecheck;verify-ssot-sync;git diff --check
- 移除每日匯率資料 PR 的 workflow 直接合併步驟 - 改由 branch protection 與 GitHub 原生合併控制接手 - 補上 workflow 回歸測試與治理文件 測試:build-scripts vitest;typecheck;verify-ssot-sync;git diff --check
- 補 Firefox NetworkError 訊息匹配,避免落入 unknown 觀測桶
- 補 Safari NSURLError 系列訊息(offline / network lost / hostname not found / cannot connect)匹配
- 補 Safari TypeError("Load failed") 仍走 chunk-load 的迴歸測試,避免新 pattern 搶走 chunk recovery
- 修正 prebuild-fetch-rates cache 分支幣別數量輸出單位,與成功路徑一致
- 同步更新 002 SSOT 紀錄與 changeset
測試:vitest errorClassification(11 passed);pnpm -r typecheck;prettier --check;verify-ssot-sync
- Sentry `beforeSend` 改用 `classifyUnhandledRejection`,避免兩處重複維護 fetch 字面比對 - Firefox / Safari 多種網路失敗訊息原本繞過 Sentry 過濾,現與跨瀏覽器 SSOT 一致 - 同步更新 002 SSOT 紀錄與 changeset 測試:vitest 29 passed;typecheck;Playwright AB 7 cases(6 fetch + 1 control)全綠
- client 加 aggregate-first:與 PROVIDER_RATES_PATH.aggregate 對齊台銀 history-30d 慣例 - 5 分鐘 memory cache 涵蓋 aggregate 命中與 fallback 兩條路徑,避免重複 fetch - aggregate 不存在時自動退回原本逐日 fetch,行為無回歸 - 4 個單測覆蓋命中 / 404 fallback / shape 不合法 / TTL cache 測試:moneyboxRateService 20 passed;typecheck;Playwright AB 50 reqs / ~5049ms → 1 req / ~2ms
- 移除說明性註解,改由函式名與結構自說明 - 抽出 fetchExchangeShopHistoricalRatesFromDailyEndpoints 與 aggregate 路徑對稱 - 兩處 historyAggregateCache 寫入收斂為單一寫入點 測試:moneyboxRateService 35 passed;typecheck
- Save snapshot 後讀本地 history/*.json 產生 history-30d.json(providerId/generatedAt/snapshots) - git add、CDN purge、post-push refresh 同步加入 aggregate file - 對應 client 端 fetchExchangeShopHistoricalRatesRange 的 aggregate-first 路徑 測試:本地 dry-run 3 fixture days 產生符合 client 預期 shape 的 aggregate JSON
- 建立 RateWise DESIGN/PRODUCT/SPEC,完成頁面盤點 - 收斂麵包屑、內容頁、App shell、通知與 PWA token - 刪除未使用 UI 死碼並補齊守門測試 測試:ratewise Vitest 全量通過 測試:ratewise typecheck、SSOT sync、build 通過 測試:Chrome /seo-tech console 0 error / 0 warning
- 恢復 Tailwind 標準 radius 預設值(lg/md/sm/xl),僅新增語義 token(card/panel/control/icon/compact)作為擴充 - 全站 UI 元件遷移至語義 radius token:rounded-card(主面板)、rounded-control(互動元素)、rounded-compact(密集元素) - 新增語義 shadow token 系統(shadow-soft/floating/brand/card/card-hover),取代散落的 Tailwind 預設 shadow - SingleConverter CTA hover 升級至 shadow-brand、SwapButton hover 升級至 shadow-card,修正互動層級回饋 - 品牌色從 Blue 遷移至 Violet/Indigo(Zen 主題),同步 themes.ts/index.css/DESIGN.md - 修正 classnames.ts 計算機按鍵 rounded-lg → rounded-compact(8px),rounded-t-lg → rounded-t-control - SkeletonLoader timeout 回退卡 rounded-control → rounded-card(對齊 feedbackSurfaceTokens 語義) - 同步 DESIGN.md radius 規格與 design-tokens.test.ts 守門測試 測試:typecheck 通過、vitest 2382 tests / 141 files 全綠 Co-authored-by: Cursor <cursoragent@cursor.com>
- PWA shell(index.html/offline.html/manifest/pwaOfflineFallback)品牌色同步至 Violet 主題 - 緊急離線卡片圓角與陰影對齊語義 token(rounded-card / shadow-card) - CDN 備援失敗日誌從 warn 降為 debug,減少正常 fallback 場景的噪音 - moneybox workflow 補齊 aggregate 檔案不存在時的初始化觸發邏輯 - AGENTS.md 新增使用者偏好與工作區事實(agents-memory-updater 產出) 測試:exchangeRateService 測試已涵蓋日誌層級變更,typecheck 通過 Co-authored-by: Cursor <cursoragent@cursor.com>
- 換錢所 computeConverterRate 依 rateMode 選價:mid=(買+賣)/2、sell 雙向賣出、auto 維持客戶視角 - rateMode 貫穿 getUnitExchangeRate、報價 adapter 與趨勢圖,修正選中間價無效的硬編碼問題 - PageNavHeader 砍掉 sticky/safe-area hack 改 in-flow pill 返回鈕,修復 iOS PWA 頂部內容遮擋 - RateSelector 以透明命中區補回 44px 觸控目標,gitignore 忽略本地 impeccable skill bundle - 同步收斂在途測試(themes SSR fallback、換錢所匯率期望值)並補 002 紀錄與 patch changeset 測試:typecheck 全 workspace 通過;ratewise Vitest 1800+ 全綠;scripts 7/7;prettier/eslint 通過
- RatingModal 星星按鈕由 32px 升至 44px 圓形命中區,新增觸控目標守門測試(TDD) - OpenData 複製鈕以透明命中區補 44px 並補 focus-visible ring;MailtoLink、計算機關閉鈕同步補齊 - OpenData/Footer bare rounded 收斂為 rounded-compact,對齊語義 radius token SSOT - 更新 002 紀錄與 patch changeset 測試:typecheck 通過;RatingModal/MailtoLink/OpenData/Footer/calculator 相關 Vitest 307+ 全綠
- 新增 radius-ssot.test.ts regex 守門:元件層禁用 bare rounded 與 Tailwind 原生圓角尺寸 - SkeletonLoader/ColorSchemeComparison/notificationTokens 殘留 bare rounded 收斂為 rounded-compact - 趨勢圖 rounded-b-xl 改 rounded-b-card,修正與 rounded-card 卡片底角不貼合 - 更新 002 紀錄與 patch changeset 測試:config 489 tests 全綠(含新守門);SkeletonLoader/趨勢圖測試通過;typecheck/prettier 通過
- Puppeteer 程式化掃描正式站 320/768/1280 視口,僅 open-data 端點 code 標籤溢出(right=449) - 端點路徑補 min-w-0 break-all,OpenData.test.tsx 新增窄視口防溢出守門 - 固定寬度全掃描無 320px 溢出風險,5 個表格均有 overflow-x-auto SSOT 包裹 - 更新 002 紀錄與 patch changeset 測試:OpenData 23 tests 全綠;typecheck/prettier 通過;首頁/multi/faq/guide/幣別頁 320px 零溢出
- 停止對 jsDelivr/GitHub Raw 發送 If-None-Match 條件式請求 - 移除 304 分支,保留 ETag 寫入快取供未來 Worker proxy 路徑 - 同步更新 exchangeRateService 單元測試 測試:pnpm --filter @app/ratewise test -- exchangeRateService(32 passed) Co-authored-by: Cursor <cursoragent@cursor.com>
- 整合二十線 UX 審查收斂為韓式 fintech 對標規格 - 定義 Hero、inline numpad、資訊去重與三階段路線圖 - 附 Phase 1 可執行任務拆解(CalculatorKeypad 抽出起) 測試:pnpm prettier --check docs/superpowers(格式已通過) Co-authored-by: Cursor <cursoragent@cursor.com>
…tion-governance-v2 # Conflicts: # docs/dev/002_development_reward_penalty_log.md
Contributor
|
✅ SEO 審計通過!所有 2026 標準驗證項目都符合要求。
|
- MiniTrendChart 移除 price as number 兩處冗餘斷言 - exchangeRateService 移除 buildTimeRates as ExchangeRateData 冗餘斷言 - 新增 patch changeset 標記內部 lint 清理 測試:lint 0 錯、typecheck 通過、相關測試 49 passed
Contributor
|
✅ SEO 審計通過!所有 2026 標準驗證項目都符合要求。
|
…tion-governance-v2 # Conflicts: # apps/ratewise/src/i18n/index.ts
Contributor
|
✅ SEO 審計通過!所有 2026 標準驗證項目都符合要求。
|
This was referenced Jun 26, 2026
- build-scripts.test 斷言 update-moneybox-rates.yml 含 extractSeoulSnapshotDate 提取 與 Asia/Seoul fallback、且不含 Asia/Taipei,防止 workflow 退回台北時區 - 保留 PR428 wall-clock 方案的回歸守門價值,適配本分支 snapshot date 方案 - 補 002 條目(本次 +1,累計 +67) 測試:ratewise build-scripts.test 47/47 通過 Generated with Claude Code via Happy Co-Authored-By: Claude <noreply@anthropic.com> Co-Authored-By: Happy <yesreply@happy.engineering>
Contributor
|
✅ SEO 審計通過!所有 2026 標準驗證項目都符合要求。
|
* feat(ratewise): 收編金融級計價基準 SSOT 與計算機即時換算預覽 - 新增 rateBasisLabel SSOT util 與四語系 rateBasis i18n 字串 - SingleConverter 顯示計價基準 pill 與 aria-live 換算宣告 - CalculatorKeyboard 即時顯示目標幣別換算預覽 - 清單標示臺銀賣出價基準與 TWD 單位 - 補齊 76 個 basis/a11y/preview/pristine 測試 * fix(ratewise): 多幣別收藏星與字級補足無障礙觸控與對比下限 - 未收藏星不透明度 30%→60%、hover→100% 改善非文字對比 - 幣名與匯率基準行字級 text-[11px]→text-xs(12px 下限) - 收藏星與匯率切換鈕加 after 偽元素擴展觸控熱區 * chore(changeset): @app/ratewise minor 計價基準與計算機預覽 * fix(ratewise): 換算宣告 live region 補顯式 aria-live 語意 - conversion-live-region output 補 aria-live=polite 與 aria-atomic=true - 不僅依賴 output 隱式 role=status,確保螢幕閱讀器確實朗讀換算結果 - a11y 測試斷言 live region 屬性防回歸(Codex review Q5) 測試:vitest SingleConverter.a11y 2 tests 通過;typecheck 通過 --------- Co-authored-by: haotool <haotool.org@gmail.com>
Contributor
|
✅ SEO 審計通過!所有 2026 標準驗證項目都符合要求。
|
- useCalculator 移除冗餘 preview state 與同步 useEffect,改 useMemo 直接衍生 - initialValue 重置改採渲染期 prev-prop 調整,移除唯一 effect 與其匯入 - 新增 getRateBasisLabelKey 與 RATE_BASIS_LIST_NOTE_KEY 集中計價基準 i18n key - 三處元件改引用上述 SSOT,並清理過時 JSDoc 與「新增」式註解 測試:ratewise typecheck 通過、calculator 與 rate-basis 相關測試通過 Co-authored-by: haotool <haotool.org@gmail.com>
Contributor
|
✅ SEO 審計通過!所有 2026 標準驗證項目都符合要求。
|
4 tasks
Contributor
Author
狀態更新(2026-06-27)本 PR 暫不 merge,原因:
建議路徑
|
This was referenced Jun 27, 2026
Contributor
Author
Rebase 衝突評估(2026-06-27,main @ 70dd42f / v2.25.6 已發版)狀態: 衝突熱區(merge-tree 摘要,至少 27 檔
|
This was referenced Jun 27, 2026
This was referenced Jun 29, 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
origin/main合併至新分支chore/ratewise-production-governance-v2,不修改、不關閉 PR chore(ratewise): 生產治理 — PWA precache-first、ETag 修復、SEO 治理 #411。apps/split-meow/舊版 v0.1.4 → 對齊 main v0.2.0衝突解決摘要
sw.ts/sw.test.ts/pwa-offline.test.tsexchangeRateService.tsmoneyboxRateService.ts*Service.test.tserrorClassification.tsreason.message無多餘 assertion)AppLayout.tsxAppLayout.safe-area.test.tsxMultiConverter.tsx/ testRateProviderMenu.test.tsxlatest.json/build-time-rates.jsonratewise-production-governance.yml002_development_reward_penalty_log.mdlighthouse-production.mjs/ testTest plan
pnpm --filter @app/ratewise typecheckpnpm --filter @app/ratewise test run(2417 passed)pnpm --filter @app/ratewise buildpnpm --filter @app/ratewise generate:deterministicMade with Cursor