diff --git a/frontend/src/lib/components/workstation/HomeWorkbenchView.svelte b/frontend/src/lib/components/workstation/HomeWorkbenchView.svelte index 7e74b14..368244a 100644 --- a/frontend/src/lib/components/workstation/HomeWorkbenchView.svelte +++ b/frontend/src/lib/components/workstation/HomeWorkbenchView.svelte @@ -36,12 +36,16 @@ dashboard, foldersPayload, hosts, + foldersPending = false, + loadError = '', crumb = '/', mode = 'queue' }: { dashboard: DashboardSummaryPayload; foldersPayload: DashboardFoldersPayload; hosts: HostsPayload; + foldersPending?: boolean; + loadError?: string; crumb?: string; mode?: 'queue' | 'folders'; } = $props(); @@ -133,10 +137,12 @@ dashboard, visibleFoldersPayload, hosts, - isFolderIndex ? folderScopeLabel : 'Work folders' + isFolderIndex ? folderScopeLabel : 'Work folders', + foldersPending ) ); const footerSignals = $derived(buildQueueFooterSignals(dashboard, visibleFoldersPayload, hosts)); + const hasLoadError = $derived(loadError.trim().length > 0); const runningSamples = $derived(dashboard.calibration_queue.sample.running_count); const queuedSamples = $derived(dashboard.calibration_queue.sample.queued_count); const pendingReviews = $derived(dashboard.calibration_queue.sample.pending_review_count); @@ -178,9 +184,20 @@ isFolderIndex ? `Matching ${folderScopeLabel.toLowerCase()}` : 'Workflow lanes' ); const visibleScopeSummary = $derived( - `${visibleFolders.length.toLocaleString('en-US')} / ${folders.length.toLocaleString( - 'en-US' - )} ${isFolderIndex ? folderScopeLabel.toLowerCase() : 'folders'}` + foldersPending && !isFolderIndex + ? 'Loading work folders' + : `${visibleFolders.length.toLocaleString('en-US')} / ${folders.length.toLocaleString( + 'en-US' + )} ${isFolderIndex ? folderScopeLabel.toLowerCase() : 'folders'}` + ); + const visibleFoldersCopy = $derived( + foldersPending && !isFolderIndex ? 'loading' : visibleFolders.length.toLocaleString('en-US') + ); + const visiblePendingCopy = $derived( + foldersPending && !isFolderIndex ? 'loading' : visiblePendingItems.toLocaleString('en-US') + ); + const visibleReclaimCopy = $derived( + foldersPending && !isFolderIndex ? 'loading' : formatBytes(visibleProjectedReclaim) ); type LibraryOption = { @@ -499,6 +516,9 @@
{headerCopy}