From 5689ed42392673fab01d18ef1994b74fd08a2b7b Mon Sep 17 00:00:00 2001 From: cmliu Date: Fri, 31 Jul 2026 04:26:32 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=94=AF=E6=8C=81=E7=AC=A6=E5=8F=B7?= =?UTF-8?q?=E9=93=BE=E6=8E=A5=E7=9A=84=E5=AF=BC=E8=88=AA=EF=BC=8C=E4=BC=98?= =?UTF-8?q?=E5=8C=96=E7=9B=AE=E5=BD=95=E6=A0=91=E7=9A=84=E5=B1=95=E5=BC=80?= =?UTF-8?q?=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/file-tree.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/frontend/src/file-tree.ts b/frontend/src/file-tree.ts index 5840639..5b8fb8f 100644 --- a/frontend/src/file-tree.ts +++ b/frontend/src/file-tree.ts @@ -748,12 +748,16 @@ export class FileTree { this.highlightNode(node); this.focusedNode = node; this.updateTabindex(); - if (node.type === 'directory' && !node.unavailable) { + if ((node.type === 'directory' || node.type === 'symlink') && !node.unavailable) { this.onNavigate(node.path); // Expand the node in the tree immediately so aria-expanded flips to // "true" (or shows a loading spinner) without waiting for the async // setCwd → expandToPath round-trip that follows onNavigate. - void this.expandNode(node); + // Only real directories are expandable; symlinks navigate the right + // panel but are not expanded in the tree (isExpandable returns false). + if (node.type === 'directory') { + void this.expandNode(node); + } } // Files/symlinks: select only, no right-side navigation // Unavailable directories: highlight but don't navigate (SFTP would