feat(KB-040): add break-into-subtasks toggle for task creation
- Add breakIntoSubtasks flag to core Task model and persist to store - Plumb subtask flag through dashboard API routes with validation - Add subtask toggle UI to inline task creation card - Update triage agent to handle automatic subtask breakdown when enabled - Add comprehensive tests for store, API routes, and UI components - Include changeset for patch release documenting the new feature
This commit is contained in:
@@ -105,6 +105,32 @@ describe("TaskStore", () => {
|
||||
expect(detail.prompt).toMatch(/^# KB-001: Add caching\n/);
|
||||
expect(detail.prompt).toContain("Implement caching layer for API responses");
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
describe("breakIntoSubtasks task creation flag", () => {
|
||||
it("persists breakIntoSubtasks=true when explicitly requested", async () => {
|
||||
const task = await store.createTask({
|
||||
description: "Large feature",
|
||||
breakIntoSubtasks: true,
|
||||
});
|
||||
|
||||
expect(task.breakIntoSubtasks).toBe(true);
|
||||
|
||||
const detail = await store.getTask(task.id);
|
||||
expect(detail.breakIntoSubtasks).toBe(true);
|
||||
});
|
||||
|
||||
it("leaves breakIntoSubtasks unset by default", async () => {
|
||||
const task = await store.createTask({
|
||||
description: "Regular task",
|
||||
});
|
||||
|
||||
expect(task.breakIntoSubtasks).toBeUndefined();
|
||||
|
||||
const detail = await store.getTask(task.id);
|
||||
expect(detail.breakIntoSubtasks).toBeUndefined();
|
||||
});
|
||||
});
|
||||
|
||||
// ── Lock serialization test ──────────────────────────────────────
|
||||
|
||||
Reference in New Issue
Block a user