Skip to content

fix(ratewise): manifest 網域改由 VITE_SITE_URL 環境驅動 - #613

Merged
s123104 merged 1 commit into
experiment/ratewise-product-2026h2from
hotfix/content-nav-safearea-h7
Jul 5, 2026
Merged

fix(ratewise): manifest 網域改由 VITE_SITE_URL 環境驅動#613
s123104 merged 1 commit into
experiment/ratewise-product-2026h2from
hotfix/content-nav-safearea-h7

Conversation

@s123104

@s123104 s123104 commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

Closes #602

PM 二次裁決收斂:safe-area 主修由 #605 處理(已併入 base 89394045)、字體 @font-face 被 Beasties 修剪部分移交 #616@font-face 歸位 index.css+inlineFonts:true 方案)。本 PR 最終範圍只保留 manifest 的 VITE_SITE_URL 環境驅動

Summary

generate-manifest.mjsscopestart_url 改由 VITE_SITE_URL 環境變數驅動(與 seo-metadata canonical 同一 SSOT),含 trailing-slash 正規化;未設定時回退 APP_INFO.siteUrl——預設輸出與 committed manifest 零 diff(已實證,見下)。staging 部署只需設 VITE_SITE_URL=https://ratewise-staging.zeabur.app/ratewise/,不硬編任何 staging 網域;id 維持 /ratewise/ 不破壞既有安裝更新連續性。

根因 vet(file:line)

  • apps/ratewise/scripts/generate-manifest.mjs:42-43(修改前):scope/start_url 硬編 APP_INFO.siteUrlhttps://app.haotool.org/ratewise/),staging 網域安裝 PWA 時 manifest scope 跨網域、安裝行為異常。

驗證證據

  • 冪等+零 diffpnpm --filter @app/ratewise generate:deterministic 連跑兩次,git diff apps/ratewise/public/manifest.webmanifest 均為 0 行(無 env 時輸出不變的宣稱已實證)
  • env 驅動+正規化VITE_SITE_URL=https://ratewise-staging.zeabur.app/ratewise(刻意不帶 trailing slash)→ 輸出 scope/start_url 均為 https://ratewise-staging.zeabur.app/ratewise/
  • verify:artifacts:通過(31 images across 6 apps)

閘門

  • pnpm vitest run:176 檔 3323 passed(含 build-scripts manifest SSOT 斷言更新)
  • pnpm typecheck:全 workspace 通過
  • pnpm build:ratewise:成功

Test plan

  • manifest 預設輸出零 diff(generate:deterministic 冪等連跑兩次)
  • env 驅動生效+trailing-slash 正規化
  • verify:artifacts/vitest/typecheck/build 全綠
  • staging 部署更新後實機複驗:manifest scope 同域、PWA 可正常安裝

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@s123104

s123104 commented Jul 5, 2026

Copy link
Copy Markdown
Contributor Author

PM 裁決(重複派工收斂):safe-area 主修與 PR #605 重複——#605 已過 Fable 審查(APPROVE)並在合併收尾中,將保留並 Closes #601。本 PR 請改造為專用 PR:剝離 PageNavHeader safe-area 部分(等 #605 併入後 rebase 自然消失),保留兩項獨有價值:(1) generate-manifest.mjs 的 VITE_SITE_URL 環境驅動(解 #602 staging manifest 跨網域);(2) Beasties reduceInlineStyles:false 修復 @font-face 被修剪(真根因發現,讚)。改造指示將由 PM 於 #605 併入後發出。重複 issues #599/#600/#601/#603 屆時一併收斂至 #605/#602

@s123104 s123104 changed the title fix(ratewise): 內容頁 sticky 返回列疊加 safe-area 修復 standalone 遮蔽(#603) fix(ratewise): manifest 網域環境化與修復字體 @font-face 被 Beasties 修剪 Jul 5, 2026
@s123104 s123104 changed the title fix(ratewise): manifest 網域環境化與修復字體 @font-face 被 Beasties 修剪 fix(ratewise): manifest 網域改由 VITE_SITE_URL 環境驅動 Jul 5, 2026
@s123104
s123104 force-pushed the hotfix/content-nav-safearea-h7 branch from c1e3043 to 00c2ee7 Compare July 5, 2026 21:23
@github-actions

github-actions Bot commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

⚠️ Deprecation Warning: The deny-licenses option is deprecated for possible removal in the next major release. For more information, see issue 997.

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

@github-actions

github-actions Bot commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

✅ SEO 審計通過!所有 2026 標準驗證項目都符合要求。

  • ✅ Sitemap 2026 標準
  • ✅ Breadcrumb Schema
  • ✅ JSON-LD 結構化數據
  • ✅ 內部連結結構

@github-actions

github-actions Bot commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

✅ SEO 審計通過!所有 2026 標準驗證項目都符合要求。

  • ✅ Sitemap 2026 標準
  • ✅ Breadcrumb Schema
  • ✅ JSON-LD 結構化數據
  • ✅ 內部連結結構

- generate-manifest 的 scope/start_url 改由 VITE_SITE_URL 環境變數驅動+trailing-slash 正規化,
  未設定時回退 APP_INFO.siteUrl,committed manifest 預設輸出零 diff(已實證)
- staging 等替代網域部署設 VITE_SITE_URL 即可脫離跨網域 scope,不硬編任何 staging 網域;
  id 維持 /ratewise/ 不破壞既有安裝更新連續性
- build-scripts 測試同步改斷言 env 驅動寫法;002 與 changeset 對齊 manifest 專用範圍
- 字體 @font-face 被 Beasties 修剪部分經 PM 裁決移交 #616(inlineFonts 方案)處理

測試:pnpm vitest run、pnpm typecheck、pnpm build:ratewise、
generate:deterministic 冪等+committed manifest 零 diff、verify:artifacts 通過

Co-authored-by: Cursor <cursoragent@cursor.com>
@s123104
s123104 force-pushed the hotfix/content-nav-safearea-h7 branch from 1d6f774 to a97b760 Compare July 5, 2026 22:22
@github-actions

github-actions Bot commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

✅ SEO 審計通過!所有 2026 標準驗證項目都符合要求。

  • ✅ Sitemap 2026 標準
  • ✅ Breadcrumb Schema
  • ✅ JSON-LD 結構化數據
  • ✅ 內部連結結構

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.

1 participant