### SystemStatusPanel TypeError
- 증상: /monitoring 에서 Uncaught TypeError: Cannot read properties of undefined (reading 'toLocaleString')
- 원인: stats 객체는 존재하나 total 필드가 undefined 인 경우 (백엔드 응답이 기대 shape 와 다를 때) 크래시
- 수정: stats?.total != null ? ... / stats.critical ?? 0 식 null-safe 전환 (total/clusterCount/gearGroups/critical/high/medium/low 전부)
### CatalogBadges 렌더링 오류
- 증상: /design-system.html 에서
(1) Each child in a list should have a unique "key" prop
(2) Objects are not valid as a React child (found: object with keys {ko, en})
- 원인: PERFORMANCE_STATUS_META 의 meta 는 {intent, hex, label: {ko, en}} 형식. code 필드 없고 label 이 객체.
- Object.values() + <Trk key={meta.code}> 로 undefined key 중복
- getKoLabel 이 meta.label (객체) 그대로 반환해 Badge children 에 객체 주입
다른 카탈로그는 fallback: {ko, en} 패턴이라 문제 없음 (performanceStatus 만 label 객체)
- 수정:
- Object.entries() 로 순회해 Record key 를 안정적 식별자로 사용
- AnyMeta.label 타입을 string | {ko,en} 확장
- getKoLabel/getEnLabel 우선순위: fallback.ko → label.ko → label(문자열) → code → key
- PERFORMANCE_STATUS_META 자체는 변경 안 함 (admin 페이지들이 label.ko/label.en 직접 참조 중)
### 검증
- npx tsc --noEmit 통과
- pre-commit tsc+ESLint 통과
|
||
|---|---|---|
| .. | ||
| public/dar03 | ||
| src | ||
| .node-version | ||
| .npmrc | ||
| .prettierignore | ||
| .prettierrc | ||
| design-system.html | ||
| eslint.config.js | ||
| index.html | ||
| package-lock.json | ||
| package.json | ||
| postcss.config.mjs | ||
| system-flow.html | ||
| tsconfig.json | ||
| vite.config.ts | ||