diff options
| author | Adam Malczewski <[email protected]> | 2026-06-27 23:13:31 +0900 |
|---|---|---|
| committer | Adam Malczewski <[email protected]> | 2026-06-28 14:41:33 +0900 |
| commit | 565217724f74d3303092c522d28f74f35132df3b (patch) | |
| tree | 8a2dacd4c4949be1ec0361b91d5d865f71cbacea /src/features/workspaces/ui/WorkspacesHome.svelte | |
| parent | a59200e786f7d97d7ba5b9cd2bee9ffef531dac2 (diff) | |
| download | dispatch-web-565217724f74d3303092c522d28f74f35132df3b.tar.gz dispatch-web-565217724f74d3303092c522d28f74f35132df3b.zip | |
feat(workspace-active-indicator): show loading dots on workspace cards with active chats
Diffstat (limited to 'src/features/workspaces/ui/WorkspacesHome.svelte')
| -rw-r--r-- | src/features/workspaces/ui/WorkspacesHome.svelte | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/features/workspaces/ui/WorkspacesHome.svelte b/src/features/workspaces/ui/WorkspacesHome.svelte index 02e92b4..d97eab7 100644 --- a/src/features/workspaces/ui/WorkspacesHome.svelte +++ b/src/features/workspaces/ui/WorkspacesHome.svelte @@ -9,10 +9,17 @@ store, onNavigate, computers, + hasActive, }: { store: WorkspaceStore; onNavigate: (path: string) => void; computers: readonly ComputerEntry[]; + /** + * Optional port forwarded to each {@link WorkspaceCard}: whether the + * workspace has at least one active (generating / queued) conversation. + * Wired by the composition root to the app store. Absent → no indicator. + */ + hasActive?: (workspaceId: string) => boolean; } = $props(); onMount(() => { @@ -89,7 +96,13 @@ {:else} <ul class="flex flex-col gap-2"> {#each store.list as ws (ws.id)} - <WorkspaceCard {ws} {store} {onNavigate} {computers} /> + <WorkspaceCard + {ws} + {store} + {onNavigate} + {computers} + {...(hasActive ? { hasActive } : {})} + /> {/each} </ul> {/if} |
