summaryrefslogtreecommitdiffhomepage
path: root/src/features/surface-host
diff options
context:
space:
mode:
authorAdam Malczewski <[email protected]>2026-06-28 20:15:10 +0900
committerAdam Malczewski <[email protected]>2026-06-28 20:15:10 +0900
commit5bab0a158c13af474a4bd6ca3e1eefe8ce7a3924 (patch)
tree0fc0045a98f616280ccf7a0a3205673df706f5fb /src/features/surface-host
parent9287b26d8faebbbc7b488157096f4ed43a506d92 (diff)
downloaddispatch-web-5bab0a158c13af474a4bd6ca3e1eefe8ce7a3924.tar.gz
dispatch-web-5bab0a158c13af474a4bd6ca3e1eefe8ce7a3924.zip
fix(tasks): keep fixed 60vh height even with 0 tasks
Diffstat (limited to 'src/features/surface-host')
-rw-r--r--src/features/surface-host/ui/TodoList.svelte15
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>