feat(auto-mode): enhance error handling and feature status updates

- Improved error handling in AutoModeService to log errors and update feature status to "waiting_approval" when an error occurs during feature execution.
- Added error message writing to the context file for better debugging.
- Updated FeatureLoader to include an optional error message parameter when updating feature status.
- Enhanced prompt generation to include detailed context about attached images for better user guidance during feature implementation.
- Modified KanbanCard component to visually indicate features with errors, improving user awareness of issues.

These changes significantly enhance the robustness of the auto mode feature and improve the user experience by providing clearer feedback on feature execution status.
This commit is contained in:
Cody Seibert
2025-12-09 22:06:52 -05:00
parent 7b760090e4
commit 39043b8958
12 changed files with 261 additions and 429 deletions

View File

@@ -1,117 +0,0 @@
📋 Planning implementation for: switch the order inside the add new feature panel so descriptino comes first followed by an optional category, also update the edit feature panel.
⚡ Executing implementation for: switch the order inside the add new feature panel so descriptino comes first followed by an optional category, also update the edit feature panel.
Starting code implementation...
🔧 Tool: Task
🔧 Tool: Bash
🔧 Tool: Glob
🔧 Tool: Glob
🔧 Tool: Grep
🔧 Tool: Grep
🔧 Tool: Glob
🔧 Tool: Glob
🔧 Tool: Bash
🔧 Tool: Read
🔧 Tool: Bash
🔧 Tool: Bash
🔧 Tool: Bash
🔧 Tool: Bash
🔧 Tool: Read
🔧 Tool: Read
🔧 Tool: Grep
🔧 Tool: Read
🔧 Tool: Grep
🔧 Tool: Read
🔧 Tool: Bash
🔧 Tool: Read
🔧 Tool: Bash
🔧 Tool: Read
🔧 Tool: Read
🔧 Tool: Read
🔧 Tool: Bash
🔧 Tool: Bash
🔧 Tool: Read
🔧 Tool: Bash
🔧 Tool: Bash
🔧 Tool: Read
🔧 Tool: Bash
🔧 Tool: Read
Now I have a good understanding of the codebase. Let me read the specific files to see the exact structure of the add and edit feature dialogs:
🔧 Tool: Read
Now I have a clear understanding of both dialogs. I need to:
1. In the **Add Feature Dialog** (lines 1342-1419): Move the Description field before the Category field
2. In the **Edit Feature Dialog** (lines 1452-1536): Move the Description field before the Category field
Let me make these edits:
🔧 Tool: Edit
Now let me update the Edit Feature Dialog similarly:
🔧 Tool: Edit
Both dialogs have been updated. Now let me verify the changes are correct by reading the updated sections:
🔧 Tool: Read
Now let me verify the edit dialog changes:
🔧 Tool: Read
Both dialogs have been successfully updated. The changes are:
1. **Add New Feature Dialog**:
- Description field now comes first
- Category field now comes second with label "Category (optional)"
2. **Edit Feature Dialog**:
- Description field now comes first
- Category field now comes second with label "Category (optional)"
Now let me mark this feature as verified using the UpdateFeatureStatus tool:
🔧 Tool: mcp__automaker-tools__UpdateFeatureStatus
I've completed the feature implementation. Here's a summary of what was done:
## Changes Made
**File Modified:** `app/src/components/views/board-view.tsx`
### Add New Feature Dialog (lines 1342-1368)
- Moved **Description** field to the first position (was second)
- Moved **Category** field to the second position (was first)
- Updated Category label from "Category" to "Category (optional)"
### Edit Feature Dialog (lines 1452-1482)
- Moved **Description** field to the first position (was second)
- Moved **Category** field to the second position (was first)
- Updated Category label from "Category" to "Category (optional)"
The feature has been marked as `waiting_approval` (automatically converted from `verified` because `skipTests=true`). Please manually verify the changes and commit when ready.✅ Verifying implementation for: switch the order inside the add new feature panel so descriptino comes first followed by an optional category, also update the edit feature panel.
Verifying implementation and checking test results...
✓ Verification successful: All tests passed

View File

@@ -1,139 +0,0 @@
📋 Planning implementation for: remember the users choice for skip testing and add a setting toggle in settings page to let them change their default when making new tasks. if it's enabled, show the steps to allow user to add manual testing steps. change label from steps to Verification Steps
⚡ Executing implementation for: remember the users choice for skip testing and add a setting toggle in settings page to let them change their default when making new tasks. if it's enabled, show the steps to allow user to add manual testing steps. change label from steps to Verification Steps
Starting code implementation...
🔧 Tool: Glob
Let me look at the project structure more specifically:
🔧 Tool: Glob
🔧 Tool: Read
🔧 Tool: Read
🔧 Tool: Read
Now I have a good understanding of the codebase. Let me implement the feature:
1. Add a `defaultSkipTests` setting to the app store (persisted)
2. Add a toggle in the settings page
3. Update the "Add Feature" dialog to:
- Default skipTests based on user preference
- Show "Verification Steps" label instead of "Steps" when skipTests is enabled
4. Also update the edit dialog label
🔧 Tool: TodoWrite
🔧 Tool: Edit
Input: {
"file_path": "/Users/webdevcody/Workspace/automaker/app/src/store/app-store.ts",
"old_string": " // Kanban Card Display Settings\n kanbanCardDetailLevel: KanbanCardDetailLevel; // Level of detail shown on kanban cards\n}",
"new_string": " // Kanban Card Display Settings\n kanbanCardDetailLevel: KanbanCardDetailLevel; // Level of detail shown on kanban cards\n\n // Feature Default Settings\n defaultSkipTests: boolean; // Default value for skip tests when creating new features\n}"
}
🔧 Tool: Edit
🔧 Tool: Edit
Input: {
"file_path": "/Users/webdevcody/Workspace/automaker/app/src/store/app-store.ts",
"old_string": " maxConcurrency: 3, // Default to 3 concurrent agents\n kanbanCardDetailLevel: \"standard\", // Default to standard detail level\n};",
"new_string": " maxConcurrency: 3, // Default to 3 concurrent agents\n kanbanCardDetailLevel: \"standard\", // Default to standard detail level\n defaultSkipTests: false, // Default to TDD mode (tests enabled)\n};"
}
🔧 Tool: Edit
Now I need to add `defaultSkipTests` to the persisted state:
🔧 Tool: Edit
🔧 Tool: TodoWrite
Now let me add the toggle in the settings page. I'll add a new section for Feature Defaults:
🔧 Tool: Read
🔧 Tool: Edit
🔧 Tool: Edit
Now let me find where I can add the new section. Let me read more of the settings view to find where to add the feature defaults section:
🔧 Tool: Read
Now let me add the Feature Defaults section after the Kanban Card Display section:
🔧 Tool: Edit
🔧 Tool: TodoWrite
Now let me update the board-view.tsx to:
1. Use `defaultSkipTests` as the default value for new features
2. Change the label from "Steps" to "Verification Steps" when skipTests is enabled
🔧 Tool: Read
🔧 Tool: Edit
Now I need to update the newFeature state initialization to use defaultSkipTests. Since it's initialized with a static value, I need to use an effect to sync it when the dialog opens or when defaultSkipTests changes:
🔧 Tool: Read
I need to update the handleAddFeature to reset skipTests to the default value:
🔧 Tool: Edit
Now I also need to make sure the initial state and when dialog opens uses the default. Let me add an effect that resets the form when the dialog opens:
🔧 Tool: Read
I need to add an effect to reset the skipTests when the dialog opens. Let me find a good place to add it:
🔧 Tool: Edit
Now let me update the label from "Steps" to "Verification Steps" when skipTests is enabled. Let me find the Add Feature dialog:
🔧 Tool: Read
I'll now update the label to change dynamically based on skipTests. I also need to:
1. Change the "Steps" label to "Verification Steps" when skipTests is enabled
2. Only show the steps section when skipTests is enabled (based on the requirement "if it's enabled, show the steps to allow user to add manual testing steps")
Let me update the add feature dialog:
🔧 Tool: Edit
🔧 Tool: TodoWrite
Now let me find and update the Edit Feature dialog to also show "Verification Steps" when skipTests is enabled:
🔧 Tool: Read
🔧 Tool: Edit
🔧 Tool: TodoWrite
Now let me verify the implementation is correct by checking that everything compiles. Let me run a quick type check:
🔧 Tool: Bash
The errors are from an example file and API routes, not from the files I modified. The core application code I changed compiles correctly. Let me verify specifically that the files I modified don't have errors:
🔧 Tool: Bash
The errors are in a different file (analysis-view.tsx) that imports from the store but has missing types - not related to my changes. The store, board-view, and settings-view themselves have no type errors.
Let me now mark the feature as verified using the UpdateFeatureStatus tool:
🔧 Tool: mcp__automaker-tools__UpdateFeatureStatus
Let me check if the feature exists in the feature list:
🔧 Tool: Bash
🔧 Tool: Read
The feature list is empty. This could be because the feature is being tracked elsewhere or the file was cleared. Let me clear my todo list and provide a summary of what was implemented:
🔧 Tool: TodoWrite
## Feature Implementation Complete
I have successfully implemented the feature to remember the user's choice for skip testing and added a settings toggle. Here's a summary of the changes made:
### Files Modified:
1. **`app/src/store/app-store.ts`**
- Added `defaultSkipTests: boolean` to the AppState interface
- Added `setDefaultSkipTests: (skip: boolean) => void` action
- Set initial state to `false` (TDD mode by default)
- Added `defaultSkipTests` to the persisted state so it's remembered across sessions
2. **`app/src/components/views/settings-view.tsx`**
- Added `FlaskConical` icon import and `Checkbox` component import
- Added `defaultSkipTests` and `setDefaultSkipTests` from the store
- Added a new "Feature Defaults" section with a toggle for "Skip automated testing by default"
- The toggle is displayed with helpful description text
3. **`app/src/components/views/board-view.tsx`**
- Added `defaultSkipTests` from the store
- Added an effect to sync `skipTests` default when the Add Feature dialog opens
- **Add Feature Dialog**:
- Moved the skip tests checkbox above the steps section
- Steps section now only shows when `skipTests` is enabled
- Changed label from "Steps" to "Verification Steps"
- Changed button from "Add Step" to "Add Verification Step"
- Changed placeholder from "Step X" to "Verification step X"
- **Edit Feature Dialog**:
- Applied the same changes - steps only show when `skipTests` is enabled
- Changed label to "Verification Steps" and button to "Add Verification Step"
- Reset form uses `defaultSkipTests` value after adding a feature
### Behavior:
- Users can set their default preference in Settings → Feature Defaults
- When creating a new feature, the "Skip automated testing" checkbox will be pre-checked based on their preference
- When skip tests is enabled, the "Verification Steps" input section appears, allowing users to add manual testing/verification steps
- The setting persists across browser sessions via localStorage
**Note:** The feature could not be marked as verified via the UpdateFeatureStatus tool because the feature list appears to be empty. Since this is a `skipTests` feature, the user should manually review and commit the changes.✅ Verifying implementation for: remember the users choice for skip testing and add a setting toggle in settings page to let them change their default when making new tasks. if it's enabled, show the steps to allow user to add manual testing steps. change label from steps to Verification Steps
Verifying implementation and checking test results...
✗ Verification: Tests need attention

View File

@@ -1,106 +1,20 @@
[
{
"id": "feature-1765328064583-6zpz7ddil",
"category": "Kanban",
"description": "remove the auto mode activity panel completley.",
"id": "feature-1765335919754-r010d1fw5",
"category": "Uncategorized",
"description": "what does the text in the button say?\n",
"steps": [],
"status": "waiting_approval",
"startedAt": "2025-12-10T00:55:21.540Z",
"startedAt": "2025-12-10T03:05:34.894Z",
"imagePaths": [
{
"id": "img-1765328011980-j8d2r6b78",
"path": "/var/folders/yk/56l0_s6978qfh521xf1dtx3r0000gn/T/automaker-images/1765328011979_Screenshot_2025-12-09_at_7.53.30_PM.png",
"filename": "Screenshot 2025-12-09 at 7.53.30PM.png",
"id": "img-1765335919132-0x3t37l1r",
"path": "/Users/webdevcody/Library/Application Support/automaker/images/1765335919131-g4qvs053g_Screenshot_2025-12-09_at_10.05.17_PM.png",
"filename": "Screenshot 2025-12-09 at 10.05.17PM.png",
"mimeType": "image/png"
}
],
"skipTests": true,
"summary": "Removed auto mode activity panel completely. Deleted: auto-mode-log.tsx. Modified: board-view.tsx - removed AutoModeLog import, showActivityLog state, activity toggle button, and activity panel rendering. Also removed unused cn import and ChevronUp/ChevronDown icons."
},
{
"id": "feature-1765330657132-oapdvbygc",
"category": "Uncategorized",
"description": "these buttons should be refactored to match more with selected theme, make sure they are set to use the button component variant styles",
"steps": [],
"status": "waiting_approval",
"startedAt": "2025-12-10T01:37:40.700Z",
"imagePaths": [
{
"id": "img-1765330619380-q9tu8blks",
"path": "/var/folders/yk/56l0_s6978qfh521xf1dtx3r0000gn/T/automaker-images/1765330619376_Screenshot_2025-12-09_at_8.36.56_PM.png",
"filename": "Screenshot 2025-12-09 at 8.36.56PM.png",
"mimeType": "image/png"
}
],
"skipTests": true,
"summary": "Refactored theme selector and kanban detail level buttons to use Button component variants. Modified: settings-view.tsx. Changed 12 theme buttons and 3 kanban detail buttons from raw <button> to <Button> with dynamic variant (secondary when selected, outline when unselected) and brand-500 ring highlight for selected state."
},
{
"id": "feature-1765330774043-35l9kw70q",
"category": "Kanban",
"description": "Increase the width of this modal and reduce font size of log output to make it easier to fit more output in modal",
"steps": [],
"status": "waiting_approval",
"imagePaths": [
{
"id": "img-1765330741800-jhmtz9ttc",
"path": "/var/folders/yk/56l0_s6978qfh521xf1dtx3r0000gn/T/automaker-images/1765330741799_Screenshot_2025-12-09_at_8.38.59_PM.png",
"filename": "Screenshot 2025-12-09 at 8.38.59PM.png",
"mimeType": "image/png"
}
],
"skipTests": true,
"summary": "Increased modal width from max-w-4xl to max-w-6xl and reduced log output font sizes from text-sm to text-xs. Modified: agent-output-modal.tsx (modal width + container font), log-viewer.tsx (log entry content + preview text fonts)."
},
{
"id": "feature-1765330800921-uwy5iu3lp",
"category": "Uncategorized",
"description": "what color is the screenshot button? don't change code just answer.",
"steps": [],
"status": "waiting_approval",
"imagePaths": [
{
"id": "img-1765330783407-msplpgmwk",
"path": "/var/folders/yk/56l0_s6978qfh521xf1dtx3r0000gn/T/automaker-images/1765330783407_Screenshot_2025-12-09_at_8.39.40_PM.png",
"filename": "Screenshot 2025-12-09 at 8.39.40PM.png",
"mimeType": "image/png"
}
],
"skipTests": true,
"summary": "Answered question about screenshot button color. The image attachment button (Paperclip icon) is blue when active (bg-blue-100/text-blue-600 light, bg-blue-900/text-blue-400 dark) and uses standard outline styling when inactive. No code changes made."
},
{
"id": "feature-1765331813319-jzlk7eku2",
"category": "Uncategorized",
"description": "describe the attached image do not change code",
"steps": [],
"status": "verified",
"startedAt": "2025-12-10T02:02:54.785Z",
"imagePaths": [
{
"id": "img-1765331797511-v4ssc1hha",
"path": "/Users/webdevcody/Library/Application Support/automaker/images/1765331797510-ypiiz13rt_Screenshot_2025-12-09_at_8.56.34_PM.png",
"filename": "Screenshot 2025-12-09 at 8.56.34PM.png",
"mimeType": "image/png"
}
],
"skipTests": true
},
{
"id": "feature-1765333165618-qmik9gy7p",
"category": "Uncategorized",
"description": "what is the text in the attache image say?",
"steps": [],
"status": "in_progress",
"startedAt": "2025-12-10T02:19:28.342Z",
"imagePaths": [
{
"id": "img-1765333155109-on4lk435f",
"path": "/Users/webdevcody/Library/Application Support/automaker/images/1765333155106-czd46vc93_Screenshot_2025-12-09_at_9.19.13_PM.png",
"filename": "Screenshot 2025-12-09 at 9.19.13PM.png",
"mimeType": "image/png"
}
],
"skipTests": true
"summary": "Investigated button text in the app. Main buttons found in welcome-view.tsx: \"Create Project\" (primary action), \"Browse Folder\" (secondary action), \"Browse\" (directory selector), \"Cancel\", \"Get Started\". No code changes made - this was an investigative question."
}
]

View File

@@ -181,6 +181,31 @@ class AutoModeService {
return { success: true, passes: result.passes };
} catch (error) {
console.error("[AutoMode] Error running feature:", error);
// Write error to context file
try {
await contextManager.writeToContextFile(
projectPath,
featureId,
`\n\n❌ ERROR: ${error.message}\n\n${error.stack || ''}\n`
);
} catch (contextError) {
console.error("[AutoMode] Failed to write error to context:", contextError);
}
// Update feature status to waiting_approval so user can review the error
try {
await featureLoader.updateFeatureStatus(
featureId,
"waiting_approval",
projectPath,
null, // no summary
error.message // pass error message
);
} catch (statusError) {
console.error("[AutoMode] Failed to update feature status after error:", statusError);
}
sendToRenderer({
type: "auto_mode_error",
error: error.message,
@@ -260,6 +285,31 @@ class AutoModeService {
return { success: true, passes: result.passes };
} catch (error) {
console.error("[AutoMode] Error verifying feature:", error);
// Write error to context file
try {
await contextManager.writeToContextFile(
projectPath,
featureId,
`\n\n❌ ERROR: ${error.message}\n\n${error.stack || ''}\n`
);
} catch (contextError) {
console.error("[AutoMode] Failed to write error to context:", contextError);
}
// Update feature status to waiting_approval so user can review the error
try {
await featureLoader.updateFeatureStatus(
featureId,
"waiting_approval",
projectPath,
null, // no summary
error.message // pass error message
);
} catch (statusError) {
console.error("[AutoMode] Failed to update feature status after error:", statusError);
}
sendToRenderer({
type: "auto_mode_error",
error: error.message,
@@ -400,6 +450,31 @@ class AutoModeService {
return { success: true, passes: finalResult.passes };
} catch (error) {
console.error("[AutoMode] Error resuming feature:", error);
// Write error to context file
try {
await contextManager.writeToContextFile(
projectPath,
featureId,
`\n\n❌ ERROR: ${error.message}\n\n${error.stack || ''}\n`
);
} catch (contextError) {
console.error("[AutoMode] Failed to write error to context:", contextError);
}
// Update feature status to waiting_approval so user can review the error
try {
await featureLoader.updateFeatureStatus(
featureId,
"waiting_approval",
projectPath,
null, // no summary
error.message // pass error message
);
} catch (statusError) {
console.error("[AutoMode] Failed to update feature status after error:", statusError);
}
sendToRenderer({
type: "auto_mode_error",
error: error.message,
@@ -544,6 +619,31 @@ class AutoModeService {
});
} catch (error) {
console.error(`[AutoMode] Error running feature ${featureId}:`, error);
// Write error to context file
try {
await contextManager.writeToContextFile(
projectPath,
featureId,
`\n\n❌ ERROR: ${error.message}\n\n${error.stack || ''}\n`
);
} catch (contextError) {
console.error("[AutoMode] Failed to write error to context:", contextError);
}
// Update feature status to waiting_approval so user can review the error
try {
await featureLoader.updateFeatureStatus(
featureId,
"waiting_approval",
projectPath,
null, // no summary
error.message // pass error message
);
} catch (statusError) {
console.error("[AutoMode] Failed to update feature status after error:", statusError);
}
sendToRenderer({
type: "auto_mode_error",
error: error.message,
@@ -761,6 +861,31 @@ class AutoModeService {
});
} catch (error) {
console.error("[AutoMode] Error in follow-up:", error);
// Write error to context file
try {
await contextManager.writeToContextFile(
projectPath,
featureId,
`\n\n❌ ERROR: ${error.message}\n\n${error.stack || ''}\n`
);
} catch (contextError) {
console.error("[AutoMode] Failed to write error to context:", contextError);
}
// Update feature status to waiting_approval so user can review the error
try {
await featureLoader.updateFeatureStatus(
featureId,
"waiting_approval",
projectPath,
null, // no summary
error.message // pass error message
);
} catch (statusError) {
console.error("[AutoMode] Failed to update feature status after error:", statusError);
}
sendToRenderer({
type: "auto_mode_error",
error: error.message,

View File

@@ -342,7 +342,8 @@ class FeatureExecutor {
const path = require("path");
for (const imagePathObj of imagePaths) {
try {
const imagePath = imagePathObj.path;
// Handle both string paths and FeatureImagePath objects
const imagePath = typeof imagePathObj === 'string' ? imagePathObj : imagePathObj.path;
const imageBuffer = fs.readFileSync(imagePath);
const base64Data = imageBuffer.toString("base64");
const ext = path.extname(imagePath).toLowerCase();
@@ -353,7 +354,9 @@ class FeatureExecutor {
".gif": "image/gif",
".webp": "image/webp",
};
const mediaType = mimeTypeMap[ext] || imagePathObj.mimeType || "image/png";
const mediaType = typeof imagePathObj === 'string'
? (mimeTypeMap[ext] || "image/png")
: (mimeTypeMap[ext] || imagePathObj.mimeType || "image/png");
contentBlocks.push({
type: "image",
@@ -366,8 +369,9 @@ class FeatureExecutor {
console.log(`[FeatureExecutor] Added image to resume prompt: ${imagePath}`);
} catch (error) {
const errorPath = typeof imagePathObj === 'string' ? imagePathObj : imagePathObj.path;
console.error(
`[FeatureExecutor] Failed to load image ${imagePathObj.path}:`,
`[FeatureExecutor] Failed to load image ${errorPath}:`,
error
);
}

View File

@@ -36,8 +36,9 @@ class FeatureLoader {
* @param {string} status - The new status
* @param {string} projectPath - Path to the project
* @param {string} [summary] - Optional summary of what was done
* @param {string} [error] - Optional error message if feature errored
*/
async updateFeatureStatus(featureId, status, projectPath, summary) {
async updateFeatureStatus(featureId, status, projectPath, summary, error) {
const featuresPath = path.join(
projectPath,
".automaker",
@@ -98,6 +99,14 @@ class FeatureLoader {
feature.summary = summary;
}
// Update the error field (set or clear)
if (error) {
feature.error = error;
} else {
// Clear any previous error when status changes without error
delete feature.error;
}
// Save back to file
const toSave = features.map((f) => {
const featureData = {
@@ -123,6 +132,9 @@ class FeatureLoader {
if (f.summary !== undefined) {
featureData.summary = f.summary;
}
if (f.error !== undefined) {
featureData.error = f.error;
}
return featureData;
});

View File

@@ -10,9 +10,18 @@ class PromptBuilder {
? `\n**⚠️ IMPORTANT - Manual Testing Mode:**\nThis feature has skipTests=true, which means:\n- DO NOT commit changes automatically\n- DO NOT mark as verified - it will automatically go to "waiting_approval" status\n- The user will manually review and commit the changes\n- Just implement the feature and mark it as verified (it will be converted to waiting_approval)\n`
: "";
const imagesNote = feature.imagePaths && feature.imagePaths.length > 0
? `\n**📎 Context Images Attached:**\nThe user has attached ${feature.imagePaths.length} image(s) for context. These images will be provided to you visually to help understand the requirements. Review them carefully before implementing.\n`
: "";
let imagesNote = "";
if (feature.imagePaths && feature.imagePaths.length > 0) {
const imagesList = feature.imagePaths.map((img, idx) =>
` ${idx + 1}. ${img.filename} (${img.mimeType})\n Path: ${img.path}`
).join("\n");
imagesNote = `\n**📎 Context Images Attached:**\nThe user has attached ${feature.imagePaths.length} image(s) for context. These images are provided both visually (in the initial message) and as files you can read:
${imagesList}
You can use the Read tool to view these images at any time during implementation. Review them carefully before implementing.\n`;
}
return `You are working on a feature implementation task.
@@ -121,9 +130,18 @@ Begin by reading the project structure and then implementing the feature.`;
? `\n**⚠️ IMPORTANT - Manual Testing Mode:**\nThis feature has skipTests=true, which means:\n- DO NOT commit changes automatically\n- DO NOT mark as verified - it will automatically go to "waiting_approval" status\n- The user will manually review and commit the changes\n- Just implement the feature and mark it as verified (it will be converted to waiting_approval)\n`
: "";
const imagesNote = feature.imagePaths && feature.imagePaths.length > 0
? `\n**📎 Context Images Attached:**\nThe user has attached ${feature.imagePaths.length} image(s) for context. These images will be provided to you visually to help understand the requirements. Review them carefully before implementing.\n`
: "";
let imagesNote = "";
if (feature.imagePaths && feature.imagePaths.length > 0) {
const imagesList = feature.imagePaths.map((img, idx) =>
` ${idx + 1}. ${img.filename} (${img.mimeType})\n Path: ${img.path}`
).join("\n");
imagesNote = `\n**📎 Context Images Attached:**\nThe user has attached ${feature.imagePaths.length} image(s) for context. These images are provided both visually (in the initial message) and as files you can read:
${imagesList}
You can use the Read tool to view these images at any time during implementation. Review them carefully before implementing.\n`;
}
return `You are implementing and verifying a feature until it is complete and working correctly.
@@ -224,9 +242,24 @@ Begin by reading the project structure and understanding what needs to be implem
? `\n**⚠️ IMPORTANT - Manual Testing Mode:**\nThis feature has skipTests=true, which means:\n- DO NOT commit changes automatically\n- DO NOT mark as verified - it will automatically go to "waiting_approval" status\n- The user will manually review and commit the changes\n- Just implement the feature and mark it as verified (it will be converted to waiting_approval)\n`
: "";
const imagesNote = feature.imagePaths && feature.imagePaths.length > 0
? `\n**📎 Context Images Attached:**\nThe user has attached ${feature.imagePaths.length} image(s) for context. These images will be provided to you visually to help understand the requirements. Review them carefully.\n`
: "";
// For resume, check both followUpImages and imagePaths
const imagePaths = feature.followUpImages || feature.imagePaths;
let imagesNote = "";
if (imagePaths && imagePaths.length > 0) {
const imagesList = imagePaths.map((img, idx) => {
// Handle both FeatureImagePath objects and simple path strings
const path = typeof img === 'string' ? img : img.path;
const filename = typeof img === 'string' ? path.split('/').pop() : img.filename;
const mimeType = typeof img === 'string' ? 'image/*' : img.mimeType;
return ` ${idx + 1}. ${filename} (${mimeType})\n Path: ${path}`;
}).join("\n");
imagesNote = `\n**📎 Context Images Attached:**\nThe user has attached ${imagePaths.length} image(s) for context. These images are provided both visually (in the initial message) and as files you can read:
${imagesList}
You can use the Read tool to view these images at any time. Review them carefully.\n`;
}
return `You are resuming work on a feature implementation that was previously started.

View File

@@ -581,7 +581,7 @@ export function Sidebar() {
isActive
? "bg-sidebar-accent/50 text-foreground border border-sidebar-border"
: "text-muted-foreground hover:text-foreground hover:bg-sidebar-accent/50",
!sidebarOpen && "justify-center"
sidebarOpen ? "justify-start" : "justify-center"
)}
title={!sidebarOpen ? item.label : undefined}
data-testid={`nav-${item.id}`}
@@ -599,7 +599,7 @@ export function Sidebar() {
/>
<span
className={cn(
"ml-2.5 font-medium text-sm flex-1",
"ml-2.5 font-medium text-sm flex-1 text-left",
sidebarOpen ? "hidden lg:block" : "hidden"
)}
>
@@ -665,7 +665,7 @@ export function Sidebar() {
/>
<span
className={cn(
"ml-2.5 font-medium text-sm flex-1",
"ml-2.5 font-medium text-sm flex-1 text-left",
sidebarOpen ? "hidden lg:block" : "hidden"
)}
>

View File

@@ -202,7 +202,7 @@ export function AgentOutputModal({
return (
<Dialog open={open} onOpenChange={onClose}>
<DialogContent
className="w-[90vw] max-w-[90vw] max-h-[80vh] flex flex-col"
className="w-[60vw] max-w-[60vw] max-h-[80vh] flex flex-col"
data-testid="agent-output-modal"
>
<DialogHeader className="flex-shrink-0">

View File

@@ -338,16 +338,32 @@ export function BoardView() {
}, [showAddDialog, defaultSkipTests]);
// Listen for auto mode feature completion and reload features
// Listen for auto mode feature completion and errors to reload features
useEffect(() => {
const api = getElectronAPI();
if (!api?.autoMode) return;
const { removeRunningTask } = useAppStore.getState();
const unsubscribe = api.autoMode.onEvent((event) => {
if (event.type === "auto_mode_feature_complete") {
// Reload features when a feature is completed
console.log("[Board] Feature completed, reloading features...");
loadFeatures();
} else if (event.type === "auto_mode_error") {
// Reload features when an error occurs (feature moved to waiting_approval)
console.log("[Board] Feature error, reloading features...", event.error);
// Remove from running tasks so it moves to the correct column
if (event.featureId) {
removeRunningTask(event.featureId);
}
loadFeatures();
// Show error toast
toast.error("Agent encountered an error", {
description: event.error || "Check the logs for details",
});
}
});
@@ -439,6 +455,7 @@ export function BoardView() {
imagePaths: f.imagePaths,
skipTests: f.skipTests,
summary: f.summary,
error: f.error,
}));
await api.writeFile(
`${currentProject.path}/.automaker/feature_list.json`,

View File

@@ -39,7 +39,6 @@ import {
RotateCcw,
StopCircle,
Hand,
ArrowLeft,
MessageSquare,
GitCommit,
Cpu,
@@ -49,6 +48,7 @@ import {
Expand,
FileText,
MoreVertical,
AlertCircle,
} from "lucide-react";
import { CountUpTimer } from "@/components/ui/count-up-timer";
import { getElectronAPI } from "@/lib/electron";
@@ -199,7 +199,10 @@ export function KanbanCard({
"cursor-grab active:cursor-grabbing transition-all backdrop-blur-sm border-border relative",
isDragging && "opacity-50 scale-105 shadow-lg",
isCurrentAutoTask &&
"border-running-indicator border-2 shadow-running-indicator/50 shadow-lg animate-pulse"
"border-running-indicator border-2 shadow-running-indicator/50 shadow-lg animate-pulse",
feature.error &&
!isCurrentAutoTask &&
"border-red-500 border-2 shadow-red-500/30 shadow-lg"
)}
data-testid={`kanban-card-${feature.id}`}
{...attributes}
@@ -214,7 +217,7 @@ export function KanbanCard({
</div>
)}
{/* Skip Tests indicator badge */}
{feature.skipTests && (
{feature.skipTests && !feature.error && (
<div
className={cn(
"absolute px-1.5 py-0.5 text-[10px] font-medium rounded flex items-center gap-1 z-10",
@@ -228,6 +231,21 @@ export function KanbanCard({
<span>Manual</span>
</div>
)}
{/* Error indicator badge */}
{feature.error && (
<div
className={cn(
"absolute px-1.5 py-0.5 text-[10px] font-medium rounded flex items-center gap-1 z-10",
shortcutKey ? "top-2 left-10" : "top-2 left-2",
"bg-red-500/20 border border-red-500/50 text-red-400"
)}
data-testid={`error-badge-${feature.id}`}
title={feature.error}
>
<AlertCircle className="w-3 h-3" />
<span>Errored</span>
</div>
)}
<CardHeader className="p-3 pb-2">
{isCurrentAutoTask && (
<div className="absolute top-2 right-2 flex items-center justify-center gap-2 bg-running-indicator/20 border border-running-indicator rounded px-2 py-0.5">
@@ -255,6 +273,28 @@ export function KanbanCard({
</Button>
</DropdownMenuTrigger>
<DropdownMenuContent align="end">
<DropdownMenuItem
onClick={(e) => {
e.stopPropagation();
onEdit();
}}
data-testid={`edit-feature-${feature.id}`}
>
<Edit className="w-3 h-3 mr-2" />
Edit
</DropdownMenuItem>
{onViewOutput && (
<DropdownMenuItem
onClick={(e) => {
e.stopPropagation();
onViewOutput();
}}
data-testid={`view-logs-${feature.id}`}
>
<FileText className="w-3 h-3 mr-2" />
Logs
</DropdownMenuItem>
)}
<DropdownMenuItem
className="text-destructive focus:text-destructive"
onClick={(e) => {
@@ -565,55 +605,10 @@ export function KanbanCard({
Logs
</Button>
)}
{/* Move back button for skipTests verified features */}
{feature.skipTests && onMoveBackToInProgress && (
<Button
variant="ghost"
size="sm"
className="h-7 text-xs text-yellow-500 hover:text-yellow-500 hover:bg-yellow-500/10"
onClick={(e) => {
e.stopPropagation();
onMoveBackToInProgress();
}}
data-testid={`move-back-${feature.id}`}
>
<ArrowLeft className="w-3 h-3 mr-1" />
Back
</Button>
)}
<Button
variant="ghost"
size="sm"
className="flex-1 h-7 text-xs"
onClick={(e) => {
e.stopPropagation();
onEdit();
}}
data-testid={`edit-feature-${feature.id}`}
>
<Edit className="w-3 h-3 mr-1" />
Edit
</Button>
</>
)}
{!isCurrentAutoTask && feature.status === "waiting_approval" && (
<>
{/* Logs button if context exists */}
{hasContext && onViewOutput && (
<Button
variant="ghost"
size="sm"
className="h-7 text-xs"
onClick={(e) => {
e.stopPropagation();
onViewOutput();
}}
data-testid={`view-output-waiting-${feature.id}`}
>
<FileText className="w-3 h-3 mr-1" />
Logs
</Button>
)}
{/* Follow-up prompt button */}
{onFollowUp && (
<Button
@@ -665,19 +660,6 @@ export function KanbanCard({
Logs
</Button>
)}
<Button
variant="ghost"
size="sm"
className="flex-1 h-7 text-xs"
onClick={(e) => {
e.stopPropagation();
onEdit();
}}
data-testid={`edit-feature-${feature.id}`}
>
<Edit className="w-3 h-3 mr-1" />
Edit
</Button>
</>
)}
</div>

View File

@@ -86,6 +86,7 @@ export interface Feature {
startedAt?: string; // ISO timestamp for when the card moved to in_progress
skipTests?: boolean; // When true, skip TDD approach and require manual verification
summary?: string; // Summary of what was done/modified by the agent
error?: string; // Error message if the agent errored during processing
}
export interface AppState {