Skip to content

Node-based terminal manager for AI coding agents — tmux-backed terminals and parallel agent sessions as draggable nodes on an infinite pan/zoom canvas. macOS, Linux, and a browser Server Edition.

feat(scm): gitAutoFetch setting (default on) + Settings toggle

enes0923cfdc3bd4
diff --git a/src/renderer/components/settings/sections/CommitSection.tsx b/src/renderer/components/settings/sections/CommitSection.tsx
index 45902d228..c15bfbd79 100644
--- a/src/renderer/components/settings/sections/CommitSection.tsx
+++ b/src/renderer/components/settings/sections/CommitSection.tsx
@@ -4,8 +4,13 @@ import { SearchableRow } from '../SearchableRow'
import { FieldRow } from '../FieldRow'
import { Select } from '@renderer/ui/Select'
import { Input } from '@renderer/ui/Input'
+import { Switch } from '@renderer/ui/Switch'
const ROWS = {
+ autoFetch: {
+ title: 'Auto-fetch git status',
+ keywords: ['git', 'fetch', 'source control', 'ahead', 'behind', 'sync', 'remote']
+ },
agent: {
title: 'Commit agent',
keywords: ['commit', 'message', 'ai', 'claude', 'codex', 'generate']
@@ -26,6 +31,19 @@ export function CommitSection({ isActive }: { isActive: boolean }): React.JSX.El
isActive={isActive}
searchEntries={ENTRIES}
>
+ <SearchableRow {...ROWS.autoFetch}>
+ <FieldRow
+ label="Auto-fetch git status"
+ description="Periodically refresh ahead/behind from the remote while Source Control is open."
+ control={
+ <Switch
+ checked={settings.gitAutoFetch}
+ ariaLabel="Auto-fetch git status"
+ onChange={(on) => update({ gitAutoFetch: on })}
+ />
+ }
+ />
+ </SearchableRow>
<SearchableRow {...ROWS.agent}>
<FieldRow
label="Agent"
diff --git a/src/shared/default-settings.test.ts b/src/shared/default-settings.test.ts
new file mode 100644
index 000000000..2bfb93776
--- /dev/null
+++ b/src/shared/default-settings.test.ts
@@ -0,0 +1,8 @@
+import { describe, expect, it } from 'vitest'
+import { DEFAULT_SETTINGS } from './types'
+
+describe('DEFAULT_SETTINGS', () => {
+ it('enables git auto-fetch by default', () => {
+ expect(DEFAULT_SETTINGS.gitAutoFetch).toBe(true)
+ })
+})
diff --git a/src/shared/types.ts b/src/shared/types.ts
index 982789bd6..d8b6c5751 100644
--- a/src/shared/types.ts
+++ b/src/shared/types.ts
@@ -269,6 +269,9 @@ export interface Settings {
seenShortcuts: boolean
/** Notify (OS notification) when a Claude Code turn finishes while the app is in the background. */
notifyOnClaudeDone: boolean
+ /** Periodically `git fetch` while the Source Control panel is open, so ahead/behind stays
+ * accurate (remote/SSH projects fetch on the remote). */
+ gitAutoFetch: boolean
/** Whether the one-time notification consent prompt has been shown. */
notifyConsentAsked: boolean
/** User-defined agents (BYO CLI) appended to the Add menus. */
@@ -299,6 +302,7 @@ export const DEFAULT_SETTINGS: Settings = {
commitExtraPrompt: '',
seenShortcuts: false,
notifyOnClaudeDone: true,
+ gitAutoFetch: true,
notifyConsentAsked: false,
customAgents: [],
disabledAgents: [],