Skip to content

Dodaios is an open-source agent OS for your desktop: it runs your coding agents, browser and apps by voice or chat, on your own machine. Formerly Personal Jarvis.

feat(ide): show at a glance whether a branch is local or on GitHub

rubenluetke10-beep31d7397e9547
diff --git a/jarvis/ui/web/frontend/src/components/agentic/sidePanel/git/GitOverviewTab.test.tsx b/jarvis/ui/web/frontend/src/components/agentic/sidePanel/git/GitOverviewTab.test.tsx
index fb6c7bc1c6..b349149423 100644
--- a/jarvis/ui/web/frontend/src/components/agentic/sidePanel/git/GitOverviewTab.test.tsx
+++ b/jarvis/ui/web/frontend/src/components/agentic/sidePanel/git/GitOverviewTab.test.tsx
@@ -275,6 +275,19 @@ describe("GitOverviewTab", () => {
expect(within(row("wip/local")).getByTestId("git-branch-link").tagName).toBe("SPAN");
});
+ it("marks every branch as local only, on GitHub, or only on GitHub", async () => {
+ answer = { ...OVERVIEW, branches: [...OVERVIEW.branches, branch("wip/local", { upstream: "", on_github: false })] };
+ render(<GitOverviewTab />);
+ await screen.findAllByTestId("git-branch-row");
+ const location = (name: string) => within(row(name)).getByTestId("git-location");
+ expect(location("wip/local").dataset.location).toBe("local");
+ expect(location("wip/local").textContent).toBe("local only");
+ expect(location("main").dataset.location).toBe("github");
+ expect(location("main").textContent).toBe("on GitHub");
+ fireEvent.click(screen.getByTestId("git-remote-toggle"));
+ expect(location("only-remote").dataset.location).toBe("github_only");
+ });
+
it("offers GitHub pages and copies from a branch's menu", async () => {
render(<GitOverviewTab />);
await screen.findAllByTestId("git-branch-row");
diff --git a/jarvis/ui/web/frontend/src/components/agentic/sidePanel/git/GitOverviewTab.tsx b/jarvis/ui/web/frontend/src/components/agentic/sidePanel/git/GitOverviewTab.tsx
index f22550963f..3a5caeb474 100644
--- a/jarvis/ui/web/frontend/src/components/agentic/sidePanel/git/GitOverviewTab.tsx
+++ b/jarvis/ui/web/frontend/src/components/agentic/sidePanel/git/GitOverviewTab.tsx
@@ -14,6 +14,8 @@ import {
GitPullRequest,
GitPullRequestClosed,
GitPullRequestDraft,
+ Globe,
+ Laptop,
Loader2,
RefreshCw,
Search,
@@ -268,6 +270,40 @@ function MergedChips({ row }: { row: BranchRow }) {
);
}
+type BranchLocation = "local" | "github" | "github_only";
+
+function branchLocation(row: BranchRow): BranchLocation {
+ if (row.remote_only) return "github_only";
+ return row.upstream || row.on_github ? "github" : "local";
+}
+
+// Where the branch lives, readable at a glance: a laptop while it exists only
+// on this computer (amber — nothing backs it up yet), a globe once it is on GitHub.
+const LOCATION_STYLE: Record<BranchLocation, { icon: typeof Globe; tone: string; label: string; tip: string }> = {
+ local: { icon: Laptop, tone: "border-warning/40 bg-warning/10 text-warning", label: "local_only", tip: "not_pushed" },
+ github: { icon: Globe, tone: "border-info/35 bg-info/10 text-info", label: "on_github", tip: "on_github_tip" },
+ github_only: { icon: Globe, tone: "border-info/35 bg-info/10 text-info", label: "github_only", tip: "github_only_tip" },
+};
+
+function LocationChip({ row }: { row: BranchRow }) {
+ const t = useT();
+ const location = branchLocation(row);
+ const style = LOCATION_STYLE[location];
+ const Icon = style.icon;
+ return (
+ <QuickTooltip content={t(`ide_side_panel.git.${style.tip}`)} side="bottom" className="inline-flex shrink-0">
+ <span
+ data-testid="git-location"
+ data-location={location}
+ className={cn("inline-flex items-center gap-1 rounded-full border px-1.5 py-px text-[10.5px] font-medium leading-none", style.tone)}
+ >
+ <Icon className="h-3 w-3 shrink-0" aria-hidden />
+ {t(`ide_side_panel.git.${style.label}`)}
+ </span>
+ </QuickTooltip>
+ );
+}
+
function BranchLine({
row,
isDefault,
@@ -325,14 +361,12 @@ function BranchLine({
</span>
)}
</QuickTooltip>
- {(row.merged_into.length > 0 || meta.length > 0 || row.worktree || unpushed) && (
- <span className="flex min-w-0 items-center gap-2 text-[10.5px] text-muted-foreground">
- <MergedChips row={row} />
- {meta.length > 0 && <span className="shrink-0 tabular-nums">{meta.join(" · ")}</span>}
- {row.worktree && <span className="shrink-0">{t("ide_side_panel.git.worktree_badge")}</span>}
- {unpushed && <span className="shrink-0">{t("ide_side_panel.git.local_only")}</span>}
- </span>
- )}
+ <span className="mt-0.5 flex min-w-0 items-center gap-2 text-[10.5px] text-muted-foreground">
+ <LocationChip row={row} />
+ <MergedChips row={row} />
+ {meta.length > 0 && <span className="shrink-0 tabular-nums">{meta.join(" · ")}</span>}
+ {row.worktree && <span className="shrink-0">{t("ide_side_panel.git.worktree_badge")}</span>}
+ </span>
</span>
<PullRequestBadge prs={row.pull_requests} />
<CiBadge ci={row.ci} stale={row.ci_stale} />
@@ -474,6 +508,14 @@ function Legend() {
<GitMerge className="h-3.5 w-3.5 text-[hsl(var(--gh-merged))]" aria-hidden />
{t("ide_side_panel.git.legend_merged")}
</li>
+ <li className="flex items-center gap-1.5">
+ <Laptop className="h-3.5 w-3.5 text-warning" aria-hidden />
+ {t("ide_side_panel.git.not_pushed")}
+ </li>
+ <li className="flex items-center gap-1.5">
+ <Globe className="h-3.5 w-3.5 text-info" aria-hidden />
+ {t("ide_side_panel.git.on_github_tip")}
+ </li>
</ul>
</div>
);
diff --git a/jarvis/ui/web/frontend/src/i18n/locales/de.json b/jarvis/ui/web/frontend/src/i18n/locales/de.json
index 746c28e8b8..4885e1d1bd 100644
--- a/jarvis/ui/web/frontend/src/i18n/locales/de.json
+++ b/jarvis/ui/web/frontend/src/i18n/locales/de.json
@@ -6227,6 +6227,10 @@
"ahead_behind": "↑{ahead} ↓{behind}",
"not_pushed": "Noch nicht zu GitHub gepusht",
"local_only": "nur lokal",
+ "on_github": "auf GitHub",
+ "on_github_tip": "Dieser Branch liegt auf GitHub.",
+ "github_only": "nur auf GitHub",
+ "github_only_tip": "Nur auf GitHub, nicht auf diesem Rechner ausgecheckt.",
"merged_short": "in {target}",
"merged_git": "In {target} gemergt: Jeder Commit dieses Branches ist in {target} enthalten.",
"merged_pr": "Über Pull Request #{number} in {target} gemergt.",
diff --git a/jarvis/ui/web/frontend/src/i18n/locales/en.json b/jarvis/ui/web/frontend/src/i18n/locales/en.json
index 72ca6d634d..1edb5335cc 100644
--- a/jarvis/ui/web/frontend/src/i18n/locales/en.json
+++ b/jarvis/ui/web/frontend/src/i18n/locales/en.json
@@ -6260,6 +6260,10 @@
"ahead_behind": "↑{ahead} ↓{behind}",
"not_pushed": "Not pushed to GitHub yet",
"local_only": "local only",
+ "on_github": "on GitHub",
+ "on_github_tip": "This branch is on GitHub.",
+ "github_only": "only on GitHub",
+ "github_only_tip": "Only on GitHub, not checked out on this computer.",
"merged_short": "in {target}",
"merged_git": "Merged into {target}: every commit of this branch is in {target}.",
"merged_pr": "Merged into {target} through pull request #{number}.",
diff --git a/jarvis/ui/web/frontend/src/i18n/locales/es.json b/jarvis/ui/web/frontend/src/i18n/locales/es.json
index ec59837c93..fd0367410c 100644
--- a/jarvis/ui/web/frontend/src/i18n/locales/es.json
+++ b/jarvis/ui/web/frontend/src/i18n/locales/es.json
@@ -6227,6 +6227,10 @@
"ahead_behind": "↑{ahead} ↓{behind}",
"not_pushed": "Aún no se ha subido a GitHub",
"local_only": "solo local",
+ "on_github": "en GitHub",
+ "on_github_tip": "Esta rama está en GitHub.",
+ "github_only": "solo en GitHub",
+ "github_only_tip": "Solo en GitHub, no está en este ordenador.",
"merged_short": "en {target}",
"merged_git": "Fusionada en {target}: todos los commits de esta rama están en {target}.",
"merged_pr": "Fusionada en {target} mediante el pull request #{number}.",