mirror of
https://github.com/leonvanzyl/autocoder.git
synced 2026-01-30 06:12:06 +00:00
feat: add feature editing capability for pending/in-progress features
Add the ability for users to edit features that are not yet completed,
allowing them to provide corrections or additional instructions when the
agent is stuck or implementing a feature incorrectly.
Backend changes:
- Add FeatureUpdate schema in server/schemas.py with optional fields
- Add PATCH /api/projects/{project_name}/features/{feature_id} endpoint
- Validate that completed features (passes=True) cannot be edited
Frontend changes:
- Add FeatureUpdate type in ui/src/lib/types.ts
- Add updateFeature() API function in ui/src/lib/api.ts
- Add useUpdateFeature() React Query mutation hook
- Create EditFeatureForm.tsx component with pre-filled form values
- Update FeatureModal.tsx with Edit button for non-completed features
The edit form allows modifying category, name, description, priority,
and test steps. Save button is disabled until changes are detected.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -87,6 +87,15 @@ class FeatureCreate(FeatureBase):
|
||||
priority: int | None = None
|
||||
|
||||
|
||||
class FeatureUpdate(BaseModel):
|
||||
"""Request schema for updating a feature (partial updates allowed)."""
|
||||
category: str | None = None
|
||||
name: str | None = None
|
||||
description: str | None = None
|
||||
steps: list[str] | None = None
|
||||
priority: int | None = None
|
||||
|
||||
|
||||
class FeatureResponse(FeatureBase):
|
||||
"""Response schema for a feature."""
|
||||
id: int
|
||||
|
||||
Reference in New Issue
Block a user