fix(web): use run detail i18n namespace
This commit is contained in:
@@ -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") ?? "";
|
||||
|
||||
|
||||
@@ -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%。
|
||||
|
||||
Reference in New Issue
Block a user