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 | 0bf3e840dc5c995942aa44082d7b43a64f4e5e26 (patch) | |
| tree | 72b8f3cd48c7ffeb83815fcea987832fe0389d09 /src/features/workspaces/ui/WorkspacesHome.svelte | |
| parent | 5f97ad6468e857b2dc0dc6567c1d60a55ce1e897 (diff) | |
| download | dispatch-web-0bf3e840dc5c995942aa44082d7b43a64f4e5e26.tar.gz dispatch-web-0bf3e840dc5c995942aa44082d7b43a64f4e5e26.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} |
