From 334b6554723f8054497ca36248b234541f767c09 Mon Sep 17 00:00:00 2001 From: Auto Date: Sat, 10 Jan 2026 20:26:57 +0200 Subject: [PATCH] feat: move feature action buttons to pending column header Move the "Add Feature" (+) and "Expand Project" (sparkles) buttons from the top navigation bar to the Pending column header in the Kanban board. Changes: - KanbanColumn: Add optional onAddFeature, onExpandProject, and showExpandButton props; render action buttons in column header - KanbanBoard: Accept and pass action handlers to the Pending column - App: Remove buttons from header, pass handlers to KanbanBoard This improves UX by placing feature creation actions contextually near the pending features they affect. Keyboard shortcuts (N, E) still work. Co-Authored-By: Claude Opus 4.5 --- ui/src/App.tsx | 29 +++------------------- ui/src/components/KanbanBoard.tsx | 9 ++++++- ui/src/components/KanbanColumn.tsx | 39 +++++++++++++++++++++++++++--- 3 files changed, 46 insertions(+), 31 deletions(-) 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 */}