diff --git a/ui/src/App.tsx b/ui/src/App.tsx index 7aff901..fec9305 100644 --- a/ui/src/App.tsx +++ b/ui/src/App.tsx @@ -19,7 +19,7 @@ import { AssistantFAB } from './components/AssistantFAB' import { AssistantPanel } from './components/AssistantPanel' import { ExpandProjectModal } from './components/ExpandProjectModal' import { SettingsModal } from './components/SettingsModal' -import { Plus, Loader2, Sparkles, Settings } from 'lucide-react' +import { Loader2, Settings } from 'lucide-react' import type { Feature } from './lib/types' function App() { @@ -171,31 +171,6 @@ function App() { {selectedProject && ( <> - - - {/* Expand Project - only show if project has features */} - {features && (features.pending.length + features.in_progress.length + features.done.length) > 0 && ( - - )} - setShowAddFeature(true)} + onExpandProject={() => setShowExpandProject(true)} /> )} diff --git a/ui/src/components/KanbanBoard.tsx b/ui/src/components/KanbanBoard.tsx index d070c70..0008367 100644 --- a/ui/src/components/KanbanBoard.tsx +++ b/ui/src/components/KanbanBoard.tsx @@ -4,9 +4,13 @@ import type { Feature, FeatureListResponse } from '../lib/types' interface KanbanBoardProps { features: FeatureListResponse | undefined onFeatureClick: (feature: Feature) => void + onAddFeature?: () => void + onExpandProject?: () => void } -export function KanbanBoard({ features, onFeatureClick }: KanbanBoardProps) { +export function KanbanBoard({ features, onFeatureClick, onAddFeature, onExpandProject }: KanbanBoardProps) { + const hasFeatures = features && (features.pending.length + features.in_progress.length + features.done.length) > 0 + if (!features) { return (
@@ -32,6 +36,9 @@ export function KanbanBoard({ features, onFeatureClick }: KanbanBoardProps) { features={features.pending} color="pending" onFeatureClick={onFeatureClick} + onAddFeature={onAddFeature} + onExpandProject={onExpandProject} + showExpandButton={hasFeatures} /> void + onAddFeature?: () => void + onExpandProject?: () => void + showExpandButton?: boolean } const colorMap = { @@ -21,6 +25,9 @@ export function KanbanColumn({ features, color, onFeatureClick, + onAddFeature, + onExpandProject, + showExpandButton, }: KanbanColumnProps) { return (
-

- {title} - {count} -

+
+

+ {title} + {count} +

+ {(onAddFeature || onExpandProject) && ( +
+ {onAddFeature && ( + + )} + {onExpandProject && showExpandButton && ( + + )} +
+ )} +
{/* Cards */}