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>
This commit is contained in:
@@ -1,2 +1,2 @@
|
||||
// Arcrun UI runtime 組態——改這一行就能切 API 目標,不必重新 build。
|
||||
window.ARCRUN_CONFIG = { apiBase: "" };
|
||||
window.ARCRUN_CONFIG = { apiBase: "https://cypher.arcrun.dev" };
|
||||
|
||||
@@ -92,7 +92,7 @@
|
||||
.theme-btn { flex: none; margin-left: 12px; width: 34px; height: 34px; border-radius: 50%; border: 1px solid rgba(var(--ink-rgb),.25); background: none; color: rgba(var(--ink-rgb),.65); font-size: 16px; cursor: pointer; line-height: 1; align-self: center; }
|
||||
</style>
|
||||
<script src="/config.js"></script>
|
||||
<script>window.ARCRUN_API_BASE = (window.ARCRUN_CONFIG && window.ARCRUN_CONFIG.apiBase) || "";</script>
|
||||
<script>window.ARCRUN_API_BASE = (window.ARCRUN_CONFIG && window.ARCRUN_CONFIG.apiBase) || "https://cypher.arcrun.dev";</script>
|
||||
</head>
|
||||
<body>
|
||||
<main>
|
||||
|
||||
@@ -220,7 +220,7 @@
|
||||
.kvline { display: flex; justify-content: space-between; gap: 12px; font-size: 15px; margin: 5px 0; }
|
||||
</style>
|
||||
<script src="/config.js"></script>
|
||||
<script>window.ARCRUN_API_BASE = (window.ARCRUN_CONFIG && window.ARCRUN_CONFIG.apiBase) || "";</script>
|
||||
<script>window.ARCRUN_API_BASE = (window.ARCRUN_CONFIG && window.ARCRUN_CONFIG.apiBase) || "https://cypher.arcrun.dev";</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
@@ -238,7 +238,7 @@
|
||||
<div id="login-status" class="err" style="font-size:14px;min-height:1.2em"></div>
|
||||
</div>
|
||||
<div style="font-size:13.5px;color:rgba(var(--ink-rgb),.4);line-height:1.7">這是一個人的智慧總部。<br>若你不是擁有者,這裡沒有你要找的東西。</div>
|
||||
<a href="/console/dashboard" style="font-size:13.5px;color:rgba(var(--amber-rgb),.7)">免登入看駕駛艙 ›</a>
|
||||
|
||||
<button class="btn3 themelabel" data-themetoggle style="align-self:center;padding:8px 16px;font-size:13.5px;border-radius:999px">☾ 切深色</button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -266,11 +266,10 @@
|
||||
<div id="shell">
|
||||
<div id="sidenav">
|
||||
<div class="logo">Arcrun</div>
|
||||
<div class="nav" data-nav="cockpit">駕駛艙</div>
|
||||
|
||||
<div class="nav" data-nav="search">總庫搜尋</div>
|
||||
<div class="nav" data-nav="workflows">工作流</div>
|
||||
<div class="nav" data-nav="creds">憑證管理</div>
|
||||
<div class="nav" data-nav="inbox">分流台</div>
|
||||
|
||||
<div class="nav" data-nav="settings">設定</div>
|
||||
<div class="nav themelabel" data-themetoggle style="margin-top:8px;font-size:14.5px">☾ 切深色</div>
|
||||
<div class="foot" id="side-foot"></div>
|
||||
@@ -442,13 +441,7 @@
|
||||
<div id="st-pw-status" style="font-size:14px;min-height:1.2em"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel" style="display:flex;align-items:center;gap:12px;cursor:pointer" data-nav="creds">
|
||||
<div>
|
||||
<div style="font-size:17px;font-weight:600">憑證管理</div>
|
||||
<div style="margin-top:4px;font-size:14px;color:rgba(var(--ink-rgb),.55)">只保存目錄與加密值,不可回看</div>
|
||||
</div>
|
||||
<span style="margin-left:auto;color:rgba(var(--amber-rgb),.6);font-size:18px">›</span>
|
||||
</div>
|
||||
|
||||
<div class="panel">
|
||||
<div style="font-size:17px;font-weight:600;margin-bottom:12px">系統資訊</div>
|
||||
<div id="st-info"><div class="muted">載入中…</div></div>
|
||||
@@ -462,10 +455,10 @@
|
||||
|
||||
<!-- 手機底部導覽 -->
|
||||
<div id="tabbar">
|
||||
<div class="tab" data-nav="cockpit">駕駛艙</div>
|
||||
|
||||
<div class="tab" data-nav="search">搜尋</div>
|
||||
<div class="tab" data-nav="workflows">工作流</div>
|
||||
<div class="tab" data-nav="inbox">分流台</div>
|
||||
|
||||
<div class="tab" data-nav="settings">設定</div>
|
||||
</div>
|
||||
|
||||
@@ -600,8 +593,8 @@ function taipeiMonthDay(ms) { var d = new Date(ms + TAIPEI_OFFSET_MS); return {
|
||||
// ── 路由 ──
|
||||
// VIEWS / HOME 由 server 依 CONSOLE_PROFILE 注入(full=全套 7 頁落地駕駛艙;rag=4 頁落地搜尋)。
|
||||
// 不在 VIEWS 裡的 hash(含被 profile 裁掉的頁)一律導回 HOME——手打 #/cockpit 也進不去。
|
||||
var VIEWS = ["cockpit","search","card","workflows","creds","inbox","settings"];
|
||||
var HOME = "cockpit";
|
||||
var VIEWS = ["search","card","workflows","settings"];
|
||||
var HOME = "search";
|
||||
function currentRoute() {
|
||||
var h = location.hash.replace(/^#\/?/, '');
|
||||
var seg = h.split('/');
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
<!doctype html>
|
||||
<html lang="zh-Hant">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Arcrun RAG</title>
|
||||
<!--
|
||||
根目錄直接導向搜尋 Portal。
|
||||
|
||||
為什麼不做「選擇介面」的導覽頁(2026-07-21 leo 實際撞到):
|
||||
這個網域(rag-demo.arcrun.dev)是給**客戶測試**用的入口,
|
||||
客戶測試指南寫的就是「一個網址、一組帳密」——多一層選擇=多一個困惑點,
|
||||
而且會讓客戶看到 Admin Console 這個維運介面(不該對客戶露出)。
|
||||
|
||||
維運者要進 console 直接打 /console/ 即可。
|
||||
-->
|
||||
<meta http-equiv="refresh" content="0; url=/portal/">
|
||||
<link rel="canonical" href="/portal/">
|
||||
<script>location.replace('/portal/');</script>
|
||||
<style>
|
||||
body{margin:0;min-height:100vh;display:grid;place-items:center;
|
||||
background:#faf8f5;color:#6b635a;
|
||||
font:15px/1.7 system-ui,-apple-system,"Noto Sans TC",sans-serif}
|
||||
@media(prefers-color-scheme:dark){body{background:#1a1816;color:#9a9186}}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<p>正在前往搜尋頁… <a href="/portal/">沒有自動跳轉請點這裡</a></p>
|
||||
</body>
|
||||
</html>
|
||||
@@ -164,7 +164,7 @@
|
||||
.kvline { display: flex; justify-content: space-between; gap: 12px; font-size: 15px; margin: 5px 0; }
|
||||
</style>
|
||||
<script src="/config.js"></script>
|
||||
<script>window.ARCRUN_API_BASE = (window.ARCRUN_CONFIG && window.ARCRUN_CONFIG.apiBase) || "";</script>
|
||||
<script>window.ARCRUN_API_BASE = (window.ARCRUN_CONFIG && window.ARCRUN_CONFIG.apiBase) || "https://cypher.arcrun.dev";</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user