From fa36c7ffde1e8f6f8cc45e867bcaab9a3dad00d1 Mon Sep 17 00:00:00 2001 From: Lauryn Menard Date: Thu, 17 Oct 2024 13:52:04 +0200 Subject: [PATCH] todo-widget: Add TODO for inbound/outbound data schema refactor. --- web/src/todo_widget.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/web/src/todo_widget.ts b/web/src/todo_widget.ts index 8a65ead7c5..47b118bedc 100644 --- a/web/src/todo_widget.ts +++ b/web/src/todo_widget.ts @@ -30,6 +30,10 @@ const todo_widget_inbound_data = z.intersection( z.record(z.string(), z.unknown()), ); +// TODO: This schema is being used to parse two completely +// different types of things (inbound and outbound data), +// which should be refactored so that the code here is +// clearer and less confusing. const new_task_inbound_data_schema = z.object({ type: z.literal("new_task").optional(), key: z.number().int().nonnegative().max(MAX_IDX),