From 1b09eea04911d73cdf3f979d4f19dcf5dc20c461 Mon Sep 17 00:00:00 2001
From: Adam Malczewski <github@tradam.dev>
Date: Sun, 21 Jun 2026 14:21:53 +0900
Subject: feat(surfaces): todo task list sidebar view
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Add a dedicated "Tasks" sidebar view for the per-conversation todo surface
(model-maintained via todo_write tool; read-only, conversation-scoped).

- parseTodoPayload: pure parser for the rendererId: "todo" custom field
  (TodoItem { content, status, priority } — types defined FE-side, not in wire)
- TodoList.svelte: renders the task list with status indicators (spinner for
  in_progress, checkmark for completed, X for cancelled, empty circle for
  pending) + priority dots (red/yellow/gray)
- SurfaceView dispatches rendererId: "todo" to TodoList
- App.svelte: "Tasks" view kind (always visible; "No tasks yet" empty state),
  todo surface pulled out of the generic Extensions list, re-mounts per
  conversation via {#key}

681 tests green.
---
 src/features/surface-host/ui/SurfaceView.svelte | 3 +++
 1 file changed, 3 insertions(+)

(limited to 'src/features/surface-host/ui/SurfaceView.svelte')

diff --git a/src/features/surface-host/ui/SurfaceView.svelte b/src/features/surface-host/ui/SurfaceView.svelte
index e5f807a..3f92e3b 100644
--- a/src/features/surface-host/ui/SurfaceView.svelte
+++ b/src/features/surface-host/ui/SurfaceView.svelte
@@ -8,6 +8,7 @@
 	import Selector from "./Selector.svelte";
 	import StatTable from "./StatTable.svelte";
 	import SurfaceTable from "./SurfaceTable.svelte";
+	import TodoList from "./TodoList.svelte";
 	import Toggle from "./Toggle.svelte";
 
 	let {
@@ -43,6 +44,8 @@
 				<SurfaceTable payload={group.field.payload} />
 			{:else if group.field.rendererId === "message-queue"}
 				<MessageQueueList payload={group.field.payload} />
+			{:else if group.field.rendererId === "todo"}
+				<TodoList payload={group.field.payload} />
 			{/if}
 		{/if}
 	{/each}
-- 
cgit v1.2.3

