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:
+13
-2
@@ -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]
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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 ──────────────────────────────────────────────
|
||||
|
||||
Reference in New Issue
Block a user