Skip to content

feat(frontend): SBOM conformance panel on scan detail (model 3)#412

Merged
haksungjang merged 1 commit into
mainfrom
feat/model3-conformance-panel
Jun 14, 2026
Merged

feat(frontend): SBOM conformance panel on scan detail (model 3)#412
haksungjang merged 1 commit into
mainfrom
feat/model3-conformance-panel

Conversation

@haksungjang

Copy link
Copy Markdown
Contributor

모델 3 (받은 SBOM) — 프론트 conformance 패널

백엔드 conformance API(#410)의 결과를 스캔 상세 페이지에 표시한다. 모델 3의 사용자 표면 마지막 조각.

포함

  • lib/projectsApi.tsSbomConformanceRead/SbomConformanceCheck 타입, getSbomConformance(projectId, scanId), SBOM_CHECK_IDS(백엔드 services/sbom_conformance.CHECK_IDS의 런타임 미러 — contract test로 정합).
  • features/scan/useSbomConformance.ts — TanStack Query 훅. enabled는 kind='sbom'일 때만, retry:false로 404(아직 verdict 없음)는 조용히 degrade.
  • features/scan/SbomConformancePanel.tsx — pass/warn/fail 결과 배지 + 체크 테이블. 모든 배지가 dot+텍스트 라벨 동반(색 단독 금지, WCAG), 커버리지 null→"—", missing 5개+"+N more", 미래 체크 id는 백엔드 라벨 fallback. data-testid 부착(E2E 대비).
  • ScanDetailPage.tsx — sbom 스캔 + verdict 존재 시 <ScanProgress> 아래 패널 렌더.
  • i18n EN/KOscans.jsonconformance 네임스페이스(result·check_status·label·check_id·errors), _one/_other 미사용.
  • 테스트 — vitest 패널 단위(배지 tone·체크 행·missing>5·null 커버리지) + catalogMirrors contract(SBOM_CHECK_IDS 정규 집합 + EN/KO check_id·result 라벨 정합, 백엔드 카탈로그와 듀얼-미러 정합 규칙 2).

검증

  • cd apps/frontend: npm run i18n:check(in sync) · npx vitest run(32 passed) · 변경 파일 lint·typecheck 클린.

후속(별개)

  • E2E(Playwright): seed 하네스의 sbom-scan 시딩 지원이 필요 → test-writer 핸드오프. testid(conformance-panel·conformance-badge[data-result]·conformance-checks-table·check-{id})는 준비됨.

Surfaces the received-SBOM conformance verdict (backend GET .../scans/{id}/
conformance) for kind='sbom' scans:

- lib/projectsApi.ts: SbomConformanceRead/Check types, getSbomConformance(),
  and SBOM_CHECK_IDS — the runtime mirror of backend
  services/sbom_conformance.CHECK_IDS (kept in lock-step by a contract test).
- features/scan/useSbomConformance.ts: TanStack Query hook, enabled only for
  sbom scans, retry:false so a 404 (verdict not yet computed) degrades quietly.
- features/scan/SbomConformancePanel.tsx: pass/warn/fail result badge + per-check
  table. Every badge pairs a tinted dot with a localized text label (colour is
  never the sole signal — WCAG); coverage nulls render '—'; missing lists cap at
  5 + '+N more'; check labels fall back to the backend label for any future id.
- ScanDetailPage.tsx: renders the panel under ScanProgress when the scan is an
  sbom ingest and a verdict is available.
- i18n EN/KO: scans.json 'conformance' namespace (result/check_status/labels/
  check_id/errors), no _one/_other plurals.
- tests: vitest panel unit tests + catalogMirrors contract test (SBOM_CHECK_IDS
  canonical set + EN/KO check_id/result label coverage).

i18n:check in sync; vitest 32 passed; lint + typecheck clean for changed files.
E2E (Playwright harness sbom-scan seeding) deferred to a follow-up.
@haksungjang haksungjang merged commit 348bcd9 into main Jun 14, 2026
18 checks passed
@haksungjang haksungjang deleted the feat/model3-conformance-panel branch June 14, 2026 04:26
haksungjang added a commit that referenced this pull request Jun 14, 2026
…s/SBOM pages (model 3) (#413)

The CI-integration how-to (ci-integration/sbom-upload.md) already covered the
upload endpoint + conformance verdict, but the product user-guide did not:

- user-guide/scans.md: add the 'sbom' scan kind to the kinds table, correct the
  'Source/Container only' dialog note (three kinds now; sbom is uploaded, not
  picked), and add a 'Received SBOMs (uploaded)' section covering formats
  (CycloneDX/SPDX), the ingest endpoint, and the advisory pass/warn/fail
  conformance verdict + per-check meaning, cross-linking the CI guide.
- user-guide/sbom.md: add an export-vs-upload note distinguishing this page
  (export from a scan) from uploading a supplier SBOM, linking both surfaces.
- EN + KO mirrored; KO translation-style lint S1/S2 clean.

(CHANGELOG is batched at release-prep here — #404#412 will be captured then,
matching how the concurrent ingest PRs were handled.)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant