diff --git a/apps/app/src/components/views/board-view.tsx b/apps/app/src/components/views/board-view.tsx index 14c56341..d782806e 100644 --- a/apps/app/src/components/views/board-view.tsx +++ b/apps/app/src/components/views/board-view.tsx @@ -63,6 +63,7 @@ import { FeatureSuggestionsDialog } from "./feature-suggestions-dialog"; import { BoardBackgroundModal } from "@/components/dialogs/board-background-modal"; import { AddFeatureDialog } from "./board-view/AddFeatureDialog"; import { EditFeatureDialog } from "./board-view/EditFeatureDialog"; +import { BoardHeader } from "./board-view/BoardHeader"; import { Plus, RefreshCw, @@ -1718,76 +1719,17 @@ export function BoardView() { data-testid="board-view" > {/* Header */} -
-
-

Kanban Board

-

{currentProject.name}

-
-
- {/* Concurrency Slider - only show after mount to prevent hydration issues */} - {isMounted && ( -
- - setMaxConcurrency(value[0])} - min={1} - max={10} - step={1} - className="w-20" - data-testid="concurrency-slider" - /> - - {maxConcurrency} - -
- )} - - {/* Auto Mode Toggle - only show after mount to prevent hydration issues */} - {isMounted && ( - <> - {autoMode.isRunning ? ( - - ) : ( - - )} - - )} - - setShowAddDialog(true)} - hotkey={shortcuts.addFeature} - hotkeyActive={false} - data-testid="add-feature-button" - > - - Add Feature - -
-
+ autoMode.start()} + onStopAutoMode={() => autoMode.stop()} + onAddFeature={() => setShowAddDialog(true)} + addFeatureShortcut={shortcuts.addFeature} + isMounted={isMounted} + /> {/* Main Content Area */}
diff --git a/apps/app/src/components/views/board-view/BoardHeader.tsx b/apps/app/src/components/views/board-view/BoardHeader.tsx new file mode 100644 index 00000000..844abd8d --- /dev/null +++ b/apps/app/src/components/views/board-view/BoardHeader.tsx @@ -0,0 +1,104 @@ +"use client"; + +import { Button } from "@/components/ui/button"; +import { HotkeyButton } from "@/components/ui/hotkey-button"; +import { Slider } from "@/components/ui/slider"; +import { Play, StopCircle, Plus, Users } from "lucide-react"; +import { KeyboardShortcut } from "@/hooks/use-keyboard-shortcuts"; + +interface BoardHeaderProps { + projectName: string; + maxConcurrency: number; + onConcurrencyChange: (value: number) => void; + isAutoModeRunning: boolean; + onStartAutoMode: () => void; + onStopAutoMode: () => void; + onAddFeature: () => void; + addFeatureShortcut: KeyboardShortcut; + isMounted: boolean; +} + +export function BoardHeader({ + projectName, + maxConcurrency, + onConcurrencyChange, + isAutoModeRunning, + onStartAutoMode, + onStopAutoMode, + onAddFeature, + addFeatureShortcut, + isMounted, +}: BoardHeaderProps) { + return ( +
+
+

Kanban Board

+

{projectName}

+
+
+ {/* Concurrency Slider - only show after mount to prevent hydration issues */} + {isMounted && ( +
+ + onConcurrencyChange(value[0])} + min={1} + max={10} + step={1} + className="w-20" + data-testid="concurrency-slider" + /> + + {maxConcurrency} + +
+ )} + + {/* Auto Mode Toggle - only show after mount to prevent hydration issues */} + {isMounted && ( + <> + {isAutoModeRunning ? ( + + ) : ( + + )} + + )} + + + + Add Feature + +
+
+ ); +}