docs(web): record t72 homepage live status rollout [skip ci]
This commit is contained in:
@@ -1,3 +1,68 @@
|
||||
## 2026-05-19 | T72 Homepage live status and flow-pipeline stabilization
|
||||
|
||||
**背景**:首頁 `https://awoooi.wooo.work/zh-TW` 已能載入 production 資料,但值班視角仍有三個明顯斷點:飛輪 KPI 卡會持續嘗試 production 未接通的 `/api/v1/stats/flywheel/ws` WebSocket 並造成 console 噪音;每張 IncidentCard 都各自抓 CSRF token,活躍事件很多時會把首頁網路請求放大;小龍蝦 / OpenClaw 流程管線只看 `incident.status`,沒有把 `decision.state` / proposal evidence 納入,導致已有 AI 提案或待授權的事件看起來仍停在早期偵測。
|
||||
|
||||
**修正**:
|
||||
- `FlywheelKPICard` 改為 HTTP poll 作為 production 預設;WebSocket 僅在 `NEXT_PUBLIC_ENABLE_FLYWHEEL_WS=true` 時啟用。
|
||||
- `/api/v1/stats/summary` 與 `/api/v1/stats/flywheel` 皆每 30s 更新。
|
||||
- 避免首頁反覆出現 `stats/flywheel/ws` 404 / reconnect 噪音。
|
||||
- `useCSRF()` 新增 module-level token cache + in-flight request sharing。
|
||||
- 多張事件卡同時 mount 時共用同一個 token 請求。
|
||||
- `refresh()` 仍可強制重新抓 token。
|
||||
- Dashboard store 在 SSE 前先用 HTTP snapshot 補水;SSE 變成增量通道,不再是首頁有資料的唯一入口。
|
||||
- IncidentCard 流程階段改由 `incident.status + decision.state + proposal_data/proposal_id` 共同判斷。
|
||||
- `decision.state=ready` / `proposal_id` 會顯示為 `approval`。
|
||||
- `proposal_data.action` 會顯示為 `proposal`。
|
||||
- `executing/mitigating` 與 `resolved/closed` 也同步修正。
|
||||
- `FlowPipeline` 新增 `data-flow-stage` / `data-flow-severity` / `data-flow-resolved`,讓 Playwright 與產品驗收能直接讀出每張卡目前階段。
|
||||
- `PageTabs` 同步 URL query 變化,修掉 tab state 與 URL 可能不同步的首頁交互雜訊;順手移除既有 unused import。
|
||||
|
||||
**local verification**:
|
||||
- `pnpm --dir apps/web typecheck`:pass。
|
||||
- Targeted `next lint`:exit 0;仍有既有 i18n literal warnings(`flywheel-kpi-card.tsx`、`incident-card.tsx`)與既有 `flow-pipeline.tsx` `<img>` warning,本輪未新增阻斷 lint error。
|
||||
- `NEXT_PUBLIC_API_URL=https://awoooi.wooo.work pnpm --dir apps/web build`:pass。
|
||||
- Local Playwright smoke(`localhost:3111` + production API,Chromium 關閉 CORS 檢查以驗證本地 build 行為):
|
||||
- `csrf=1`,不再因 180 張 incident 卡放大成大量 CSRF 請求。
|
||||
- `websocket=0`、`ws404Console=0`。
|
||||
- `summary=1`、`flywheel=1`、`dashboardSnapshot=1`、`dashboardStream=1`。
|
||||
- 首頁 KPI 顯示 production 值:Service Health 100%、Active Incidents 180、Auto Rate 41%、Pending 0、Today/Weekly 695。
|
||||
- `data-flow-stage` 可讀:`approval=2`、`alert=3`、`detection=175`。
|
||||
|
||||
**production deployment / verification**:
|
||||
- Code commit:`10f2f1ab fix(web): stabilize homepage live status`。
|
||||
- Deploy marker:`8234a3ee chore(cd): deploy 10f2f1a [skip ci]`。
|
||||
- Gitea Code Review run `2408` success;CD run `2407` success。
|
||||
- jobs:`2997/tests` success、`2998/build-and-deploy` success、`2999/post-deploy-checks` success。
|
||||
- Production images:
|
||||
- `awoooi-web` → `192.168.0.110:5000/awoooi/web:10f2f1abaff7ee2a273c928b1081e0717caff0b1`。
|
||||
- `awoooi-api` / `awoooi-worker` → `192.168.0.110:5000/awoooi/api:10f2f1abaff7ee2a273c928b1081e0717caff0b1`。
|
||||
- Health:`https://awoooi.wooo.work/api/v1/health` → `status=healthy`、`mock_mode=false`、`environment=prod`。
|
||||
- Stats API smoke:
|
||||
- `/api/v1/stats/summary` → `playbook_count=36`、`execution_success_rate=1.0`、`today_processed=16`、`flywheel_conversions_today=14`、`km_vectorized_rate=0.9955`、`incidents_stuck=1462`。
|
||||
- `/api/v1/stats/flywheel` → `flow_count=10`,monitoring / deduplication / diagnosis / reasoning / execution / learning nodes all active。
|
||||
- Production Playwright smoke on `/zh-TW`:
|
||||
- 導航列存在;首頁 KPI 顯示 Service Health 100%、Active Incidents 179、Auto Rate 41%、Pending 0、Today/Weekly 695。
|
||||
- `flywheelOfflineVisible=false`。
|
||||
- network counts:`csrf=1`、`summary=1`、`flywheel=1`、`dashboardSnapshot=2`、`dashboardStream=1`、`websocket=0`、`ws404Console=0`。
|
||||
- `consoleErrors=[]`;只剩 Next RSC prefetch aborts,未阻斷頁面。
|
||||
- `pipelineCount=179`;`data-flow-stage` summary:`approval=2`、`alert=3`、`detection=174`。
|
||||
|
||||
**邊界 / 下一步**:
|
||||
- T72 修的是首頁 live read / visual stage / network flood,不代表所有中低風險告警都已被允許全自動修復。
|
||||
- `incidents_stuck=1462` 是下一個應該治理的產品與資料債:首頁已誠實呈現,但需接續把 stuck incident 的 closure / no-action / manual-required lifecycle 收斂。
|
||||
- 既有 i18n literal warnings 仍需另開前端治理波次處理,不在本輪混改。
|
||||
|
||||
**目前整體進度**:
|
||||
- 首頁 live status / 小龍蝦流程管線產品化:約 99.7%。
|
||||
- AwoooP observability / truth-chain 可回看:約 99.8%。
|
||||
- 來源告警入庫、重複發生、Sentry / SignOz 與修復結果可見性:約 99.7%。
|
||||
- Telegram callback detail/history 可追溯:約 98.0%。
|
||||
- Operator Console status-chain 可見性:約 99.5%。
|
||||
- AI 自動修復閉環:約 98.2%;T72 補首頁 read model 與階段呈現,不新增全自動執行權限。
|
||||
- Config Drift 治理:約 99.6%。
|
||||
- 前端 AI 自動化管理介面產品化:約 99.7%。
|
||||
- 完整 AI 自動化管理產品化:約 99.2%。
|
||||
|
||||
## 2026-05-19 | T71 Work queues AwoooP status-chain rollout
|
||||
|
||||
**背景**:T70 已讓 Run Detail / Callback Replies 看得到 AwoooP 狀態鏈,但值班實際操作更常從 Work Items 與 Approvals 進入。若這些頁面沒有同源狀態鏈,Operator 仍會看不出「同一告警目前跑到哪個階段、AI 是否真的修復、是否只是在等待人工」。
|
||||
|
||||
Reference in New Issue
Block a user