import { redirect } from "next/navigation"; import { Dashboard } from "@/components/dashboard/Dashboard"; import { ApiAuthError } from "@/lib/api/http"; import { fetchMe } from "@/lib/api/team"; import { loadWorkspace } from "@/lib/dashboard-data"; import type { Agent, User } from "@/lib/api/schemas"; import type { DemoOrg } from "@/lib/dashboard-demo"; // Workspace home = the integrated dashboard (tier rail → topology canvas → // agent computer slide-out), now driven by the live workspace (real claws + // org/company/team structure). export default async function WorkspaceHome() { let user: User; let workspace: { orgs: DemoOrg[]; claws: Agent[] }; try { [user, workspace] = await Promise.all([fetchMe(), loadWorkspace()]); } catch (error) { if (error instanceof ApiAuthError) redirect("/login"); throw error; } return ; }