fix: Persist and expose task dependencies from detail output

Detail agents define task dependencies in YAML frontmatter but they were
silently dropped — never written to the task_dependencies table. This
caused all tasks to dispatch in parallel regardless of intended ordering,
and the frontend showed no dependency information.

- Add fileIdToDbId mapping and second-pass dependency creation in
  output-handler.ts (mirrors existing phase dependency pattern)
- Add task_dependency to changeset entry entityType enum
- Add listPhaseTaskDependencies tRPC procedure for batch querying
- Wire blockedBy in PhaseDetailPanel and PhaseWithTasks from real data
- Clarify dependency semantics in detail prompt
This commit is contained in:
Lukas May
2026-03-03 13:46:29 +01:00
parent 536cdf08a1
commit 9b91ffe0e5
9 changed files with 90 additions and 11 deletions

View File

@@ -151,6 +151,19 @@ export function taskProcedures(publicProcedure: ProcedureBuilder) {
return { success: true };
}),
listPhaseTaskDependencies: publicProcedure
.input(z.object({ phaseId: z.string().min(1) }))
.query(async ({ ctx, input }) => {
const taskRepo = requireTaskRepository(ctx);
const tasks = await taskRepo.findByPhaseId(input.phaseId);
const edges: Array<{ taskId: string; dependsOn: string[] }> = [];
for (const t of tasks) {
const deps = await taskRepo.getDependencies(t.id);
if (deps.length > 0) edges.push({ taskId: t.id, dependsOn: deps });
}
return edges;
}),
approveTask: publicProcedure
.input(z.object({ taskId: z.string().min(1) }))
.mutation(async ({ ctx, input }) => {