Multi-Agent Collaboration for Team and Friends
TypeScript agent-automationagent-orchestrationagent-workflowai-agentsai-collaborationai-memoryai-workforceautonomous-agentsclaude-codeclaude-code-skillscodexcoding-agentmulti-agentmultiple-agentone-person-businessone-person-companyone-person-teamopencodesolopreneur
feat(web): add shared spaces sign-in story
Gusb51fc075420c
diff --git a/src/web/src/app/(auth)/sign-in/sign-in-client.tsx b/src/web/src/app/(auth)/sign-in/sign-in-client.tsxindex 6d4031404..25bc7e89c 100644--- a/src/web/src/app/(auth)/sign-in/sign-in-client.tsx+++ b/src/web/src/app/(auth)/sign-in/sign-in-client.tsx@@ -27,6 +27,7 @@ import {sceneDurationMs,type LandingScene,} from "@/components/home/landing-shell-motion-timeline"+import galleryStyles from "@/components/home/landing-shell-motion.module.css"import { DEV_PASSWORD } from "@alook/shared"// Default post-login landing when no explicit `?redirect=` is present. Points@@ -289,6 +290,11 @@ const galleryScenes: { scene: LandingScene; label: string; description: string }label: "The best room for agents and humans",description: "Bring your people and agents together in one shared home.",},+ {+ scene: "spaces",+ label: "A room for every part of life",+ description: "Keep work, life, and play separate—invite the friends and bots who belong.",+ },{scene: "machine",label: "Bring your own workspaces",@@ -334,9 +340,9 @@ function ProductGallery() {if (!enabled) return nullreturn (- <div className="flex h-full min-h-0 flex-col items-center justify-center p-5 lg:p-7">+ <div className={`${galleryStyles.galleryContainer} flex h-full min-h-0 flex-col items-center justify-center p-5 lg:p-7`}><div- className="w-full overflow-hidden rounded-sm bg-background ring-1 ring-border/60 shadow-lg"+ className={`${galleryStyles.galleryFrame} w-full bg-background ring-1 ring-border/60 shadow-lg`}role="img"aria-label={activeScene.label}>@@ -345,7 +351,7 @@ function ProductGallery() {scene={activeScene.scene}/></div>- <div className="mt-4 flex w-full items-center justify-between gap-4">+ <div className={`${galleryStyles.galleryFooter} mt-4`}><div aria-live="polite"><p className="font-mono text-[10px] font-medium uppercase tracking-[0.14em] text-muted-foreground">{String(active + 1).padStart(2, "0")} / {String(galleryScenes.length).padStart(2, "0")}@@ -357,7 +363,7 @@ function ProductGallery() {{activeScene.description}</p></div>- <div className="flex" aria-label="Product stories">+ <div className={galleryStyles.gallerySwitcher} aria-label="Product stories">{galleryScenes.map((item, i) => (<buttonkey={item.scene}diff --git a/src/web/src/components/community/bots/bot-list-card.test.ts b/src/web/src/components/community/bots/bot-list-card.test.tsindex 0eeff5625..550db8153 100644--- a/src/web/src/components/community/bots/bot-list-card.test.ts+++ b/src/web/src/components/community/bots/bot-list-card.test.ts@@ -114,4 +114,19 @@ describe("BotList — card model segment", () => {const renderer = render()expect(modelSegments(renderer)).toEqual(["local default"])})++ it("folds and reopens a machine category from its header", () => {+ useBotsMock.mockReturnValue({ bots: [bot({ modelName: null })], isLoading: false })+ const renderer = render()+ const collapse = renderer.root.findByProps({ "aria-label": "Collapse Mac" })++ act(() => collapse.props.onClick())+ expect(renderer.root.findAll((node) => node.props.hidden === true)).toHaveLength(1)+ const expand = renderer.root.findByProps({ "aria-label": "Expand Mac" })+ expect(expand.props["aria-expanded"]).toBe(false)++ act(() => expand.props.onClick())+ expect(renderer.root.findAll((node) => node.props.hidden === true)).toHaveLength(0)+ expect(modelSegments(renderer)).toEqual(["local default"])+ })})diff --git a/src/web/src/components/community/bots/bot-list.tsx b/src/web/src/components/community/bots/bot-list.tsxindex e497b407c..e60aa0fcb 100644--- a/src/web/src/components/community/bots/bot-list.tsx+++ b/src/web/src/components/community/bots/bot-list.tsx@@ -2,7 +2,7 @@import { useEffect, useMemo, useRef, useState } from "react"import { useRouter, useSearchParams } from "next/navigation"-import { ChevronLeft, Monitor, MoreVertical, HelpCircle, RotateCcw, Activity } from "lucide-react"+import { ChevronDown, ChevronLeft, Monitor, MoreVertical, HelpCircle, RotateCcw, Activity } from "lucide-react"import { toast } from "sonner"import { toastApiError } from "@/lib/api/client"import { isPresenceOnline, formatModelLabel } from "@alook/shared"@@ -99,6 +99,9 @@ export function BotList({ onBack }: { onBack?: () => void } = {}) {// Batch "reset all agents on this machine" confirm — keyed by machineId so the// dialog knows which group it's acting on (and can name it).const [confirmResetMachine, setConfirmResetMachine] = useState<string | null>(null)+ const [collapsedMachines, setCollapsedMachines] = useState<Set<string>>(+ () => new Set(),+ )const [helpOpen, setHelpOpen] = useState(false)const del = useDeleteBot()const resetSession = useResetBotSession()@@ -198,6 +201,12 @@ export function BotList({ onBack }: { onBack?: () => void } = {}) {const scrolledForRef = useRef<string | null>(null)useEffect(() => {if (!targetMachineId || bots.length === 0) return+ setCollapsedMachines((current) => {+ if (!current.has(targetMachineId)) return current+ const next = new Set(current)+ next.delete(targetMachineId)+ return next+ })if (scrolledForRef.current === targetMachineId) returnscrolledForRef.current = targetMachineIdgroupRefs.current[targetMachineId]?.scrollIntoView({ behavior: "smooth", block: "start" })@@ -307,6 +316,8 @@ export function BotList({ onBack }: { onBack?: () => void } = {}) {<div className="flex flex-col gap-6">{groups.map(({ machineId, machine, bots: machineBots }) => {const machineOnline = isPresenceOnline(machine?.status)+ const collapsed = collapsedMachines.has(machineId)+ const label = machineName(machineId)return (<divkey={machineId}@@ -319,16 +330,34 @@ export function BotList({ onBack }: { onBack?: () => void } = {}) {].join(" ")}><div className="flex items-center gap-2 px-1">- <Monitor className="size-3.5 text-muted-foreground" />- <span className="font-mono text-xs font-medium text-muted-foreground">- {machineName(machineId)}- </span>- <span- className={[- "inline-block size-1.5 rounded-full",- machineOnline ? "bg-status-online" : "bg-muted-foreground",- ].join(" ")}- />+ <button+ type="button"+ className="flex min-w-0 items-center gap-2 rounded-md text-left focus-visible:ring-2 focus-visible:ring-ring focus-visible:outline-none"+ aria-expanded={!collapsed}+ aria-label={`${collapsed ? "Expand" : "Collapse"} ${label}`}+ onClick={() => {+ setCollapsedMachines((current) => {+ const next = new Set(current)+ if (next.has(machineId)) next.delete(machineId)+ else next.add(machineId)+ return next+ })+ }}+ >+ <ChevronDown+ className={`size-3 shrink-0 text-muted-foreground transition-transform ${collapsed ? "-rotate-90" : ""}`}+ />+ <Monitor className="size-3.5 shrink-0 text-muted-foreground" />+ <span className="truncate font-mono text-xs font-medium text-muted-foreground">+ {label}+ </span>+ <span+ className={[+ "inline-block size-1.5 shrink-0 rounded-full",+ machineOnline ? "bg-status-online" : "bg-muted-foreground",+ ].join(" ")}+ />+ </button>{/* Reset every agent bound to this machine in one command(Gus #811). Idle bots get cold-started too (② semantics). */}<Button@@ -341,7 +370,7 @@ export function BotList({ onBack }: { onBack?: () => void } = {}) {Reset all</Button></div>- <div className="flex flex-col gap-3">+ <div className="flex flex-col gap-3" hidden={collapsed}>{machineBots.map((bot) => {const online = onlineUserIds.has(bot.id)return (diff --git a/src/web/src/components/community/edit-profile-dialog.tsx b/src/web/src/components/community/edit-profile-dialog.tsxindex ba909a241..75657b8ae 100644--- a/src/web/src/components/community/edit-profile-dialog.tsx+++ b/src/web/src/components/community/edit-profile-dialog.tsx@@ -14,6 +14,13 @@ import { clearPersistedCache } from "@/lib/query-persister"import { Avatar } from "./avatar"import { Field } from "./field"import { StatusEditor, hasStatus } from "./status-editor"+import {+ SETTINGS_LOGOUT_CLASS,+ SETTINGS_NAV_CLASS,+ SETTINGS_NAV_LABEL_CLASS,+ SETTINGS_TAB_CLASS,+ SETTINGS_TABS_LIST_CLASS,+} from "./settings-navigation"const THEME_OPTIONS = [{ value: "light", label: "Light", icon: Sun },@@ -172,21 +179,21 @@ export function UserSettings({ onClose, userId, userName, aboutMe, avatar, statuonValueChange={setTab}className="min-h-0 flex-1 flex-row gap-0">- <nav className="flex w-60 shrink-0 flex-col gap-2 overflow-y-auto thin-scrollbar border-r border-border p-3" style={{ background: "var(--d-rail)" }}>- <div className="px-2 text-xs font-semibold text-muted-foreground">User Settings</div>- <TabsList variant="line" className="h-auto w-full flex-col gap-1">- <TabsTrigger value="profile" className="h-8 w-full justify-start gap-2">+ <nav className={SETTINGS_NAV_CLASS} style={{ background: "var(--d-rail)" }}>+ <div className={SETTINGS_NAV_LABEL_CLASS}>User Settings</div>+ <TabsList variant="line" className={SETTINGS_TABS_LIST_CLASS}>+ <TabsTrigger value="profile" className={SETTINGS_TAB_CLASS}><User className="size-4" /> My Profile</TabsTrigger>- <TabsTrigger value="appearance" className="h-8 w-full justify-start gap-2">+ <TabsTrigger value="appearance" className={SETTINGS_TAB_CLASS}><Palette className="size-4" /> Appearance</TabsTrigger>- <TabsTrigger value="advanced" className="h-8 w-full justify-start gap-2">+ <TabsTrigger value="advanced" className={SETTINGS_TAB_CLASS}><Database className="size-4" /> Advanced</TabsTrigger></TabsList><Separator className="my-1" />- <Button variant="ghost" className="justify-start text-destructive hover:text-destructive" size="sm" onClick={onLogout}>+ <Button variant="ghost" className={SETTINGS_LOGOUT_CLASS} size="sm" onClick={onLogout}><LogOut className="size-4" /> Log Out</Button></nav>diff --git a/src/web/src/components/community/server-settings.tsx b/src/web/src/components/community/server-settings.tsxindex 400be2f0e..b3f72bf6d 100644--- a/src/web/src/components/community/server-settings.tsx+++ b/src/web/src/components/community/server-settings.tsx@@ -23,6 +23,12 @@ import { tid } from "@/lib/community/testids"import { useInvites, useAuditLog } from "@/hooks/community/use-server-panels"import type { SettingsSection, Member, Role, InviteRow, AuditEntry, OpenProfile } from "./_types"import { isServerOwner } from "./_types"+import {+ SETTINGS_NAV_CLASS,+ SETTINGS_NAV_LABEL_CLASS,+ SETTINGS_TAB_CLASS,+ SETTINGS_TABS_LIST_CLASS,+} from "./settings-navigation"const SETTABLE_ROLES: Role[] = ["admin", "member"]@@ -98,11 +104,11 @@ export function ServerSettings({className="min-h-0 flex-1 flex-row gap-0">{/* settings nav */}- <nav className="flex w-60 shrink-0 flex-col gap-2 overflow-y-auto thin-scrollbar border-r border-border p-4" style={{ background: "var(--d-rail)" }}>- <div className="px-2 text-xs font-semibold text-muted-foreground">{serverName}</div>- <TabsList variant="line" className="h-auto w-full flex-col gap-1">+ <nav className={SETTINGS_NAV_CLASS} style={{ background: "var(--d-rail)" }}>+ <div className={SETTINGS_NAV_LABEL_CLASS}>{serverName}</div>+ <TabsList variant="line" className={SETTINGS_TABS_LIST_CLASS}>{nav.map((n) => (- <TabsTrigger key={n.id} value={n.id} className="h-9 w-full justify-start gap-2">+ <TabsTrigger key={n.id} value={n.id} className={SETTINGS_TAB_CLASS}><n.icon className="size-4" /> {n.label}</TabsTrigger>))}diff --git a/src/web/src/components/community/settings-navigation.test.ts b/src/web/src/components/community/settings-navigation.test.tsnew file mode 100644index 000000000..2a495596b--- /dev/null+++ b/src/web/src/components/community/settings-navigation.test.ts@@ -0,0 +1,21 @@+import { describe, expect, it } from "vitest"+import {+ SETTINGS_LOGOUT_CLASS,+ SETTINGS_NAV_CLASS,+ SETTINGS_NAV_LABEL_CLASS,+ SETTINGS_TAB_CLASS,+ SETTINGS_TABS_LIST_CLASS,+} from "./settings-navigation"++describe("settings navigation density", () => {+ it("keeps user and server settings narrow without changing the content inset", () => {+ expect(SETTINGS_NAV_CLASS).toContain("w-44")+ expect(SETTINGS_NAV_CLASS).not.toContain("w-60")+ expect(SETTINGS_NAV_CLASS).toContain("p-3")+ expect(SETTINGS_TABS_LIST_CLASS).toContain("overflow-x-hidden")+ expect(SETTINGS_TAB_CLASS).toContain("h-8")+ expect(SETTINGS_TAB_CLASS).not.toContain("px-0")+ expect(SETTINGS_NAV_LABEL_CLASS).toContain("px-2")+ expect(SETTINGS_LOGOUT_CLASS).not.toContain("px-0")+ })+})diff --git a/src/web/src/components/community/settings-navigation.ts b/src/web/src/components/community/settings-navigation.tsnew file mode 100644index 000000000..98cf59bf2--- /dev/null+++ b/src/web/src/components/community/settings-navigation.ts@@ -0,0 +1,13 @@+export const SETTINGS_NAV_CLASS =+ "flex w-44 shrink-0 flex-col gap-2 overflow-y-auto thin-scrollbar border-r border-border p-3"++export const SETTINGS_TABS_LIST_CLASS =+ "h-auto w-full flex-col gap-1 overflow-x-hidden"++export const SETTINGS_TAB_CLASS = "h-8 w-full justify-start gap-2"++export const SETTINGS_NAV_LABEL_CLASS =+ "px-2 text-xs font-semibold text-muted-foreground"++export const SETTINGS_LOGOUT_CLASS =+ "justify-start text-destructive hover:text-destructive"diff --git a/src/web/src/components/community/shell-frame-geometry.test.ts b/src/web/src/components/community/shell-frame-geometry.test.tsnew file mode 100644index 000000000..5a41a95d6--- /dev/null+++ b/src/web/src/components/community/shell-frame-geometry.test.ts@@ -0,0 +1,21 @@+import { describe, expect, it } from "vitest"+import {+ COMMUNITY_RAIL_WIDTH,+ COMMUNITY_SEPARATOR_WIDTH,+ COMMUNITY_SHELL_INSET,+ desktopUserBarOverlayWidth,+} from "./shell-frame-geometry"++describe("desktop community shell geometry", () => {+ it("mirrors the user bar and composer around the sidebar boundary", () => {+ const sidebarWidth = 240+ const mainStart = COMMUNITY_RAIL_WIDTH + sidebarWidth + COMMUNITY_SEPARATOR_WIDTH+ const overlayLeft = COMMUNITY_RAIL_WIDTH - COMMUNITY_RAIL_WIDTH+ const userBarRight =+ overlayLeft + desktopUserBarOverlayWidth(sidebarWidth) - COMMUNITY_SHELL_INSET+ const composerLeft = mainStart + COMMUNITY_SHELL_INSET++ expect(mainStart - userBarRight).toBe(COMMUNITY_SHELL_INSET)+ expect(composerLeft - mainStart).toBe(COMMUNITY_SHELL_INSET)+ })+})diff --git a/src/web/src/components/community/shell-frame-geometry.ts b/src/web/src/components/community/shell-frame-geometry.tsnew file mode 100644index 000000000..1d91c340e--- /dev/null+++ b/src/web/src/components/community/shell-frame-geometry.ts@@ -0,0 +1,7 @@+export const COMMUNITY_RAIL_WIDTH = 56+export const COMMUNITY_SEPARATOR_WIDTH = 1+export const COMMUNITY_SHELL_INSET = 12++export function desktopUserBarOverlayWidth(sidebarWidth: number) {+ return sidebarWidth + COMMUNITY_RAIL_WIDTH + COMMUNITY_SEPARATOR_WIDTH+}diff --git a/src/web/src/components/community/shell-frame.tsx b/src/web/src/components/community/shell-frame.tsxindex 2b4087c6c..6750942fd 100644--- a/src/web/src/components/community/shell-frame.tsx+++ b/src/web/src/components/community/shell-frame.tsx@@ -14,6 +14,10 @@ import { AppSurface } from "@/components/ui/app-surface"import { Dialog, DialogContent } from "@/components/ui/dialog"import { useBreakpoint } from "@/hooks/use-mobile"import { Shell } from "./shell"+import {+ COMMUNITY_RAIL_WIDTH,+ desktopUserBarOverlayWidth,+} from "./shell-frame-geometry"import { ServerRail } from "./server-rail"import { UserBar } from "./user-bar"import { markVoluntaryLeave, pickPostEjectDestination } from "./eject-server"@@ -684,7 +688,13 @@ export function ShellFrame({</ResizablePanel></ResizablePanelGroup></AppSurface>- <div className="absolute bottom-0 left-0 z-10" style={{ width: sidebarW + 56, marginLeft: -56 }}>+ <div+ className="absolute bottom-0 left-0 z-10"+ style={{+ width: desktopUserBarOverlayWidth(sidebarW),+ marginLeft: -COMMUNITY_RAIL_WIDTH,+ }}+ ><UserBar user={{ id: currentUser.id, name: currentUser.name, avatar: currentUser.avatar }} onOpenProfile={openProfile} onEditProfile={() => setEditingProfile(true)} inbox={inboxElement} hasUnread={inboxHasUnread} inboxOpen={inbox.open} onInboxOpenChange={inbox.onOpenChange} /></div></div>diff --git a/src/web/src/components/community/shell.tsx b/src/web/src/components/community/shell.tsxindex 50c1c171a..73c63f138 100644--- a/src/web/src/components/community/shell.tsx+++ b/src/web/src/components/community/shell.tsx@@ -1,11 +1,13 @@import type React from "react"import { AppBackground } from "@/components/ui/app-surface"+import { cn } from "@/lib/utils"-export function Shell({ children }: {+export function Shell({ children, className }: {children: React.ReactNode+ className?: string}) {return (- <div className="fixed inset-0 flex overflow-hidden font-sans text-sm text-foreground">+ <div className={cn("fixed inset-0 flex overflow-hidden font-sans text-sm text-foreground", className)}><AppBackground />{children}</div>diff --git a/src/web/src/components/home/landing-shell-motion-timeline.ts b/src/web/src/components/home/landing-shell-motion-timeline.tsindex 370588044..29e54dca6 100644--- a/src/web/src/components/home/landing-shell-motion-timeline.ts+++ b/src/web/src/components/home/landing-shell-motion-timeline.ts@@ -1,4 +1,6 @@-export type LandingScene = "server" | "machine" | "provider"+export type LandingScene = "server" | "machine" | "provider" | "spaces"++export type LandingRoom = "work" | "life" | "play"export const LANDING_MACHINE_RUNTIMES = ["claude",@@ -12,6 +14,7 @@ export const SCENE_MAX_BEAT: Record<LandingScene, number> = {server: 6,machine: 7,provider: 9,+ spaces: 12,}export const SCENE_BEAT_DURATION_MS = 1500@@ -50,6 +53,9 @@ export type SceneSnapshot = {pairSheet: "closed" | "command" | "waiting" | "connected"runtime: "claude" | "codex"model: string | null+ room: LandingRoom+ inviteOpen: boolean+ inviteSent: booleanfocus: string | nullcamera: { scale: number; x: number; y: number }}@@ -86,6 +92,21 @@ const PROVIDER_CAMERAS = [{ scale: 1.18, x: 620, y: 230 },WIDE_CAMERA,]+const SPACES_CAMERAS = [+ WIDE_CAMERA,+ { scale: 1.18, x: 84, y: 190 },+ { scale: 1.18, x: 160, y: 28 },+ { scale: 1.18, x: 200, y: 105 },+ { scale: 1.18, x: 210, y: 45 },+ { scale: 1.2, x: 610, y: 340 },+ { scale: 1.2, x: 610, y: 340 },+ { scale: 1.18, x: 650, y: 240 },+ { scale: 1.18, x: 84, y: 250 },+ { scale: 1.18, x: 160, y: 28 },+ { scale: 1.18, x: 200, y: 105 },+ { scale: 1.18, x: 650, y: 180 },+ WIDE_CAMERA,+]export function sceneSnapshot(scene: LandingScene, requestedBeat: number): SceneSnapshot {const beat = Math.max(0, Math.min(requestedBeat, SCENE_MAX_BEAT[scene]))@@ -98,6 +119,9 @@ export function sceneSnapshot(scene: LandingScene, requestedBeat: number): ScenepairSheet: "closed",runtime: "claude",model: null,+ room: "work",+ inviteOpen: false,+ inviteSent: false,focus: [null, "composer", "message-gus", "message-alli", "message-ruth", "message-shelly"][beat] ?? null,camera: SERVER_CAMERAS[beat] ?? WIDE_CAMERA,}@@ -125,6 +149,9 @@ export function sceneSnapshot(scene: LandingScene, requestedBeat: number): Scene: "closed",runtime: "claude",model: null,+ room: "work",+ inviteOpen: false,+ inviteSent: false,focus: [null,"connect",@@ -137,25 +164,58 @@ export function sceneSnapshot(scene: LandingScene, requestedBeat: number): Scenecamera: MACHINE_CAMERAS[beat] ?? WIDE_CAMERA,}}+ if (scene === "provider") {+ return {+ beat,+ visibleMessages: beat >= 8 ? 2 : beat >= 7 ? 1 : 0,+ composerText: beat === 6 ? "hello Alli" : "",+ machineState: "online",+ pairSheet: "closed",+ runtime: beat >= 4 ? "codex" : "claude",+ model: null,+ room: "work",+ inviteOpen: false,+ inviteSent: false,+ focus: [+ null,+ "bot-actions",+ "bot-edit",+ "runtime-codex",+ "save-provider",+ "dm-alli",+ "dm-composer",+ "dm-message-gus",+ "dm-message-alli",+ ][beat] ?? null,+ camera: PROVIDER_CAMERAS[beat] ?? WIDE_CAMERA,+ }+ }return {beat,- visibleMessages: beat >= 8 ? 2 : beat >= 7 ? 1 : 0,- composerText: beat === 6 ? "hello Alli" : "",+ visibleMessages: beat >= 9 ? 3 : beat >= 7 ? 3 : 2,+ composerText: "",machineState: "online",pairSheet: "closed",- runtime: beat >= 4 ? "codex" : "claude",+ runtime: "claude",model: null,+ room: beat >= 9 ? "play" : beat >= 2 ? "life" : "work",+ inviteOpen: beat === 5 || beat === 6,+ inviteSent: beat >= 6,focus: [null,- "bot-actions",- "bot-edit",- "runtime-codex",- "save-provider",- "dm-alli",- "dm-composer",- "dm-message-gus",- "dm-message-alli",+ "server-life",+ "space-server-name-life",+ "space-channel-life",+ "invite-life",+ "invite-maya",+ "invite-maya",+ "space-message-maya",+ "server-play",+ "space-server-name-play",+ "space-channel-play",+ "space-message-quest",+ null,][beat] ?? null,- camera: PROVIDER_CAMERAS[beat] ?? WIDE_CAMERA,+ camera: SPACES_CAMERAS[beat] ?? WIDE_CAMERA,}}diff --git a/src/web/src/components/home/landing-shell-motion.module.css b/src/web/src/components/home/landing-shell-motion.module.cssindex 50c180a6a..ebf78ffc0 100644--- a/src/web/src/components/home/landing-shell-motion.module.css+++ b/src/web/src/components/home/landing-shell-motion.module.css@@ -2,18 +2,47 @@width: 100%;}+.galleryContainer {+ --gallery-frame-radius: var(--radius-sm);+ container-type: inline-size;+}++.galleryFrame {+ overflow: hidden;+ border-radius: var(--gallery-frame-radius);+}++.galleryFooter {+ display: flex;+ width: 100%;+ align-items: center;+ justify-content: space-between;+ gap: 1rem;+}++.gallerySwitcher {+ display: flex;+}+.stage {position: relative;width: 100%;aspect-ratio: 1120 / 660;overflow: hidden;pointer-events: none;- border-radius: var(--radius-sm);+ border-radius: var(--gallery-frame-radius);box-shadow: none;contain: layout paint;isolation: isolate;}+.productShell {+ border: 1px solid color-mix(in oklch, var(--border), var(--foreground) 20%);+ border-radius: var(--gallery-frame-radius);+ background: var(--app-bg);+ clip-path: inset(0 round var(--gallery-frame-radius));+}+.canvas {position: absolute;top: 0;@@ -92,6 +121,41 @@visibility 0s;}+.inviteSurface {+ position: absolute;+ z-index: 60;+ top: 50%;+ left: 50%;+ display: flex;+ width: 448px;+ max-height: 520px;+ flex-direction: column;+ overflow: hidden;+ border: 1px solid var(--border);+ border-radius: var(--radius-xl);+ background: var(--popover);+ color: var(--popover-foreground);+ box-shadow: var(--shadow-md);+ opacity: 0;+ visibility: hidden;+ pointer-events: none;+ transform: translate(-50%, calc(-50% + 14px)) scale(0.98);+ transition:+ transform 420ms cubic-bezier(0.4, 0, 0.2, 1),+ opacity 320ms cubic-bezier(0.4, 0, 0.2, 1),+ visibility 0s linear 420ms;+}++.inviteSurface[data-open="true"] {+ opacity: 1;+ visibility: visible;+ transform: translate(-50%, -50%) scale(1);+ transition:+ transform 420ms cubic-bezier(0.4, 0, 0.2, 1),+ opacity 320ms cubic-bezier(0.4, 0, 0.2, 1),+ visibility 0s;+}+.motionTarget {transform: scale(1);transform-origin: center;@@ -265,6 +329,7 @@.resultReveal,.botMenu,.sheetSurface,+ .inviteSurface,.camera,.sceneEnter {transition: none;@@ -275,3 +340,14 @@max-width: 11ch;}}++@container (max-width: 520px) {+ .galleryFooter {+ flex-direction: column;+ align-items: stretch;+ }++ .gallerySwitcher {+ align-self: flex-end;+ }+}diff --git a/src/web/src/components/home/landing-shell-motion.test.ts b/src/web/src/components/home/landing-shell-motion.test.tsindex 6eac6e02a..6bae1119f 100644--- a/src/web/src/components/home/landing-shell-motion.test.ts+++ b/src/web/src/components/home/landing-shell-motion.test.ts@@ -50,7 +50,23 @@ describe("landing shell motion timeline", () => {expect(sceneSnapshot("provider", 9)).toMatchObject({ visibleMessages: 2, focus: null, camera: { scale: 1 } })})- it("zooms in around the cursor and returns wide in all three acts", () => {+ it("switches isolated rooms, invites a friend, and lands in play with its bot", () => {+ expect(sceneSnapshot("spaces", 0)).toMatchObject({ room: "work", inviteOpen: false, focus: null })+ expect(sceneSnapshot("spaces", 1)).toMatchObject({ room: "work", focus: "server-life" })+ expect(sceneSnapshot("spaces", 2)).toMatchObject({ room: "life", focus: "space-server-name-life" })+ expect(sceneSnapshot("spaces", 3)).toMatchObject({ room: "life", focus: "space-channel-life" })+ expect(sceneSnapshot("spaces", 4)).toMatchObject({ room: "life", focus: "invite-life" })+ expect(sceneSnapshot("spaces", 5)).toMatchObject({ room: "life", inviteOpen: true, inviteSent: false, focus: "invite-maya" })+ expect(sceneSnapshot("spaces", 6)).toMatchObject({ room: "life", inviteOpen: true, inviteSent: true, focus: "invite-maya" })+ expect(sceneSnapshot("spaces", 7)).toMatchObject({ room: "life", inviteOpen: false, visibleMessages: 3, focus: "space-message-maya" })+ expect(sceneSnapshot("spaces", 8)).toMatchObject({ room: "life", focus: "server-play" })+ expect(sceneSnapshot("spaces", 9)).toMatchObject({ room: "play", focus: "space-server-name-play" })+ expect(sceneSnapshot("spaces", 10)).toMatchObject({ room: "play", focus: "space-channel-play" })+ expect(sceneSnapshot("spaces", 11)).toMatchObject({ room: "play", visibleMessages: 3, focus: "space-message-quest" })+ expect(sceneSnapshot("spaces", 12)).toMatchObject({ room: "play", focus: null, camera: { scale: 1 } })+ })++ it("zooms in around the cursor and returns wide in all four acts", () => {expect(sceneSnapshot("server", 1).camera.scale).toBe(1.22)expect(sceneSnapshot("server", 6).camera.scale).toBe(1)expect(sceneSnapshot("machine", 2).camera.scale).toBe(1.22)@@ -59,12 +75,15 @@ describe("landing shell motion timeline", () => {expect(sceneSnapshot("provider", 5).camera.scale).toBe(1)expect(sceneSnapshot("provider", 6).camera.scale).toBe(1.18)expect(sceneSnapshot("provider", 9).camera.scale).toBe(1)+ expect(sceneSnapshot("spaces", 5).camera.scale).toBe(1.2)+ expect(sceneSnapshot("spaces", 12).camera.scale).toBe(1)})it("clamps out-of-range beats to a valid deterministic snapshot", () => {expect(sceneSnapshot("server", -1).beat).toBe(0)expect(sceneSnapshot("server", 99).beat).toBe(SCENE_MAX_BEAT.server)expect(sceneSnapshot("machine", 99).machineState).toBe("bot-born")+ expect(sceneSnapshot("spaces", 99)).toMatchObject({ room: "play", inviteSent: true })})it("exposes each act's complete playback duration to gallery consumers", () => {@@ -73,6 +92,7 @@ describe("landing shell motion timeline", () => {)expect(sceneDurationMs("machine")).toBe(12_900)expect(sceneDurationMs("provider")).toBe(15_900)+ expect(sceneDurationMs("spaces")).toBe(20_400)})it("boosts focused gallery beats while preserving wide beats", () => {diff --git a/src/web/src/components/home/landing-shell-motion.tsx b/src/web/src/components/home/landing-shell-motion.tsxindex c1cc78424..967724998 100644--- a/src/web/src/components/home/landing-shell-motion.tsx+++ b/src/web/src/components/home/landing-shell-motion.tsx@@ -12,17 +12,21 @@ import {import { QueryClient, QueryClientProvider } from "@tanstack/react-query"import {Activity,+ Check,MoreVertical,MousePointer2,PlusCircle,RotateCcw,+ Search,Smile,+ UserPlus,} from "lucide-react"import type { CommunityMachineSummary } from "@alook/shared"import { AgentAvatar, type AvatarDraft } from "@/components/avatar"import { ProviderLogo } from "@/components/provider-logo"import { Button } from "@/components/ui/button"import { Card } from "@/components/ui/card"+import { Input } from "@/components/ui/input"import { AppSurface } from "@/components/ui/app-surface"import { SheetBody, SheetFooter, SheetHeader } from "@/components/ui/sheet"import { Shell } from "@/components/community/shell"@@ -31,6 +35,7 @@ import { ChannelSidebar } from "@/components/community/channel-sidebar"import { DmSidebar } from "@/components/community/dm-sidebar"import { DmHeader } from "@/components/community/dm-header"import { ChannelHeader } from "@/components/community/channel-header"+import { Avatar } from "@/components/community/avatar"import { Message } from "@/components/community/message"import { MachineCard } from "@/components/community/machines/machine-card"import { PairMachineSteps } from "@/components/community/machines/pair-machine-sheet"@@ -50,6 +55,7 @@ import {galleryCameraTransform,sceneSnapshot,type LandingScene,+ type LandingRoom,type SceneSnapshot,} from "./landing-shell-motion-timeline"import styles from "./landing-shell-motion.module.css"@@ -58,6 +64,12 @@ const SERVERS: Server[] = [{ id: "gus", name: "Gus", initial: "G", active: true, mentions: 0, isOwner: true, icon: null },]+const SPACE_SERVERS: Server[] = [+ { id: "work", name: "Studio", initial: "S", active: true, mentions: 0, isOwner: true, icon: null },+ { id: "life", name: "Home", initial: "H", active: false, mentions: 0, isOwner: true, icon: null },+ { id: "play", name: "Game Night", initial: "G", active: false, mentions: 0, isOwner: true, icon: null },+]+const CHANNELS: Category[] = [{id: "cat_public",@@ -76,6 +88,66 @@ const CHANNELS: Category[] = [},]+const SPACE_CHANNELS: Record<LandingRoom, Category[]> = {+ work: [+ {+ id: "cat_work_public",+ name: "Public",+ channels: [+ { id: "work-general", name: "general", active: true, unread: false, type: "text" },+ { id: "work-design", name: "design-review", active: false, unread: false, type: "text" },+ ],+ },+ {+ id: "cat_work_private",+ name: "Private",+ private: true,+ channels: [+ { id: "work-launch", name: "launch-room", active: false, unread: false, type: "text" },+ { id: "work-release", name: "release-notes", active: false, unread: false, type: "text" },+ ],+ },+ ],+ life: [+ {+ id: "cat_life_public",+ name: "Public",+ channels: [+ { id: "life-kitchen", name: "kitchen", active: true, unread: false, type: "text" },+ { id: "life-photos", name: "photos", active: false, unread: false, type: "text" },+ ],+ },+ {+ id: "cat_life_private",+ name: "Private",+ private: true,+ channels: [+ { id: "life-plans", name: "family-plans", active: false, unread: false, type: "text" },+ { id: "life-travel", name: "travel", active: false, unread: false, type: "text" },+ ],+ },+ ],+ play: [+ {+ id: "cat_play_public",+ name: "Public",+ channels: [+ { id: "play-lobby", name: "lobby", active: true, unread: false, type: "text" },+ { id: "play-clips", name: "clips", active: false, unread: false, type: "text" },+ ],+ },+ {+ id: "cat_play_private",+ name: "Private",+ private: true,+ channels: [+ { id: "play-party", name: "party-chat", active: false, unread: false, type: "text" },+ { id: "play-strategy", name: "strategy", active: false, unread: false, type: "text" },+ ],+ },+ ],+}+const DMS: DM[] = [{ id: "dm-alli", userId: "alli", name: "Alli", discriminator: "8145", avatar: "avatar:beam:alli", status: "online", preview: "Available" },]@@ -127,6 +199,103 @@ const MESSAGES: RenderMsg[] = [},]+const SPACE_MESSAGES: Record<LandingRoom, RenderMsg[]> = {+ work: [+ {+ id: "space-work-gus",+ type: "chat",+ authorId: "gus",+ authorName: "Gus",+ authorAvatar: "avatar:beam:gus",+ content: "The new gallery story is ready.",+ createdAt: "2026-08-06T06:00:00.000Z",+ seq: 501,+ grouped: false,+ },+ {+ id: "space-work-shelly",+ type: "chat",+ authorId: "shelly",+ authorName: "Shelly",+ authorAvatar: "avatar:beam:shelly",+ content: "I’ll ship it after review.",+ createdAt: "2026-08-06T06:00:05.000Z",+ seq: 502,+ grouped: false,+ },+ ],+ life: [+ {+ id: "space-life-gus",+ type: "chat",+ authorId: "gus-life",+ authorName: "Gus",+ authorAvatar: "avatar:beam:gus",+ content: "Dinner at seven?",+ createdAt: "2026-08-06T06:01:00.000Z",+ seq: 503,+ grouped: false,+ },+ {+ id: "space-life-alli",+ type: "chat",+ authorId: "alli-life",+ authorName: "Alli",+ authorAvatar: "avatar:beam:alli",+ content: "I’ll remind everyone.",+ createdAt: "2026-08-06T06:01:04.000Z",+ seq: 504,+ grouped: false,+ },+ {+ id: "space-life-maya",+ type: "chat",+ authorId: "maya",+ authorName: "Maya",+ authorAvatar: "avatar:beam:maya",+ content: "I’m in — I’ll bring dessert.",+ createdAt: "2026-08-06T06:01:08.000Z",+ seq: 505,+ grouped: false,+ },+ ],+ play: [+ {+ id: "space-play-noah",+ type: "chat",+ authorId: "noah",+ authorName: "Noah",+ authorAvatar: "avatar:beam:noah",+ content: "Game night at eight.",+ createdAt: "2026-08-06T06:02:00.000Z",+ seq: 506,+ grouped: false,+ },+ {+ id: "space-play-quest",+ type: "chat",+ authorId: "quest",+ authorName: "Quest Bot",+ authorAvatar: "avatar:beam:quest",+ content: "The room and teams are ready.",+ createdAt: "2026-08-06T06:02:04.000Z",+ seq: 507,+ grouped: false,+ },+ {+ id: "space-play-gus",+ type: "chat",+ authorId: "gus-play",+ authorName: "Gus",+ authorAvatar: "avatar:beam:gus",+ content: "Let’s go.",+ createdAt: "2026-08-06T06:02:08.000Z",+ seq: 508,+ grouped: false,+ },+ ],+}+const DM_MESSAGES: RenderMsg[] = [{id: "dm-message-gus",@@ -374,39 +543,39 @@ export function LandingShellMotion({ scene }: { scene: LandingScene }) {}function PrototypeShell({ scene, snapshot }: { scene: LandingScene; snapshot: SceneSnapshot }) {- const serverView = scene === "server"+ const serverView = scene === "server" || scene === "spaces"+ const room = scene === "spaces" ? snapshot.room : null+ const servers = room+ ? SPACE_SERVERS.map((server) => ({ ...server, active: server.id === room }))+ : SERVERSreturn (- <Shell>- <ServerRail- servers={SERVERS}- folders={[]}- activeServerId="gus"- view={serverView ? "server" : "dm"}- bottomInset={60}- onHome={() => {}}- onServer={() => {}}- onServerNavigate={() => {}}+ <Shell className={styles.productShell}>+ <PrototypeServerRail+ servers={servers}+ activeServerId={room ?? "gus"}+ serverView={serverView}/><div className="relative flex min-w-0 flex-1 flex-col pt-2"><AppSurface className="rounded-tl-xl rounded-tr-none rounded-br-none rounded-bl-none border-l border-t border-border/40 shadow-none ring-0"><div className="flex min-h-0 flex-1"><div- key={`sidebar-${scene}`}+ key={`sidebar-${scene}-${room ?? "default"}`}className={`flex w-60 shrink-0 flex-col bg-sidebar pb-14 ${styles.sceneEnter}`}>{serverView ? (- <PrototypeChannelSidebar />+ <PrototypeChannelSidebar room={room} />) : (<PrototypeDmSidebar scene={scene} snapshot={snapshot} />)}</div><div- key={`content-${scene}`}+ key={`content-${scene}-${room ?? "default"}`}className={`flex min-w-0 flex-1 flex-col bg-background ${styles.sceneEnter}`}>{scene === "server" && <ServerScene snapshot={snapshot} />}{scene === "machine" && <MachineScene snapshot={snapshot} />}{scene === "provider" && <ProviderScene snapshot={snapshot} />}+ {scene === "spaces" && <SpacesScene snapshot={snapshot} />}</div></div></AppSurface>@@ -421,17 +590,99 @@ function PrototypeShell({ scene, snapshot }: { scene: LandingScene; snapshot: Sc)}-function PrototypeChannelSidebar() {- const tree = useChannelTree(CHANNELS)+function PrototypeServerRail({+ servers,+ activeServerId,+ serverView,+}: {+ servers: Server[]+ activeServerId: string+ serverView: boolean+}) {+ const railRef = useRef<HTMLDivElement>(null)++ useLayoutEffect(() => {+ const rail = railRef.current+ const targets = ["life", "play"] as const+ for (const id of targets) {+ rail+ ?.querySelector<HTMLElement>(`[data-testid="${tid.serverIcon(id)}"]`)+ ?.setAttribute("data-motion-target", `server-${id}`)+ }+ return () => {+ for (const id of targets) {+ rail+ ?.querySelector<HTMLElement>(`[data-testid="${tid.serverIcon(id)}"]`)+ ?.removeAttribute("data-motion-target")+ }+ }+ }, [servers])+return (- <ChannelSidebar- tree={tree}- serverName="Gus"- activeChannel="general"- setActiveChannel={() => {}}- isAdmin={false}- currentUserId="gus"- />+ <div ref={railRef} className="contents">+ <ServerRail+ servers={servers}+ folders={[]}+ activeServerId={activeServerId}+ view={serverView ? "server" : "dm"}+ bottomInset={60}+ onHome={() => {}}+ onServer={() => {}}+ onServerNavigate={() => {}}+ />+ </div>+ )+}++function PrototypeChannelSidebar({ room }: { room: LandingRoom | null }) {+ const categories = room ? SPACE_CHANNELS[room] : CHANNELS+ const tree = useChannelTree(categories)+ const serverName = room+ ? SPACE_SERVERS.find((server) => server.id === room)?.name ?? ""+ : "Gus"+ const activeChannel = categories[0]?.channels[0]?.id ?? "general"+ const sidebarRef = useRef<HTMLDivElement>(null)++ useLayoutEffect(() => {+ if (!room) return+ const sidebar = sidebarRef.current+ const serverNameElement = Array.from(+ sidebar?.querySelectorAll<HTMLElement>("header span") ?? [],+ ).find((element) => element.textContent?.trim() === serverName)+ const channelElement = sidebar?.querySelector<HTMLElement>(+ `[data-testid="${tid.channelRow(activeChannel)}"]`,+ )+ serverNameElement?.setAttribute(+ "data-motion-target",+ `space-server-name-${room}`,+ )+ channelElement?.setAttribute("data-motion-target", `space-channel-${room}`)+ return () => {+ serverNameElement?.removeAttribute("data-motion-target")+ channelElement?.removeAttribute("data-motion-target")+ }+ }, [activeChannel, room, serverName])++ return (+ <div ref={sidebarRef} className="relative flex min-h-0 flex-1 flex-col">+ <ChannelSidebar+ tree={tree}+ serverName={serverName}+ activeChannel={activeChannel}+ setActiveChannel={() => {}}+ isAdmin={false}+ currentUserId="gus"+ />+ {room && (+ <button+ data-motion-target="invite-life"+ className="absolute right-2 top-2 grid size-7 place-items-center rounded-md text-muted-foreground"+ aria-label="Invite to server"+ >+ <UserPlus className="size-4" />+ </button>+ )}+ </div>)}@@ -539,6 +790,108 @@ function ServerScene({ snapshot }: { snapshot: SceneSnapshot }) {)}+function SpacesScene({ snapshot }: { snapshot: SceneSnapshot }) {+ const room = snapshot.room+ const server = SPACE_SERVERS.find((item) => item.id === room) ?? SPACE_SERVERS[0]+ const channel = SPACE_CHANNELS[room][0]?.channels[0]+ const messages = SPACE_MESSAGES[room]++ return (+ <>+ <ChannelHeader+ channel={channel?.name ?? "general"}+ rightPanel={null}+ onToggle={() => {}}+ server={{ id: server.id, name: server.name, icon: server.icon ?? null }}+ />+ <div className="flex min-h-0 flex-1 flex-col overflow-hidden">+ <div className="flex-1 overflow-hidden px-4 py-3">+ {messages.map((message, index) => {+ const target = `space-message-${message.authorId}`+ return (+ <div+ key={message.id}+ data-visible={index < snapshot.visibleMessages}+ className={styles.messageSlot}+ >+ <div+ data-motion-target={target}+ className={targetClass(snapshot, target)}+ >+ <Message m={message} onOpenThread={() => {}} />+ </div>+ </div>+ )+ })}+ </div>+ <PrototypeComposer+ snapshot={snapshot}+ target="spaces-composer"+ placeholder={`Message /${channel?.name ?? "general"}`}+ />+ </div>+ <PrototypeInviteSurface snapshot={snapshot} />+ </>+ )+}++function PrototypeInviteSurface({ snapshot }: { snapshot: SceneSnapshot }) {+ return (+ <aside+ aria-label="Invite friends to Home"+ aria-hidden={!snapshot.inviteOpen}+ data-open={snapshot.inviteOpen}+ className={styles.inviteSurface}+ >+ <header className="border-b border-border/50 px-4 py-3">+ <h2 className="truncate text-sm font-semibold">Invite friends to Home</h2>+ </header>+ <div className="px-4 pt-3">+ <label className="relative block">+ <Search+ aria-hidden+ className="pointer-events-none absolute left-3 top-1/2 size-4 -translate-y-1/2 text-muted-foreground"+ />+ <Input readOnly placeholder="Search for friends" className="pl-9" />+ </label>+ </div>+ <div className="px-2 py-2">+ <div className="flex items-center gap-3 rounded-md px-2 py-2">+ <Avatar label="Maya" seed="maya" size={32} presence="online" ringColor="var(--popover)" />+ <div className="min-w-0 flex-1">+ <div className="truncate text-sm font-medium">Maya</div>+ <div className="truncate text-xs text-muted-foreground">Free for dinner</div>+ </div>+ <Button+ size="sm"+ variant={snapshot.inviteSent ? "secondary" : "default"}+ data-motion-target="invite-maya"+ className={targetClass(snapshot, "invite-maya")}+ >+ {snapshot.inviteSent ? (+ <>+ <Check className="size-3.5" />+ Invited+ </>+ ) : (+ "Invite"+ )}+ </Button>+ </div>+ </div>+ <footer className="border-t border-border/50 px-4 py-3">+ <div className="text-xs font-medium text-muted-foreground">+ Or, send a server invite link to a friend+ </div>+ <div className="mt-2 flex items-center gap-2">+ <Input readOnly value="alook.ai/c/invite/home" className="font-mono text-xs" />+ <Button size="sm">Copy</Button>+ </div>+ </footer>+ </aside>+ )+}+function PrototypeComposer({snapshot,target,