fix(web): use run detail i18n namespace
All checks were successful
CD Pipeline / tests (push) Successful in 1m18s
Code Review / ai-code-review (push) Successful in 13s
CD Pipeline / build-and-deploy (push) Successful in 3m14s
CD Pipeline / post-deploy-checks (push) Successful in 1m18s

This commit is contained in:
Your Name
2026-05-25 16:11:21 +08:00
parent c38a3a9794
commit b30005f4c1
2 changed files with 21 additions and 5 deletions

View File

@@ -328,7 +328,7 @@ function RunActionPanel({
counts?: RunDetailResponse["counts"];
emptyLabel: string;
}) {
const t = useTranslations("awooop.runDetail.action");
const t = useTranslations("runDetail.action");
if (!run) {
return (
@@ -434,7 +434,7 @@ function EventDossierPanel({
locale: string;
emptyLabel: string;
}) {
const t = useTranslations("awooop.runDetail.dossier");
const t = useTranslations("runDetail.dossier");
const events = dossier?.events ?? [];
const summary = dossier?.summary;
const metrics = [
@@ -607,7 +607,7 @@ function McpGatewayPanel({
emptyLabel: string;
statusLabel: (status: string) => string;
}) {
const t = useTranslations("awooop.runDetail.gateway");
const t = useTranslations("runDetail.gateway");
const hasRecords = Boolean(summary && summary.total > 0);
const legacyTotal = legacy?.total ?? 0;
const hasAnyRecords = hasRecords || legacyTotal > 0;
@@ -697,7 +697,7 @@ function RemediationEvidencePanel({
locale: string;
emptyLabel: string;
}) {
const t = useTranslations("awooop.runDetail.remediation");
const t = useTranslations("runDetail.remediation");
const total = history?.total ?? 0;
const latest = history?.items?.[0] ?? null;
const hasRecords = total > 0;
@@ -828,7 +828,7 @@ export default function RunDetailPage({
}) {
const { run_id } = params;
const locale = useLocale();
const t = useTranslations("awooop.runDetail");
const t = useTranslations("runDetail");
const searchParams = useSearchParams();
const projectId = searchParams.get("project_id") ?? "";

View File

@@ -20066,6 +20066,22 @@ pnpm --dir apps/web lint -- --file src/components/awooop/status-chain.tsx
NEXT_PUBLIC_API_URL=https://awoooi.wooo.work pnpm --dir apps/web run build
```
**T181b 技術債清理(完成)**
- 第一輪 production smoke 在 Runs 詳細頁抓到新矩陣已顯示,但 console 出現大量 `MISSING_MESSAGE: awooop.runDetail (zh-TW)`
- 根因:`apps/web/src/app/[locale]/awooop/runs/[run_id]/page.tsx` 讀取 `awooop.runDetail.*`,但既有語系 namespace 是 root `runDetail.*`
- 修正Runs 詳細頁改用 `runDetail.*` namespace避免 i18n fallback noise 淹沒真正前端錯誤。
**T181b local validation完成**
```text
jq empty apps/web/messages/zh-TW.json apps/web/messages/en.json
git diff --check
pnpm --dir apps/web exec tsc --noEmit --tsBuildInfoFile /tmp/awoooi-t181b-tsconfig.tsbuildinfo
pnpm --dir apps/web lint -- --file 'src/app/[locale]/awooop/runs/[run_id]/page.tsx' --file src/components/awooop/status-chain.tsx
NEXT_PUBLIC_API_URL=https://awoooi.wooo.work pnpm --dir apps/web run build
```
**目前整體進度**
- AwoooP 告警可觀測鏈:約 99.38%。