Skip to content

Commit 21fe0a6

Browse files
committed
fix(cli): repair history collapse CI failures
1 parent 9f80bf9 commit 21fe0a6

4 files changed

Lines changed: 15 additions & 3 deletions

File tree

packages/cli/src/ui/AppContainer.test.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,10 @@ describe('AppContainer State Management', () => {
325325
vimEnabled: false,
326326
vimMode: 'NORMAL',
327327
});
328-
mockedUseSessionStats.mockReturnValue({ stats: {} });
328+
mockedUseSessionStats.mockReturnValue({
329+
stats: {},
330+
seedPromptCount: vi.fn(),
331+
});
329332
mockedUseTextBuffer.mockReturnValue({
330333
text: '',
331334
setText: vi.fn(),

packages/cli/src/ui/AppContainer.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2650,7 +2650,7 @@ export const AppContainer = (props: AppContainerProps) => {
26502650

26512651
config.getChatRecordingService()?.rewindRecording(
26522652
targetTurnIndex,
2653-
{ truncatedCount: originalLength - truncatedUi.length },
2653+
{ truncatedCount: effectiveLength - truncatedUi.length },
26542654
!hasRestoreFailure
26552655
? config
26562656
.getFileHistoryService()

packages/cli/src/ui/hooks/slashCommandProcessor.test.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,6 @@ describe('useSlashCommandProcessor', () => {
162162
openMcpDialog: vi.fn(),
163163
openHooksDialog: vi.fn(),
164164
openRewindSelector: vi.fn(),
165-
openDiffDialog: vi.fn(),
166165
});
167166

168167
beforeEach(() => {

packages/cli/src/ui/hooks/useResumeCommand.test.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -343,6 +343,11 @@ describe('useResumeCommand', () => {
343343
getRunning: vi.fn().mockReturnValue([]),
344344
reset: resetMonitorRegistry,
345345
}),
346+
getWorkflowRunRegistry: () => ({
347+
hasRunningEntries: vi.fn().mockReturnValue(false),
348+
reset: vi.fn(),
349+
abortAll: vi.fn(),
350+
}),
346351
loadPausedBackgroundAgents: vi.fn().mockResolvedValue([]),
347352
getChatRecordingService: () => ({ rebuildTurnBoundaries: vi.fn() }),
348353
getDebugLogger: () => ({
@@ -636,6 +641,11 @@ describe('useResumeCommand', () => {
636641
getRunning: vi.fn().mockReturnValue([]),
637642
reset: vi.fn(),
638643
}),
644+
getWorkflowRunRegistry: () => ({
645+
hasRunningEntries: vi.fn().mockReturnValue(false),
646+
reset: vi.fn(),
647+
abortAll: vi.fn(),
648+
}),
639649
loadPausedBackgroundAgents: vi.fn().mockResolvedValue([]),
640650
getChatRecordingService: () => ({ rebuildTurnBoundaries: vi.fn() }),
641651
getDebugLogger: () => ({

0 commit comments

Comments
 (0)