diff --git a/src/renderer/src/store/slices/worktrees.test.ts b/src/renderer/src/store/slices/worktrees.test.ts index 0c37595f8..cdffd5b18 100644 --- a/src/renderer/src/store/slices/worktrees.test.ts +++ b/src/renderer/src/store/slices/worktrees.test.ts @@ -34,7 +34,6 @@ function createTestStore() { unifiedTabsByWorktree: {}, groupsByWorktree: {}, activeGroupIdByWorktree: {}, - layoutByWorktree: {}, openFiles: [], editorDrafts: {}, markdownViewMode: {}, @@ -272,10 +271,6 @@ describe('removeWorktree state cleanup', () => { activeGroupIdByWorktree: { 'repo1::/path/wt1': 'group-1', 'repo1::/path/wt2': 'group-2' - }, - layoutByWorktree: { - 'repo1::/path/wt1': { type: 'leaf', groupId: 'group-1' }, - 'repo1::/path/wt2': { type: 'leaf', groupId: 'group-2' } } } as unknown as Partial) @@ -293,9 +288,6 @@ describe('removeWorktree state cleanup', () => { expect(store.getState().activeGroupIdByWorktree).toEqual({ 'repo1::/path/wt2': 'group-2' }) - expect(store.getState().layoutByWorktree).toEqual({ - 'repo1::/path/wt2': { type: 'leaf', groupId: 'group-2' } - }) }) it('cleans up git caches for the removed worktree', async () => { diff --git a/src/renderer/src/store/slices/worktrees.ts b/src/renderer/src/store/slices/worktrees.ts index 000948566..f69a49da1 100644 --- a/src/renderer/src/store/slices/worktrees.ts +++ b/src/renderer/src/store/slices/worktrees.ts @@ -153,8 +153,6 @@ export const createWorktreeSlice: StateCreator delete nextGroupsByWorktree[worktreeId] const nextActiveGroupIdByWorktree = { ...s.activeGroupIdByWorktree } delete nextActiveGroupIdByWorktree[worktreeId] - const nextLayoutByWorktree = { ...s.layoutByWorktree } - delete nextLayoutByWorktree[worktreeId] // Why: git status / compare caches are keyed by worktree and stop being // refreshed once the worktree is deleted. Remove them here so deleted // worktrees cannot retain stale conflict badges, branch diffs, or compare @@ -222,7 +220,6 @@ export const createWorktreeSlice: StateCreator unifiedTabsByWorktree: nextUnifiedTabsByWorktree, groupsByWorktree: nextGroupsByWorktree, activeGroupIdByWorktree: nextActiveGroupIdByWorktree, - layoutByWorktree: nextLayoutByWorktree, editorDrafts: nextEditorDrafts, markdownViewMode: nextMarkdownViewMode, expandedDirs: nextExpandedDirs,