From ad85502ca10e1c517e2b989ce1061536f2e2016c Mon Sep 17 00:00:00 2001 From: chihlasm Date: Tue, 24 Feb 2026 00:52:17 -0500 Subject: [PATCH] feat: add Generate All button and per-branch progress to AI builder detail stage Co-Authored-By: Claude Opus 4.6 --- .../ai-builder/BranchDetailView.tsx | 60 +++++++++++++++++-- 1 file changed, 54 insertions(+), 6 deletions(-) diff --git a/frontend/src/components/ai-builder/BranchDetailView.tsx b/frontend/src/components/ai-builder/BranchDetailView.tsx index 24ef854a..629c2acd 100644 --- a/frontend/src/components/ai-builder/BranchDetailView.tsx +++ b/frontend/src/components/ai-builder/BranchDetailView.tsx @@ -1,4 +1,4 @@ -import { Check, RefreshCw, SkipForward, ChevronRight, ChevronLeft } from 'lucide-react' +import { Check, RefreshCw, SkipForward, ChevronRight, ChevronLeft, Zap, Square } from 'lucide-react' import { useAIFlowBuilderStore } from '@/store/aiFlowBuilderStore' import { GeneratingAnimation } from './GeneratingAnimation' import { cn } from '@/lib/utils' @@ -13,6 +13,9 @@ export function BranchDetailView() { error, phase, setError, + isGeneratingAll, + generateAllBranchDetails, + cancelGenerateAll, } = useAIFlowBuilderStore() const viewingIndex = currentBranchIndex @@ -32,11 +35,55 @@ export function BranchDetailView() { } if (phase === 'generating' && isLoading) { - return + return ( + b.steps).length + 1, + total: selectedBranches.length, + } + : undefined + } + /> + ) } return (
+ {/* Generate All / Stop control */} + {(() => { + const undetailedCount = selectedBranches.filter((b) => !b.steps).length + if (undetailedCount === 0) return null + return ( +
+ + {undetailedCount} branch{undetailedCount !== 1 ? 'es' : ''} need detail + + {isGeneratingAll ? ( + + ) : ( + + )} +
+ ) + })()} + {/* Content area */}
{/* Branch tabs */} @@ -83,7 +130,7 @@ export function BranchDetailView() {