) => {
event.preventDefault()
event.stopPropagation()
@@ -2211,22 +2215,26 @@ const VirtualizedWorktreeViewport = React.memo(function VirtualizedWorktreeViewp
{child.worktree.displayName}
-
- {child.repo && groupBy !== 'repo' ? (
-
-
-
- {child.repo.displayName}
+ {showChildRepoBadge || showChildBranch ? (
+
+ {showChildRepoBadge && childRepo ? (
+
+
+
+ {childRepo.displayName}
+
-
- ) : null}
-
- {branchDisplayName(child.worktree.branch)}
-
-
+ ) : null}
+ {showChildBranch ? (
+
+ {branchDisplayName(child.worktree.branch)}
+
+ ) : null}
+
+ ) : null}
{child.worktree.linkedIssue || child.worktree.comment ? (
{child.worktree.linkedIssue ? (
diff --git a/src/renderer/src/store/slices/ui.test.ts b/src/renderer/src/store/slices/ui.test.ts
index fc234b392..1311fc938 100644
--- a/src/renderer/src/store/slices/ui.test.ts
+++ b/src/renderer/src/store/slices/ui.test.ts
@@ -547,6 +547,19 @@ describe('createUISlice hydratePersistedUI', () => {
expect(store.getState().worktreeCardProperties).toEqual(expected)
expect(setUI).toHaveBeenCalledWith({ worktreeCardProperties: expected })
})
+
+ it('persists Branch name as an opt-in card property', () => {
+ const setUI = vi.fn().mockResolvedValue(undefined)
+ vi.stubGlobal('window', { api: { ui: { set: setUI } } })
+ const store = createUIStore()
+
+ store.getState().toggleWorktreeCardProperty('branch')
+
+ expect(store.getState().worktreeCardProperties).toContain('branch')
+ expect(setUI).toHaveBeenCalledWith({
+ worktreeCardProperties: expect.arrayContaining(['status', 'unread', 'branch'])
+ })
+ })
})
describe('createUISlice settings navigation', () => {
diff --git a/src/shared/constants.test.ts b/src/shared/constants.test.ts
index 0f0215128..8b120c743 100644
--- a/src/shared/constants.test.ts
+++ b/src/shared/constants.test.ts
@@ -1,5 +1,9 @@
import { describe, expect, it } from 'vitest'
-import { getDefaultPrimarySelectionMiddleClickPaste, getDefaultSettings } from './constants'
+import {
+ getDefaultPrimarySelectionMiddleClickPaste,
+ getDefaultSettings,
+ getDefaultUIState
+} from './constants'
describe('getDefaultSettings', () => {
it('enables gitignored file decorations by default', () => {
@@ -36,3 +40,9 @@ describe('getDefaultPrimarySelectionMiddleClickPaste', () => {
expect(getDefaultPrimarySelectionMiddleClickPaste('win32')).toBe(false)
})
})
+
+describe('getDefaultUIState', () => {
+ it('keeps branch names hidden from workspace cards by default', () => {
+ expect(getDefaultUIState().worktreeCardProperties).not.toContain('branch')
+ })
+})
diff --git a/src/shared/types.ts b/src/shared/types.ts
index 49e43ed3c..8fe5ba7b1 100644
--- a/src/shared/types.ts
+++ b/src/shared/types.ts
@@ -2025,6 +2025,9 @@ export type NotificationPermissionStatusResult = {
export type WorktreeCardProperty =
| 'status'
| 'unread'
+ // Git branch metadata shown on workspace cards. Hidden by default because
+ // workspace names already carry the primary identity for most lists.
+ | 'branch'
// Legacy persisted preference. CI status is now represented by linked PR metadata.
| 'ci'
// GitHub issue metadata shown on workspace cards.
diff --git a/src/shared/worktree-card-properties.ts b/src/shared/worktree-card-properties.ts
index ea405c3d4..a9ccf5ad8 100644
--- a/src/shared/worktree-card-properties.ts
+++ b/src/shared/worktree-card-properties.ts
@@ -18,6 +18,7 @@ export const DEFAULT_WORKTREE_CARD_PROPERTIES: WorktreeCardProperty[] = [
const WORKTREE_CARD_PROPERTY_ORDER: WorktreeCardProperty[] = [
'status',
'unread',
+ 'branch',
'ci',
'issue',
'linear-issue',