Skip to content

Remove the Licenses tab the Compliance tab replaced - #37

Merged
haksungjang merged 2 commits into
mainfrom
chore/remove-dead-licenses-tab
Aug 9, 2026
Merged

Remove the Licenses tab the Compliance tab replaced#37
haksungjang merged 2 commits into
mainfrom
chore/remove-dead-licenses-tab

Conversation

@haksungjang

Copy link
Copy Markdown
Contributor

LicensesTab and LicensesToolbar stopped being routed when ComplianceTab took over (W9-#58), but the files and their unit test stayed in the tree. A reader grepping for the licenses screen found a fully-formed component with tests and no indication it was dead.

Removed:

  • components/LicensesTab.tsx, components/LicensesToolbar.tsx
  • tests/unit/features/projects/LicensesTab.test.tsx
  • api/useLicenses.ts — the tab was its only caller

Kept, deliberately: api/licensesApi.ts and its listProjectLicenses. The list endpoint is staying as a REST surface a CI job can call, this file is where that surface is typed and tested, and deleting the function alone would cascade through LicenseListResponse, ListLicensesParams, the query serializer and their tests. That it now has no in-app caller is stated in the file rather than left to be rediscovered.

Comments in ObligationsTab, ObligationsToolbar, ComplianceTab, ReportsTab, useObligations and four test files pointed at the removed files ("Mirrors LicensesTab"); they now name what they actually mirror, or say the thing directly.

The E2E harness verbs selectLicensesTab / expectLicensesTabReady are untouched — they click the Compliance tab and their own doc comment already explains the historical name. Renaming them would touch a dozen spec files for no behavioural reason.

Verification

  • npm run typecheck clean; 1981 unit tests pass across 184 files.
  • npm run lint exits 0. The 36 warnings it prints are unchanged from main (verified by stashing).

Trivy picks a distro advisory database from an operating-system component,
not from package PURLs, so a supplier SBOM listing every rpm on an image
reported zero vulnerabilities. Measured on Trivy 0.71.2: 0 findings without
the component, 306 with it; SPDX behaves the same (0 -> 166) and needs the
SPDXRef-OperatingSystem id prefix, not primaryPackagePurpose.

Infer the distro from the packages and scan an enriched copy — the upload
itself is never edited, since it backs the conformance verdict and the
signature bundle. A second defect surfaced alongside: os-pkgs results are
labelled with the distro, which no PURL reconstruction maps, so every distro
finding was dropped as "no purl". Fall back to the PURL Trivy attaches to the
finding, leaving reconstruction first so existing ecosystems are untouched.

Upstream's rewrite of an existing OS version down to its major release is
deliberately not ported: centos 7.9.2009, rocky 8.10, alma 9.3 and redhat 8.9
each matched identically with and without the minor.
LicensesTab / LicensesToolbar stopped being routed when ComplianceTab took
over (W9-#58), but the files and their unit test stayed, so the screen still
read as live. Remove them along with useLicenses, whose only caller they were.

licensesApi keeps listProjectLicenses: the list endpoint is staying as a REST
surface a CI job can call, and this file is where it is typed and tested. That
it now has no in-app caller is stated in the file. Comments that pointed at the
removed files were repointed at what they actually mirror.
@haksungjang
haksungjang merged commit 5365188 into main Aug 9, 2026
25 checks passed
@haksungjang
haksungjang deleted the chore/remove-dead-licenses-tab branch August 9, 2026 22:52
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