fix(dashboard): repo views on a phone, CRA figure, empty licence view (#957)
CI / Check (push) Skipped
CI / Detect Changes (pull_request) Skipped
CI / Deploy Agent (pull_request) Skipped
CI / Deploy Dashboard (pull_request) Skipped
CI / Deploy Docs (pull_request) Skipped
CI / Deploy MCP (pull_request) Skipped
CI / Agent integration (pull_request) Successful in 4m23s
CI / Check (pull_request) Successful in 19m44s

Checked against the mockup in a local run: the tab strip scrolls on its
own on a narrow screen instead of widening the page and no longer shows a
stray scrollbar; the CRA tab counts the requirements checked without a
finding (not those outside the code); the licence tab says why it is empty;
the repo cards' bucket labels wrap as in the mockup.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Sharang ParnerkarandClaude Opus 5.5 committed 2026-11-10 20:50:41 +01:00
1 parent 93083ec3a5
commit 40a08577b8
3 files changed
+18 -8

No files matched your search

+8 -6
View File
@@ -7774,7 +7774,10 @@ span.repo-crumb-name {
margin-bottom: 20px;
border-bottom: 1px solid var(--border-bright);
overflow-x: auto;
overflow-y: hidden;
scrollbar-width: thin;
/* Scrolls on its own on a narrow screen instead of widening the page. */
contain: inline-size;
}
.repo-tab {
@@ -7784,7 +7787,6 @@ span.repo-crumb-name {
flex: none;
min-height: 44px;
padding: 0 16px;
margin-bottom: -1px;
border-bottom: 2px solid transparent;
color: var(--text-secondary);
font-size: 14px;
@@ -7835,8 +7837,9 @@ span.repo-crumb-name {
.repo-card-bucket {
display: grid;
gap: 2px;
align-content: start;
min-width: 0;
min-height: 44px;
min-height: 56px;
padding: 6px 8px;
border: 1px solid var(--border);
border-top: 3px solid var(--tone, var(--border-strong));
@@ -7861,9 +7864,8 @@ span.repo-crumb-name {
}
.repo-card-bucket-label {
overflow: hidden;
color: var(--text-tertiary);
color: var(--text-secondary);
font-size: 11px;
text-overflow: ellipsis;
white-space: nowrap;
line-height: 1.25;
overflow-wrap: anywhere;
}
+4
View File
@@ -6659,6 +6659,10 @@ pub mod repo_views {
de: "Verwendet von",
en: "Used by",
};
pub const NO_LICENCES: Text = Text {
de: "Die Stückliste nennt noch keine Komponenten, also auch keine Lizenzen.",
en: "The SBOM names no components yet, so no licences either.",
};
pub const LICENCES_LIST: Text = Text {
de: "Alle Lizenzen im SBOM",
en: "All licences in the SBOM",
@@ -101,7 +101,7 @@ fn tab_figure(
+ c.partial
+ c.no_violation_found
+ c.not_code_checkable;
format!("{}/{total}", c.no_violation_found + c.not_code_checkable)
format!("{}/{total}", c.no_violation_found)
}),
RepoView::Licences | RepoView::History => None,
}
@@ -303,6 +303,9 @@ fn LicencesTab(target_id: String) -> Element {
return rsx! { div { class: "loading", {common::LOADING.get(lang)} } };
};
let counts: LicenseGroupCounts = summary.data.iter().map(|l| (l.category, l.count)).collect();
if counts.total() == 0 {
return rsx! { p { class: "card target-muted", {tx::NO_LICENCES.get(lang)} } };
}
let group: Option<LicenseGroup> = selected();
let licences: Vec<LicenseSummaryData> = summary
.data
@@ -367,7 +370,8 @@ mod tests {
assert_eq!(figure(RepoView::Findings).as_deref(), Some("47 offen"));
assert_eq!(figure(RepoView::Cves).as_deref(), Some("15"));
assert_eq!(figure(RepoView::Components).as_deref(), Some("312"));
assert_eq!(figure(RepoView::Cra).as_deref(), Some("26/40"));
// Checked in the code without a finding, of all 40.
assert_eq!(figure(RepoView::Cra).as_deref(), Some("14/40"));
assert_eq!(figure(RepoView::Licences), None);
assert_eq!(figure(RepoView::History), None);
assert_eq!(tab_figure(RepoView::Cves, None, None, Lang::De), None);