feat(FN-734): extract reusable TaskForm component and integrate into modals

- Extract shared TaskForm component from NewTaskModal with all form fields and validation logic
- Integrate TaskForm into NewTaskModal, replacing duplicated form code
- Integrate TaskForm into TaskDetailModal edit mode for consistent editing experience
- Add comprehensive tests for TaskForm, Header, and updated modal components
- Clean up removed/obsolete tests and fix SSE, settings, and comment components
This commit is contained in:
gsxdsm
2026-04-02 19:40:21 -07:00
parent 5c6a574b35
commit f72924c7ab
7 changed files with 1183 additions and 709 deletions

View File

@@ -24,6 +24,7 @@ vi.mock("../../api", () => ({
fetchWorkflowSteps: vi.fn().mockResolvedValue([]),
refineText: vi.fn(),
getRefineErrorMessage: vi.fn((err) => err?.message || "Failed to refine text. Please try again."),
updateGlobalSettings: vi.fn().mockResolvedValue({}),
}));
function makeTask(id: string): Task {
@@ -49,6 +50,8 @@ function renderNewTaskModal(props = {}) {
tasks: [] as Task[],
onCreateTask: vi.fn().mockResolvedValue({ id: "FN-001" }),
addToast: vi.fn(),
onPlanningMode: vi.fn(),
onSubtaskBreakdown: vi.fn(),
};
const mergedProps = { ...defaultProps, ...props };
const result = render(<NewTaskModal {...mergedProps} />);