diff options
Diffstat (limited to 'src/features/surface-host')
| -rw-r--r-- | src/features/surface-host/ui/TodoList.svelte | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/features/surface-host/ui/TodoList.svelte b/src/features/surface-host/ui/TodoList.svelte index 466cc2d..30cdf8f 100644 --- a/src/features/surface-host/ui/TodoList.svelte +++ b/src/features/surface-host/ui/TodoList.svelte @@ -6,10 +6,11 @@ const data = $derived(parseTodoPayload(payload)); </script> -{#if data !== null && data.todos.length > 0} - <!-- Fixed at 60% of the viewport height so a long task list scrolls inside - this region instead of growing the whole sidebar (mirrors the tabs view). --> - <ul class="flex h-[60vh] flex-col gap-1 overflow-y-auto pr-1"> +<!-- Fixed at 60% of the viewport height so the region is consistent whether the + list is empty or overflowing — it always reserves the space and scrolls + internally (mirrors the tabs view). --> +<ul class="flex h-[60vh] flex-col gap-1 overflow-y-auto pr-1"> + {#if data !== null && data.todos.length > 0} {#each data.todos as todo, i (i)} <li class="flex items-start gap-2 rounded-box bg-base-200 px-3 py-2 text-sm"> <!-- Status indicator --> @@ -59,5 +60,7 @@ </span> </li> {/each} - </ul> -{/if} + {:else} + <li class="text-xs opacity-60">No tasks yet.</li> + {/if} +</ul> |
