From a80c2485293f329f65e62b45d79b9a9103e55eaf Mon Sep 17 00:00:00 2001 From: Sharang Parnerkar <30073382+mighty840@users.noreply.github.com> Date: Thu, 12 Nov 2026 11:14:52 +0100 Subject: [PATCH] fix(dashboard): the Managed Git hint links one docs path in both languages (#980) On prod, DOCS_URL is the customer docs site, which keeps a page at the same path under each language root and has no "-en" pages: the English link to guide/managed-git-en would 404 there. Both languages now link guide/managed-git. Co-Authored-By: Claude Opus 5.5 --- compliance-dashboard/src/pages/finding_detail.rs | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/compliance-dashboard/src/pages/finding_detail.rs b/compliance-dashboard/src/pages/finding_detail.rs index c2b5db3..8b17dea 100644 --- a/compliance-dashboard/src/pages/finding_detail.rs +++ b/compliance-dashboard/src/pages/finding_detail.rs @@ -158,13 +158,10 @@ pub fn FindingDetailPage(id: String) -> Element { &me.docs_url, "guide/repositories#connecting-an-issue-tracker", ); - let managed_git_guide = docs_page( - &me.docs_url, - match lang { - Lang::De => "guide/managed-git", - Lang::En => "guide/managed-git-en", - }, - ); + // The same path in both languages: the customer docs site + // (prod's `DOCS_URL`) keeps each page at one path per language + // root and has no `-en` pages. + let managed_git_guide = docs_page(&me.docs_url, "guide/managed-git"); // `move` closures take ownership (like a Python closure capturing // by value), so the copy handler gets its own clones. let finding_for_copy = f.clone(); @@ -915,8 +912,8 @@ mod tests { "/docs/guide/managed-git" ); assert_eq!( - docs_page("https://docs.example/pruefwerk", "guide/managed-git-en"), - "https://docs.example/pruefwerk/guide/managed-git-en" + docs_page("https://docs.example/pruefwerk/", "guide/managed-git"), + "https://docs.example/pruefwerk/guide/managed-git" ); } }