diff --git a/packages/studio/src/components/CreateWorkspaceWizard.tsx b/packages/studio/src/components/CreateWorkspaceWizard.tsx index 623276c..8884250 100644 --- a/packages/studio/src/components/CreateWorkspaceWizard.tsx +++ b/packages/studio/src/components/CreateWorkspaceWizard.tsx @@ -76,6 +76,10 @@ export function CreateWorkspaceWizard({ open, onOpenChange, onCreated }: CreateW onSuccess: (result) => { setIngestResults(result.ingest) queryClient.invalidateQueries({ queryKey: queryKeys.workspaces() }) + // Sidebar reads per-remote via `['workspaces-at', remoteId]`, which is + // a different cache entry from the single-server `['workspaces']` key. + // Without this the newly-scaffolded workspace doesn't appear until reload. + queryClient.invalidateQueries({ queryKey: ['workspaces-at'], exact: false }) onCreated?.(result.workspace.id) }, }) diff --git a/packages/studio/src/components/Sidebar.tsx b/packages/studio/src/components/Sidebar.tsx index 65e14d2..b0b5f43 100644 --- a/packages/studio/src/components/Sidebar.tsx +++ b/packages/studio/src/components/Sidebar.tsx @@ -397,6 +397,23 @@ function RemoteContent({ onOpenDetails={() => onOpenDetails(ws.id)} /> ))} + {collapsed && ( +
  • + + + + + {`Open workspace on ${remote.name}`} + +
  • + )} ) } @@ -628,12 +645,13 @@ function HereRow({ collapsed, icon: Icon, label, active, count = 0, shortcut, on shortcut?: string onClick: () => void }) { + const collapsedTitle = [label, count > 0 ? `(${count})` : null, shortcut].filter(Boolean).join(' ') return ( 0 ? `${label} (${count})` : label, className: 'justify-center px-0 py-1' } : {})} + {...(collapsed ? { title: collapsedTitle, className: 'justify-center px-0 py-1' } : {})} > {collapsed ? ( @@ -664,7 +682,7 @@ function HereRow({ collapsed, icon: Icon, label, active, count = 0, shortcut, on {count} )} - {shortcut && count === 0 && ( + {shortcut && (