From 60d4b5c8774aec159947001cb2799f72ead22277 Mon Sep 17 00:00:00 2001 From: Illia Filippov Date: Wed, 24 Dec 2025 19:50:57 +0100 Subject: [PATCH] fix: handle root path in breadcrumb parsing for PathInput component - Added logic to correctly parse and return the root path for Unix-like systems in the breadcrumb segment function. --- apps/ui/src/components/ui/path-input.tsx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/apps/ui/src/components/ui/path-input.tsx b/apps/ui/src/components/ui/path-input.tsx index 49f67505..7840c16d 100644 --- a/apps/ui/src/components/ui/path-input.tsx +++ b/apps/ui/src/components/ui/path-input.tsx @@ -22,6 +22,11 @@ interface BreadcrumbSegment { function parseBreadcrumbs(path: string): BreadcrumbSegment[] { if (!path) return []; + // Handle root path on Unix-like systems + if (path === '/') { + return [{ name: '/', path: '/', isLast: true }]; + } + const segments = path.split(/[/\\]/).filter(Boolean); const isWindows = segments[0]?.includes(':');