feat: Add tiptap editor for task descriptions in slide-over panel

- Add updateTask tRPC mutation (name, description fields)
- Replace static description with TiptapEditor in TaskSlideOver
- Auto-detect existing markdown descriptions and convert to tiptap JSON
- Debounced auto-save with flush on close/unmount
- Saving indicator in header
This commit is contained in:
Lukas May
2026-03-04 09:06:44 +01:00
parent 38be28e443
commit 2948eb1139
3 changed files with 94 additions and 17 deletions

View File

@@ -143,6 +143,25 @@ export function taskProcedures(publicProcedure: ProcedureBuilder) {
return tasks.filter((t) => t.category !== 'detail');
}),
updateTask: publicProcedure
.input(z.object({
id: z.string().min(1),
name: z.string().min(1).optional(),
description: z.string().nullable().optional(),
}))
.mutation(async ({ ctx, input }) => {
const taskRepository = requireTaskRepository(ctx);
const existing = await taskRepository.findById(input.id);
if (!existing) {
throw new TRPCError({
code: 'NOT_FOUND',
message: `Task '${input.id}' not found`,
});
}
const { id, ...data } = input;
return taskRepository.update(id, data);
}),
deleteTask: publicProcedure
.input(z.object({ id: z.string().min(1) }))
.mutation(async ({ ctx, input }) => {