feat: implement plan approval functionality in board view

- Introduced PlanApprovalDialog for reviewing and approving feature plans.
- Added state management for pending plan approvals and loading states.
- Enhanced BoardView to handle plan approval actions, including approve and reject functionalities.
- Updated KanbanCard and KanbanBoard components to include buttons for viewing and approving plans.
- Integrated plan approval logic into the auto mode service, allowing for user feedback and plan edits.
- Updated app state to manage default plan approval settings and integrate with existing feature workflows.
This commit is contained in:
SuperComboGamer
2025-12-17 19:39:09 -05:00
parent 01098545cf
commit b112747073
22 changed files with 1290 additions and 57 deletions

View File

@@ -251,6 +251,13 @@ export interface AutoModeAPI {
projectPath: string,
featureId: string
) => Promise<{ success: boolean; error?: string }>;
approvePlan: (
projectPath: string,
featureId: string,
approved: boolean,
editedPlan?: string,
feedback?: string
) => Promise<{ success: boolean; error?: string }>;
onEvent: (callback: (event: AutoModeEvent) => void) => () => void;
}
@@ -1422,6 +1429,23 @@ function createMockAutoModeAPI(): AutoModeAPI {
return { success: true };
},
approvePlan: async (
projectPath: string,
featureId: string,
approved: boolean,
editedPlan?: string,
feedback?: string
) => {
console.log("[Mock] Plan approval:", {
projectPath,
featureId,
approved,
editedPlan: editedPlan ? "[edited]" : undefined,
feedback,
});
return { success: true };
},
onEvent: (callback: (event: AutoModeEvent) => void) => {
mockAutoModeCallbacks.push(callback);
return () => {

View File

@@ -544,6 +544,20 @@ export class HttpApiClient implements ElectronAPI {
}),
commitFeature: (projectPath: string, featureId: string) =>
this.post("/api/auto-mode/commit-feature", { projectPath, featureId }),
approvePlan: (
projectPath: string,
featureId: string,
approved: boolean,
editedPlan?: string,
feedback?: string
) =>
this.post("/api/auto-mode/approve-plan", {
projectPath,
featureId,
approved,
editedPlan,
feedback,
}),
onEvent: (callback: (event: AutoModeEvent) => void) => {
return this.subscribeToEvent(
"auto-mode:event",