From 3684b98d552a05a3dd970126ff134eee4d879b61 Mon Sep 17 00:00:00 2001 From: LyAhn Date: Sun, 21 Jun 2026 19:21:00 +0100 Subject: [PATCH] fix(folder-picker): address QoL issues from PR review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Fix chevron tooltip: was "Open folder" in both branches; now shows "No subfolders" when the entry has no children (consistent with the existing opacity-45 visual cue on the same chevron icon) - Fix Unix breadcrumb root label: was always "Home" even for non-home paths like /mnt/data — now labelled "/" which is always accurate - Fix partial-failure staging: on a mixed add result, successfully-added entries are now removed from the staging panel so only genuinely failed folders remain for the user to retry (index-pairing is safe because the backend returns results in input order via a preserved .map()) --- src/components/FolderPickerModal.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/components/FolderPickerModal.tsx b/src/components/FolderPickerModal.tsx index c509993..047b127 100644 --- a/src/components/FolderPickerModal.tsx +++ b/src/components/FolderPickerModal.tsx @@ -36,7 +36,7 @@ function buildBreadcrumbs(path: string | null): { label: string; path: string | const parts = normalized.split(/[\\/]+/).filter(Boolean); let current = separator === "/" ? "" : ""; return [ - { label: "Home", path: null }, + { label: "/", path: null }, ...parts.map((part) => { current = `${current}/${part}`; return { label: part, path: current }; @@ -117,7 +117,7 @@ function FolderRow({ type="button" className="rounded-md p-1 text-gray-500 transition-colors hover:bg-white/[0.06] hover:text-white light-theme:hover:bg-gray-900 light-theme:hover:text-white" onClick={onNavigate} - title={entry.has_children ? "Open folder" : "Open folder"} + title={entry.has_children ? "Open folder" : "No subfolders"} > @@ -300,6 +300,7 @@ export function FolderPickerModal() { const failed = addResults.filter((result) => result.status === "error"); setResults(addResults); if (failed.length > 0) { + setStagedPaths(stagedPaths.filter((_, i) => addResults[i]?.status === "error")); setError(failed.map((failure) => failure.data).join("; ")); return; }