Files
Arcrun/console-ui/public/console/dashboard
uncle6me-web ad367e450d console-ui: 修好壞了一個月的 build + 具名部署目標(個人版/企業版)
🔴 根因:5a16484 把 UI 搬 CF Pages 時「移出 → console-ui/」實際上只搬了
build 產物(HTML),三支 renderer 原始檔被刪且沒搬 →
`npm run build` 從那天起 ENOENT 死掉,線上 HTML 是刪檔前烤好的,
一個月來無法重建(CONSOLE_PROFILE 改了也不會生效,因為 build 跑不起來)。

修法:
- 從 git 撈回 console.ts(1623)/portal-ui.ts(1390)/console-dashboard.ts(822)
  放進 console-ui/src/——UI 原始碼跟著 UI 專案走,才是那一刀的原意
- build.mjs 加 resolveSource():本地 src/ 優先,找不到才回退 cypher-executor

新增具名部署目標(deploy.targets.json + scripts/deploy.mjs):
一個目標=帳號+profile+apiBase 綁在一起,解決三次帶漏參數:
- demo 站漏 CONSOLE_PROFILE=rag → 顯示個人版 7 頁駕駛艙(leo「進去是 Mira 介面」的真因)
- 兩站漏 ARCRUN_API_BASE → apiBase 空 → 前端打自己 405 → 登不進去
- 兩帳號都有同名 arcrun-console-ui 專案且 wrangler OAuth 登入在 uncle6
  → 不指定帳號 deploy 會部到 demo 站(差點蓋掉,改用 API token 鎖帳號)

  npm run deploy:personal    → leo21c, profile=full(7頁), apiBase 指 leo21c worker
  npm run deploy:enterprise  → uncle6, profile=rag(4頁落地搜尋), apiBase 指 cypher.arcrun.dev

實測(用戶真的會走的路):
- mira.uncle6.me/console/ 200,VIEWS 7 頁,apiBase 對,CORS ACAO 通
- rag-demo.arcrun.dev 4 頁落地搜尋;登入 OK、搜「藍鯨導航儀」5 筆(未受部署影響)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-22 19:09:29 +08:00
..