The "Lizenzen" view of #957: the licences tab of one target opens as a chart, and the licence table sits behind a click.
What changed
compliance-core (models/license.rs): LicenseGroup (Permissiv, Schwaches Copyleft, Starkes Copyleft, Unbekannt), LicenseCategory::group(), and LicenseGroupCounts (sums (category, count) rows per group). Pure, no feature gate, unit tests and a doctest.
New componentcompliance-dashboard/src/components/licence_overview.rs:
one horizontal bar split into the four groups (Permissiv #2a78d6, Schwaches Copyleft #1baf7a, Starkes Copyleft #eb6834, Unbekannt #9EA3BD), 2px gaps. Each segment is a <button> with an aria-label like "Starkes Copyleft: 49". A group with 0 components has no segment, but its card still shows 0.
below the bar, one card per group (a button): swatch and name, component count as text (#1baf7a has less than 3:1 contrast, so the number on the card is what makes the chart readable), and a short note ("MIT, Apache-2.0, BSD" / "LGPL, MPL, EPL: Änderungen offenlegen" / "GPL, AGPL: Weitergabe prüfen" / "keine Lizenz erkannt oder proprietär").
a "Tabelle" toggle (aria-pressed) that shows the same numbers as a plain table.
a click on a segment, card or table row narrows the tab: breadcrumb "Lizenzen › Starkes Copyleft" and "← Zurück zum Diagramm".
pages/sbom.rs: edits are only in the Lizenzen tab's branch, plus one signal for the chosen group (and an effect that clears it when the target changes). The chart is mounted at the top of the tab. Once a group is chosen, the existing "Alle Lizenzen" table shows only the licences of that group. The Lizenzprüfung panel, the open-licences card, the copyleft warning and the distribution card are hidden until the chart is back. Hiding those four is my reading of "lists behind a click"; it is easy to drop if they should stay.
Texts DE+EN in a new licence_overview module at the end of i18n/texts.rs. Styles are small lo-* classes at the end of assets/main.css, using the existing tokens (the four group colours are fixed hex values).
Classification
No new classifier. The view reuses what the licence policy (#570) and the summary endpoint already use:
spdx_license::category() for a detected licence, or the category a person gave when they confirmed the licence (that one wins, as in summarize_licenses).
SPDX expressions: OR takes the most permissive term, AND the most restrictive.
Public domain, permissive and own code → Permissiv.
No licence, NOASSERTION, NONE, LicenseRef-…, free text it cannot read → Unbekannt.
Proprietary → Unbekannt. It is neither open source nor copyleft; its terms are a contract a person has to read. The card note says "oder proprietär".
WITH exceptions keep the category of their licence, so GPL-2.0-only WITH Classpath-exception-2.0 stays Starkes Copyleft. This differs from the issue sketch (weak copyleft). It is the rule the licence policy evaluates by (asserted in spdx_license tests). Changing it here would make the chart disagree with the "Typ" column and with the policy verdicts, so I left it as is. A test pins the current behaviour.
Endpoints
Used: GET /api/v1/sbom/licenses?repo_id=<target> (already tenant-scoped and gated with SBOM_READ). It already returns count and category for each licence of one target. Group counts are summed from those rows, so the chart, cards, table toggle and filtered table all use the same numbers.
Added: none, so there is no new role_gate/router_tests.rs row.
cargo test -p compliance-core --lib models::license::: 9 passed, 3 new:
every category falls into one group;
SPDX expressions (OR/AND/WITH, NOASSERTION, NONE, LicenseRef, free text) land in the right group;
counts add up.
cargo test -p compliance-core --doc license: passed.
cargo test -p compliance-dashboard --features server --no-default-features --lib licence_overview: 3 passed (segment aria-label, distinct names and notes per group, each group's colour class is defined in main.css).
Not rendered in a browser; the crate has no SSR test harness.
Open points
Filter not in the URL yet.Route::SbomPage { target } is built in app.rs, sidebar.rs, overview.rs and target.rs. Adding a field there is not additive and would collide with #962–#965. The SBOM tab is not in the URL either, so ?licence_group= alone would open on the Komponenten tab. Better as a follow-up that makes the SBOM tabs routable (together with the Komponenten chart's ecosystem filter).
The chart only appears once a target is chosen (the view is per repo). "Alle Prüfobjekte" keeps the current tab.
Classpath and other WITH exceptions stay Starkes Copyleft (see above). If that should change, it belongs in spdx_license::category() and the licence policy, not in this view.
The "Lizenzen" view of #957: the licences tab of one target opens as a chart, and the licence table sits behind a click.
## What changed
- **compliance-core** (`models/license.rs`): `LicenseGroup` (Permissiv, Schwaches Copyleft, Starkes Copyleft, Unbekannt), `LicenseCategory::group()`, and `LicenseGroupCounts` (sums `(category, count)` rows per group). Pure, no feature gate, unit tests and a doctest.
- **New component** `compliance-dashboard/src/components/licence_overview.rs`:
- one horizontal bar split into the four groups (Permissiv #2a78d6, Schwaches Copyleft #1baf7a, Starkes Copyleft #eb6834, Unbekannt #9EA3BD), 2px gaps. Each segment is a `<button>` with an aria-label like "Starkes Copyleft: 49". A group with 0 components has no segment, but its card still shows 0.
- below the bar, one card per group (a button): swatch and name, component count as text (#1baf7a has less than 3:1 contrast, so the number on the card is what makes the chart readable), and a short note ("MIT, Apache-2.0, BSD" / "LGPL, MPL, EPL: Änderungen offenlegen" / "GPL, AGPL: Weitergabe prüfen" / "keine Lizenz erkannt oder proprietär").
- a "Tabelle" toggle (`aria-pressed`) that shows the same numbers as a plain table.
- a click on a segment, card or table row narrows the tab: breadcrumb "Lizenzen › Starkes Copyleft" and "← Zurück zum Diagramm".
- **`pages/sbom.rs`**: edits are only in the Lizenzen tab's branch, plus one signal for the chosen group (and an effect that clears it when the target changes). The chart is mounted at the top of the tab. Once a group is chosen, the existing "Alle Lizenzen" table shows only the licences of that group. The Lizenzprüfung panel, the open-licences card, the copyleft warning and the distribution card are hidden until the chart is back. Hiding those four is my reading of "lists behind a click"; it is easy to drop if they should stay.
- Texts DE+EN in a new `licence_overview` module at the end of `i18n/texts.rs`. Styles are small `lo-*` classes at the end of `assets/main.css`, using the existing tokens (the four group colours are fixed hex values).
## Classification
No new classifier. The view reuses what the licence policy (#570) and the summary endpoint already use:
- `spdx_license::category()` for a detected licence, or the category a person gave when they confirmed the licence (that one wins, as in `summarize_licenses`).
- SPDX expressions: `OR` takes the most permissive term, `AND` the most restrictive.
- LGPL / MPL / EPL / CDDL / CPL / MS-RL / OFL → Schwaches Copyleft.
- GPL / EUPL / OSL / CC-BY-SA, and network copyleft AGPL / SSPL → Starkes Copyleft.
- Public domain, permissive and own code → Permissiv.
- No licence, `NOASSERTION`, `NONE`, `LicenseRef-…`, free text it cannot read → Unbekannt.
- **Proprietary → Unbekannt.** It is neither open source nor copyleft; its terms are a contract a person has to read. The card note says "oder proprietär".
- **`WITH` exceptions keep the category of their licence**, so `GPL-2.0-only WITH Classpath-exception-2.0` stays Starkes Copyleft. This differs from the issue sketch (weak copyleft). It is the rule the licence policy evaluates by (asserted in `spdx_license` tests). Changing it here would make the chart disagree with the "Typ" column and with the policy verdicts, so I left it as is. A test pins the current behaviour.
## Endpoints
- Used: `GET /api/v1/sbom/licenses?repo_id=<target>` (already tenant-scoped and gated with `SBOM_READ`). It already returns `count` and `category` for each licence of one target. Group counts are summed from those rows, so the chart, cards, table toggle and filtered table all use the same numbers.
- Added: none, so there is no new `role_gate/router_tests.rs` row.
## How tested
- `cargo fmt --all --check`: clean
- `RUSTFLAGS="-D warnings" cargo clippy -p compliance-core --all-targets -j8 -- -D warnings`: clean
- `RUSTFLAGS="-D warnings" cargo clippy -p compliance-agent --all-targets -j8 -- -D warnings`: clean
- `RUSTFLAGS="-D warnings" cargo clippy -p compliance-dashboard --features server --no-default-features --all-targets -j8 -- -D warnings`: clean
- `RUSTFLAGS="-D warnings" cargo clippy -p compliance-dashboard --features web --no-default-features --all-targets -j8 -- -D warnings`: clean
- `cargo test -p compliance-core --lib models::license::`: 9 passed, 3 new:
- every category falls into one group;
- SPDX expressions (OR/AND/WITH, NOASSERTION, NONE, LicenseRef, free text) land in the right group;
- counts add up.
- `cargo test -p compliance-core --doc license`: passed.
- `cargo test -p compliance-dashboard --features server --no-default-features --lib licence_overview`: 3 passed (segment aria-label, distinct names and notes per group, each group's colour class is defined in `main.css`).
- Not rendered in a browser; the crate has no SSR test harness.
## Open points
- **Filter not in the URL yet.** `Route::SbomPage { target }` is built in `app.rs`, `sidebar.rs`, `overview.rs` and `target.rs`. Adding a field there is not additive and would collide with #962–#965. The SBOM tab is not in the URL either, so `?licence_group=` alone would open on the Komponenten tab. Better as a follow-up that makes the SBOM tabs routable (together with the Komponenten chart's ecosystem filter).
- The chart only appears once a target is chosen (the view is per repo). "Alle Prüfobjekte" keeps the current tab.
- Classpath and other `WITH` exceptions stay Starkes Copyleft (see above). If that should change, it belongs in `spdx_license::category()` and the licence policy, not in this view.
Part of #957
🤖 Generated with [Claude Code](https://claude.com/claude-code)
The Lizenzen tab of one target opens with one bar split into four
licence groups (Permissiv, Schwaches Copyleft, Starkes Copyleft,
Unbekannt) and a card per group with its count and a short note. A
click on a segment or a card narrows the licence table to that group,
with a breadcrumb and the way back to the chart; a "Tabelle" toggle
shows the same numbers as a table.
The groups come from the licence categories the summary endpoint
already returns (spdx_license::category, or the category a person
confirmed); compliance-core maps the eight categories onto the four
groups and sums them (LicenseGroup, LicenseGroupCounts).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
The "Lizenzen" view of #957: the licences tab of one target opens as a chart, and the licence table sits behind a click.
What changed
models/license.rs):LicenseGroup(Permissiv, Schwaches Copyleft, Starkes Copyleft, Unbekannt),LicenseCategory::group(), andLicenseGroupCounts(sums(category, count)rows per group). Pure, no feature gate, unit tests and a doctest.compliance-dashboard/src/components/licence_overview.rs:<button>with an aria-label like "Starkes Copyleft: 49". A group with 0 components has no segment, but its card still shows 0.aria-pressed) that shows the same numbers as a plain table.pages/sbom.rs: edits are only in the Lizenzen tab's branch, plus one signal for the chosen group (and an effect that clears it when the target changes). The chart is mounted at the top of the tab. Once a group is chosen, the existing "Alle Lizenzen" table shows only the licences of that group. The Lizenzprüfung panel, the open-licences card, the copyleft warning and the distribution card are hidden until the chart is back. Hiding those four is my reading of "lists behind a click"; it is easy to drop if they should stay.licence_overviewmodule at the end ofi18n/texts.rs. Styles are smalllo-*classes at the end ofassets/main.css, using the existing tokens (the four group colours are fixed hex values).Classification
No new classifier. The view reuses what the licence policy (#570) and the summary endpoint already use:
spdx_license::category()for a detected licence, or the category a person gave when they confirmed the licence (that one wins, as insummarize_licenses).ORtakes the most permissive term,ANDthe most restrictive.NOASSERTION,NONE,LicenseRef-…, free text it cannot read → Unbekannt.WITHexceptions keep the category of their licence, soGPL-2.0-only WITH Classpath-exception-2.0stays Starkes Copyleft. This differs from the issue sketch (weak copyleft). It is the rule the licence policy evaluates by (asserted inspdx_licensetests). Changing it here would make the chart disagree with the "Typ" column and with the policy verdicts, so I left it as is. A test pins the current behaviour.Endpoints
GET /api/v1/sbom/licenses?repo_id=<target>(already tenant-scoped and gated withSBOM_READ). It already returnscountandcategoryfor each licence of one target. Group counts are summed from those rows, so the chart, cards, table toggle and filtered table all use the same numbers.role_gate/router_tests.rsrow.How tested
cargo fmt --all --check: cleanRUSTFLAGS="-D warnings" cargo clippy -p compliance-core --all-targets -j8 -- -D warnings: cleanRUSTFLAGS="-D warnings" cargo clippy -p compliance-agent --all-targets -j8 -- -D warnings: cleanRUSTFLAGS="-D warnings" cargo clippy -p compliance-dashboard --features server --no-default-features --all-targets -j8 -- -D warnings: cleanRUSTFLAGS="-D warnings" cargo clippy -p compliance-dashboard --features web --no-default-features --all-targets -j8 -- -D warnings: cleancargo test -p compliance-core --lib models::license::: 9 passed, 3 new:cargo test -p compliance-core --doc license: passed.cargo test -p compliance-dashboard --features server --no-default-features --lib licence_overview: 3 passed (segment aria-label, distinct names and notes per group, each group's colour class is defined inmain.css).Open points
Route::SbomPage { target }is built inapp.rs,sidebar.rs,overview.rsandtarget.rs. Adding a field there is not additive and would collide with #962–#965. The SBOM tab is not in the URL either, so?licence_group=alone would open on the Komponenten tab. Better as a follow-up that makes the SBOM tabs routable (together with the Komponenten chart's ecosystem filter).WITHexceptions stay Starkes Copyleft (see above). If that should change, it belongs inspdx_license::category()and the licence policy, not in this view.Part of #957
🤖 Generated with Claude Code
bb5c9ac8a0toee17235182