110 Commits

Author SHA1 Message Date
OG T
4d46e6b9a7 style(web): 全站 font-mono → font-body (DM Mono 設計系統套用)
Some checks failed
E2E Health Check / e2e-health (push) Successful in 17s
CD Pipeline / build-and-deploy (push) Has been cancelled
45 個 component + 6 個 page 統一從舊 font-mono 遷移到
font-body (DM Mono),確保設計系統一致性。

font-body = DM Mono (等寬),視覺效果相同但走新設計 token。
保留: font-heading (Syne)、font-dot-matrix (VT323/DSEG7)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-02 09:37:03 +08:00
OG T
3ecfe7b3f5 chore: 清理 NemoNodeAnimation 殘留 + 修復 Migration YAML
Some checks failed
E2E Health Check / e2e-health (push) Successful in 19s
CD Pipeline / build-and-deploy (push) Has been cancelled
- 移除 nemo-node-animation.tsx (無人引用,已被 NemoClaw 取代)
- Migration YAML: 修復 $$ 在 YAML heredoc 被 shell 解析問題
  改用單引號字串 DO '' 語法

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-02 09:09:25 +08:00
OG T
e17248fd10 fix: 首席架構師審查修復 — i18n/CD/時區/死碼清理
Some checks failed
E2E Health Check / e2e-health (push) Successful in 16s
CD Pipeline / build-and-deploy (push) Has been cancelled
P0 前端 i18n 合規 (6 檔案):
- settings/page.tsx: 全面改用 useTranslations('settings')
- auto-repair/page.tsx: 30+ 處硬編碼改用 t('autoRepair.*')
- sidebar.tsx: sectionLabel 改用 tSection(),aria-label 國際化
- openclaw-panel.tsx: STATUS_MESSAGES 改用 tPanel(),Production 改用 tBrand
- alerts/page.tsx: StatPill label 改用 t('incident.severity.*')

P1 CD Pipeline:
- cd.yaml: runs-on 改 self-hosted (ADR-039)
- Telegram Secret 注入失敗改為 exit 1 (ADR-035)
- kubectl patch op:replace → op:add (首次部署相容)

P2 後端:
- langfuse_client.py: 移除 v4.x 死碼分支 (SDK 鎖定 <3.0.0)
- ai.py: 標記 TODO(R4) Router 瘦身

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-02 09:02:41 +08:00
OG T
502621e2f2 feat(web): Knowledge Base 前端頁面 + i18n
Some checks failed
CD Pipeline / build-and-deploy (push) Has been cancelled
E2E Health Check / e2e-health (push) Has been cancelled
- 左側分類導航 (基礎設施/應用層/AI系統/安全合規)
- 頂部搜尋欄 + 類型篩選 + 新增按鈕
- 知識條目列表 (type badge + status + tags + view count)
- 右側詳情 Panel (content + meta + approve/archive)
- 空態設計 (BookOpen icon + 說明文字)
- i18n: zh-TW + en knowledgeBase namespace (30+ keys)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-02 09:00:23 +08:00
OG T
5959855a71 feat(web): 字體系統升級 + NemoClaw SVG 還原 + Knowledge Base 設計文件
Some checks failed
E2E Health Check / e2e-health (push) Has been cancelled
CD Pipeline / build-and-deploy (push) Has been cancelled
- 字體:Syne (標題) + DM Mono (內文) + VT323 (品牌點陣),替換 Inter
- Tailwind: fontFamily 更新 + 5 層文字色彩 token (primary→disabled)
- Sidebar: NemoClaw 白瓷龍蝦爪 SVG + AWOOOI 用 VT323 放大
- OpenClaw Panel: 還原 NemoClaw 3D 白瓷龍蝦爪 (替換 NemoNodeAnimation)
- Knowledge Base 設計文件 (B分離/A K8s Job/Phase1跳過向量搜尋)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-02 00:48:42 +08:00
OG T
75e17528fc feat(settings): 從佔位符升級為完整設定頁面
All checks were successful
CD Pipeline / build-and-deploy (push) Successful in 6m55s
E2E Health Check / e2e-health (push) Successful in 15s
- 4 分區側邊導覽:外觀/語言/通知/系統資訊
- 外觀:緊湊模式 Toggle (localStorage 持久化)
- 語言:zh-TW / en 切換(路由導向)
- 通知:瀏覽器推播 / P0 Only 過濾 Toggles
- 系統:版本、API 端點資訊

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-01 23:03:41 +08:00
OG T
b51241826c feat(auto-repair): 從佔位符升級為完整自動修復頁面
- 統計面板: Playbook 數/高品質數/執行次數/成功率
- 自動修復就緒狀態指示器
- 活躍 P1/P2 Incident 評估列表(可展開查看 Playbook 詳情)
- 執行修復按鈕(呼叫 /api/v1/auto-repair/execute)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-01 23:02:40 +08:00
OG T
cdf60bb8c8 feat(pages): 補全所有缺失路由頁面 (15 個)
Some checks failed
E2E Health Check / e2e-health (push) Has been cancelled
CD Pipeline / build-and-deploy (push) Has been cancelled
實作頁面:
- /monitoring: 黃金指標 + 主機狀態 + 服務健康表格
- /alerts: P0-P3 分組 + 嚴重度統計 (已送)
- /terminal: OmniTerminal 路由 (已送)
- /authorizations: LiveApprovalPanel (已送)

佔位頁面 (ComingSoon):
- /apm /topology /security /compliance
- /auto-repair /deployments /tickets /cost /reports
- /apps /services /users /notifications /billing /help

新增 ComingSoon 元件 (極簡動點動畫)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-01 22:59:02 +08:00
OG T
7dde534575 feat(alerts): 新增告警管理頁面 + i18n 補全
Some checks failed
CD Pipeline / build-and-deploy (push) Successful in 6m52s
E2E Health Check / e2e-health (push) Has been cancelled
- /alerts 頁面:按 P0/P1/P2/P3 分組,15s 自動刷新
- 統計 4 欄(P0 CRITICAL 紅色高亮)
- 空態 / 載入 / 錯誤三態處理
- 補全 alerts.autoRefresh、common.loading/refresh i18n keys

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-01 22:50:12 +08:00
OG T
fccc69972d feat(terminal): 建立 /terminal 路由頁 + 補全 Sidebar 全部 i18n nav keys
Some checks failed
E2E Health Check / e2e-health (push) Has been cancelled
CD Pipeline / build-and-deploy (push) Has been cancelled
- 新增 terminal/page.tsx (自動開啟 OmniTerminal)
- zh-TW/en nav 補全 18 個缺失 key (alerts/monitoring/apm/...)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-01 22:46:59 +08:00
OG T
ddf82937f4 feat(authorizations): 從佔位符升級為完整 HITL 授權頁面
Some checks failed
E2E Health Check / e2e-health (push) Has been cancelled
CD Pipeline / build-and-deploy (push) Has been cancelled
接入 LiveApprovalPanel:Multi-Sig、權限擋板 (RBAC)、SSE 即時更新、CSRF 保護

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-01 22:45:41 +08:00
OG T
79c8a2e7ab fix(layout): 還原 Header 原始設計 + 修復 Metrics Strip 高度
Some checks failed
CD Pipeline / build-and-deploy (push) Has been cancelled
E2E Health Check / e2e-health (push) Has been cancelled
- Header 左側換回頁面標題 (移除重複的 SVG + AWOOOI 品牌)
- Metrics Strip height 50→60px (避免三行文字被截斷)
- 原因: commit 249ecde 錯誤地在 Header 加入品牌區塊,與 Sidebar 重複

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-01 22:42:07 +08:00
OG T
48d89a1a91 style(font): 系統性字體升級 — 對齊業界標準 Linear/Vercel/Anthropic
Some checks failed
E2E Health Check / e2e-health (push) Has been cancelled
CD Pipeline / build-and-deploy (push) Has been cancelled
- openclaw-panel: 11/9/8px → 13/12/11px
- sidebar: nav 13→14px, badges 11→12px, bottom 12→13px, icons 14→15px
- page.tsx: metric labels 11→12px, section headers 12→13px
- incident-card: 11px 全面升 12px, meta 12→13px

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-01 22:15:35 +08:00
OG T
0ae210a433 fix(ui): sidebar font sizes to standard + remove dead NemoClaw SVG from openclaw-panel
All checks were successful
CD Pipeline / build-and-deploy (push) Successful in 6m47s
E2E Health Check / e2e-health (push) Successful in 17s
2026-04-01 21:24:52 +08:00
OG T
0df2625b26 fix(ui): increase font sizes to mainstream web standards across AI Center 2026-04-01 21:05:03 +08:00
OG T
44e2244781 fix(page): wrap with AppLayout to restore Sidebar + Header, use calc(100vh-64px)
Some checks failed
E2E Health Check / e2e-health (push) Has been cancelled
CD Pipeline / build-and-deploy (push) Has been cancelled
2026-04-01 20:30:58 +08:00
OG T
249ecdeb25 feat(header): update NemoClaw Logo SVG with ceramic3d arms and LED core
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-01 20:11:39 +08:00
OG T
e623b1c4e9 chore(incident): remove DualStateIncidentCard (Phase 6.5 old style, migrated to IncidentCard)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-01 20:10:20 +08:00
OG T
d14a58be0d fix(page): correct comment from 3-col to 2-col (sidebar is in AppLayout) 2026-04-01 20:09:27 +08:00
OG T
9268d22dee feat(page): redesign AI Center layout - 3-col Feed+RightPanel, Metrics Strip
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-01 20:07:58 +08:00
OG T
beb6a227db feat(ai): replace dragon arm SVG with NemoNodeAnimation in OpenClawPanel
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-01 20:05:18 +08:00
OG T
edc3707032 fix(incident): a11y AI proposal button, move spin keyframe to globals, fix deps
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-01 20:03:09 +08:00
OG T
823e2b95a3 feat(incident): redesign IncidentCard with FlowPipeline, migrate auth logic from DualState
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-01 20:00:16 +08:00
OG T
8b99dde05e fix(i18n): add tagline and fix liveDashboard section placement 2026-04-01 19:53:57 +08:00
OG T
faf658c4b4 feat(sidebar): 4-section nav with AI center active style #d97757 2026-04-01 19:53:00 +08:00
OG T
dae401270c feat(i18n): rename to AI Center, add flow pipeline keys 2026-04-01 19:52:28 +08:00
OG T
91b42b4bb9 feat(infra): add HostGrid 2x2 compact host grid component 2026-04-01 19:50:27 +08:00
OG T
354bf7a6f2 feat(ai): add NemoNodeAnimation 72x72 SVG with orb-pulse and ring-spin 2026-04-01 19:50:05 +08:00
OG T
16ca133955 feat(incident): add FlowPipeline 7-node pipeline with lobster animation 2026-04-01 19:47:19 +08:00
OG T
c1c7564e41 feat(design): add Anthropic Warmth ai-center color tokens 2026-04-01 19:44:43 +08:00
OG T
c9c60c3a61 feat(mcp-integrations): Phase S 架構修復 + MCP 整合基礎建設
Some checks failed
E2E Health Check / e2e-health (push) Has been cancelled
CD Pipeline / build-and-deploy (push) Has been cancelled
Type Sync Check / check-type-sync (push) Failing after 22s
Phase S 技術債修復 (首席架構師審查 82→完整):
- S-01: generate_alert_fingerprint 移至 AlertAnalyzer.generate_fingerprint() staticmethod
- S-04: 移除 Pydantic v2 deprecated json_encoders (直接用原生 datetime 序列化)

Sentry MCP 整合 (Phase 23):
- ADR-048: Sentry→OpenClaw AI Triage 架構決策
- sentry_webhook_service.py: parse/analyze/create_incident/build_message Service 層
- config.py: SENTRY_WEBHOOK_SECRET (Fail-Closed HMAC-SHA256)

Playwright MCP 整合 (短期):
- smoke.spec.ts: 5 頁面 E2E smoke test (home/dashboard/incidents/approvals/terminal)
- cd.yaml: E2E Smoke Test 步驟 + Telegram 🎭 Smoke 狀態通知

長期規劃 ADR:
- ADR-049: Figma Code Connect 設計系統同步
- ADR-050: Telegram 互動式 Incident 2.0 (6鍵 Inline Keyboard)
- ADR-051: Context7 依賴升級顧問 (Next.js 14→15, FastAPI 0.115→0.128)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-01 16:20:57 +08:00
OG T
22de22c989 refactor(phase-s): Phase S 技術債清理 - 五項架構改善
S-01: generate_alert_fingerprint() 移至 alert_analyzer_service (Router→Service)
S-02: 移除廢棄 USE_NEW_ENGINE config (Phase R 已完成歷史使命)
S-03: github_webhook.py linter 清理 (Field unused + delivery_id noqa)
S-04: Pydantic v2 遷移 - approval/incident models (class Config → ConfigDict)
S-05: Skill 09 v1.1 更新 (USE_NEW_ENGINE 廢棄說明)

測試: 393 passed, 零失敗

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-01 13:12:02 +08:00
OG T
384015ec2c perf(cd): 加速 CI/CD - venv 持久化 + Web cache 精準失效 + 合併 SSH
Some checks failed
CD Pipeline / build-and-deploy (push) Failing after 50s
E2E Health Check / e2e-health (push) Successful in 16s
- Run API Tests: 持久化 /opt/api-venv,pyproject.toml hash 變才重裝 (~6-7 min)
- Build Web: CACHE_BUST=git_sha 取代 --no-cache,deps 層可 cache (~2-3 min)
- Deploy: ConfigMap + Deploy + Health Check 合併為 2 次 SSH 連線 (~30s)
- 預估總節省: ~8-10 min/run

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-01 11:17:47 +08:00
OG T
95de7e0e15 fix(web): 活躍事件 Y/n 按鈕補上 CSRF Token (P0 根本原因)
All checks were successful
E2E Health Check / e2e-health (push) Successful in 19s
問題: DualStateIncidentCard 的 Y/n 按鈕呼叫 apiClient.signApproval/rejectApproval
時,沒有帶 X-CSRF-Token header 也沒有 credentials: 'include'
後端返回 403 CSRF token cookie missing

修復:
- api-client.ts: signApproval/rejectApproval 加入 csrfToken 參數
  + X-CSRF-Token header + credentials: 'include'
- dual-state-incident-card.tsx: 加入 useCSRF() hook,
  將 csrfToken 傳入 API 呼叫,更新 useCallback deps

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-03-31 22:45:27 +08:00
OG T
589f2fc4c7 fix(web): openclaw-state-machine 補上 CSRF Token (P0 根本原因)
All checks were successful
E2E Health Check / e2e-health (push) Successful in 15s
根本原因: 首頁用的是 openclaw-state-machine.tsx 而非 LiveApprovalPanel
該元件的 handleApprove 完全沒有 CSRF token 和 credentials: include
導致後端回傳 "CSRF token cookie missing" → 按鈕沒有任何反應

修復:
- import useCSRF hook
- handleApprove 加上 X-CSRF-Token header
- fetch 加上 credentials: 'include'
- useCallback deps 加上 csrfToken

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-31 21:50:34 +08:00
OG T
172ff04653 fix(web): 簽核失敗視覺回饋 (Phase 22 P0)
All checks were successful
E2E Health Check / e2e-health (push) Successful in 18s
問題: 簽核失敗時沒有任何提示,用戶不知道發生了什麼

修復:
- 新增 toast.error() 當簽核失敗時
- 新增 Error Overlay (紅色背景 + critical 狀態球)

這與前一個 commit 的 CSRF 修復配合,讓用戶能清楚知道:
1. CSRF 載入中 → 按鈕 disabled
2. CSRF 失敗 → 顯示警告訊息
3. 簽核失敗 → Error Overlay + Toast

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-03-31 19:18:25 +08:00
OG T
936f1d64de feat(types): Phase 14.3 共用型別系統 (#97-#100)
建立 Pydantic → TypeScript 自動生成工具鏈:

1. scripts/generate-schemas.py
   - 從 Pydantic 模型生成 JSON Schema
   - 正確處理 Pydantic 2.x 的 $defs 格式
   - 支援 Approval/Incident/Terminal/Playbook/CSRF 模型

2. packages/shared-types/
   - @awoooi/shared-types 套件
   - 44 個型別定義,40 個介面
   - json-schema-to-typescript 自動生成

3. 前端整合
   - apps/web 加入 @awoooi/shared-types 依賴
   - typecheck 通過

使用方式:
  cd packages/shared-types
  pnpm generate  # 重新生成型別

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-03-31 19:10:33 +08:00
OG T
a028b44c84 fix(web): Y/n 按鈕 CSRF Token 缺失修復 (Phase 22 P0)
All checks were successful
E2E Health Check / e2e-health (push) Successful in 17s
修復問題:
- 按鈕點擊無反應:CSRF token 載入中或失敗時,buttons 現在會被 disabled
- 增加 toast.error() 提示:當 token 缺失時,顯示「安全驗證失敗」提示

變更:
- handleSign: 新增 toast.error() 當 csrfToken 為 null
- confirmReject: 新增 toast.error() 當 csrfToken 為 null
- ApprovalCard isLoading: 擴展為 signing || csrfLoading || csrfError

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-03-31 19:09:25 +08:00
OG T
62327b6ca8 fix(i18n): 修復 placeholder 頁面硬編碼字串 + 擴展 ESLint ignore
Wave 3 i18n 合規修復:
- authorizations/knowledge-base/settings 頁面改用 t('placeholder.xxx')
- demo 頁面 brand tagline 改用 tBrand('aiTagline')
- 新增 placeholder i18n keys (zh-TW/en)
- ESLint 擴展 ignoreAttribute/ignoreCallee 覆蓋更多技術標籤

剩餘 83 個 warn 為技術組件中的英文標籤 (LIVE/SSE/Multi-Sig)
Phase 1 warn 模式可接受,待 Phase 2 升級 error 前處理

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-03-31 18:59:28 +08:00
OG T
83a0845858 feat(lint): Wave 3 ESLint i18n Plugin 啟用 (warn 模式)
All checks were successful
E2E Health Check / e2e-health (push) Successful in 18s
安裝 eslint-plugin-i18next:
- 檢測 JSX 中硬編碼字串
- markupOnly: true (只檢查 JSX)
- 忽略技術屬性: data-testid, className, href, src

階段一: warn 模式 (當前)
階段二: error 模式 (待統帥批准)

發現 10+ 遺留警告,待修復

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-03-31 18:54:47 +08:00
OG T
60b461df50 feat(e2e): Wave 4 E2E Hardening
All checks were successful
E2E Health Check / e2e-health (push) Successful in 15s
- playwright.config.ts: ignoreHTTPSErrors + deviceScaleFactor + maxDiffPixelRatio
- global.setup.ts: 環境連通性驗證 + Storage State 結構
- .gitignore: 排除 .auth/ 目錄

支援:
- 自簽憑證環境測試
- Visual Baseline 一致性 (deviceScaleFactor: 1)
- 5% 比對容差 (避免字體渲染差異)
- 未來 Auth 擴展點

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-03-31 16:18:36 +08:00
OG T
b94a7800ad fix(approval): 修復 Y/n 簽核按鈕無動作問題 (Phase 22 P1)
All checks were successful
E2E Health Check / e2e-health (push) Successful in 17s
根本原因: 前端未傳送 CSRF Token,API 拒絕所有簽核請求

修復內容:
1. live-approval-panel.tsx: 整合 useCSRF hook
   - 簽核時帶上 csrfToken 參數
   - 拒絕時帶上 csrfToken 參數
   - 新增 CSRF 載入/錯誤狀態顯示

2. test_intent_classifier.py: 移除 Mock 違規 (P1)
   - 改用 @requires_ollama marker
   - 真實 Ollama 整合測試

3. test_terminal_service.py: 移除 Mock 違規 (P1)
   - 改用 @requires_database/@requires_k8s markers
   - 保留純函數單元測試

遵循規範:
- feedback_no_mock_testing.md: 禁止 MagicMock/AsyncMock
- Phase 20 CSRF Protection: Double Submit Cookie

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-03-31 16:16:16 +08:00
OG T
2f02f1523a feat(web): #126 Frontend Replay UI 整合
All checks were successful
E2E Health Check / e2e-health (push) Successful in 18s
- 新增 useUXAudit hook (5 分鐘自動刷新)
- 新增 UXAuditCard 組件 (健康度 + Replay 連結)
- 整合到錯誤追蹤頁面
- i18n: zh-TW + en 翻譯

功能:
- UX 健康度評分 (good/moderate/poor)
- 有錯誤的 Replay 連結
- 憤怒點擊/死亡點擊統計
- Replay Dashboard 快捷連結

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-03-31 16:04:44 +08:00
OG T
eaca7199c2 fix(web): Phase 22.4 移除 ClawBot 舊檔案與命名殘留
- 刪除 clawbot-panel.tsx (已被 openclaw-panel.tsx 取代)
- 刪除 clawbot-state-machine.tsx (已被 openclaw-state-machine.tsx 取代)
- 修正 hitl-section.tsx: setClawbotStatus → setOpenClawStatus
- 符合 feedback_openclaw_naming.md 命名鐵律

Phase 22.4: 命名清理 

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-03-31 12:12:30 +08:00
OG T
e176e063d4 fix(web): #19 Action Logs AbortController 防止記憶體洩漏
All checks were successful
E2E Health Check / e2e-health (push) Successful in 17s
- 新增 AbortController ref 追蹤請求
- fetchLogs: 每次新請求前取消前一次
- fetchStats: 共用 AbortController signal
- useEffect cleanup: unmount 時取消所有請求
- AbortError 正確忽略 (非錯誤狀態)

首席架構師審查: 98/100 OUTSTANDING (前端 P2)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-03-31 11:30:39 +08:00
OG T
f25e94e8c4 fix(web): #17 i18n Hydration 防護 (NEXT_LOCALE Cookie)
Phase D #17: 修復 i18n 語系切換 Hydration 當機

問題: Client/Server 渲染語系落差導致 Hydration Mismatch
解法: Middleware 強制綁定 NEXT_LOCALE Cookie

實作內容:
- 從 URL 路徑提取當前語系
- 強制設定 NEXT_LOCALE cookie (1年 TTL)
- 確保 Server/Client 語系一致

@see QA Report 3.1 節

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-03-31 11:18:53 +08:00
OG T
8c8664c75a feat(web): #15 SSE + Optimistic Updates (樂觀更新)
Phase 15: 解決 Zustand Polling 與授權 API Race Condition

樂觀更新 (Optimistic UI):
- signApproval: 點擊瞬間更新簽章數和狀態
- rejectApproval: 點擊瞬間標記為 rejected
- 失敗自動回滾到原始狀態 (Rollback)

SSE 增量更新:
- 'created': 直接加入列表 (無需 re-fetch)
- 'signed': 增量更新簽章數
- 'rejected/expired/executed': 延遲移除

預期效益:
- 即時 UI 響應 (0ms 延遲)
- 減少 API 請求 (增量取代全量)
- Race Condition 消除

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-03-31 11:13:12 +08:00
OG T
0b8701854d feat(web): #16 ThinkingTerminal DOM Bypass (記憶體優化)
Phase 8.0 #16: 解決千行 GraphRAG 日誌記憶體崩潰問題

架構改進:
- 新增 ThinkingTerminalOptimized 使用 ref 直接操作 DOM
- 繞過 React state,避免每行觸發 re-render
- 最大行數限制 (maxLines=500),防止 DOM 過大
- 支援 SSE 串流、停止、清除功能

i18n 更新:
- zh-TW/en: terminal 新增 connecting/connected/stop/clear 等 6 個 key

預期效益: 100x 渲染效能提升 (無 virtual DOM diff)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-03-31 11:10:29 +08:00
OG T
f83f0360a0 fix(web): 移除 Sentry Dashboard 連結 (內網 IP 問題)
原因: 內網 IP (192.168.0.110:9000) 會觸發瀏覽器「存取區域網路」權限對話框
參考: feedback_sentry_local_network.md

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-03-30 01:21:18 +08:00
OG T
04bfff9d19 refactor(ai): 模組化重構 - NVIDIA chat 移至 NvidiaProvider
符合 feedback_lewooogo_modular_enforcement.md 規範:
- 移除 openclaw.py 中的 _call_nvidia() (重複邏輯)
- 新增 NvidiaProvider.chat() 方法
- 更新 INvidiaProvider Protocol
- openclaw.py 改用 get_nvidia_provider().chat()
- 測試移至 test_nvidia_chat.py

架構層次:
- Router → Service → Provider (正確)
- 禁止 Service 層重複實作已存在的 Provider 功能

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-03-29 20:49:23 +08:00