feat(web): show repair draft status in Runs
Some checks failed
Code Review / ai-code-review (push) Successful in 21s
CD Pipeline / tests (push) Successful in 1m40s
CD Pipeline / build-and-deploy (push) Successful in 5m23s
CD Pipeline / post-deploy-checks (push) Successful in 1m45s
Ansible / Reboot Recovery Contract / validate (push) Has been cancelled

This commit is contained in:
Your Name
2026-06-25 20:29:24 +08:00
parent 195ad031da
commit cbe6e64f8a
6 changed files with 110 additions and 4 deletions

View File

@@ -9715,6 +9715,15 @@
"source_correlation_review": "來源證據待配對",
"no_repair_record": "無修復記錄"
},
"workItemStatuses": {
"owner_review_ready": "草案待 owner review",
"draft_ready": "草案已準備",
"open": "工作項待處理",
"blocked": "工作項阻塞",
"closed": "工作項已關閉",
"none": "無工作項",
"unknown": "工作項狀態未知"
},
"item": {
"latest": "最新 {time}",
"duplicates": "重複 {count}",

View File

@@ -9715,6 +9715,15 @@
"source_correlation_review": "來源證據待配對",
"no_repair_record": "無修復記錄"
},
"workItemStatuses": {
"owner_review_ready": "草案待 owner review",
"draft_ready": "草案已準備",
"open": "工作項待處理",
"blocked": "工作項阻塞",
"closed": "工作項已關閉",
"none": "無工作項",
"unknown": "工作項狀態未知"
},
"item": {
"latest": "最新 {time}",
"duplicates": "重複 {count}",

View File

@@ -2211,6 +2211,20 @@ function recurrenceRepairStatusLabelKey(status?: string | null) {
return "repairStatuses.no_repair_record";
}
function recurrenceWorkItemStatusLabelKey(status?: string | null) {
if (
status === "owner_review_ready" ||
status === "draft_ready" ||
status === "open" ||
status === "blocked" ||
status === "closed" ||
status === "none"
) {
return `workItemStatuses.${status}`;
}
return "workItemStatuses.unknown";
}
function EventRecurrencePanel({
recurrence,
error,
@@ -2344,6 +2358,17 @@ function EventRecurrencePanel({
const workItem = item.work_item;
const repairKey = recurrenceRepairStatusLabelKey(repair?.status);
const repairLabel = t(repairKey as never);
const workItemStatusLabel = workItem
? t(recurrenceWorkItemStatusLabelKey(workItem.status) as never)
: null;
const workItemTone =
workItem?.status === "owner_review_ready" || workItem?.status === "draft_ready"
? "owner_review"
: workItem?.status === "blocked"
? "blocked"
: workItem?.status === "open"
? "open"
: "neutral";
const runHref = item.latest_run_id
? `/awooop/runs/${item.latest_run_id}?project_id=${encodeURIComponent(recurrence?.project_id ?? "awoooi")}`
: null;
@@ -2391,6 +2416,22 @@ function EventRecurrencePanel({
>
{repairLabel}
</span>
{workItemStatusLabel ? (
<span
className={cn(
"border px-2 py-0.5 text-xs font-semibold",
workItemTone === "owner_review"
? "border-[#b9a6d9] bg-[#f5f0ff] text-[#51358f]"
: workItemTone === "blocked"
? "border-[#e2a29b] bg-[#fff0ef] text-[#9f2f25]"
: workItemTone === "open"
? "border-[#d9b36f] bg-[#fff7e8] text-[#8a5a08]"
: "border-[#d8d3c7] bg-[#faf9f3] text-[#5f5b52]"
)}
>
{workItemStatusLabel}
</span>
) : null}
{runHref ? (
<Link
href={runHref as never}

View File

@@ -75,6 +75,29 @@
- 21:00 後只讀確認 `intelligence-sync` 是否用 restored Docker-backed `psql` shim 成功;不手動補跑 production data。
- 21:00 / 22:00 / 22:35 / 23:10 後追蹤官方 margin-short source 是否發布;發布後讓正式 cron 產生 margin / AI recommendation freshness green再重跑 post-start quick check。
## 2026-06-25Runs recurrence Work Item 草案狀態 chip
**背景**Repair Candidate 後端已能把 host-service 類 prefilled draft 標成 `owner_review_ready`,但 Runs recurrence 卡片仍只顯示粗略修復狀態operator 無法在 Run 視角一眼看出「AI 已產生草案,等待 owner review」。
**完成**
- `/zh-TW/awooop/runs` 的 recurrence work item 卡片新增 Work Item status chip。
- 新增 `owner_review_ready``draft_ready``open``blocked``closed``none``unknown` 狀態文案。
- `owner_review_ready` / `draft_ready` 以獨立色彩顯示為「草案待 owner review / 草案已準備」,避免和「無修復記錄」混在一起。
**驗證**
- `RUNS_STATUS_JSON_OK`
- `RUNS_WORK_ITEM_STATUS_I18N_OK leaves=13652`
- `pnpm --filter @awoooi/web typecheck` 通過。
- `git diff --check` 通過。
**完成度同步**
- AwoooP Runs 可判讀性:`62% -> 65%`
- AwoooP AI 自動化真相鏈:維持 `64%`,因本輪只是 readback UI。
- 全站 UI/UX 專業化:`55% -> 56%`
- Runtime execution gate / production autonomous repair verified success不變。
**邊界**:本輪只做 Runs read-only 狀態 chip沒有發 Telegram、沒有套用 PlayBook、沒有執行 Ansible、沒有 SSH、沒有重啟服務、沒有讀 secret、沒有提高 runtime gate。
## 2026-06-25Repair Candidate Draft Ready owner review 狀態模型
**背景**Telegram `INC-20260625-977E5F``node-exporter-188` 告警已能預填 `host_service_route_after_owner_review``systemctl restart node-exporter-188`、rollback、verifier 與 AwoooP Work Item但 webhook / Telegram 仍把它標成 `NO_ACTION - REPAIR_CANDIDATE_MISSING`,造成 operator 看到「AI 選擇不修、需人工」而非「AI 已產出 owner review 草案」。這會讓 AI 自動化產品看起來像只會把問題丟回人工。

View File

@@ -142,12 +142,22 @@
| Tests | `py_compile` 通過targeted API tests `21 passed` |
| 邊界 | 不執行主機命令、不發 Telegram、不套用 PlayBook、不跑 Ansible、不開 runtime gate只是讓 owner review 草案成為可追蹤狀態 |
## 4.7 2026-06-25 Runs recurrence Work Item 草案狀態 chip
| 項目 | 結果 |
|---|---|
| UI | `/zh-TW/awooop/runs` recurrence 卡片新增 Work Item status chip |
| 新狀態 | `owner_review_ready``draft_ready``open``blocked``closed``none``unknown` |
| 判讀 | `owner_review_ready` 顯示為「草案待 owner review」不再和「無修復記錄」混淆 |
| 驗證 | JSON parse、i18n mirror、web typecheck、diff check 通過 |
| 邊界 | 只讀狀態顯示不新增執行、重啟、Telegram send 或 PlayBook apply 入口 |
## 5. 下一輪必做
| 優先級 | 工作 | 驗收 |
|---|---|---|
| P0 | AwoooP Runs 共用 Situation Strip / Agent Flow / Action Rail | Overview、Work Items、Approvals 第一刀已完成;下一步讓 Runs 也能一眼看懂卡點、owner、補救試跑、verifier 與下一步 |
| P0 | Repair candidate draft readback 串接 | 後端已拆出 `draft_ready_for_owner_review`;下一步 Runs / Work Items / KB 必須顯示草案 ID、owner、rollback、verifier、KM / PlayBook / script / schedule 資產狀態 |
| P0 | AwoooP Runs 共用 Situation Strip / Agent Flow / Action Rail | Recurrence Work Item status chip 已完成;下一步補首屏 Situation Strip讓 Runs 一眼看懂卡點、owner、補救試跑、verifier 與下一步 |
| P0 | Repair candidate draft readback 串接 | 後端已拆出 `draft_ready_for_owner_review`Runs 已顯示 Work Item 草案狀態;下一步 Work Items / KB 顯示草案 ID、owner、rollback、verifier、KM / PlayBook / script / schedule 資產狀態 |
| P0 | Tenants 舊表格 responsive 化 | route / source 已完成卡片化;下一步處理租戶資料表 drawer 與產品 topology drilldown |
| P0 | Observability topology | 主機 / 服務 / 網站 / 告警 / SLO 關聯可視化 |
| P0 | Knowledge / Automation trust ledger | KM、PlayBook、腳本、排程、dry-run、verifier 有統一沉澱面板 |

View File

@@ -186,6 +186,20 @@ Tenants 目前已讀到:
完成度同步Repair candidate missing 後端真相模型 `38% -> 48%`Telegram 告警可判讀性 `58% -> 64%`AwoooP AI 自動化真相鏈 `60% -> 64%`production autonomous repair verified success 仍 `3-5%`
### 2.5.5 Runs recurrence Work Item 草案狀態 chip
2026-06-25 已完成 `/zh-TW/awooop/runs` 小切片,讓 recurrence 卡片能讀出 work item 的 `owner_review_ready` / `draft_ready`把「AI 已產出草案,等待 owner review」放到 Run 視角。
| 項目 | 完成 |
|---|---|
| UI | recurrence 卡片新增 Work Item status chip |
| 狀態 | `owner_review_ready``draft_ready``open``blocked``closed``none``unknown` |
| 判讀 | `owner_review_ready` 顯示「草案待 owner review」不再只看到「無修復記錄」 |
| 驗證 | JSON parse、i18n mirror `RUNS_WORK_ITEM_STATUS_I18N_OK leaves=13652``pnpm --filter @awoooi/web typecheck``git diff --check` 通過 |
| 邊界 | 只讀顯示不新增執行、重啟、Telegram send、PlayBook apply 或 runtime gate |
完成度同步AwoooP Runs 可判讀性 `62% -> 65%`;全站 UI/UX 專業化 `55% -> 56%`AwoooP AI 自動化真相鏈仍 `64%`
## 3. 頁面 UI/UX 現況盤點
2026-06-25 對正式站桌機 / mobile 抽查:
@@ -193,7 +207,7 @@ Tenants 目前已讀到:
| 頁面 | 現況 | 主要問題 | 優先級 |
|---|---|---|---|
| `/zh-TW/awooop` | Google Ads 式 shell 已存在AwoooP 概覽與 AI 自動化真相帶可見 | 仍需把 Runs / Work Items / Approvals 的卡點與 owner SOP rail 串回同一首屏;後續要減少下方長文字卡 | P0 |
| `/zh-TW/awooop/runs` | Runs 狀態鏈provider evidence 可見 | mobile 有長字串、內部 provider URL / key 類資訊外露風險;使用者無法一眼分辨「AI 已做什麼、卡哪裡、下一步誰做」 | P0 |
| `/zh-TW/awooop/runs` | Runs 狀態鏈provider evidence 與 recurrence Work Item 草案狀態 chip 可見 | mobile 有長字串、內部 provider URL / key 類資訊外露風險;仍需補 Situation Strip / Agent Flow / Action Rail 才能一眼分辨「AI 已做什麼、卡哪裡、下一步誰做」 | P0 |
| `/zh-TW/awooop/work-items` | 工作項目、repair candidate 與 operator SOP rail 可見;已能一眼看到人工卡點、候選品質、沉澱資產與負責人接手 | 底部長表格仍需 responsive data grid / drawer 化;每筆 item 還要補更細的 owner、rollback、verifier receipt 與狀態回寫 | P0 |
| `/zh-TW/awooop/approvals` | approval 狀態鏈、AI evidence 與審批決策 handoff rail 可見;已能一眼看到阻塞、證據、接手包與安全閘門;後端已能把 prefilled host-service 草案標成 owner-review-ready | 表格仍需 drawer 化Runs / Work Items 仍要讀回 draft-ready 狀態、owner、rollback、verifier receipt 與資產 ID | P0 |
| `/zh-TW/awooop/tenants` | 16 產品、31 路由、10 repo 資產可讀;作戰圖與 route/source 手機卡片已上線 | 下一步補產品拓樸 drilldown 與租戶資料表 drawer | P0 |
@@ -379,7 +393,7 @@ AWOOOI 缺的是:
| 項目 | 基準完成度 |
|---|---:|
| 全站 UI/UX 專業化 | `55%` |
| 全站 UI/UX 專業化 | `56%` |
| 導航 / IA 整合 | `64%` |
| AwoooP 操作台產品化 | `65%` |
| Tenants 全產品資產中心 | `68%` |