From b88bcc92301b316a316f0f34be280b23a7dc1eb5 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 9 Apr 2026 13:44:48 +0000 Subject: [PATCH 1/3] Initial plan From 14857a94c65e55d23446e885502a8630294a3f46 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 9 Apr 2026 13:56:27 +0000 Subject: [PATCH 2/3] fix: use explicit router.push() for breadcrumb navigation to fix post-refresh navigation After a page refresh in the bucket browser, clicking breadcrumb links ("Browser" or "Buckets") failed to navigate because the Next.js Link component wrapped in Radix Slot.Root did not properly handle same-pathname navigations (only search params change) in static export mode. The fix adds explicit onClick handlers with router.push() to breadcrumb links, ensuring navigation always works regardless of Link component behavior. This follows the same pattern used in browser/content.tsx. Agent-Logs-Url: https://github.com/rustfs/console/sessions/8ece92ef-fc2f-4465-a648-5f95fbe189e4 Co-authored-by: overtrue <1472352+overtrue@users.noreply.github.com> --- components/top-nav-breadcrumb.tsx | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/components/top-nav-breadcrumb.tsx b/components/top-nav-breadcrumb.tsx index bd6b5fd8..0b07088b 100644 --- a/components/top-nav-breadcrumb.tsx +++ b/components/top-nav-breadcrumb.tsx @@ -2,7 +2,7 @@ import * as React from "react" import Link from "next/link" -import { usePathname, useSearchParams } from "next/navigation" +import { usePathname, useRouter, useSearchParams } from "next/navigation" import { useTranslation } from "react-i18next" import { Breadcrumb, @@ -26,6 +26,7 @@ function getLabelByPath(pathSegment: string, t: (k: string) => string): string { export function TopNavBreadcrumb() { const pathname = usePathname() const searchParams = useSearchParams() + const router = useRouter() const { t } = useTranslation() const segments = pathname?.split("/").filter(Boolean) ?? [] @@ -98,7 +99,15 @@ export function TopNavBreadcrumb() { {item.href ? ( - {item.label} + { + e.preventDefault() + router.push(item.href!) + }} + > + {item.label} + ) : ( {item.label} From b6d9986b0cffb1c58f7b3d866b000d2f944d5f9b Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 9 Apr 2026 13:59:15 +0000 Subject: [PATCH 3/3] fix: address review - add defensive check instead of non-null assertion Agent-Logs-Url: https://github.com/rustfs/console/sessions/8ece92ef-fc2f-4465-a648-5f95fbe189e4 Co-authored-by: overtrue <1472352+overtrue@users.noreply.github.com> --- components/top-nav-breadcrumb.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/top-nav-breadcrumb.tsx b/components/top-nav-breadcrumb.tsx index 0b07088b..ec4b513b 100644 --- a/components/top-nav-breadcrumb.tsx +++ b/components/top-nav-breadcrumb.tsx @@ -103,7 +103,7 @@ export function TopNavBreadcrumb() { href={item.href} onClick={(e) => { e.preventDefault() - router.push(item.href!) + if (item.href) router.push(item.href) }} > {item.label}