diff --git a/.claude/settings.local.json b/.claude/settings.local.json index 1d8c023..db797c0 100644 --- a/.claude/settings.local.json +++ b/.claude/settings.local.json @@ -99,7 +99,8 @@ "Bash(xxd -l 16 src-tauri/icons/GitCat.ico)", "Bash(pkg-config --exists openssl)", "Bash(sudo apt-get install -y libssl-dev pkg-config)", - "Bash(dpkg -L libssl3t64)" + "Bash(dpkg -L libssl3t64)", + "Bash(grep *)" ] } } diff --git a/src/App.svelte b/src/App.svelte index 6a43a5d..743b082 100644 --- a/src/App.svelte +++ b/src/App.svelte @@ -938,6 +938,10 @@ return repoKey(left) === repoKey(right); } + function baseName(path: string): string { + return path.split(/[\\/]/).filter(Boolean).pop() ?? path; + } + function uniqueRepoPaths(paths: string[]): string[] { const seen = new Set(); const result: string[] = []; @@ -2554,7 +2558,7 @@ const targets = files.filter((file) => file.unstaged !== null); if (targets.length === 0) return; const paths = targets.map((file) => file.path); - await runOperation(targets.length === 1 ? `Staging ${targets[0].path}` : `Staging ${targets.length} files`, async () => { + await runOperation(targets.length === 1 ? `Staging ${baseName(targets[0].path)}` : `Staging ${targets.length} files`, async () => { applyStatus(await stageFiles(activeRepoPath, paths)); await refreshExplorerFiles(activeRepoPath); trackEvent("file_staged", { @@ -2568,7 +2572,7 @@ const targets = files.filter((file) => file.staged !== null); if (targets.length === 0) return; const paths = targets.map((file) => file.path); - await runOperation(targets.length === 1 ? `Unstaging ${targets[0].path}` : `Unstaging ${targets.length} files`, async () => { + await runOperation(targets.length === 1 ? `Unstaging ${baseName(targets[0].path)}` : `Unstaging ${targets.length} files`, async () => { applyStatus(await unstageFiles(activeRepoPath, paths)); await refreshExplorerFiles(activeRepoPath); trackEvent("file_unstaged", { @@ -3372,7 +3376,7 @@ {/if} - {#if operation && operation !== "Opening repository"} + {#if operation && operation !== "Opening repository" && !hasRepository}