feat(frontend): label the 'sbom' scan kind (badge + admin filter, EN/KO)#408
Merged
Conversation
The external SBOM ingest endpoint (#406) creates scans with kind="sbom". Surface it in the UI so ingested scans render a proper label instead of a raw key: - Promote ScanKind to the runtime mirror SCAN_KIND_VALUES (source, container, sbom), matching the backend's SCAN_KIND_VALUES tuple; derive the admin scan-kind filter KIND_OPTIONS from it so the two can't drift. - Add EN/KO labels ("SBOM upload" / "SBOM 업로드") for the three dynamic kind→label maps: scans page badge, project-overview recent-scans badge, and the admin scans kind filter. - Add a catalog-mirror contract test walking SCAN_KIND_VALUES against all three label maps in both locales (CLAUDE.md §2 rule 2) so a future kind can't ship a raw i18n key. Badges carry no per-kind color, so sbom renders with the same outline style as source/container — label only. i18n:check parity clean.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
The external SBOM ingest endpoint (#406) creates scans with
kind="sbom". This surfaces that kind in the UI so an ingested scan renders a proper label instead of a raw i18n key.Changes
ScanKindto the runtime mirrorSCAN_KIND_VALUES(source,container,sbom), matching the backend'sSCAN_KIND_VALUEStuple; derive the admin scan-kind filterKIND_OPTIONSfrom it so they can't drift.SBOM upload/SBOM 업로드) for the three dynamic kind→label maps: scans page badge, project-overview recent-scans badge, and the admin scans kind filter.SCAN_KIND_VALUESagainst all three label maps in both locales (CLAUDE.md §2 rule 2) so a future kind can't ship a raw i18n key.Badges carry no per-kind color, so
sbomrenders with the same outline style assource/container— label only. The scan-trigger dialog (SourceSelectDialog) is intentionally untouched: SBOM is external ingest, never a trigger target.Verification
typecheck,lint(0 errors),i18n:check(EN/KO parity, 0 drift),vitest(1256 passed, 1 skipped) — all green.