U-1: /studio 退場 — 移除直連 Gemini SPA,307 轉址至 /app#83
Merged
Conversation
/studio 的原 infoCard 前端 client-side 直連 Gemini,繞過後端計費 + review
gate;其源碼不在本 repo 無法「改走後端」,且 U-2 已在 /app 補齊視覺站對等
(逐區 refine + 區域選擇)。依拍板「先補 /app 對等再退場 /studio」執行退場:
- server/main.py:移除 /studio StaticFiles mount + SPA fallback,改無條件
GET /studio 與 /studio/{path} → 307 轉址 /app/(暫時轉址不被永久快取、保留
反悔餘地;無條件註冊=即使殘留 web/studio build 也不再被服務)。一舉關掉
繞過計費 + 繞過審查漏洞、舊書籤不 404。
- 移除 banner helper now-dead 的 studio 參數(僅 /ui 仍用 legacy banner)。
- landing.html:移除 /studio legacy 卡片 + 連帶 .warn CSS。
- tests/test_legacy_banner.py:banner 注入 4 測 + /studio 根與深連結
307→/app/ 2 測(TestClient 不依賴 build 產物)。
本機全套 2706 passed(剩 3 個 QR/journal 字型像素為容器缺 Noto CJK 假象,
CI 權威)。
https://claude.ai/code/session_01PbVQ2LtjgjfgpujfszRG7B
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.
做什麼
Phase 3 U-1:讓
/studio退場。原 infoCard 前端在/studio是 client-side 直連 Gemini,繞過後端計費 + 繞過 review gate(既有計費/審查漏洞)。其源碼不在本 repo 無法「改走後端」,且 U-2(2026-06-15)已在/app補齊視覺站對等(海報/圖卡逐區 refine + 區域選擇 = 唯一「大」缺口)。故依劉老師拍板「先補/app對等再退場/studio」執行退場。為什麼
/app已功能對等,退場時機成熟。怎麼改
server/main.py:移除/studio的StaticFilesmount + SPA fallback,改無條件註冊GET /studio與GET /studio/{path}→ 307 轉址/app/。web/studiobuild 存在與否)→ 即使殘留舊 build 也不再被服務。/app/。_legacy_banner_html/_inject_legacy_banner/_serve_legacy_spa)now-dead 的studio參數(僅/ui仍用 legacy banner)。landing.html:移除/studiolegacy 卡片 + 連帶不再使用的.warnCSS。怎麼測
tests/test_legacy_banner.py:banner 注入 4 測 +/studio根與深連結(/studio、/studio/、/studio/poster、/studio/assets/index.js)一律 307→/app/2 測(TestClient,不依賴 build 產物)。journal字型像素失敗為容器缺 Noto CJK 字型的環境假象(CI 裝了字型為權威)。Reviewer 決策點
server/runner.pyrender 入口 assert、reviewed機制或 auth。/ui(影片站)本輪保留 legacy banner 過渡,未一併退場(範圍聚焦/studio);若要連/ui一起退場可另開小 PR。https://claude.ai/code/session_01PbVQ2LtjgjfgpujfszRG7B
Generated by Claude Code