feat: implement follow-up and commit features for waiting_approval status

- Added functionality to allow users to send follow-up prompts for features in the waiting_approval status, enabling continued work with additional instructions.
- Implemented a commit feature that allows users to mark waiting_approval features as verified and commit changes directly.
- Updated the UI to include buttons for follow-up and commit actions on Kanban cards and integrated dialogs for user interaction.
- Enhanced the feature loader and executor to handle the new status and actions appropriately.

This update improves the workflow for managing features that require manual review and enhances user experience in the auto mode.
This commit is contained in:
Kacper
2025-12-09 22:25:20 +01:00
parent 66951f2b94
commit bfc0934ce9
15 changed files with 1079 additions and 80 deletions

View File

@@ -1,5 +1,6 @@
const { createSdkMcpServer, tool } = require("@anthropic-ai/claude-agent-sdk");
const { z } = require("zod");
const featureLoader = require("./feature-loader");
/**
* MCP Server Factory - Creates custom MCP servers with tools
@@ -18,22 +19,41 @@ class McpServerFactory {
tools: [
tool(
"UpdateFeatureStatus",
"Update the status of a feature in the feature list. Use this tool instead of directly modifying feature_list.json to safely update feature status.",
"Update the status of a feature in the feature list. Use this tool instead of directly modifying feature_list.json to safely update feature status. IMPORTANT: If the feature has skipTests=true, you should NOT mark it as verified - instead it will automatically go to waiting_approval status for manual review.",
{
featureId: z.string().describe("The ID of the feature to update"),
status: z.enum(["backlog", "in_progress", "verified"]).describe("The new status for the feature")
status: z.enum(["backlog", "in_progress", "verified"]).describe("The new status for the feature. Note: If skipTests=true, verified will be converted to waiting_approval automatically.")
},
async (args) => {
try {
console.log(`[McpServerFactory] UpdateFeatureStatus tool called: featureId=${args.featureId}, status=${args.status}`);
// Load the feature to check skipTests flag
const features = await featureLoader.loadFeatures(projectPath);
const feature = features.find((f) => f.id === args.featureId);
if (!feature) {
throw new Error(`Feature ${args.featureId} not found`);
}
// If agent tries to mark as verified but feature has skipTests=true, convert to waiting_approval
let finalStatus = args.status;
if (args.status === "verified" && feature.skipTests === true) {
console.log(`[McpServerFactory] Feature ${args.featureId} has skipTests=true, converting verified -> waiting_approval`);
finalStatus = "waiting_approval";
}
// Call the provided callback to update feature status
await updateFeatureStatusCallback(args.featureId, args.status, projectPath);
await updateFeatureStatusCallback(args.featureId, finalStatus, projectPath);
const statusMessage = finalStatus !== args.status
? `Successfully updated feature ${args.featureId} to status "${finalStatus}" (converted from "${args.status}" because skipTests=true)`
: `Successfully updated feature ${args.featureId} to status "${finalStatus}"`;
return {
content: [{
type: "text",
text: `Successfully updated feature ${args.featureId} to status "${args.status}"`
text: statusMessage
}]
};
} catch (error) {