feat(tauri): update Windows taskbar badge with combined count

The Windows overlay badge now renders a single combined number and
includes an additional “changes” component in the total. This makes
the badge more informative while keeping the icon compact and
legible across small sizes.

- Simplify badge rendering to one circle with centered text
- Extend the Tauri command and frontend call to pass changes count
This commit is contained in:
Christoph Brandau
2026-07-03 16:40:47 +02:00
parent b69538de85
commit 399ba80550
4 changed files with 96 additions and 55 deletions
+2 -2
View File
@@ -679,7 +679,7 @@
repoPath = "";
status = null;
lastStatusFingerprint = "";
void setSyncBadge(0, 0).catch(() => {});
void setSyncBadge(0, 0, 0).catch(() => {});
}
branches = [];
commits = [];
@@ -713,7 +713,7 @@
repoPath = activeRepoPath;
lastStatusFingerprint = statusFingerprint(nextStatus);
upsertRepoTab(activeRepoPath, nextStatus);
void setSyncBadge(nextStatus.ahead, nextStatus.behind).catch(() => {});
void setSyncBadge(nextStatus.ahead, nextStatus.behind, nextStatus.files.length).catch(() => {});
}
function errorToMessage(error: unknown): string {
+3 -3
View File
@@ -37,10 +37,10 @@ export function getStatus(path: string): Promise<GitStatus> {
return invoke<GitStatus>("get_status", { path });
}
// Sets the taskbar icon badge to ahead + behind (0 clears it). Windows only — a no-op on
// Sets the taskbar icon badge to ahead + behind + changed status files (0 clears it). Windows only — a no-op on
// other platforms, since Windows has no native numeric badge to fall back to.
export function setSyncBadge(ahead: number, behind: number): Promise<void> {
return invoke<void>("set_sync_badge", { ahead, behind });
export function setSyncBadge(ahead: number, behind: number, changes: number): Promise<void> {
return invoke<void>("set_sync_badge", { ahead, behind, changes });
}
export function listBranches(path: string): Promise<GitBranch[]> {