From c7fac3d9e64ebc9ab7990b7f897c2a7467cc7040 Mon Sep 17 00:00:00 2001 From: Shirone Date: Wed, 14 Jan 2026 09:29:38 +0100 Subject: [PATCH] refactor: Replace worktreePath param with useWorktrees flag --- .../components/views/board-view/hooks/use-board-actions.ts | 5 +++-- apps/ui/src/lib/electron.ts | 4 ++-- apps/ui/src/lib/http-api-client.ts | 4 ++-- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/apps/ui/src/components/views/board-view/hooks/use-board-actions.ts b/apps/ui/src/components/views/board-view/hooks/use-board-actions.ts index e25d963e..78c0526f 100644 --- a/apps/ui/src/components/views/board-view/hooks/use-board-actions.ts +++ b/apps/ui/src/components/views/board-view/hooks/use-board-actions.ts @@ -628,8 +628,8 @@ export function useBoardActions({ currentProject.path, followUpFeature.id, followUpPrompt, - imagePaths - // No worktreePath - server derives from feature.branchName + imagePaths, + useWorktrees ); if (!result.success) { @@ -667,6 +667,7 @@ export function useBoardActions({ setFollowUpPrompt, setFollowUpImagePaths, setFollowUpPreviewMap, + useWorktrees, ]); const handleCommitFeature = useCallback( diff --git a/apps/ui/src/lib/electron.ts b/apps/ui/src/lib/electron.ts index 80516362..6f6c564c 100644 --- a/apps/ui/src/lib/electron.ts +++ b/apps/ui/src/lib/electron.ts @@ -524,7 +524,7 @@ export interface AutoModeAPI { featureId: string, prompt: string, imagePaths?: string[], - worktreePath?: string + useWorktrees?: boolean ) => Promise<{ success: boolean; passes?: boolean; error?: string }>; commitFeature: ( projectPath: string, @@ -2113,7 +2113,7 @@ function createMockAutoModeAPI(): AutoModeAPI { featureId: string, prompt: string, imagePaths?: string[], - worktreePath?: string + useWorktrees?: boolean ) => { if (mockRunningFeatures.has(featureId)) { return { diff --git a/apps/ui/src/lib/http-api-client.ts b/apps/ui/src/lib/http-api-client.ts index b9de5fbc..2ce7f6a7 100644 --- a/apps/ui/src/lib/http-api-client.ts +++ b/apps/ui/src/lib/http-api-client.ts @@ -1652,14 +1652,14 @@ export class HttpApiClient implements ElectronAPI { featureId: string, prompt: string, imagePaths?: string[], - worktreePath?: string + useWorktrees?: boolean ) => this.post('/api/auto-mode/follow-up-feature', { projectPath, featureId, prompt, imagePaths, - worktreePath, + useWorktrees, }), commitFeature: (projectPath: string, featureId: string, worktreePath?: string) => this.post('/api/auto-mode/commit-feature', {