feat(git): add upstream tracking and local-only branch UI

This release adds upstream tracking for branches and a local-only
indicator in the UI.
The Git integration now exposes upstreams and supports publish flows.
This enables publishing and remote-tracking configuration.

- Introduces upstream tracking and local-only branch UI markers
- Updates toolbar to reflect publish-local state and status indicators
- Bumps version to 2026.8.3 and updates changelog
This commit is contained in:
Christoph Brandau
2026-08-13 19:32:26 +02:00
parent f43fe00873
commit b6b9964a93
11 changed files with 420 additions and 45 deletions
+19 -4
View File
@@ -3,6 +3,7 @@
ChevronDown,
Code2,
CloudDownload,
CloudOff,
Download,
FolderOpen,
GitCompare,
@@ -21,6 +22,7 @@
export let operation: string = "";
export let ahead: number = 0;
export let behind: number = 0;
export let localOnly: boolean = false;
export let language: "en" | "de" = "en";
export let editorName: string = "Editor";
export let terminalName: string = "Terminal";
@@ -45,6 +47,12 @@
let toolbarElement: HTMLDivElement;
$: isGerman = language === "de";
$: pushLabel = localOnly ? (isGerman ? "Veröffentlichen" : "Publish") : "Push";
$: pushTitle = localOnly
? (isGerman
? "Dieser Branch existiert nur lokal. Veröffentlichen erstellt den Remote-Branch und richtet das Tracking ein."
: "This branch exists only locally. Publish creates the remote branch and configures tracking.")
: "Push";
function runHistoryAction(action: () => void) {
historyOpen = false;
@@ -103,10 +111,13 @@
<button
class="repo-action sync-primary"
class:publish-local={localOnly}
onclick={onPush}
disabled={!hasRepository || isBusy}
title="Push"
aria-label={ahead > 0
title={pushTitle}
aria-label={localOnly
? pushTitle
: ahead > 0
? `Push, ${ahead} ${isGerman ? (ahead === 1 ? "lokaler Commit voraus" : "lokale Commits voraus") : (ahead === 1 ? "commit ahead" : "commits ahead")}`
: "Push"}
>
@@ -115,8 +126,12 @@
{:else}
<Upload size={15} aria-hidden="true" />
{/if}
<span class="repo-action-label">Push</span>
{#if ahead > 0}<span class="repo-action-count ahead">↑{ahead}</span>{/if}
<span class="repo-action-label">{pushLabel}</span>
{#if localOnly}
<span class="repo-action-local-marker"><CloudOff size={9} aria-hidden="true" />{isGerman ? "NUR LOKAL" : "LOCAL"}</span>
{:else if ahead > 0}
<span class="repo-action-count ahead">↑{ahead}</span>
{/if}
</button>
<div class="repo-history-wrap">
<button class="repo-action" type="button" onclick={() => { syncOpen = !syncOpen; historyOpen = false; }} disabled={!hasRepository || isBusy} aria-label={isGerman ? "Sync-Optionen" : "Sync options"} aria-haspopup="menu">