From 78da2a954cc45935828836549f728c906f7eff81 Mon Sep 17 00:00:00 2001 From: Sharang Parnerkar <30073382+mighty840@users.noreply.github.com> Date: Fri, 20 Nov 2026 11:09:14 +0100 Subject: [PATCH] fix(dashboard): a release page of an unknown target says so (#1028) Opening "SBOM freigeben" for a target the workspace does not have (found on stage with another workspace's link) said the releases could not be loaded, under a breadcrumb with an empty name. It now says what the target page says: this target does not exist (any more). Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01Q9inRcu428A2iNjDHPEAT9 --- compliance-dashboard/src/pages/releases.rs | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/compliance-dashboard/src/pages/releases.rs b/compliance-dashboard/src/pages/releases.rs index 4a8aea2..ced8359 100644 --- a/compliance-dashboard/src/pages/releases.rs +++ b/compliance-dashboard/src/pages/releases.rs @@ -284,11 +284,19 @@ pub fn TargetReleasesPage(id: String) -> Element { .and_then(|n| n.as_str()) .unwrap_or_default() .to_string(), - Some(None) => String::new(), + // Not a target of this workspace (or it cannot be read): said as the + // target page says it, rather than as releases that fail to load. + Some(None) => { + return rsx! { + div { class: "card target-missing", + p { {crate::i18n::texts::targets::NOT_FOUND.get(lang)} } + } + } + } None => return rsx! { div { class: "loading", {tx::LOADING.get(lang)} } }, }; let listed = match &*releases.read() { - Some(Ok(listed)) if !name.is_empty() => listed.clone(), + Some(Ok(listed)) => listed.clone(), Some(_) => { return rsx! { ReleaseCrumbs { id: id.clone(), name }