From 628e2f7c0bce9c344c9427f33eb1ba3f615aab2d Mon Sep 17 00:00:00 2001 From: Christoph Brandau Date: Wed, 1 Jul 2026 10:40:22 +0200 Subject: [PATCH] Add repository opening loading overlay Introduce a full-screen, animated overlay to provide visual feedback when the application is opening a repository. This prevents perceived delays and informs the user about the ongoing operation. Also, enhance build performance and binary size by configuring Cargo profiles: - Development: Enable incremental compilation, use line-tables-only debug info, and optimize third-party dependencies to speed up rebuilds and improve runtime snappiness during development. - Release: Apply aggressive optimizations (opt-level 3, thin LTO, single codegen unit, stripping) for smaller, faster binaries. --- src-tauri/Cargo.toml | 21 +++ src/App.svelte | 8 + src/lib/components/RepoLoadingOverlay.svelte | 175 +++++++++++++++++++ 3 files changed, 204 insertions(+) create mode 100644 src/lib/components/RepoLoadingOverlay.svelte diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml index 52fbb2a..486da8d 100644 --- a/src-tauri/Cargo.toml +++ b/src-tauri/Cargo.toml @@ -18,3 +18,24 @@ tauri-build = { version = "2", features = [] } [target.'cfg(not(any(target_os = "android", target_os = "ios")))'.dependencies] tauri-plugin-updater = "2" + +# ── Build profiles ─────────────────────────────────────────────────────────── +# Dev: keep incremental compilation and emit only line-table debug info instead +# of full debuginfo. This cuts link time noticeably (linking is the slow part of +# a `tauri dev` recompile) while still giving panic backtraces with line numbers. +[profile.dev] +incremental = true +debug = "line-tables-only" + +# Optimize third-party dependencies once (they are cached), so the running dev +# build is snappy without slowing down rebuilds of our own crate. +[profile.dev.package."*"] +opt-level = 2 + +# Release: smaller binary (also shrinks the auto-updater download) without +# regressing runtime performance of the code-search feature. +[profile.release] +opt-level = 3 +lto = "thin" +codegen-units = 1 +strip = true diff --git a/src/App.svelte b/src/App.svelte index 4df224f..06f28b5 100644 --- a/src/App.svelte +++ b/src/App.svelte @@ -14,6 +14,7 @@ import FileHistoryPanel from "./lib/components/FileHistoryPanel.svelte"; import GlobalSearchDialog from "./lib/components/GlobalSearchDialog.svelte"; import HistoryPanel from "./lib/components/HistoryPanel.svelte"; + import RepoLoadingOverlay from "./lib/components/RepoLoadingOverlay.svelte"; import ResolveDialog from "./lib/components/ResolveDialog.svelte"; import StatusPanel from "./lib/components/StatusPanel.svelte"; import UpdateToast from "./lib/components/UpdateToast.svelte"; @@ -133,6 +134,8 @@ $: isBusy = operation.length > 0; $: hasRepository = activeRepoPath.length > 0 && status !== null; + $: openingRepo = operation === "Opening repository"; + $: repoDisplayName = ((repoPath || activeRepoPath).split(/[\\/]/).filter(Boolean).pop()) ?? ""; $: changedFiles = status?.files ?? []; $: stagedCount = status?.files.filter((f) => f.staged !== null).length ?? 0; $: unstagedCount = status?.files.filter((f) => f.unstaged !== null).length ?? 0; @@ -1207,6 +1210,11 @@ /> {/if} + +{#if openingRepo} + +{/if} + {#if resolveDialogOpen} + export let label = "Repository wird geöffnet"; + export let repoName = ""; + + +
+
+ + + +
+ {label}… + {#if repoName} + {repoName} + {/if} +
+ +
+
+
+ +