From 35d9fc969ce9091cd0309f3517409cd18036df91 Mon Sep 17 00:00:00 2001 From: Christoph Brandau Date: Thu, 9 Jul 2026 19:51:51 +0200 Subject: [PATCH] feat(status-panel): enhance UI and add new functionality This update introduces several improvements to the StatusPanel component, enhancing the user interface and experience. A new function has been added to simplify file path handling, and the overlay now features a more dynamic design with animated elements for better visual feedback during operations. - Added baseName function for improved path handling - Enhanced status overlay with animations and new design elements - Updated file staging and unstaging messages for clarity --- .claude/settings.local.json | 3 +- src/App.svelte | 10 +- src/lib/components/StatusPanel.svelte | 163 +++++++++++++++++++++++--- 3 files changed, 155 insertions(+), 21 deletions(-) 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}