Shared task board where people and AI coding agents work as teammates. Source-available, self-hostable.
Go
fix(web): resolve CSS token import and WorkspaceIdProvider crash after monorepo extraction (#551)
Bohan Jiangd7a37f60b5be
diff --git a/apps/web/app/(dashboard)/layout.tsx b/apps/web/app/(dashboard)/layout.tsxindex bb96558a8e..3e83eaeb23 100644--- a/apps/web/app/(dashboard)/layout.tsx+++ b/apps/web/app/(dashboard)/layout.tsx@@ -43,22 +43,28 @@ export default function DashboardLayout({if (!user) return null;+ // AppSidebar (and other dashboard children) call hooks that depend on the+ // workspace id via useWorkspaceId(), so the entire dashboard tree must+ // mount inside WorkspaceIdProvider. Show a fullscreen loader while the+ // workspace is still being resolved.+ if (!workspace) {+ return (+ <div className="flex h-svh items-center justify-center">+ <MulticaIcon className="size-6 animate-pulse" />+ </div>+ );+ }+return (- <SidebarProvider className="h-svh">- <AppSidebar />- <SidebarInset className="overflow-hidden">- {workspace ? (- <WorkspaceIdProvider wsId={workspace.id}>- {children}- <ModalRegistry />- </WorkspaceIdProvider>- ) : (- <div className="flex flex-1 items-center justify-center">- <MulticaIcon className="size-6 animate-pulse" />- </div>- )}- </SidebarInset>- <SearchCommand />- </SidebarProvider>+ <WorkspaceIdProvider wsId={workspace.id}>+ <SidebarProvider className="h-svh">+ <AppSidebar />+ <SidebarInset className="overflow-hidden">+ {children}+ <ModalRegistry />+ </SidebarInset>+ <SearchCommand />+ </SidebarProvider>+ </WorkspaceIdProvider>);}diff --git a/apps/web/app/globals.css b/apps/web/app/globals.cssindex 5e0ad0bd20..f8562ced42 100644--- a/apps/web/app/globals.css+++ b/apps/web/app/globals.css@@ -1,14 +1,14 @@@import "tailwindcss";@import "tw-animate-css";@import "shadcn/tailwind.css";-@import "@multica/ui/styles/tokens.css";+@import "../../../packages/ui/styles/tokens.css";@import "./custom.css";@custom-variant dark (&:is(.dark *));-@source "../../../packages/ui/**/*.tsx";-@source "../../../packages/core/**/*.tsx";-@source "../../../packages/views/**/*.tsx";+@source "../../../packages/ui/**/*.{ts,tsx}";+@source "../../../packages/core/**/*.{ts,tsx}";+@source "../../../packages/views/**/*.{ts,tsx}";@layer base {* {