From c9cda3e203600f3dafb37cb97652088425baf61a Mon Sep 17 00:00:00 2001 From: Linus Rath <139418639+rathlinus@users.noreply.github.com> Date: Thu, 21 May 2026 18:06:59 +0200 Subject: [PATCH] fix: parent navigation detaching account in Pro shell file browser --- components/files/file-browser.tsx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/components/files/file-browser.tsx b/components/files/file-browser.tsx index e9eb11a8..926f95f5 100644 --- a/components/files/file-browser.tsx +++ b/components/files/file-browser.tsx @@ -491,8 +491,15 @@ export function FileBrowser({ const segments = currentPath.split('/').filter(Boolean); segments.pop(); const parentPath = segments.length === 0 ? '/' : '/' + segments.join('/'); + // Pro shell: going up to root from a subfolder must land on the + // account's filesystem root, not detach back to the account picker. + // Home click (breadcrumb) still detaches. + if (parentPath === '/' && accountLabel) { + onNavigate('/', '__account_root__'); + return; + } onNavigate(parentPath); - }, [currentPath, onNavigate]); + }, [currentPath, onNavigate, accountLabel]); const handleResourceClick = (resource: FileResource, e: React.MouseEvent) => { if (resource.isDirectory) {