feat: configurable worktree cards with property toggles (#232)

- fix: stay under max-lines lint limit after merge with main

Extract restoreScrollbackBuffers into layout-serialization.ts to reduce
use-terminal-pane-lifecycle.ts below the 300-line limit. Also filter
stale leaf IDs from persisted scrollback buffers and remove design doc.

- fix: polish worktree card controls

- feat: configurable worktree cards with property toggles
This commit is contained in:
Jinjing
2026-03-31 08:49:00 -07:00
committed by GitHub
parent f2eb119c62
commit e0e01cd687
11 changed files with 218 additions and 139 deletions
+13 -2
View File
@@ -3,12 +3,22 @@ import type {
PersistedState,
PersistedUIState,
RepoHookSettings,
WorkspaceSessionState
WorkspaceSessionState,
WorktreeCardProperty
} from './types'
import { DEFAULT_TERMINAL_FONT_WEIGHT } from './terminal-fonts'
export const SCHEMA_VERSION = 1
export const DEFAULT_WORKTREE_CARD_PROPERTIES: WorktreeCardProperty[] = [
'status',
'unread',
'ci',
'issue',
'pr',
'comment'
]
export const REPO_COLORS = [
'#737373', // neutral
'#ef4444', // red
@@ -77,7 +87,8 @@ export function getDefaultUIState(): PersistedUIState {
groupBy: 'none',
sortBy: 'name',
filterRepoIds: [],
uiZoomLevel: 0
uiZoomLevel: 0,
worktreeCardProperties: [...DEFAULT_WORKTREE_CARD_PROPERTIES]
}
}
+3
View File
@@ -194,6 +194,8 @@ export type GlobalSettings = {
rightSidebarOpenByDefault: boolean
}
export type WorktreeCardProperty = 'status' | 'unread' | 'ci' | 'issue' | 'pr' | 'comment'
export type PersistedUIState = {
lastActiveRepoId: string | null
lastActiveWorktreeId: string | null
@@ -203,6 +205,7 @@ export type PersistedUIState = {
sortBy: 'name' | 'recent' | 'repo'
filterRepoIds: string[]
uiZoomLevel: number
worktreeCardProperties: WorktreeCardProperty[]
}
// ─── Persistence shape ──────────────────────────────────────────────