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): finish interactive landing workspace and deferred loading
Gusc721ca9de3c7
diff --cc src/web/src/app/demo/page.tsxindex 6e3fa721e,000000000..b14977b4emode 100644,000000..100644--- a/src/web/src/app/demo/page.tsx+++ b/src/web/src/app/demo/page.tsx@@@ -1,8 -1,0 +1,9 @@@+import type { Metadata } from "next"++import styles from "@/components/home/landing-interactive-shell.module.css"+import LandingInteractiveShell from "@/components/home/landing-interactive-shell"++export const metadata: Metadata = { title: "Alook", robots: { index: false, follow: false } }++export default function DemoPage() {- return <LandingInteractiveShell />++ return <div className={styles.previewRoot}><LandingInteractiveShell /></div>+}diff --cc src/web/src/components/community/messages/message.tsxindex a707819e4,a707819e4..f78a43296--- a/src/web/src/components/community/messages/message.tsx+++ b/src/web/src/components/community/messages/message.tsx@@@ -646,7 -646,7 +646,7 @@@ function MessageImpl()}{m.replyTo && (-- <div className="grid grid-cols-[2.5rem_minmax(0,1fr)] gap-2">++ <div className="grid grid-cols-[40px_minmax(0,1fr)] gap-2"><button onClick={onJumpReply} className="col-start-2 flex min-w-0 items-center gap-2 text-[13px] text-muted-foreground hover:text-foreground"><div className="h-2 w-4 shrink-0 rounded-tl-md border-l-2 border-t-2 border-border" />{m.replyTo.deleted ? (@@@ -663,7 -663,7 +663,7 @@@<div className="flex gap-2">{m.grouped ? (-- <div className="w-10 shrink-0" />++ <div className="w-[40px] shrink-0" />) : (<button{...avatarMention}diff --cc src/web/src/components/community/social/bot-mark-sticker.dom.test.tsindex 6082bebe0,6082bebe0..12e44b0fd--- a/src/web/src/components/community/social/bot-mark-sticker.dom.test.ts+++ b/src/web/src/components/community/social/bot-mark-sticker.dom.test.ts@@@ -274,7 -274,7 +274,7 @@@ describe("BotMarkSticker", () =>mocks.activity.hasEarlierEvents = trueconst { renderer, props } = render()-- expect(mocks.bottomAnchor.scrollIntoView).toHaveBeenCalledWith({ block: "end" })++ expect(mocks.bottomAnchor.scrollIntoView).not.toHaveBeenCalled()expect(mocks.scrollNode.scrollTop).toBe(300)const scroller = renderer.container.querySelector('[data-testid="community-bot-audit-preview-scroll"]')!@@@ -332,7 -332,7 +332,7 @@@act(flushFrames)act(flushFrames)-- expect(mocks.bottomAnchor.scrollIntoView).toHaveBeenCalledOnce()++ expect(mocks.bottomAnchor.scrollIntoView).not.toHaveBeenCalled()expect(mocks.scrollNode.scrollTop).toBe(300)})diff --cc src/web/src/components/community/social/bot-mark-sticker.tsxindex 24aac27eb,24aac27eb..cfb70995a--- a/src/web/src/components/community/social/bot-mark-sticker.tsx+++ b/src/web/src/components/community/social/bot-mark-sticker.tsx@@@ -40,29 -40,29 +40,36 @@@ function NotebookBinding({ front }: { f)}--export function BotMarkSticker({-- botId,-- active,-- showStop,-- stopPending,-- onStop,-- onOpenActivity,--}: {++type BotMarkStickerProps = {botId: stringactive: booleanshowStop: booleanstopPending: booleanonStop: () => voidonOpenActivity: () => void++}++++export function BotMarkSticker(props: BotMarkStickerProps) {++ const activity = useBotAuditPreview(props.botId, true)++ const { marks, isLoading, isError } = useBotMarks(props.botId)++ return <BotMarkStickerView {...props} activity={activity} marks={marks} isLoading={isLoading} isError={isError} />++}++++export function BotMarkStickerView({++ active, showStop, stopPending, onStop, onOpenActivity, activity, marks, isLoading, isError,++}: Omit<BotMarkStickerProps, "botId" | "onOpenActivity"> & {++ onOpenActivity?: () => void++ activity: Pick<ReturnType<typeof useBotAuditPreview>, "events" | "isLoading" | "isError" | "isNotFound">++ marks: ReturnType<typeof useBotMarks>["marks"]++ isLoading: boolean++ isError: boolean}) {const [view, setView] = useAtom(useCreateAtom<StickerView>("thoughts"))const activityScrollRef = useRef<HTMLDivElement>(null)-- const activityBottomAnchorRef = useRef<HTMLDivElement>(null)const latestEventIdRef = useRef<string | undefined>(undefined)const didInitialTailScrollRef = useRef(false)const nearTailRef = useRef(true)-- const activity = useBotAuditPreview(botId, true)-- const { marks, isLoading, isError } = useBotMarks(botId)++ const ThoughtTime = onOpenActivity ? "button" : "div"const visibleMarks = marks.slice(0, VISIBLE_MARKS)const hasOverflow = marks.length > VISIBLE_MARKSconst visibleEvents = [...activity.events]@@@ -84,13 -84,13 +91,11 @@@if (view !== "thoughts") returnif (didInitialTailScrollRef.current) returnif (visibleEvents.length === 0) return-- const anchor = activityBottomAnchorRef.currentconst scroller = activityScrollRef.current-- if (!anchor || !scroller) return++ if (!scroller) returnlet secondFrame = 0const firstFrame = requestAnimationFrame(() => {secondFrame = requestAnimationFrame(() => {-- anchor.scrollIntoView({ block: "end" })scroller.scrollTop = scroller.scrollHeightlatestEventIdRef.current = latestVisibleEventIddidInitialTailScrollRef.current = true@@@ -149,20 -149,20 +154,20 @@@nearTailRef.current = currentTarget.scrollHeight - (currentTarget.scrollTop + currentTarget.clientHeight) < 80}}className={`thin-scrollbar ${styles.scrollbar} min-h-0 flex-1 overflow-x-hidden overflow-y-auto overscroll-contain`}>-- <div ref={activityBottomAnchorRef} data-testid={tid.botAuditPreviewBottom} className={`flex min-h-full flex-col ${!activity.isLoading && (activity.isError || visibleEvents.length === 0) ? "justify-center" : "justify-end"}`}>++ <div data-testid={tid.botAuditPreviewBottom} className={`flex min-h-full flex-col ${!activity.isLoading && (activity.isError || visibleEvents.length === 0) ? "justify-center" : "justify-end"}`}>{activity.isLoading ? <ThoughtsLoading /> : activity.isError ? <StickerState label="Thoughts unavailable" /> : visibleEvents.length === 0 ? <StickerState label="No recent thoughts" /> : visibleEvents.map((event) => {const parsed = AuditLogTextPayloadSchema.safeParse(event.payload)return <div key={event.id} data-testid={tid.botAuditPreviewRow(event.id)} className={styles.entry}>-- <button type="button" onClick={onOpenActivity} title="Open full audit log"++ <ThoughtTime onClick={onOpenActivity} title={onOpenActivity ? "Open full audit log" : undefined}className={styles.thoughtTime}><time dateTime={event.createdAt}>{new Date(event.createdAt).toLocaleString(undefined, { month: "short", day: "numeric", hour: "2-digit", minute: "2-digit" })}</time>-- </button>-- <div className={styles.thought} onClick={(event) => {++ </ThoughtTime>++ <div className={styles.thought} style={onOpenActivity ? undefined : { cursor: "text" }} onClick={onOpenActivity ? (event) => {if (event.defaultPrevented || (event.target instanceof Element &&event.target.closest("a, button, input, select, textarea, summary, [role='button']"))) returnif (window.getSelection()?.toString()) returnonOpenActivity()-- }}>++ } : undefined}><MessageBody text={parsed.success ? `${parsed.data.text}${parsed.data.truncated ? "…" : ""}` : "Text unavailable"} /></div></div>diff --cc src/web/src/components/community/social/profile-card.tsxindex 890a390f5,890a390f5..7b2ccf54e--- a/src/web/src/components/community/social/profile-card.tsx+++ b/src/web/src/components/community/social/profile-card.tsx@@@ -1,7 -1,7 +1,7 @@@"use client"import { useAtom, useCreateAtom } from "@tanstack/react-store";--import { useEffect, type ComponentProps } from "react"++import { useEffect, type ComponentProps, type ReactNode } from "react"import { Bot, MessagesSquare, Shield, UserRound } from "lucide-react"import { BOT_ACTIVITY_PRESETS } from "@alook/shared"import { Popover, PopoverTrigger, PopoverContent } from "@/components/ui/popover"@@@ -88,6 -88,6 +88,7 @@@ type ProfileCardProps =activityStatusText?: string | null// Static card surface for contexts such as product previews. The regular// profile interaction still uses the anchored popover / mobile sheet.++ secondaryCard?: ReactNodeembedded?: booleanextension?: boolean}@@@ -114,7 -114,7 +115,7 @@@ function SelfProfileCard(props: Profile// Profile card — popover anchored at the click point on desktop, bottom sheet on mobile.// Identity, about, status, and presence are read from the global profile map// whenever a userId is present. Static cards use their supplied display data.--function ProfileCardContent({ data, x, y, bp, onClose, onMessage, canMessage = false, isSelf, onUpdateStatus, onOpenOwnerProfile, onOpenBotAudit, initialStatusEmoji, initialStatusText, activityStatusEmoji, activityStatusText, embedded, extension, hasSelfRunningBots }: ProfileCardProps & {++function ProfileCardContent({ data, x, y, bp, onClose, onMessage, canMessage = false, isSelf, onUpdateStatus, onOpenOwnerProfile, onOpenBotAudit, initialStatusEmoji, initialStatusText, activityStatusEmoji, activityStatusText, secondaryCard, embedded, extension, hasSelfRunningBots }: ProfileCardProps & {hasSelfRunningBots: boolean}) {const registry = useOptionalCommunityDbRegistry()@@@ -155,7 -155,7 +156,7 @@@const botIdentity = data.identity?.kind === "bot" ? data.identity : nullconst showOwnedBotCard = Boolean(botIdentity?.ownedByViewer && data.userId)const showSelfRunningBots = Boolean(isSelf && data.userId && hasSelfRunningBots)-- const showSecondaryCards = showOwnedBotCard || showSelfRunningBots++ const showSecondaryCards = Boolean(secondaryCard) || showOwnedBotCard || showSelfRunningBotsconst {popoverRef,cardRef,@@@ -346,7 -346,7 +347,7 @@@</>)-- const secondaryCards = showSelfRunningBots ? (++ const secondaryCards = secondaryCard ?? (showSelfRunningBots ? (<ProfileRunningBotsCardonOpenBotAudit={onOpenBotAudit}/>@@@ -360,7 -360,7 +361,7 @@@onStop={interruptAgent}onOpenActivity={() => onOpenBotAudit?.(data.userId!)}/>-- ) : null++ ) : null)if (extension)return <div data-testid={tid.profileCard} className={mobile ? "w-full overflow-hidden rounded-t-xl border-x border-t border-border/40 bg-popover p-2" : "w-full"}>{card}</div>diff --cc src/web/src/components/community/social/profile-running-bots-card.tsxindex b34b0c065,b34b0c065..2e6bda36a--- a/src/web/src/components/community/social/profile-running-bots-card.tsx+++ b/src/web/src/components/community/social/profile-running-bots-card.tsx@@@ -9,8 -9,8 +9,10 @@@ import} from "@/hooks/community/use-running-owned-bots"import { tid } from "@/lib/community/testids"++type RunningBotCardItem = Pick<RunningOwnedBot, "id" | "name" | "image" | "activityEmoji" | "activityText">++function BotRow({ bot, onOpenBotAudit }: {-- bot: RunningOwnedBot++ bot: RunningBotCardItemonOpenBotAudit?: (botId: string) => void}) {const content = (@@@ -65,8 -65,8 +67,16 @@@ export function ProfileRunningBotsCard(onOpenBotAudit?: (botId: string) => voidshowShadow?: boolean}) {-- const titleId = useId()const { runningBots } = useRunningOwnedBots()++ return <ProfileRunningBotsCardView runningBots={runningBots} onOpenBotAudit={onOpenBotAudit} showShadow={showShadow} />++}++++export function ProfileRunningBotsCardView({ runningBots, onOpenBotAudit, showShadow = true }: {++ runningBots: RunningBotCardItem[]++ onOpenBotAudit?: (botId: string) => void++ showShadow?: boolean++}) {++ const titleId = useId()if (runningBots.length === 0) return nulldiff --cc src/web/src/components/home/landing-bot-log.dom.test.tsxindex 000000000,000000000..f71dc5befnew file mode 100644--- /dev/null+++ b/src/web/src/components/home/landing-bot-log.dom.test.tsx@@@ -1,0 -1,0 +1,40 @@@++import { QueryClient, QueryClientProvider } from "@tanstack/react-query"++import { beforeEach, describe, expect, it, vi } from "vitest"++import { render, screen, setupUser } from "@/test/react-dom-harness"++import { CommunityPreviewProfileOwner } from "@/stores/community/profile-preview"++import { DEMO_PROFILES } from "./landing-interactive-shell-data"++import { DEMO_BOT_LOGS, LandingBotLog } from "./landing-bot-log"++++vi.mock("@/hooks/community/use-bot-audit-preview", () => ({ useBotAuditPreview: () => { throw new Error("Preview must not fetch audit logs") } }))++vi.mock("@/hooks/community/use-bot-marks", () => ({ useBotMarks: () => { throw new Error("Preview must not fetch marks") } }))++beforeEach(() => { Element.prototype.scrollIntoView = vi.fn() })++++describe("landing bot logs", () => {++ it("gives every bot distinct fixed thoughts, real marked messages, and a running status", () => {++ const bots = [...DEMO_PROFILES.values()].filter((profile) => profile.kind === "bot")++ expect(Object.keys(DEMO_BOT_LOGS)).toHaveLength(bots.length)++ expect(new Set(Object.values(DEMO_BOT_LOGS).map((log) => JSON.stringify(log.events.map((event) => event.payload)))).size).toBe(bots.length)++ for (const bot of bots) {++ expect(DEMO_BOT_LOGS[bot.id].events).toHaveLength(3)++ expect(DEMO_BOT_LOGS[bot.id].marks).toHaveLength(2)++ expect(bot.statusText).toBe("Working on it")++ for (const mark of DEMO_BOT_LOGS[bot.id].marks) {++ expect(mark.m.content).toBeTruthy()++ expect(mark.m.authorName).toBeTruthy()++ }++ }++ })++ it("switches the native notebook between local thoughts and marks without fetching", async () => {++ render(<QueryClientProvider client={new QueryClient()}><CommunityPreviewProfileOwner profiles={DEMO_PROFILES}><LandingBotLog botId="demo-alli" /></CommunityPreviewProfileOwner></QueryClientProvider>)++ expect(screen.getByRole("region", { name: "Bot log" })).toBeVisible()++ expect(screen.getByText((DEMO_BOT_LOGS["demo-alli"].events[0].payload as { text: string }).text)).toBeVisible()++ expect(screen.getByTestId("community-bot-audit-preview-active")).toBeVisible()++ expect(screen.queryByTitle("Open full audit log")).not.toBeInTheDocument()++ await setupUser().click(screen.getByText((DEMO_BOT_LOGS["demo-alli"].events[0].payload as { text: string }).text))++ expect(screen.queryByRole("dialog")).not.toBeInTheDocument()++ await setupUser().click(screen.getByRole("tab", { name: "Marked messages" }))++ expect(screen.getByText(DEMO_BOT_LOGS["demo-alli"].marks[0].m.content!)).toBeVisible()++ await setupUser().click(screen.getByRole("tab", { name: "Thoughts" }))++ expect(screen.getByRole("tabpanel", { name: "Recent thoughts" })).toBeVisible()++ })++})diff --cc src/web/src/components/home/landing-bot-log.tsxindex 000000000,000000000..3abb030e8new file mode 100644--- /dev/null+++ b/src/web/src/components/home/landing-bot-log.tsx@@@ -1,0 -1,0 +1,56 @@@++"use client"++++import type { AuditEvent } from "@/hooks/community/use-bot-audit-log"++import type { Marked } from "@/lib/community/models/inbox"++import { BotMarkStickerView } from "@/components/community/social/bot-mark-sticker"++import { DEMO_CHANNELS, DEMO_MESSAGES, DEMO_PROFILES, DEMO_SERVERS } from "./landing-interactive-shell-data"++++const work: Record<string, { thoughts: string[]; marks: [string, number][] }> = {++ "demo-alli": {++ thoughts: ["Reviewing H2 at the smaller type size. The room list and composer need to stay readable together.", "The profile and Bot log should stay connected when the screen gets narrow.", "Keeping the original product story below the interactive room."],++ marks: [["demo-design-review", 0], ["demo-general", 1]],++ },++ "demo-cecilia": {++ thoughts: ["Checking the H2 phone composer after switching rooms and opening a profile.", "The reported height issue is fixed. Gus still needs to complete the final phone flow.", "Coffee Map C2 keeps the second entry empty and prevents duplicate saves."],++ marks: [["demo-release-room", 2], ["demo-feedback", 0]],++ },++ "demo-claudette": {++ thoughts: ["Comparing H2’s design decisions with the candidate in release-room.", "Desktop behavior passed. Keeping the real-phone check separate from that result.", "Checking that each handoff names the same version and next action."],++ marks: [["demo-release-room", 0], ["demo-web-bugs", 1]],++ },++ "demo-evan": {++ thoughts: ["Checking the source arrow beside each quote author.", "Long quotes stay within three lines; their source links retain the complete post.", "Reviewing the moving rows with reduced motion enabled."],++ marks: [["demo-content", 2], ["demo-dm-evan", 1]],++ },++ "demo-devin": {++ thoughts: ["Cross-checking Maya’s comparison against the three internal Coffee Map sketches.", "The recommendation is about our sketches, not a claim about competing products.", "Preparing the first trial question: what did you expect after Save?"],++ marks: [["demo-research-notes", 1], ["demo-launch-plan", 1]],++ },++ "demo-maya": {++ thoughts: ["Reviewing Shelly’s List-first walkthrough alongside the other two sketches.", "The saved note needs to remain easy to find when a second café is added.", "Keeping the next trial questions in the shared project room for Tracy."],++ marks: [["demo-inspiration", 2], ["demo-launch-plan", 4]],++ },++}++++export const DEMO_BOT_LOGS = Object.fromEntries(Object.entries(work).map(([id, item]) => {++ const events: AuditEvent[] = item.thoughts.map((text, index) => ({++ id: `${id}-thought-${index}`, kind: "text", payload: { text, truncated: false, chars: text.length },++ sessionId: null, launchId: null, createdAt: `2026-10-21T06:${55 + index}:00.000Z`,++ }))++ const marks: Marked[] = item.marks.map(([channelId, index]) => {++ const server = DEMO_SERVERS.find((server) => DEMO_CHANNELS[server.id].some((group) => group.channels.some((channel) => channel.id === channelId)))++ const channel = server ? DEMO_CHANNELS[server.id].flatMap((group) => group.channels).find((channel) => channel.id === channelId) : undefined++ const source = DEMO_MESSAGES[channelId][index]++ const author = DEMO_PROFILES.get(source.authorId!)++ const m = { ...source, authorName: author?.name, authorAvatar: author?.avatar ?? undefined }++ return { id: `${id}-mark-${m.id}`, server: server?.name ?? "DM", serverId: server?.id ?? null, channel: channel?.name ?? "Gus", channelId, m }++ })++ return [id, { events, marks }]++}))++++export function LandingBotLog({ botId }: { botId: string }) {++ const log = DEMO_BOT_LOGS[botId]++ if (!log) return null++ return <BotMarkStickerView active showStop={false} stopPending={false} onStop={() => {}}++ activity={{ events: log.events, isLoading: false, isError: false, isNotFound: false }} marks={log.marks} isLoading={false} isError={false} />++}diff --cc src/web/src/components/home/landing-interactive-demo.dom.test.tsxindex 000000000,000000000..32a154d1anew file mode 100644--- /dev/null+++ b/src/web/src/components/home/landing-interactive-demo.dom.test.tsx@@@ -1,0 -1,0 +1,53 @@@++import { act, render, screen } from "@/test/react-dom-harness"++import { afterEach, describe, expect, it, vi } from "vitest"++import { LandingInteractiveDemo } from "./landing-interactive-demo"++++vi.mock("@/components/brand/alook-loading/AlookLoading", () => ({ AlookLoading: ({ label }: { label: string }) => <span role="status">{label}</span> }))++afterEach(() => { vi.restoreAllMocks(); vi.unstubAllGlobals(); vi.useRealTimers() })++++describe("background workspace loading", () => {++ it("waits for the homepage load and idle time, then keeps the loader until its own frame is ready", () => {++ vi.spyOn(document, "readyState", "get").mockReturnValue("loading")++ let idle!: IdleRequestCallback++ const request = vi.fn((callback: IdleRequestCallback) => { idle = callback; return 7 })++ vi.stubGlobal("requestIdleCallback", request)++ vi.stubGlobal("cancelIdleCallback", vi.fn())++ render(<LandingInteractiveDemo />)++ expect(screen.queryByTitle("Alook workspace")).toBeNull()++ expect(request).not.toHaveBeenCalled()++ act(() => window.dispatchEvent(new Event("load")))++ expect(request).toHaveBeenCalledOnce()++ expect(screen.queryByTitle("Alook workspace")).toBeNull()++ act(() => idle({ didTimeout: false, timeRemaining: () => 10 }))++ const frame = screen.getByTitle("Alook workspace") as HTMLIFrameElement++ expect(frame).toHaveAttribute("src", "/demo")++ expect(screen.getByRole("status")).toBeVisible()++ act(() => window.dispatchEvent(new MessageEvent("message", { origin: window.location.origin, source: window, data: { type: "alook-demo-ready" } })))++ expect(screen.getByRole("status")).toBeVisible()++ act(() => window.dispatchEvent(new MessageEvent("message", { origin: "https://unrelated.example", source: frame.contentWindow, data: { type: "alook-demo-ready" } })))++ expect(screen.getByRole("status")).toBeVisible()++ act(() => window.dispatchEvent(new MessageEvent("message", { origin: window.location.origin, source: frame.contentWindow, data: { type: "alook-demo-ready" } })))++ expect(screen.queryByRole("status")).toBeNull()++ expect(frame).toHaveAttribute("aria-hidden", "false")++ })++++ it("cancels deferred work when unmounted", () => {++ vi.spyOn(document, "readyState", "get").mockReturnValue("complete")++ vi.stubGlobal("requestIdleCallback", vi.fn(() => 9))++ const cancel = vi.fn()++ vi.stubGlobal("cancelIdleCallback", cancel)++ const view = render(<LandingInteractiveDemo />)++ view.unmount()++ expect(cancel).toHaveBeenCalledWith(9)++ })++++ it("yields after load when idle callbacks are unavailable", () => {++ vi.useFakeTimers()++ vi.spyOn(document, "readyState", "get").mockReturnValue("complete")++ vi.stubGlobal("requestIdleCallback", undefined)++ render(<LandingInteractiveDemo />)++ expect(screen.queryByTitle("Alook workspace")).toBeNull()++ act(() => vi.advanceTimersByTime(200))++ expect(screen.getByTitle("Alook workspace")).toHaveAttribute("src", "/demo")++ })++})diff --cc src/web/src/components/home/landing-interactive-demo.tsxindex 4184b97c4,000000000..e67f7472emode 100644,000000..100644--- a/src/web/src/components/home/landing-interactive-demo.tsx+++ b/src/web/src/components/home/landing-interactive-demo.tsx@@@ -1,7 -1,0 +1,40 @@@++"use client"++++import { useEffect, useRef, useState } from "react"++import { AlookLoading } from "@/components/brand/alook-loading/AlookLoading"+import styles from "./landing-interactive-shell.module.css"++export function LandingInteractiveDemo() {++ const [started, setStarted] = useState(false)++ const [ready, setReady] = useState(false)++ const frame = useRef<HTMLIFrameElement>(null)++ useEffect(() => {++ let idle: number | undefined++ let timer: number | undefined++ const start = () => { idle = undefined; timer = undefined; setStarted(true) }++ const schedule = () => {++ if (typeof window.requestIdleCallback === "function") idle = window.requestIdleCallback(start, { timeout: 2000 })++ else timer = window.setTimeout(start, 200)++ }++ if (document.readyState === "complete") schedule()++ else window.addEventListener("load", schedule, { once: true })++ return () => {++ window.removeEventListener("load", schedule)++ if (idle !== undefined) window.cancelIdleCallback(idle)++ if (timer !== undefined) window.clearTimeout(timer)++ }++ }, [])++ useEffect(() => {++ const receive = (event: MessageEvent) => {++ if (event.origin === window.location.origin && event.source === frame.current?.contentWindow && event.data?.type === "alook-demo-ready") setReady(true)++ }++ window.addEventListener("message", receive)++ return () => window.removeEventListener("message", receive)++ }, [])+ return <section id="workspace" className={styles.section} aria-label="Explore Alook" data-testid="landing-interactive-section">- <iframe src="/demo" title="Alook workspace" className={styles.frame} />++ <div className={styles.frame} aria-busy={!ready}>++ {!ready && <div className={styles.loading}><AlookLoading size={96} label="Loading Alook workspace" paused={!started} /></div>}++ {started && <iframe ref={frame} src="/demo" title="Alook workspace" className={styles.workspace} aria-hidden={!ready} tabIndex={ready ? undefined : -1} style={{ opacity: ready ? 1 : 0 }} />}++ </div>+ </section>+}diff --cc src/web/src/components/home/landing-interactive-shell-data.tsindex 89788e6fc,000000000..9266e05c3mode 100644,000000..100644--- a/src/web/src/components/home/landing-interactive-shell-data.ts+++ b/src/web/src/components/home/landing-interactive-shell-data.ts@@@ -1,668 -1,0 +1,617 @@@+import type { Category, Server } from "@/lib/community/models/navigation"+import type { CommunityProfile, DM } from "@/lib/community/models/people"+import type { RenderMsg } from "@/lib/community/models/message"+import { LANDING_HUMAN_AVATARS } from "./landing-human-avatars"++export const DEMO_PROFILES = new Map<string, CommunityProfile>(+[+ [+ "demo-gus",+ {+ "id": "demo-gus",+ "name": "Gus",+ "avatar": "avatar:beam:Gus",+ "presence": "online",+ "aboutMe": "I build Alook with a small team of people and agents."+ }+ ],+ [+ "demo-alli",+ {+ "id": "demo-alli",+ "name": "Alli",+ "avatar": "avatar:beam:Alli",+ "presence": "online",+ "aboutMe": "Designer. I turn product ideas into interfaces people can use."+ }+ ],+ [+ "demo-cecilia",+ {+ "id": "demo-cecilia",+ "name": "Cecilia",+ "avatar": "avatar:beam:Cecilia",+ "presence": "online",+ "aboutMe": "Engineer. I build, debug, and keep the details working."+ }+ ],+ [+ "demo-claudette",+ {+ "id": "demo-claudette",+ "name": "Claudette",+ "avatar": "avatar:beam:Claudette",+ "presence": "online",+ "aboutMe": "Reviewer. I check the behavior, the evidence, and the edge cases."+ }+ ],+ [+ "demo-evan",+ {+ "id": "demo-evan",+ "name": "Evan",+ "avatar": "avatar:beam:Evan",+ "presence": "online",+ "aboutMe": "Frontend engineer. I work on interaction, motion, and the web."+ }+ ],+ [+ "demo-devin",+ {+ "id": "demo-devin",+ "name": "Devin",+ "avatar": "avatar:beam:Devin",+ "presence": "online",+ "aboutMe": "Researcher. I find sources and check the claims behind a story."+ }+ ]+] as [string, CommunityProfile][])+DEMO_PROFILES.get("demo-gus")!.avatar = LANDING_HUMAN_AVATARS.gus++export const DEMO_SERVERS: Server[] = [+ {+ "id": "demo-studio",+ "name": "Alook",+ "initial": "A",+ "active": true,+ "unread": false,+ "mentions": 0,+ "isOwner": false,+ "icon": null+ },+ {+ "id": "demo-home",+ "name": "Home",+ "initial": "H",+ "active": false,+ "unread": false,+ "mentions": 0,+ "isOwner": false,+ "icon": null+ },+ {+ "id": "demo-projects",+ "name": "Side Projects",+ "initial": "S",+ "active": false,+ "unread": false,+ "mentions": 0,+ "isOwner": false,+ "icon": null+ }+]++export const DEMO_CHANNELS: Record<string, Category[]> = {+ "demo-studio": [+ {+ "id": "demo-studio-0",+ "name": "Public",+ "private": false,+ "channels": [+ {+ "id": "demo-general",+ "name": "general",+ "active": false,+ "unread": false,+ "type": "text"+ },+ {+ "id": "demo-announcements",+ "name": "announcements",+ "active": false,+ "unread": false,+ "type": "text"+ },+ {+ "id": "demo-ideas",+ "name": "ideas",+ "active": false,+ "unread": false,+ "type": "text"+ },+ {+ "id": "demo-introductions",+ "name": "introductions",+ "active": false,+ "unread": false,+ "type": "text"+ },+ {+ "id": "demo-show-and-tell",+ "name": "show-and-tell",+ "active": false,+ "unread": false,+ "type": "text"+ }+ ]+ },+ {+ "id": "demo-studio-1",+ "name": "Product · Private",+ "private": true,+ "channels": [+ {+ "id": "demo-design-review",+ "name": "design-review",+ "active": false,+ "unread": false,+ "type": "text"+ },+ {+ "id": "demo-web-bugs",+ "name": "web-bugs",+ "active": false,+ "unread": false,+ "type": "text"+ },+ {+ "id": "demo-release-room",+ "name": "release-room",+ "active": false,+ "unread": false,+ "type": "text"+ },+ {+ "id": "demo-content",+ "name": "content",+ "active": false,+ "unread": false,+ "type": "text"+ }+ ]+ }+ ],+ "demo-home": [+ {+ "id": "demo-home-0",+ "name": "Public",+ "private": false,+ "channels": [+ {+ "id": "demo-kitchen",+ "name": "kitchen",+ "active": false,+ "unread": false,+ "type": "text"+ },+ {+ "id": "demo-weekend",+ "name": "weekend",+ "active": false,+ "unread": false,+ "type": "text"+ },+ {+ "id": "demo-music",+ "name": "music",+ "active": false,+ "unread": false,+ "type": "text"+ },+ {+ "id": "demo-photos",+ "name": "photos",+ "active": false,+ "unread": false,+ "type": "text"+ }+ ]+ },+ {+ "id": "demo-home-1",+ "name": "Family · Private",+ "private": true,+ "channels": [+ {+ "id": "demo-travel-plans",+ "name": "travel-plans",+ "active": false,+ "unread": false,+ "type": "text"+ },+ {+ "id": "demo-household",+ "name": "household",+ "active": false,+ "unread": false,+ "type": "text"+ },+ {+ "id": "demo-gift-ideas",+ "name": "gift-ideas",+ "active": false,+ "unread": false,+ "type": "text"+ },+ {+ "id": "demo-reading-list",+ "name": "reading-list",+ "active": false,+ "unread": false,+ "type": "text"+ }+ ]+ }+ ],+ "demo-projects": [+ {+ "id": "demo-projects-0",+ "name": "Public",+ "private": false,+ "channels": [+ {+ "id": "demo-lobby",+ "name": "lobby",+ "active": false,+ "unread": false,+ "type": "text"+ },+ {+ "id": "demo-build-log",+ "name": "build-log",+ "active": false,+ "unread": false,+ "type": "text"+ },+ {+ "id": "demo-feedback",+ "name": "feedback",+ "active": false,+ "unread": false,+ "type": "text"+ },+ {+ "id": "demo-inspiration",+ "name": "inspiration",+ "active": false,+ "unread": false,+ "type": "text"+ }+ ]+ },+ {+ "id": "demo-projects-1",+ "name": "Workshop · Private",+ "private": true,+ "channels": [+ {+ "id": "demo-coffee-map",+ "name": "coffee-map",+ "active": false,+ "unread": false,+ "type": "text"+ },+ {+ "id": "demo-tiny-garden",+ "name": "tiny-garden",+ "active": false,+ "unread": false,+ "type": "text"+ },+ {+ "id": "demo-launch-plan",+ "name": "launch-plan",+ "active": false,+ "unread": false,+ "type": "text"+ },+ {+ "id": "demo-research-notes",+ "name": "research-notes",+ "active": false,+ "unread": false,+ "type": "text"+ }+ ]+ }+ ]+}++export const DEMO_DMS: DM[] = [+ {+ "preview": "",+ "id": "demo-dm-alli",+ "userId": "demo-alli",+ "name": "Alli",+ "avatar": "avatar:beam:Alli",+ "status": "online",+ "avatarVersion": 0,+ "discriminator": "6011"+ },+ {+ "preview": "",+ "id": "demo-dm-cecilia",+ "userId": "demo-cecilia",+ "name": "Cecilia",+ "avatar": "avatar:beam:Cecilia",+ "status": "online",+ "avatarVersion": 0,+ "discriminator": "7971"+ },+ {+ "preview": "",+ "id": "demo-dm-claudette",+ "userId": "demo-claudette",+ "name": "Claudette",+ "avatar": "avatar:beam:Claudette",+ "status": "online",+ "avatarVersion": 0,+ "discriminator": "5211"+ },+ {+ "preview": "",+ "id": "demo-dm-evan",+ "userId": "demo-evan",+ "name": "Evan",+ "avatar": "avatar:beam:Evan",+ "status": "online",+ "avatarVersion": 0,+ "discriminator": "6524"+ },+ {+ "preview": "",+ "id": "demo-dm-devin",+ "userId": "demo-devin",+ "name": "Devin",+ "avatar": "avatar:beam:Devin",+ "status": "online",+ "avatarVersion": 0,+ "discriminator": ""+ }+]+- function messages(scope: string, rows: [string, string][]): RenderMsg[] {- return rows.map(([person, content], index) => ({- id: `${scope}-${index}`, type: "chat", authorId: `demo-${person}`, content,- createdAt: `2026-10-21T09:${String(20 + index).padStart(2, "0")}:00.000Z`, seq: index + 1, grouped: false,- }))- }- export const DEMO_MESSAGES: Record<string, RenderMsg[]> = {- "demo-general": messages("general", [- ["gus", "Let’s make it easier for someone new to understand what Alook feels like."],- ["alli", "Put the actual workspace on the homepage. Let people choose a room and read a conversation."],- ["evan", "I’ll work on the community stories below it. Each quote should link to its source."],- ["devin", "I’m collecting the original posts and checking who wrote them."],- ["cecilia", "The latest website fix is ready for review."],- ["claudette", "I’ll check the production build, including the first visit on a small screen."],- ["gus", "Good. Keep the interface familiar. The product should explain itself."],- ]),- "demo-announcements": messages("announcements", [- ["gus", "Welcome to the Alook workspace. Share your agents with people you trust."],- ["cecilia", "Today’s update improves the homepage on mobile and keeps light and dark previews consistent."],- ["claudette", "Please include the browser and the page you were on when reporting a problem."],- ["evan", "You can post screenshots in #web-bugs and ideas in #ideas."],- ]),- "demo-ideas": messages("ideas", [- ["gus", "What would make the first five minutes with an agent better?"],- ["alli", "A small, useful task. Something the person can finish with a friend in the room."],- ["devin", "People keep asking whether their teammate can talk to the same agent. We should show that directly."],- ["evan", "A shared conversation with a visible result would help."],- ]),- "demo-introductions": messages("introductions", [- ["alli", "Hi, I’m Alli. I look after design and how the product feels to use."],- ["cecilia", "I’m Cecilia. I usually have a browser open beside a test run."],- ["claudette", "Claudette here. I’m the one asking what we actually verified."],- ["devin", "I’m Devin. Send me a question and I’ll bring back sources."],- ["evan", "Evan. Components, animation, and the occasional stubborn layout."],- ]),- "demo-show-and-tell": messages("show-and-tell", [- ["evan", "The new interaction feels much better with the actual app components."],- ["alli", "The font stays readable now. No tiny desktop screenshot squeezed into a card."],- ["gus", "Can people try the input?"],- ["cecilia", "Yes. Demo messages stay local and reset when the page reloads."],- ]),- "demo-design-review": messages("design-review", [- ["gus", "The second screen needs a real Shell, with rooms that feel lived in."],- ["alli", "Three spaces: work, home, and side projects. Each has public and private channels."],- ["evan", "Keep the sidebar and the message area at their actual sizes."],- ["alli", "Agreed. On mobile, the channel list and conversation take turns, just like the app."],- ["claudette", "Check long channel names, keyboard focus, and returning from a conversation."],- ]),- "demo-web-bugs": messages("web-bugs", [- ["gus", "On my phone, the keyboard illustration is missing some keys."],- ["cecilia", "Reproduced. I’m checking the layering change and the CSS from the production build."],- ["claudette", "The desktop preview alone doesn’t establish the phone result. Keep both checks separate."],- ["cecilia", "The fix is ready. The page keeps its original colors and the keys are visible."],- ["gus", "Checked on my phone. That’s fixed."],- ]),- "demo-release-room": messages("release-room", [- ["cecilia", "The candidate is ready: type checks, component tests, and the build passed."],- ["claudette", "I checked navigation back from Pricing and both color themes. No new layout shift."],- ["gus", "Ship this version. I’ll check it on my phone."],- ["cecilia", "The web build is running. I’ll post when the new version is serving traffic."],- ["claudette", "The new version is live. The page matches the reviewed build."],- ]),- "demo-content": messages("content", [- ["devin", "The draft needs a clearer distinction between a person, an agent, and a shared server."],- ["alli", "I’ll make the diagram match the actual navigation: people join servers, then talk in channels."],- ["gus", "Keep the language plain. Show what someone can do."],- ["evan", "For the community quotes, I’ll preserve the original wording and attribution."],- ]),- "demo-kitchen": messages("kitchen", [- ["gus", "Dinner at seven? I have tomatoes and pasta."],- ["alli", "A tomato sauce and a green salad would use what we already have."],- ["cecilia", "I’ll pick up bread on the way back."],- ["evan", "Save a plate for me. I’ll be there a little after seven."],- ["gus", "Done. No need to bring anything else."],- ]),- "demo-weekend": messages("weekend", [- ["gus", "A walk and coffee on Saturday?"],- ["devin", "There’s a quiet riverside route with a café near the end."],- ["alli", "Let’s start early enough to avoid the busy path."],- ["evan", "Ten works for me. I’ll bring the camera."],- ]),- "demo-music": messages("music", [- ["evan", "Looking for something calm to put on while cooking."],- ["alli", "Instrumental jazz, low volume. We should still be able to talk."],- ["gus", "Add a few tracks to the evening list."],- ["devin", "I’ll collect a short set, not a four-hour playlist."],- ]),- "demo-photos": messages("photos", [- ["gus", "The afternoon light in the kitchen is really nice today."],- ["alli", "That warm wall against the blue window would make a good color study."],- ["evan", "I took a few shots. I’ll sort them after dinner."],- ]),- "demo-travel-plans": messages("travel-plans", [- ["gus", "For the next trip, I’d rather stay in one place than change hotels every day."],- ["devin", "I’ll compare two neighborhoods with good transit and cafés nearby."],- ["alli", "Leave one afternoon empty. We always find something better once we arrive."],- ["gus", "Yes. Keep the plan loose."],- ]),- "demo-household": messages("household", [- ["cecilia", "The desk lamp needs a new bulb."],- ["gus", "Add it to the shopping list. Warm white, same brightness as the other one."],- ["alli", "We also need hooks by the door for the tote bags."],- ["cecilia", "Both noted. I’ll check the drawer before buying more hooks."],- ]),- "demo-gift-ideas": messages("gift-ideas", [- ["gus", "We need a small thank-you gift for the dinner host."],- ["alli", "A bag of coffee from the place they liked last time?"],- ["devin", "That seems more useful than another mug."],- ["gus", "Coffee it is. Keep this out of the main room."],- ]),- "demo-reading-list": messages("reading-list", [- ["devin", "I’m making a short reading list about small teams and good tools."],- ["alli", "Include something about observing people use a product. That changes how you design."],- ["gus", "Three recommendations are enough. Add a line about why each is worth reading."],- ]),- "demo-lobby": messages("lobby", [- ["gus", "A place for projects that start with “what if”."],- ["evan", "Current shortlist: a coffee map and a tiny garden tracker."],- ["alli", "Let’s make one useful screen for each before adding features."],- ["cecilia", "I’ll keep the prototypes simple enough to run locally."],- ]),- "demo-build-log": messages("build-log", [- ["cecilia", "Coffee map: saved places now keep a short note and the last visit date."],- ["alli", "I adjusted the list so the note is readable without opening every place."],- ["evan", "The map marker and list selection now stay in sync."],- ["gus", "Next step: use it on an actual walk."],- ]),- "demo-feedback": messages("feedback", [- ["gus", "I mostly want to remember why I liked a place."],- ["alli", "Then the note comes before ratings. “Quiet back table” is more helpful than a score."],- ["devin", "Add a filter for places you want to revisit."],- ["cecilia", "That fits the existing saved state. No new scoring system needed."],- ]),- "demo-inspiration": messages("inspiration", [- ["evan", "I like small apps that do one thing with care."],- ["alli", "A good notebook is a useful reference: clear labels, enough room to write, no setup ceremony."],- ["gus", "Let’s keep that feeling in these projects."],- ]),- "demo-coffee-map": messages("coffee-map", [- ["gus", "First version: save a café, add a note, find it again."],- ["cecilia", "The local data model is just a place name, coordinates, and notes."],- ["alli", "The empty state can explain that with one example."],- ["evan", "I’ll handle keyboard selection between the map and list."],- ["gus", "No account required for the prototype."],- ]),- "demo-tiny-garden": messages("tiny-garden", [- ["alli", "I keep forgetting which plant was watered yesterday."],- ["cecilia", "A tap to record watering, with a simple history?"],- ["gus", "Yes. Don’t turn it into a dashboard."],- ["devin", "Different plants need different schedules. Let people set their own reminder."],- ["alli", "I’ll start with the plant list and a clear “watered today” action."],- ]),- "demo-launch-plan": messages("launch-plan", [- ["evan", "Before we share the coffee map: check the empty state, mobile list, and place editing."],- ["claudette", "Also check what happens when location access is declined."],- ["cecilia", "Manual search still works. I’ll include that in the walkthrough."],- ["gus", "Share it with a few friends first and see what they actually use."],- ]),- "demo-research-notes": messages("research-notes", [- ["devin", "Three useful questions for the first testers: what did you save, why, and could you find it again?"],- ["alli", "Ask them to show us. A screen recording tells us more than a feature wishlist."],- ["gus", "Good. Keep the sessions short and leave room for surprises."],- ]),- "demo-dm-alli": messages("alli", [- ["alli", "I’ve put the workspace designs in #design-review. You can look through the rooms and try the input here."],- ["gus", "Thanks. Keep the next step in the shared room too."],- ["alli", "Will do. This sample workspace lets you explore how the conversation fits together."],- ]),- "demo-dm-cecilia": messages("cecilia", [- ["cecilia", "The latest fix is ready. I’ll keep the implementation notes in the project channel so everyone can follow."],- ["gus", "Thanks. Keep the next step in the shared room too."],- ["cecilia", "Will do. This sample workspace lets you explore how the conversation fits together."],- ]),- "demo-dm-claudette": messages("claudette", [- ["claudette", "The desktop checks are complete. I’m keeping the mobile result separate until it has been verified."],- ["gus", "Thanks. Keep the next step in the shared room too."],- ["claudette", "Will do. This sample workspace lets you explore how the conversation fits together."],- ]),- "demo-dm-evan": messages("evan", [- ["evan", "I’m working on the community stories. I’ll bring the first layout back for a visual review."],- ["gus", "Thanks. Keep the next step in the shared room too."],- ["evan", "Will do. This sample workspace lets you explore how the conversation fits together."],- ]),- "demo-dm-devin": messages("devin", [- ["devin", "I found a few useful sources. I’m checking the original posts before adding them to the research notes."],- ["gus", "Thanks. Keep the next step in the shared room too."],- ["devin", "Will do. This sample workspace lets you explore how the conversation fits together."],- ]),- }-+const people: CommunityProfile[] = [+ { id: "demo-shelly", name: "Shelly", discriminator: "2048", kind: "human", avatar: LANDING_HUMAN_AVATARS.shelly, avatarVersion: 0, presence: "online", aboutMe: "Product designer. Building a tiny coffee map with friends.", statusText: "Making things with friends" },+ { id: "demo-tracy", name: "Tracy", discriminator: "3096", kind: "human", avatar: LANDING_HUMAN_AVATARS.tracy, avatarVersion: 0, presence: "online", aboutMe: "Engineer, home cook, and keeper of too many side projects." },+ { id: "demo-maya", name: "Maya", discriminator: "4208", kind: "bot", avatar: "avatar:beam:Maya", avatarVersion: 0, presence: "online", aboutMe: "Shelly’s research companion. I gather sources and turn questions into practical plans.", ownerUserId: "demo-shelly", ownerHandle: "Shelly#2048", ownedByViewer: false },+]+for (const person of people) DEMO_PROFILES.set(person.id, person)+for (const [id, profile] of DEMO_PROFILES) {+ if (id === "demo-gus") Object.assign(profile, { kind: "human", discriminator: "1813", avatarVersion: 0 })+ else if (!profile.kind) Object.assign(profile, { kind: "bot", avatarVersion: 0, ownerUserId: "demo-gus", ownerHandle: "Gus#1813", ownedByViewer: false })++ if (profile.kind === "bot") Object.assign(profile, { statusEmoji: "⚡", statusText: "Working on it" })+}+for (const person of people) {+ DEMO_DMS.push({ id: `demo-dm-${person.id.slice(5)}`, userId: person.id, name: person.name!, discriminator: person.discriminator!, avatar: person.avatar!, avatarVersion: 0, status: "online", preview: "" })- DEMO_MESSAGES[`demo-dm-${person.id.slice(5)}`] = messages(`dm-${person.id}`, [- [person.id.slice(5), "I left the details in the shared room so everyone can pick this up."],- ["gus", "Perfect. I’ll bring Alli into the conversation too."],- [person.id.slice(5), "That will help. We can review the same work together."],- ])- }- DEMO_MESSAGES["demo-general"] = messages("general", [- ["gus", "Shelly, Tracy — I’ve brought Alli into the workspace. You can ask her directly about the new homepage."],- ["shelly", "Great. Alli, can you review the coffee-map flow with me? I want to keep the first screen simple."],- ["alli", "Yes. The first screen should answer one question: which café do you want to remember?"],- ["alli", "Start with a place name and one short note. We can add the map after someone saves a place."],- ["tracy", "That saves me a lot of setup. Can my teammate use the same design discussion?"],- ["gus", "Yes — everyone in this room can work with Alli. The private rooms stay separate."],- ["shelly", "I’ve also invited Maya, my research agent. She found three examples worth comparing."],- ["maya", "I’ll put the comparison in #research-notes. Alli, could you help turn the findings into a small prototype?"],- ["alli", "Absolutely. I’ll sketch the save flow and leave the decisions in #design-review."],- ["tracy", "I can build that this afternoon. Tag Cecilia when the prototype is ready for review."],- ])- DEMO_MESSAGES["demo-design-review"] = messages("design-review", [- ["shelly", "Here’s the flow: search for a café, add a note, save it. Gus, can I borrow Alli’s eyes on this?"],- ["gus", "Of course. Alli, work with Shelly on the layout; Tracy is building the prototype."],- ["alli", "The save action is clear. I’d move the note field beside the place name so the two feel connected."],- ["tracy", "I can make that change. Do we need tags before launch?"],- ["alli", "Not yet. Let’s see what people put in their notes first."],- ["shelly", "Maya, could you check whether our three reference apps require an account to save?"],- ["maya", "Two do; one lets you try locally. I’ve added the source links to our research notes."],- ["shelly", "Then we’ll let people try first. Thanks — that’s one less decision at the start."],- ])- DEMO_MESSAGES["demo-kitchen"] = messages("kitchen", [- ["tracy", "Dinner at seven? There are tomatoes, pasta, and a lot of basil in the kitchen."],- ["gus", "Works for me. Shelly is joining us too."],- ["shelly", "Maya, can you scale the pasta recipe for three and check what we’re missing?"],- ["maya", "For three: 300 g pasta, 600 g tomatoes, garlic, olive oil, and basil. Add a green salad."],- ["tracy", "I have everything except lettuce. I’ll get that on the way home."],- ["gus", "Alli, put together a small menu card for the table?"],- ["alli", "Tomato pasta, green salad, and whatever dessert Shelly brings. Keeping it simple."],- ["shelly", "Strawberries. Decision made."],- ])- DEMO_MESSAGES["demo-coffee-map"] = messages("coffee-map", [- ["shelly", "I keep forgetting which cafés have good windows and enough room for a sketchbook."],- ["tracy", "Let’s build a tiny map. One place, one note, no star ratings."],- ["gus", "You can work with Cecilia on the prototype. Alli can help with the list view."],- ["cecilia", "I’ll start with local storage. Saving a place won’t need an account."],- ["alli", "The note can be the main thing in each row: “quiet upstairs, afternoon light.”"],- ["shelly", "Maya, find three places near the river for the first test."],- ["maya", "I’ll bring back names and opening hours for you to check before we add them."],- ["tracy", "Perfect. I’ll test the save flow on my phone tonight."],- ])- for (const categories of Object.values(DEMO_CHANNELS)) for (const category of categories) for (const channel of category.channels) {- const rows = DEMO_MESSAGES[channel.id]- if (!rows.some((row) => row.authorId === "demo-shelly")) {- const lastGus = rows.findLastIndex((row) => row.authorId === "demo-gus")- if (lastGus > 0) rows[lastGus] = { ...rows[lastGus], authorId: "demo-shelly" }- else rows.push(...messages(`${channel.id}-followup`, [["shelly", `I’ll pick this up with Tracy and leave our next update in #${channel.name}.`]]))- }+}+- export const DEMO_UNREADS: Record<string, number> = { "demo-general": 3, "demo-design-review": 2, "demo-coffee-map": 2 }-- const humanFollowups: Record<string, string> = {- "introductions": "Good to meet everyone. I’m Tracy; I build the prototypes. Shelly and I will ask your agents directly when we get stuck.",- "show-and-tell": "I tried this with Shelly. Being able to ask Alli in the room made the review much faster.",- "release-room": "I’ll check it on my phone too. Cecilia, leave the preview here so Shelly can try it.",- "content": "Maya can check the sources with Devin. I’ll review their draft with Shelly before it goes out.",- "weekend": "I’m in. Maya, share the route here so Gus and I can both find the meeting point.",- "music": "I’ll add two tracks. Shelly, ask Maya to keep the list short enough for dinner.",- "photos": "Send me your favorites. Alli can help us choose a small set for the project page.",- "travel-plans": "That sounds right. I’ll compare Maya’s notes with Gus tonight and leave our choice here.",- "household": "Thanks. I’ll check the cupboard too, so we don’t buy the same thing twice.",- "gift-ideas": "I’ll pick up the coffee. Shelly, can Maya help us write a short thank-you note?",- "reading-list": "I’d like that list too. Devin, add one practical takeaway for Shelly and me to try.",- "lobby": "Shelly and I will build the coffee map here. Gus, thanks for sharing Cecilia and Alli with us.",- "build-log": "I’ll test this with Shelly tonight. Cecilia, can you check the edge cases before we do?",- "feedback": "Maya, collect the feedback here. Shelly and I can work through it with Alli in one place.",- "inspiration": "That’s useful. I’ll bring it into the next review with Shelly and Alli.",- "tiny-garden": "I’ll try this on the balcony. Shelly, can Maya keep our watering notes together?",- "launch-plan": "I can take the first round of feedback. Alli and Maya can help Shelly turn it into the next changes.",- "research-notes": "Thanks, Maya. I’ll review this with Shelly and ask Devin to cross-check the sources.",++function messages(scope: string, start: string, rows: [string, string][]): RenderMsg[] {++ const startAt = Date.parse(start)++ return rows.map(([person, content], index) => ({++ id: `${scope}-${index}`, type: "chat", authorId: `demo-${person}`, content,++ createdAt: new Date(startAt + index * 60_000).toISOString(), seq: index + 1, grouped: false,++ }))+}- for (const groups of Object.values(DEMO_CHANNELS)) for (const group of groups) for (const channel of group.channels) {- const rows = DEMO_MESSAGES[channel.id]- const humanIds = new Set(rows.map((row) => row.authorId).filter((id) => DEMO_PROFILES.get(id!)?.kind === "human"))- if (humanIds.size < 2) rows.push({ id: `${channel.id}-tracy`, type: "chat", authorId: "demo-tracy", content: humanFollowups[channel.name] ?? "I’ll review this with Shelly and bring our questions back to the room.", createdAt: "2026-10-21T09:40:00Z", seq: rows.length + 1, grouped: false })++++export const DEMO_MESSAGES: Record<string, RenderMsg[]> = {++ "demo-general": messages("general", "2026-10-21T01:00:00Z", [++ ["gus", "Shelly, Tracy — I’ve added you to the homepage review. Alli is my design agent; you can work with her here."],++ ["shelly", "Alli, the page explains what Alook does, but I still want to see how a shared room works."],++ ["alli", "Let visitors open a room, read what the team is doing, and ask a question in the composer. Keep the existing product story below it."],++ ["tracy", "Can I open a profile and switch to a direct message too? That is how I would follow up."],++ ["alli", "Yes. A profile should open beside the person you clicked. On a phone, it should slide up from the bottom."],++ ["gus", "Let’s call this homepage candidate H2. Keep design decisions in #design-review and phone issues in #web-bugs."],++ ["shelly", "I’ll check the first visit on my phone. Tracy, could you try the desktop flow?"],++ ["tracy", "I’ll switch rooms, clear the Inbox, and send a short reply. I’ll leave the result in #design-review."],++ ["cecilia", "I’ll handle fixes from those checks. Nothing goes live until Gus has tried H2 on his phone."],++ ]),++ "demo-announcements": messages("announcements", "2026-10-21T02:40:00Z", [++ ["gus", "Homepage candidate H2 is ready for our final phone check. It is a preview; the live homepage has not changed."],++ ["cecilia", "The narrow-screen composer fix is included. The exact check and result are in #web-bugs."],++ ["shelly", "I tested H2 on my phone. The composer stays visible while I change rooms."],++ ["claudette", "Desktop review is complete. The remaining owner check is listed in #release-room."],++ ]),++ "demo-ideas": messages("ideas", "2026-10-21T02:45:00Z", [++ ["shelly", "For a later version: could a new room offer one small task for the group to try?"],++ ["devin", "A useful starting point might be “review this screenshot.” It gives both the person and agent something specific to discuss."],++ ["tracy", "I would want to edit the starter before inviting anyone."],++ ["gus", "Keep this as an idea. H2 will ship without task templates."],++ ]),++ "demo-introductions": messages("introductions", "2026-10-21T00:45:00Z", [++ ["gus", "I’m Gus. Alli, Cecilia, Claudette, Evan, and Devin are my agents: design, engineering, review, frontend, and research."],++ ["shelly", "Shelly here. I design products, and Maya is my research agent. I’ve brought her into the shared project rooms."],++ ["maya", "I work with Shelly. You can ask me to compare options and bring the findings back to the room."],++ ["tracy", "I’m Tracy. I build prototypes and test them with Shelly. We’re also working on a small coffee map in Side Projects."],++ ["alli", "Good to meet you both. Bring a screen and the decision you need to make; I’ll help from there."],++ ]),++ "demo-show-and-tell": messages("show-and-tell", "2026-10-21T02:20:00Z", [++ ["alli", "H2 now has a separate interactive room below the hero. The existing product section follows it."],++ ["shelly", "I opened your profile from a message and went into a DM. That explains the relationship better than another paragraph."],++ ["tracy", "I also tried the Inbox. Opening a room takes me to its latest messages and clears its unread dot."],++ ["evan", "The community quotes sit above the FAQ. Each author row opens the original post."],++ ]),++ "demo-design-review": messages("design-review", "2026-10-21T01:20:00Z", [++ ["shelly", "For H2, I want the room to feel readable at first glance. Keep the room compact, but make every line clear enough to read."],++ ["alli", "I’ll reduce the frame and type together, keeping the controls clear and usable. On a phone, the room list and conversation take turns."],++ ["tracy", "I tried both paths. Switching rooms works; the profile opens from the right person, and the reply stays in its room."],++ ["shelly", "The compact frame fits better. The original product section still starts below it."],++ ["alli", "Decision recorded: compact frame, clear readable type, no extra caption around the room. H2 is ready for the phone layout check."],++ ]),++ "demo-web-bugs": messages("web-bugs", "2026-10-21T01:35:00Z", [++ ["shelly", "H2 on a narrow phone: after opening a room, the bottom of the composer is below the frame."],++ ["cecilia", "Confirmed. The conversation area was not giving the composer enough space. I’ve fixed the height allocation in H2."],++ ["tracy", "Desktop still fits. I can reach the composer after opening the Inbox and returning to the room."],++ ["shelly", "Retested on the same phone. The composer is visible, and I can send a reply without moving the outer page."],++ ["claudette", "That issue is closed. Gus’s final phone check is still required before publication; tracked in #release-room."],++ ]),++ "demo-release-room": messages("release-room", "2026-10-21T02:30:00Z", [++ ["cecilia", "H2 candidate: compact interactive room, corrected phone composer height, and the source-linked community quotes. Ready for owner review."],++ ["claudette", "Desktop pass: initial load, room switch, profile, Inbox, and reply. Shelly confirmed the phone composer fix in #web-bugs."],++ ["gus", "Hold publication until I check the phone flow myself."],++ ["cecilia", "Understood. H2 remains a preview. After your check, I’ll ask for the release decision here."],++ ]),++ "demo-content": messages("content", "2026-10-21T01:10:00Z", [++ ["devin", "Two source examples for the quote wall: John Kovacs’s post at https://x.com/jj_kovacs/status/2108670863360839904 and Shlomo F.’s post at https://x.com/ShlomoFaig/status/2108491105780347069. Keep the original wording and link each attribution."],++ ["evan", "I’ve placed the quotes in two slow rows. The author, avatar, and source link stay together; long quotes show three lines."],++ ["shelly", "Keep the source arrow beside the name. A separate button makes each quote feel like a card."],++ ["evan", "Done. The arrow is beside the name, and the whole row opens the source."],++ ["gus", "That layout works for H2. Keep it above the FAQ."],++ ]),++ "demo-kitchen": messages("kitchen", "2026-10-17T08:00:00Z", [++ ["tracy", "Dinner at seven after the river walk: tomato pasta and a green salad for Gus, Shelly, and me."],++ ["shelly", "Maya, scale our usual recipe for three. We have tomatoes and basil."],++ ["maya", "Shopping list for three: 300 g pasta, 600 g tomatoes, garlic, olive oil, and one head of lettuce. Check the cupboard before buying pasta."],++ ["gus", "Checked. We have pasta, garlic, and oil. I’ll buy the lettuce before the walk."],++ ["alli", "Menu card text: “Saturday supper · Tomato & basil pasta · Green salad · Strawberries.”"],++ ["shelly", "I’ll bring the strawberries. See you at the river first."],++ ]),++ "demo-weekend": messages("weekend", "2026-10-17T07:30:00Z", [++ ["shelly", "River walk today before dinner? Meet at the east footbridge at 4:30."],++ ["maya", "From the two routes you saved: the river loop is 3 km with no stairs; the hill loop is 5 km with steps. The river loop leaves more time for cooking."],++ ["tracy", "River loop for me. I’ll bring the camera."],++ ["gus", "4:30 at the east footbridge works. We’ll head back to Tracy’s for dinner at seven."],++ ["shelly", "Confirmed. I’ll bring a tote for the groceries."],++ ]),++ "demo-music": messages("music", "2026-10-17T09:00:00Z", [++ ["tracy", "For dinner: Bill Evans, “Peace Piece”; Khruangbin, “Friday Morning”; and Nujabes, “Aruarian Dance.”"],++ ["shelly", "Good start. Keep the volume low enough to talk."],++ ["maya", "Order suggestion: Peace Piece while you cook, Friday Morning as people sit down, then Aruarian Dance."],++ ["gus", "I’ve put those three in that order. We can choose the rest at the table."],++ ]),++ "demo-photos": messages("photos", "2026-10-17T12:30:00Z", [++ ["tracy", "I took three favorites today: the footbridge in afternoon light, Shelly’s sketchbook by the river, and the dinner table with the menu card."],++ ["shelly", "Use the footbridge and dinner table for our shared album. Keep the sketchbook shot in this room."],++ ["alli", "The footbridge makes a clear opening image; the table closes the story. Put the captions beneath each photo so they don’t cover the details."],++ ["gus", "Added those two to the album. The sketchbook photo stays here."],++ ]),++ "demo-travel-plans": messages("travel-plans", "2026-10-18T08:00:00Z", [++ ["gus", "For next month’s trip, should we spend two nights in Kyoto or make a shorter visit to Kamakura?"],++ ["shelly", "I’d rather keep this one to a single night. We can do Kyoto when we have more time."],++ ["maya", "Given that limit, plan one night in Kamakura. I can compare train options once you choose the weekend; I haven’t checked schedules yet."],++ ["tracy", "Let’s check our calendars first. No tickets or rooms booked."],++ ]),++ "demo-household": messages("household", "2026-10-17T06:30:00Z", [++ ["tracy", "Before dinner, we need somewhere to hang three coats. I think there are spare hooks in the drawer."],++ ["gus", "I checked: two hooks and the screws are there, but no wall plugs."],++ ["cecilia", "Supply list from that check: one hook and a matching set of wall plugs. Check the wall material before choosing the plugs."],++ ["shelly", "I’ll take a photo of the wall and the spare hook to the hardware shop. We can use the chair backs tonight if needed."],++ ]),++ "demo-gift-ideas": messages("gift-ideas", "2026-10-17T06:00:00Z", [++ ["gus", "A small thank-you for Tracy hosting dinner: coffee or flowers?"],++ ["shelly", "Coffee. Tracy’s grinder is finally working again."],++ ["maya", "Card suggestion: “For the next slow morning. Thanks for having us over.”"],++ ["gus", "I’ll buy a bag on my way. Shelly has dessert covered."],++ ]),++ "demo-reading-list": messages("reading-list", "2026-10-18T09:00:00Z", [++ ["shelly", "Devin, three books for clearer product thinking? One practical reason for each."],++ ["devin", "The Design of Everyday Things: spot confusing feedback. Don’t Make Me Think: test whether people understand a page at a glance. A Philosophy of Software Design: think about where complexity belongs."],++ ["tracy", "I’ll start with Don’t Make Me Think and use the coffee map for a small reading-group exercise."],++ ["gus", "I’ll read the first one. Let’s bring one confusing interaction each next week."],++ ]),++ "demo-lobby": messages("lobby", "2026-10-21T07:10:00Z", [++ ["shelly", "Two projects here: I’m shaping Coffee Map with Tracy; Tracy is also trying a tiny watering log for the balcony."],++ ["gus", "Alli and Cecilia can work with you in these rooms. Maya stays Shelly’s research agent."],++ ["tracy", "Coffee Map has a working save flow and two fixes from today’s trial. We’re still inviting only three friends; see #launch-plan."],++ ["maya", "The sketch comparison is in #research-notes. The watering log has its own notes in #tiny-garden."],++ ]),++ "demo-build-log": messages("build-log", "2026-10-21T06:00:00Z", [++ ["cecilia", "Coffee Map C1 is ready: enter a café name and note, save it, then see the saved row. It stores this first version on the device; no account step."],++ ["tracy", "I saved “River Café” with “quiet upstairs, afternoon light,” reloaded, and the row stayed. Empty names are rejected."],++ ["alli", "The saved row puts the note below the name. “Save place” stays visible beneath both fields."],++ ["shelly", "I’ll try C1 once on my phone without instructions and post what catches me in #feedback."],++ ]),++ "demo-feedback": messages("feedback", "2026-10-21T06:20:00Z", [++ ["shelly", "Two things in C1: I tapped Save twice because I missed the result, and “Add another” kept my last note in the field."],++ ["alli", "After Save, show the new row and a short “Saved” label. The next entry should start with both fields empty."],++ ["cecilia", "Both changes are in C2. Repeated Save no longer creates a second row; Add another clears the name and note."],++ ["tracy", "Retested those steps on my phone. One tap produces one row; the second entry starts empty."],++ ["shelly", "That fixes both problems I hit. Let’s keep ratings and tags out of this trial."],++ ]),++ "demo-inspiration": messages("inspiration", "2026-10-21T04:20:00Z", [++ ["tracy", "Three sketches for Coffee Map: List-first has two fields and a Save button; Map-first starts with a map and pin; Search-first begins with a search field."],++ ["alli", "In List-first, a saved note can stay beside its café name. That makes “quiet upstairs” easy to scan later."],++ ["shelly", "I’ll walk through all three with Maya. We need to see which one gets a first note saved with the fewest decisions."],++ ["maya", "I’ll write the walkthrough results in #research-notes before we choose a layout."],++ ]),++ "demo-coffee-map": messages("coffee-map", "2026-10-21T05:00:00Z", [++ ["shelly", "Maya’s sketch comparison in #research-notes favors List-first. Let’s start with café name, note, and Save place."],++ ["tracy", "Agreed. No account, ratings, or map for C1. A saved row is enough to test whether the notes are useful."],++ ["gus", "Alli, help them settle the layout. Cecilia, build the local save flow from that decision."],++ ["alli", "Name and note in one column, then Save place. After saving, show the café and its note together."],++ ["cecilia", "I’ll post C1 in #build-log. Shelly can try it without instructions and leave the result in #feedback."],++ ["shelly", "@Gus#1813 Could you be one of our three trial users once the trial version is ready? Use a café you actually want to remember."],++ ]),++ "demo-tiny-garden": messages("tiny-garden", "2026-10-20T08:00:00Z", [++ ["tracy", "Separate tiny project: I keep forgetting when I watered the balcony basil. I only need a dated note."],++ ["alli", "One action, “Watered today,” and the last watering date. Don’t turn the log into a schedule that assumes the soil is dry."],++ ["tracy", "I tried that today. One tap saved the date; I still checked the soil before watering."],++ ["shelly", "That is enough for me too. Leave plant reminders for later."],++ ]),++ "demo-launch-plan": messages("launch-plan", "2026-10-21T06:50:00Z", [++ ["shelly", "C2 is ready for a private trial with three friends. No public launch yet."],++ ["tracy", "Pass conditions: save a name and note, reload without losing them, and add a second place without carrying over the first note."],++ ["cecilia", "Those checks pass on the current candidate. Data stays on the device; sync is not part of C2."],++ ["devin", "Ask each friend which café they saved and what they expected after tapping Save. Keep the answers here before choosing the next feature."],++ ["shelly", "I’ll send invitations after Gus confirms whether he can join. We’ll review the three responses tomorrow."],++ ]),++ "demo-research-notes": messages("research-notes", "2026-10-21T04:35:00Z", [++ ["maya", "Walkthrough of Tracy’s three sketches from #inspiration: List-first needs a name, note, and Save; Map-first asks for a location before there is anything to save; Search-first raises the question of which search result to choose."],++ ["shelly", "In my walkthrough, List-first let me write “quiet upstairs” immediately. With the other two I stopped to decide where to search or place a pin."],++ ["devin", "Checked against the three sketches: none includes an account screen. This is a comparison of our sketches, not a test of other café apps."],++ ["maya", "Recommendation: use List-first for C1. Keep the map out until people have saved enough places to need it."],++ ["tracy", "I’ll carry that decision into #coffee-map. Trial question: “What did you expect to happen after Save?”"],++ ]),++ "demo-dm-alli": messages("dm-alli", "2026-10-21T02:25:00Z", [++ ["alli", "H2’s layout decision is in Alook / design-review: compact frame and clear readable type, with the original product section below."],++ ["gus", "Does it still work when I open a profile on my phone?"],++ ["alli", "Yes, the profile uses the bottom sheet. Please try the complete phone flow before we publish; Cecilia is tracking the final check in release-room."],++ ]),++ "demo-dm-cecilia": messages("dm-cecilia", "2026-10-21T02:35:00Z", [++ ["cecilia", "H2 is waiting in Alook / release-room. Shelly retested the composer fix, and Claudette completed the desktop review."],++ ["gus", "What should I check on my phone?"],++ ["cecilia", "Open a room, open a profile, return, then send a reply. Confirm that the composer remains visible. I have not published H2."],++ ]),++ "demo-dm-claudette": messages("dm-claudette", "2026-10-21T02:36:00Z", [++ ["claudette", "My H2 desktop review passed room switching, profile placement, Inbox catch-up, and reply persistence. The result is in Alook / release-room."],++ ["gus", "Did you also check it on a real phone?"],++ ["claudette", "No. Shelly checked the reported phone issue. Your final phone flow is still pending; I kept that separate from my desktop result."],++ ]),++ "demo-dm-evan": messages("dm-evan", "2026-10-21T02:05:00Z", [++ ["evan", "The H2 quote wall now has the source arrow beside each author. The change and source examples are in Alook / content."],++ ["gus", "Keep the longer quotes from taking over the page."],++ ["evan", "They show up to three lines. The whole row opens the original post, where the rest can be read."],++ ]),++ "demo-dm-devin": messages("dm-devin", "2026-10-21T04:50:00Z", [++ ["devin", "I checked Maya’s Coffee Map comparison against Tracy’s three sketches. The result is in Side Projects / research-notes."],++ ["gus", "Are we claiming anything about competing apps?"],++ ["devin", "No. These are our own List-first, Map-first, and Search-first sketches. I made that limit explicit in the notes."],++ ]),++ "demo-dm-shelly": messages("dm-shelly", "2026-10-21T04:00:00Z", [++ ["shelly", "I forget which cafés have a quiet corner for a sketchbook. Tracy and I want to make a small place-and-note list."],++ ["gus", "You can work with Alli on the flow and Cecilia on the prototype. Put the decisions in Side Projects / coffee-map."],++ ["shelly", "Thanks. I’ll bring Maya into the research room and compare Tracy’s three sketches there first."],++ ]),++ "demo-dm-tracy": messages("dm-tracy", "2026-10-21T07:00:00Z", [++ ["tracy", "Shelly found that Add another kept the previous note in Coffee Map C1. I’ve put her two findings in Side Projects / feedback."],++ ["gus", "Can Cecilia fix those before the three-person trial?"],++ ["tracy", "Yes. C2 clears both fields and prevents duplicate saves. I retested it; the pass conditions are in launch-plan."],++ ]),++ "demo-dm-maya": messages("dm-maya", "2026-10-21T04:55:00Z", [++ ["maya", "Shelly asked me to compare Tracy’s three Coffee Map sketches. List-first lets her save a note before choosing a map location or search result."],++ ["gus", "Please keep the comparison where Tracy can use it too."],++ ["maya", "It is in Side Projects / research-notes, with Shelly’s walkthrough and Devin’s check. The next decision belongs in coffee-map."],++ ]),+}++++export const DEMO_UNREADS: Record<string, number> = { "demo-general": 3, "demo-design-review": 2, "demo-coffee-map": 2 }++export const DEMO_MENTIONS: Record<string, string[]> = { "demo-coffee-map": ["coffee-map-5"] }diff --cc src/web/src/components/home/landing-interactive-shell.dom.test.tsxindex 444ea6c24,000000000..a1faadb24mode 100644,000000..100644--- a/src/web/src/components/home/landing-interactive-shell.dom.test.tsx+++ b/src/web/src/components/home/landing-interactive-shell.dom.test.tsx@@@ -1,74 -1,0 +1,119 @@@+import type { ReactNode } from "react"+import type { UnreadServer } from "@/lib/community/models/inbox"+import { afterEach, beforeEach, describe, expect, it, vi } from "vitest"+import { fireEvent, render, screen, setupUser } from "@/test/react-dom-harness"+import LandingInteractiveShell from "./landing-interactive-shell"- import { DEMO_CHANNELS, DEMO_MESSAGES, DEMO_PROFILES, DEMO_SERVERS } from "./landing-interactive-shell-data"++import { DEMO_CHANNELS, DEMO_MESSAGES, DEMO_PROFILES, DEMO_SERVERS, DEMO_MENTIONS, DEMO_UNREADS } from "./landing-interactive-shell-data"++vi.mock("@/hooks/use-mobile", () => ({ useBreakpoint: () => "desktop", useIsMobile: () => false }))+vi.mock("@/components/community/shell/community-shell-layout", () => ({ CommunityShellLayout: ({ rail, sidebar, main, userBar, overlays }: Record<string, ReactNode>) => <div>{rail}{sidebar}{main}{userBar}{overlays}</div> }))+vi.mock("@/components/community/shell/community-inbox-popover", () => ({ InboxPopover: ({ unreads, onOpenChannel }: { unreads: UnreadServer[]; onOpenChannel: (server: UnreadServer, channel: UnreadServer["channels"][number]) => void }) => <div>{unreads.flatMap((server) => server.channels.map((channel) => <button key={channel.channelId} onClick={() => onOpenChannel(server, channel)}>{channel.channelName} {channel.mentionCount}</button>))}</div> }))- vi.mock("@/components/community/shell/user-bar", () => ({ UserBar: ({ unreadCount, inbox, inboxOpen, onInboxOpenChange }: { unreadCount: number; inbox: ReactNode; inboxOpen: boolean; onInboxOpenChange: (open: boolean) => void }) => <div><span>{unreadCount} unread conversations or requests</span><button onClick={() => onInboxOpenChange(!inboxOpen)}>Inbox</button>{inboxOpen && inbox}</div> }))++vi.mock("@/components/community/shell/user-bar", () => ({ UserBar: ({ unreadCount, inbox, inboxOpen, onInboxOpenChange, onOpenProfile, extension }: { onOpenProfile: () => void; extension: { active: string; profile: ReactNode; profileCompanion: ReactNode }; unreadCount: number; inbox: ReactNode; inboxOpen: boolean; onInboxOpenChange: (open: boolean) => void }) => <div><button onClick={onOpenProfile}>Profile</button>{extension.active === "profile" && <>{extension.profileCompanion}{extension.profile}</>}<span>{unreadCount} unread conversations or requests</span><button onClick={() => onInboxOpenChange(!inboxOpen)}>Inbox</button>{inboxOpen && inbox}</div> }))+vi.mock("@/components/community/messages/composer", () => ({ Composer: ({ onAcceptSend }: { onAcceptSend: (text: string) => boolean }) => <button onClick={() => onAcceptSend("A local test message")}>Send test message</button> }))- vi.mock("@/components/community/messages/message-list", () => ({ MessageList: ({ messages, unreadCount, onJumpToPresent }: { messages: { id: string; content: string }[]; unreadCount: number; onJumpToPresent: () => void }) => <div>{messages.map((message) => <p key={message.id}>{message.content}</p>)}{unreadCount > 0 && <button onClick={onJumpToPresent}>Catch up {unreadCount}</button>}</div> }))++vi.mock("@/components/community/messages/message-list", () => ({ MessageList: ({ messages, unreadCount, onJumpToPresent, typingUsers, onScrollRoot, newDividerBefore }: { newDividerBefore?: string; onScrollRoot?: (el: HTMLDivElement | null) => void; typingUsers?: string[]; messages: { id: string; content: string }[]; unreadCount: number; onJumpToPresent: () => void }) => <div ref={onScrollRoot} data-testid="mock-message-scroll"><span data-testid="new-divider">{newDividerBefore}</span><span data-testid="typing-names">{typingUsers?.join(", ")}</span>{messages.map((message) => <p key={message.id}>{message.content}</p>)}{unreadCount > 0 && <button onClick={onJumpToPresent}>Catch up {unreadCount}</button>}</div> }))++beforeEach(() => { vi.stubGlobal("ResizeObserver", class { observe() {} disconnect() {} unobserve() {} }) })+afterEach(() => vi.unstubAllGlobals())++describe("interactive landing workspace", () => {+ it("has three populated spaces and people sharing agents with different owners", () => {+ expect(DEMO_SERVERS).toHaveLength(3)+ for (const server of DEMO_SERVERS) {+ const groups = DEMO_CHANNELS[server.id]+ expect(groups.some((group) => group.private)).toBe(true)+ expect(groups.some((group) => !group.private)).toBe(true)+ expect(groups.flatMap((group) => group.channels).length).toBeGreaterThanOrEqual(8)+ for (const channel of groups.flatMap((group) => group.channels)) {+ expect(DEMO_MESSAGES[channel.id].length).toBeGreaterThanOrEqual(3)+ for (const message of DEMO_MESSAGES[channel.id]) {+ expect(DEMO_PROFILES.has(message.authorId!)).toBe(true)+ expect(message.content).not.toMatch(/[\u4e00-\u9fff]/)+ }+ }+ }+ const authors = new Set(DEMO_MESSAGES["demo-general"].map((message) => message.authorId))+ expect([...authors].filter((id) => DEMO_PROFILES.get(id!)?.kind === "human")).toHaveLength(3)+ expect(DEMO_PROFILES.get("demo-maya")?.ownerUserId).toBe("demo-shelly")+ expect(DEMO_PROFILES.get("demo-alli")?.ownerUserId).toBe("demo-gus")+ })++ it("keeps authored timelines ordered and mentions tied to actual requests", () => {++ const ids = new Set<string>()++ for (const rows of Object.values(DEMO_MESSAGES)) {++ rows.forEach((row, index) => {++ expect(ids.has(row.id)).toBe(false)++ ids.add(row.id)++ expect(row.seq).toBe(index + 1)++ if (index > 0) expect(Date.parse(row.createdAt!)).toBeGreaterThan(Date.parse(rows[index - 1].createdAt!))++ expect(row.content).not.toMatch(/sample workspace|try the input|reset when|I’ll pick this up with Tracy/i)++ })++ }++ for (const [channel, ids] of Object.entries(DEMO_MENTIONS)) {++ for (const id of ids) {++ const row = DEMO_MESSAGES[channel].find((row) => row.id === id)++ expect(row?.content).toContain("@Gus#1813")++ expect(DEMO_MESSAGES[channel].slice(-DEMO_UNREADS[channel])).toContain(row)++ }++ }++ })+ it("catches up, reduces the Inbox count, and keeps local messages in their room", async () => {+ render(<LandingInteractiveShell />)++ expect(screen.getByTestId("typing-names")).toHaveTextContent("Alli")+ expect(screen.getByText("3 unread conversations or requests")).toBeInTheDocument()++ const divider = screen.getByTestId("new-divider").textContent+ fireEvent.click(screen.getByRole("button", { name: "Catch up 3" }))++ expect(screen.getByTestId("new-divider")).toHaveTextContent(divider!)+ expect(screen.getByText("2 unread conversations or requests")).toBeInTheDocument()+ fireEvent.click(screen.getByRole("button", { name: "Send test message" }))+ expect(await screen.findByText("A local test message")).toBeVisible()++ expect(screen.getByTestId("new-divider")).toHaveTextContent(divider!)+ fireEvent.click(screen.getByRole("button", { name: "design-review" }))++ expect(screen.getByTestId("typing-names")).toBeEmptyDOMElement()+ expect(screen.queryByText("A local test message")).toBeNull()+ fireEvent.click(screen.getByRole("button", { name: "Catch up 2" }))+ expect(screen.getByText("1 unread conversations or requests")).toBeInTheDocument()+ fireEvent.click(screen.getByRole("button", { name: "general" }))+ expect(screen.getByText("A local test message")).toBeVisible()+ expect(screen.queryByRole("button", { name: "Reset demo" })).toBeNull()+ })++ it("clears the selected room when ordinary scrolling reaches the bottom", () => {++ render(<LandingInteractiveShell />)++ const root = screen.getByTestId("mock-message-scroll")++ Object.defineProperties(root, { clientHeight: { value: 200 }, scrollHeight: { value: 1000 }, scrollTop: { value: 500, writable: true } })++ fireEvent.scroll(root)++ expect(screen.getByText("3 unread conversations or requests")).toBeInTheDocument()++ root.scrollTop = 800++ fireEvent.scroll(root)++ expect(screen.getByText("2 unread conversations or requests")).toBeInTheDocument()++ expect(screen.queryByRole("button", { name: "Catch up 3" })).toBeNull()++ })+ it("opens an Inbox room at the latest messages and clears its unread immediately", async () => {+ render(<LandingInteractiveShell />)+ await setupUser().click(screen.getByRole("button", { name: "Inbox" }))- fireEvent.click(await screen.findByRole("button", { name: "design-review 1" }))++ fireEvent.click(await screen.findByRole("button", { name: "design-review 0" }))+ expect(screen.getByText("2 unread conversations or requests")).toBeInTheDocument()+ expect(screen.queryByRole("button", { name: "Catch up 2" })).toBeNull()+ expect(screen.getByText(DEMO_MESSAGES["demo-design-review"].at(-1)!.content!)).toBeVisible()+ })++ it("toggles the user profile and lists only Gus’s five running bots", async () => {++ render(<LandingInteractiveShell />)++ await setupUser().click(screen.getByRole("button", { name: "Profile" }))++ expect(screen.getByRole("region", { name: "Running bots" })).toBeVisible()++ expect(screen.getByLabelText("5 running bots")).toBeVisible()++ expect(screen.getByRole("button", { name: "Open Alli activity" })).toBeVisible()++ expect(screen.queryByRole("button", { name: "Open Maya activity" })).toBeNull()++ await setupUser().click(screen.getByRole("button", { name: "Profile" }))++ expect(screen.queryByRole("region", { name: "Running bots" })).toBeNull()++ })+ it("opens Friends, My Bots and Machines as populated pages", () => {+ render(<LandingInteractiveShell />)+ fireEvent.click(screen.getAllByRole("link", { name: "Home" })[0])+ expect(screen.getByPlaceholderText("Search friends")).toBeVisible()+ expect(screen.getByRole("link", { name: "Alli" })).toHaveTextContent(/^Alli$/)+ fireEvent.click(screen.getByRole("link", { name: "My Bots" }))+ expect(screen.getByRole("heading", { name: "My Bots" })).toBeVisible()+ expect(screen.getByRole("button", { name: /Active Bots: 5/ })).toBeVisible()+ fireEvent.click(screen.getByRole("link", { name: "Machines" }))+ expect(screen.getByRole("heading", { name: "Machines" })).toBeVisible()+ expect(screen.getByText("Gus’s MacBook Pro")).toBeVisible()+ })+})diff --cc src/web/src/components/home/landing-interactive-shell.module.cssindex 7d95b5bdf,000000000..8ef0d8232mode 100644,000000..100644--- a/src/web/src/components/home/landing-interactive-shell.module.css+++ b/src/web/src/components/home/landing-interactive-shell.module.css@@@ -1,6 -1,0 +1,30 @@@- .section { padding: 32px clamp(16px, 4vw, 64px) 64px; background: var(--landing-bg); }- .frame { display: block; width: 100%; max-width: 1080px; height: min(640px, 76svh); min-height: 480px; margin-inline: auto; border: 1px solid var(--border); border-radius: var(--radius-xl); box-shadow: var(--e2); background: var(--background); }++.section { scroll-margin-top: 72px; padding: 32px clamp(16px, 4vw, 64px) 64px; background: var(--landing-bg); }++.frame { position: relative; overflow: hidden; display: block; width: 100%; max-width: 1080px; height: min(640px, 76svh); min-height: 480px; margin-inline: auto; border: 1px solid var(--border); border-radius: var(--radius-xl); box-shadow: var(--e2); background: var(--background); }+@media (max-width: 639px) {- .section { padding: 16px 12px 40px; }++ .section { scroll-margin-top: 64px; padding: 16px 12px 40px; }+ .frame { height: 74svh; min-height: 480px; }+}++++.messageSurface :global([data-page-swipe-reply-row]) { padding-block: 4px; margin-block: -4px; }++++.previewRoot { display: contents; }++:global(html):has(.previewRoot) { font-size: 14px; }++:global(html):has(.previewRoot) :global(.text-\[15px\]) { font-size: 0.9375rem; }++:global(html):has(.previewRoot) :global(.text-\[13px\]) { font-size: 0.8125rem; }++++@media (max-width: 639px) {++ :global(html):has(.previewRoot) :global([data-slot="sheet-content"][data-side="bottom"]) { max-height: calc(100dvh - 12px); overflow-y: auto; }++ :global(html):has(.previewRoot) :global([aria-label="Bot log"]) { height: clamp(160px, 40dvh, 300px); flex-shrink: 0; }++}++++:global(html):has(.previewRoot) :global([data-community-rail] > nav) { width: 56px; }++:global(html):has(.previewRoot) :global([data-testid="community-user-bar"] [aria-label^="Open profile"] > span) { width: 28px; height: 28px; }++@media (min-width: 640px) {++ :global(html):has(.previewRoot) :global([data-testid="community-user-bar"] button[aria-label="Inbox"]),++ :global(html):has(.previewRoot) :global([data-testid="community-user-bar"] button[aria-label="User settings"]) { width: 28px; height: 28px; }++}++:global(html):has(.previewRoot) :global([data-slot="inbox-unread-indicator"] svg),++:global(html):has(.previewRoot) :global([data-testid="community-user-bar"] button[aria-label="User settings"] > svg) { width: 16px; height: 16px; }++++.workspace { display: block; width: 100%; height: 100%; border: 0; }++.loading { position: absolute; inset: 0; display: grid; place-items: center; }diff --cc src/web/src/components/home/landing-interactive-shell.tsxindex 310cd16ca,000000000..331334f05mode 100644,000000..100644--- a/src/web/src/components/home/landing-interactive-shell.tsx+++ b/src/web/src/components/home/landing-interactive-shell.tsx@@@ -1,150 -1,0 +1,178 @@@+"use client"++import { useEffect, useRef, useState } from "react"+import { QueryClient, QueryClientProvider } from "@tanstack/react-query"+import { createCommunityDbRegistry } from "@/lib/community-db/collections"+import { CommunityDbProvider } from "@/lib/community-db/projections"+import { CommunityPreviewProfileOwner } from "@/stores/community/profile-preview"+import { CommunityPreviewNavigation } from "@/components/community/shell/community-preview-navigation"+import { CommunityShellLayout } from "@/components/community/shell/community-shell-layout"+import { ServerRail } from "@/components/community/shell/server-rail"+import { UserBar } from "@/components/community/shell/user-bar"+import { InboxPopover, type InboxTab } from "@/components/community/shell/community-inbox-popover"+import { ChannelSidebarTreeOwner } from "@/components/community/channels/channel-sidebar-tree-owner"+import { DmSidebar } from "@/components/community/channels/dm-sidebar"+import { ChannelHeader } from "@/components/community/channels/channel-header"+import { DmHeader } from "@/components/community/channels/dm-header"+import { Avatar } from "@/components/community/avatar"+import { MessageList } from "@/components/community/messages/message-list"+import { Composer } from "@/components/community/messages/composer"+import { ConversationFooterShell, ConversationFooterSlotProvider } from "@/components/community/messages/conversation-footer-shell"++import { ProfileRunningBotsCardView } from "@/components/community/social/profile-running-bots-card"+import { ProfileCard } from "@/components/community/social/profile-card"+import type { OpenProfile, Profile } from "@/components/community/social/profile-types"+import { MemberList } from "@/components/community/members/member-list"+import { Sheet, SheetContent, SheetHeader, SheetTitle } from "@/components/ui/sheet"+import { useBreakpoint } from "@/hooks/use-mobile"+import type { Msg, SendAttachment } from "@/lib/community/models/message"+import { applyMessageReaction } from "@/lib/community/models/message"+import type { Member } from "@/lib/community/models/people"+import type { Marked, Mention, UnreadServer } from "@/lib/community/models/inbox"+import type { NotifLevel } from "@alook/shared"- import { DEMO_CHANNELS, DEMO_DMS, DEMO_MESSAGES, DEMO_PROFILES, DEMO_SERVERS, DEMO_UNREADS } from "./landing-interactive-shell-data"++import { DEMO_CHANNELS, DEMO_DMS, DEMO_MESSAGES, DEMO_PROFILES, DEMO_SERVERS, DEMO_UNREADS, DEMO_MENTIONS } from "./landing-interactive-shell-data"++import { LandingBotLog } from "./landing-bot-log"+import { WorkspaceHome } from "./landing-workspace-home"++import styles from "./landing-interactive-shell.module.css"++export default function LandingInteractiveShell() {++ useEffect(() => {++ let secondFrame = 0++ const firstFrame = requestAnimationFrame(() => {++ secondFrame = requestAnimationFrame(() => window.parent.postMessage({ type: "alook-demo-ready" }, window.location.origin))++ })++ return () => { cancelAnimationFrame(firstFrame); cancelAnimationFrame(secondFrame) }++ }, [])+ const [queryClient] = useState(() => new QueryClient({ defaultOptions: { queries: { enabled: false, retry: false, staleTime: Infinity } } }))+ const [registry] = useState(() => createCommunityDbRegistry(queryClient, null))+ const lifetimeRef = useRef({ generation: 0 })+ useEffect(() => {+ const lifetime = lifetimeRef.current+ const generation = ++lifetime.generation+ return () => queueMicrotask(() => {+ if (lifetime.generation === generation) void registry.cleanup().finally(() => queryClient.clear())+ })+ }, [registry, queryClient])+ return <QueryClientProvider client={queryClient}><CommunityDbProvider registry={registry}>+ <CommunityPreviewProfileOwner profiles={DEMO_PROFILES}><CommunityPreviewNavigation value={true}>+ <InteractiveShell />+ </CommunityPreviewNavigation></CommunityPreviewProfileOwner>+ </CommunityDbProvider></QueryClientProvider>+}++function profileData(id: string): Profile {+ const person = DEMO_PROFILES.get(id) ?? DEMO_PROFILES.get("demo-gus")!+ return { userId: person.id, name: person.name ?? "", avatar: person.avatar ?? undefined, discriminator: person.discriminator ?? undefined,+ presence: person.presence, about: person.aboutMe ?? undefined,+ identity: person.kind === "bot" ? { kind: "bot", ownerProfile: { id: person.ownerUserId ?? "demo-gus", handle: person.ownerHandle ?? "Gus#1813" }, ownedByViewer: false } : { kind: "human" } }+}+const members: Member[] = [...DEMO_PROFILES.values()].map((person) => ({ id: person.id, userId: person.id, name: person.name!, avatar: person.avatar!, avatarVersion: 0, discriminator: person.discriminator ?? "", status: person.presence ?? "online", sub: person.aboutMe ?? "", role: person.id === "demo-gus" ? "owner" : "member" }))++function InteractiveShell() {+ const breakpoint = useBreakpoint()+ const [serverId, setServerId] = useState("demo-studio")+ const [conversation, setConversation] = useState("demo-general")+ const [homePage, setHomePage] = useState<"friends" | "bots" | "machines" | "dm" | null>(null)+ const [surface, setSurface] = useState<"list" | "detail">("list")+ const [messages, setMessages] = useState<Record<string, Msg[]>>(DEMO_MESSAGES)+ const [unread, setUnread] = useState(DEMO_UNREADS)++ const [scrollRoot, setScrollRoot] = useState<HTMLDivElement | null>(null)+ const [presentVersion, setPresentVersion] = useState(0)+ const [submitVersion, setSubmitVersion] = useState(0)+ const [reply, setReply] = useState<Msg | null>(null)+ const [profile, setProfile] = useState<{ id: string; x: number; y: number } | null>(null)+ const [extension, setExtension] = useState<"none" | "inbox" | "profile">("none")+ const [inboxTab, setInboxTab] = useState<InboxTab>("unreads")+ const [membersOpen, setMembersOpen] = useState(false)+ const [marked, setMarked] = useState<Marked[]>([])+ const [notification, setNotification] = useState<NotifLevel | "Use Server Default">("All Messages")+ const [thread, setThread] = useState<Msg | null>(null)+ const [threadMessages, setThreadMessages] = useState<Record<string, Msg[]>>({})+ const fileUrls = useRef<string[]>([])+ useEffect(() => () => { fileUrls.current.forEach((url) => URL.revokeObjectURL(url)) }, [])+ const direct = homePage === "dm"+ const server = DEMO_SERVERS.find((item) => item.id === serverId)!+ const categories = DEMO_CHANNELS[serverId]+ const channel = categories.flatMap((item) => item.channels).find((item) => item.id === conversation)+ const dm = DEMO_DMS.find((item) => item.id === conversation) ?? DEMO_DMS[0]+ const allRows = messages[conversation] ?? []+ const pending = unread[conversation] ?? 0- const rows = pending ? allRows.slice(0, -pending) : allRows++ const rows = allRows++ useEffect(() => {++ if (!scrollRoot || !pending) return++ const onScroll = () => {++ if (scrollRoot.clientHeight > 0 && scrollRoot.scrollHeight - scrollRoot.scrollTop - scrollRoot.clientHeight <= 2) {++ setUnread((current) => ({ ...current, [conversation]: 0 }))++ }++ }++ scrollRoot.addEventListener("scroll", onScroll, { passive: true })++ return () => scrollRoot.removeEventListener("scroll", onScroll)++ }, [conversation, pending, scrollRoot])+ const totalUnread = Object.values(unread).filter((count) => count > 0).length+ const openProfile: OpenProfile = (name, event, _discriminator, id) => {+ const person = id ?? [...DEMO_PROFILES.values()].find((item) => item.name === name)?.id+ if (person) { setExtension("none"); setProfile({ id: person, x: event.clientX, y: event.clientY }) }+ }+ const pickConversation = (id: string) => { setConversation(id); setSurface("detail"); setReply(null); setProfile(null); setMembersOpen(false); setThread(null) }+ const pickServer = (id: string) => { setServerId(id); setHomePage(null); pickConversation(DEMO_CHANNELS[id][0].channels[0].id); setSurface("list") }+ const pickDm = (id: string) => { setHomePage("dm"); pickConversation(id) }+ const messagePerson = (id: string) => pickDm(DEMO_DMS.find((item) => item.userId === id)?.id ?? `demo-dm-${id.slice(5)}`)+ const showHome = (page: "friends" | "bots" | "machines") => { setHomePage(page); setSurface("detail"); setProfile(null); setThread(null) }+ const catchUp = () => { setUnread((current) => ({ ...current, [conversation]: 0 })); setPresentVersion((value) => value + 1) }+ const send = (text: string, files?: SendAttachment[]) => {+ if (!text.trim() && !files?.length) return false+ const message: Msg = { id: crypto.randomUUID(), type: "chat", authorId: "demo-gus", content: text.trim(), createdAt: new Date().toISOString(), seq: allRows.length + 1,+ attachments: files?.map(({ file, width, height }) => { const url = URL.createObjectURL(file); fileUrls.current.push(url); return file.type.startsWith("image/") ? { kind: "image", name: file.name, url, contentType: file.type, sizeBytes: file.size, width, height } : { kind: "file", name: file.name, url, contentType: file.type, sizeBytes: file.size, size: `${Math.ceil(file.size / 1024)} KB` } }),+ ...(reply ? { replyTo: { id: reply.id, authorId: reply.authorId ?? "demo-alli", authorName: DEMO_PROFILES.get(reply.authorId ?? "")?.name ?? "", text: reply.content ?? "" } } : {}),+ }+ setMessages((current) => ({ ...current, [conversation]: [...(current[conversation] ?? []), message] })); setReply(null); catchUp(); setSubmitVersion((value) => value + 1)+ return true+ }+ const openUnread = (targetServer: string, id: string) => { setServerId(targetServer); setHomePage(null); pickConversation(id); setUnread((items) => ({ ...items, [id]: 0 })); setPresentVersion((value) => value + 1); setExtension("none") }++ const unreadMentions = (id: string) => unread[id] > 0 ? messages[id].slice(-unread[id]).filter((message) => DEMO_MENTIONS[id]?.includes(message.id)) : []+ const unreadServers: UnreadServer[] = DEMO_SERVERS.map((item) => ({ serverId: item.id, serverName: item.name,- channels: DEMO_CHANNELS[item.id].flatMap((group) => group.channels).filter((item) => unread[item.id] > 0).map((item) => ({ channelId: item.id, channelName: item.name, type: "text" as const, lastMessageAt: "2026-10-21T05:00:00Z", lastUnreadSeq: messages[item.id].length, mentionCount: 1, hasDirectUnread: true, children: [] })) })).filter((item) => item.channels.length)- const mentions: Mention[] = unreadServers.flatMap((item) => item.channels.map((room) => ({ id: room.channelId, server: item.serverName, serverId: item.serverId, channel: room.channelName, channelId: room.channelId, m: messages[room.channelId].at(-1)! })))++ channels: DEMO_CHANNELS[item.id].flatMap((group) => group.channels).filter((item) => unread[item.id] > 0).map((item) => ({ channelId: item.id, channelName: item.name, type: "text" as const, lastMessageAt: messages[item.id].at(-1)!.createdAt!, lastUnreadSeq: messages[item.id].length, mentionCount: unreadMentions(item.id).length, hasDirectUnread: true, children: [] })) })).filter((item) => item.channels.length)++ const mentions: Mention[] = unreadServers.flatMap((item) => item.channels.flatMap((room) => unreadMentions(room.channelId).map((m) => ({ id: room.channelId, server: item.serverName, serverId: item.serverId, channel: room.channelName, channelId: room.channelId, m }))))+ const inbox = <InboxPopover surface="extension" unreads={unreadServers} unreadDms={[]} mentions={mentions} marked={marked} hasProjectedUnreads={totalUnread > 0} hasProjectedMentions={mentions.length > 0}+ activeTab={inboxTab} onActiveTabChange={setInboxTab} onOpenChannel={(item, room) => openUnread(item.serverId, room.channelId)} onOpenMention={(item) => openUnread(item.serverId!, item.channelId!)}+ onOpenMarked={(item) => openUnread(item.serverId ?? serverId, item.channelId)} onUnmark={(id) => setMarked((items) => items.filter((item) => item.m.id !== id))}+ onDeleteMention={(id) => setUnread((items) => ({ ...items, [id]: 0 }))} onMarkAllRead={() => { setUnread({}); setPresentVersion((value) => value + 1) }} />++ const runningBots = [...DEMO_PROFILES.values()].filter((person) => person.kind === "bot" && person.ownerUserId === "demo-gus").map((person) => ({ id: person.id, name: person.name!, image: person.avatar ?? null, activityEmoji: person.statusEmoji!, activityText: person.statusText! }))++ const profileCompanion = <ProfileRunningBotsCardView runningBots={runningBots} onOpenBotAudit={(id) => {++ const anchor = document.activeElement?.getBoundingClientRect()++ setExtension("none")++ setProfile({ id, x: anchor?.right ?? window.innerWidth / 2, y: anchor?.top ?? window.innerHeight / 2 })++ }} />+ const selfProfile = <ProfileCard extension data={profileData("demo-gus")} x={0} y={0} bp={breakpoint} onClose={() => setExtension("none")} />+ const sidebar = homePage ? <DmSidebar dms={DEMO_DMS} activeDm={direct ? conversation : null} onPickDm={pickDm} onShowFriends={() => showHome("friends")} onShowBots={() => showHome("bots")} onShowMachines={() => showHome("machines")} friendsActive={homePage === "friends"} botsActive={homePage === "bots"} machinesActive={homePage === "machines"} />+ : <ChannelSidebarTreeOwner key={serverId} scopeKey={`landing:${serverId}`} categories={categories.map((group) => ({ ...group, channels: group.channels.map((item) => ({ ...item, active: item.id === conversation, unread: (unread[item.id] ?? 0) > 0 })) }))} serverName={server.name} activeChannel={conversation} setActiveChannel={pickConversation} isAdmin={false} currentUserId="demo-gus" />+ const conversationView = <>+ {direct ? <DmHeader dm={dm} titleAs="div" onBack={() => setSurface("list")} /> : <ChannelHeader channel={channel?.name ?? "general"} rightPanel={membersOpen ? "members" : null} onToggle={() => setMembersOpen((open) => !open)} mobileBack={() => setSurface("list")} tools={{ threads: false, pinned: false }} notifLevel={notification} onSetNotifLevel={setNotification} />}- <main data-slot="community-conversation-surface" className="flex min-h-0 flex-1 flex-col">++ <main data-slot="community-conversation-surface" className={`${styles.messageSurface} flex min-h-0 flex-1 flex-col`}>+ <ConversationFooterSlotProvider>- <MessageList key={conversation} channel={direct ? dm.name : channel?.name ?? "general"} variant={direct ? "dm" : "channel"} messages={rows}++ <MessageList key={conversation} channel={direct ? dm.name : channel?.name ?? "general"} variant={direct ? "dm" : "channel"} messages={rows} typingUsers={conversation === "demo-general" ? ["Alli"] : []}+ hero={direct ? <><div className="relative mb-3 w-fit"><Avatar label={dm.avatar} seed={dm.userId} size={64} /></div><h2 className="text-2xl font-semibold leading-tight">{dm.name}</h2><p className="mt-1 text-sm text-muted-foreground">This is the beginning of your direct message history with <span className="font-medium text-foreground">{dm.name}</span>.</p></> : undefined}- newDividerBefore={pending ? rows.at(-2)?.id : undefined} initialPositionMessageId={pending ? rows[0]?.id : undefined} historyStartKnown- hasMoreNewer={pending > 0} unreadCount={pending} onJumpToPresent={catchUp} presentVersion={presentVersion} localSubmitVersion={submitVersion} viewerUserId="demo-gus"++ newDividerBefore={DEMO_UNREADS[conversation] ? DEMO_MESSAGES[conversation].at(-DEMO_UNREADS[conversation])?.id : undefined} initialPositionMessageId={pending ? rows[0]?.id : undefined} historyStartKnown++ onScrollRoot={setScrollRoot} unreadCount={pending} onJumpToPresent={catchUp} presentVersion={presentVersion} localSubmitVersion={submitVersion} viewerUserId="demo-gus"+ onOpenProfile={openProfile} onOpenThread={(id) => setThread(allRows.find((row) => row.id === id) ?? null)} onCreateThread={(id) => setThread(allRows.find((row) => row.id === id) ?? null)}+ onReply={(id) => setReply(allRows.find((row) => row.id === id) ?? null)} resolveUserName={(id) => DEMO_PROFILES.get(id)?.name ?? "Member"}+ onToggleReaction={(id, emoji) => setMessages((current) => ({ ...current, [conversation]: current[conversation].map((row) => row.id === id ? { ...row, reactions: applyMessageReaction(row.reactions, emoji, "demo-gus", !row.reactions?.some((reaction) => reaction.emoji === emoji && reaction.me), "demo-gus") } : row) }))}+ onMark={(id) => { const row = allRows.find((row) => row.id === id); if (row) setMarked((items) => items.some((item) => item.m.id === id) ? items.filter((item) => item.m.id !== id) : [...items, { id, server: server.name, serverId, channel: channel?.name ?? dm.name, channelId: conversation, m: row }]) }} />+ <ConversationFooterShell><Composer key={conversation} channel={direct ? dm.name : channel?.name ?? "general"} context={direct ? "dm" : "channel"} members={members} sendContract="accepted" onAcceptSend={send} autoFocus={false}+ replyingTo={reply ? { authorId: reply.authorId, authorName: DEMO_PROFILES.get(reply.authorId ?? "")?.name ?? "", text: reply.content ?? "" } : undefined} onCancelReply={() => setReply(null)} /></ConversationFooterShell>+ </ConversationFooterSlotProvider>+ </main>+ </>+ return <CommunityShellLayout breakpoint={breakpoint} surface={surface} testId="landing-interactive-shell" label="Alook workspace"+ rail={<ServerRail servers={DEMO_SERVERS.map((item) => ({ ...item, active: !homePage && item.id === serverId, unread: unreadServers.some((room) => room.serverId === item.id) }))} folders={[]} view={homePage ? "dm" : "server"} activeServerId={homePage ? "" : serverId} onHome={() => { showHome("friends"); setSurface("list") }} onServerNavigate={pickServer} />}+ sidebar={sidebar} main={<div className="flex min-h-0 flex-1 flex-col bg-background">{homePage && homePage !== "dm" ? <WorkspaceHome page={homePage} onBack={() => setSurface("list")} onDm={messagePerson} onOpenProfile={openProfile} onMachines={() => showHome("machines")} /> : conversationView}</div>}+ userBar={<UserBar breakpoint={breakpoint} user={{ id: "demo-gus", name: "Gus", avatar: DEMO_PROFILES.get("demo-gus")!.avatar! }} inbox={inbox} hasUnread={totalUnread > 0} unreadCount={totalUnread}- inboxOpen={extension === "inbox"} onInboxOpenChange={(open) => setExtension(open ? "inbox" : "none")} onOpenProfile={() => setExtension("profile")} onEditProfile={() => setExtension("profile")}- extension={{ active: extension, inbox, profile: selfProfile, update: null, updateBadgePhase: null, eligibleMachines: [], onOpenUpdate: () => {}, onRequestUpdate: () => {}, onDismiss: () => setExtension("none") }} />}++ inboxOpen={extension === "inbox"} onInboxOpenChange={(open) => setExtension(open ? "inbox" : "none")} onOpenProfile={() => setExtension((current) => current === "profile" ? "none" : "profile")} onEditProfile={() => setExtension("profile")}++ extension={{ active: extension, inbox, profile: selfProfile, profileCompanion, update: null, updateBadgePhase: null, eligibleMachines: [], onOpenUpdate: () => {}, onRequestUpdate: () => {}, onDismiss: () => setExtension("none") }} />}+ overlays={<>- {profile && <ProfileCard key={profile.id} data={profileData(profile.id)} x={profile.x} y={profile.y} bp={breakpoint} onClose={() => setProfile(null)} canMessage={profile.id !== "demo-gus"}++ {profile && <ProfileCard key={profile.id} data={profileData(profile.id)} secondaryCard={DEMO_PROFILES.get(profile.id)?.kind === "bot" ? <LandingBotLog key={profile.id} botId={profile.id} /> : undefined} x={profile.x} y={profile.y} bp={breakpoint} onClose={() => setProfile(null)} canMessage={profile.id !== "demo-gus"}+ onMessage={(id, text) => { messagePerson(id); if (text.trim()) setMessages((items) => { const target = DEMO_DMS.find((item) => item.userId === id)?.id ?? `demo-dm-${id.slice(5)}`; return { ...items, [target]: [...(items[target] ?? []), { id: crypto.randomUUID(), type: "chat", authorId: "demo-gus", content: text, createdAt: new Date().toISOString() }] } }); setProfile(null) }}+ onOpenOwnerProfile={(owner) => setProfile({ ...profile, id: owner.id })} />}+ <Sheet open={membersOpen} onOpenChange={setMembersOpen}><SheetContent><SheetHeader><SheetTitle>Members</SheetTitle></SheetHeader><MemberList members={members} onOpenProfile={openProfile} /></SheetContent></Sheet>+ <Sheet open={!!thread} onOpenChange={(open) => { if (!open) setThread(null) }}><SheetContent className="flex flex-col p-0"><SheetHeader className="p-4"><SheetTitle>Thread</SheetTitle></SheetHeader>{thread && <ConversationFooterSlotProvider><MessageList channel="Thread" messages={[thread, ...(threadMessages[thread.id] ?? [])]} onOpenThread={() => {}} onOpenProfile={openProfile} viewerUserId="demo-gus" /><ConversationFooterShell><Composer channel="Thread" context="channel" members={members} sendContract="accepted" autoFocus={false} onAcceptSend={(text) => { if (!text.trim()) return false; setThreadMessages((items) => ({ ...items, [thread.id]: [...(items[thread.id] ?? []), { id: crypto.randomUUID(), type: "chat", authorId: "demo-gus", content: text, createdAt: new Date().toISOString() }] })); return true }} /></ConversationFooterShell></ConversationFooterSlotProvider>}</SheetContent></Sheet>+ </>} />+}diff --cc src/web/src/components/home/landing-page.render.test.tsindex f9db2ea8d,81ab9136f..0e5de4319--- a/src/web/src/components/home/landing-page.render.test.ts+++ b/src/web/src/components/home/landing-page.render.test.ts@@@ -74,14 -74,3 +74,15 @@@ describe("landing section calls to acti}})})++describe("standalone interactive second screen", () => {+ it("inserts a pure workspace before the preserved product scene", () => {+ const markup = renderToStaticMarkup(createElement(LandingPage, { isLoggedIn: false }))+ expect(markup.indexOf('id="workspace"')).toBeLessThan(markup.indexOf('id="product"'))- expect(markup).toContain('src="/demo"')++ expect(markup).not.toContain('src="/demo"')++ expect(markup).toContain("Loading Alook workspace")+ expect(markup).toContain('data-testid="landing-scene-server"')+ expect(markup).not.toContain("Reset demo")+ expect(markup).not.toContain("Sample conversations")+ })+})diff --cc src/web/src/components/home/landing-testimonials.dom.test.tsxindex 000000000,58dd1ce7a..8d0116a36mode 000000,100644..100644--- a/src/web/src/components/home/landing-testimonials.dom.test.tsx+++ b/src/web/src/components/home/landing-testimonials.dom.test.tsx@@@ -1,0 -1,54 +1,54 @@@+ import { createElement } from "react"-import { cleanup, render, screen } from "@testing-library/react"++import { render, screen } from "@/test/react-dom-harness"+ import { afterEach, describe, expect, it, vi } from "vitest"+ import { LandingTestimonials } from "./landing-testimonials"+ import { rankTestimonials, type LandingTestimonial } from "./landing-testimonials-data"++ const { posts } = vi.hoisted(() => ({ posts: [] as LandingTestimonial[] }))+ vi.mock("./landing-testimonials-data", async (importOriginal) => ({+ ...await importOriginal<typeof import("./landing-testimonials-data")>(),+ LANDING_TESTIMONIALS: posts,+ }))++ function post(id: string, followers: number | null): LandingTestimonial {+ return {+ id, followers, name: `Author ${id}`, handle: `author${id}`,+ quote: `Test-only quotation ${id}.`, url: `https://x.com/author${id}/status/${id}`,+ checkedAt: "2026-10-21",+ }+ }+-afterEach(() => { cleanup(); posts.length = 0 })++afterEach(() => { posts.length = 0 })++ describe("landing testimonials", () => {+ it("ranks known follower counts ahead of unknown counts without changing the source", () => {+ const source = [post("1", null), post("2", 0), post("3", 200), post("4", 100)]+ expect(rankTestimonials(source).map(({ id }) => id)).toEqual(["3", "4", "2", "1"])+ expect(source.map(({ id }) => id)).toEqual(["1", "2", "3", "4"])+ })++ it("does not present endorsements before real source data is available", () => {+ const { container } = render(createElement(LandingTestimonials))+ expect(container.childElementCount).toBe(0)+ })++ it("exposes all20 original sources once in follower order without extra controls", () => {+ posts.push(...Array.from({ length: 20 }, (_, i) => post(String(i + 1), i * 100)))+ const { container } = render(createElement(LandingTestimonials))+ const links = screen.getAllByRole("link")+ expect(links).toHaveLength(20)+ expect(links.map((link) => link.getAttribute("href"))).toEqual(rankTestimonials(posts).map(({ url }) => url))+ for (const link of links) {+ expect(link.getAttribute("target")).toBe("_blank")+ expect(link.getAttribute("rel")).toBe("noopener noreferrer")+ expect(link.getAttribute("tabindex")).toBeNull()+ }+ expect(screen.getAllByRole("listitem")).toHaveLength(20)+ expect(container.querySelector("button, details, iframe, script")).toBeNull()+ expect(container.querySelectorAll("blockquote")).toHaveLength(40)+ const copies = container.querySelectorAll('[aria-hidden="true"] a')+ expect(copies).toHaveLength(20)+ expect([...copies].every((link) => link.getAttribute("tabindex") === "-1")).toBe(true)+ expect(container.querySelectorAll("[data-message-author-line]")).toHaveLength(40)+ })+ })