Skip to content

armgit / alook

Public Imported from GitHub
0

Multi-Agent Collaboration for Team and Friends

fix(web): polish landing hero and human conversation demos

Gus6faf39ad9dae
diff --git a/src/web/public/landing/people/alex.webp b/src/web/public/landing/people/alex.webp
new file mode 100644
index 000000000..41c6f9f0a
Binary files /dev/null and b/src/web/public/landing/people/alex.webp differ
diff --git a/src/web/public/landing/people/lin.webp b/src/web/public/landing/people/lin.webp
new file mode 100644
index 000000000..406300a43
Binary files /dev/null and b/src/web/public/landing/people/lin.webp differ
diff --git a/src/web/public/landing/people/nina.webp b/src/web/public/landing/people/nina.webp
new file mode 100644
index 000000000..aee62d7b2
Binary files /dev/null and b/src/web/public/landing/people/nina.webp differ
diff --git a/src/web/public/landing/people/priya.webp b/src/web/public/landing/people/priya.webp
new file mode 100644
index 000000000..95275686a
Binary files /dev/null and b/src/web/public/landing/people/priya.webp differ
diff --git a/src/web/public/landing/people/sam.webp b/src/web/public/landing/people/sam.webp
new file mode 100644
index 000000000..16e235000
Binary files /dev/null and b/src/web/public/landing/people/sam.webp differ
diff --git a/src/web/readme-capture/capture.test.ts b/src/web/readme-capture/capture.test.ts
index 47af2b2bf..6bda8899b 100644
--- a/src/web/readme-capture/capture.test.ts
+++ b/src/web/readme-capture/capture.test.ts
@@ -169,8 +169,13 @@ describe("standalone README capture app contract", () => {
"Free to join · leave anytime",
]
+ const demoCopySource = readFileSync(
+ path.join(root, "src/components/home/landing-demo-copy.ts"),
+ "utf8",
+ )
+ expect(motionSource).toContain("content: LANDING_DEMO_REQUESTS.server")
for (const copy of canonicalOverviewMessages) {
- expect(motionSource).toContain(copy)
+ expect(motionSource + demoCopySource).toContain(copy)
}
for (const copy of canonicalMessages) {
expect(motionSource).toContain(copy)
diff --git a/src/web/src/app/globals.css b/src/web/src/app/globals.css
index 31a14c306..de6a41339 100644
--- a/src/web/src/app/globals.css
+++ b/src/web/src/app/globals.css
@@ -920,6 +920,10 @@ body.driver-active .community-ws-reconnect-overlay * {
}
/* ── Paper — slides up inside the track ── */
+.tw-paper.tw-paper-city {
+ padding: 8px 8px 24px;
+}
+
.tw-paper {
position: absolute;
bottom: 0;
@@ -1311,6 +1315,93 @@ body.driver-active .community-ws-reconnect-overlay * {
}
}
+.hero-section-scrollable {
+ padding-bottom: 64px;
+}
+
+@media (min-width: 1024px) {
+ .hero-section-split {
+ height: auto;
+ min-height: 100svh;
+ }
+
+ .hero-section-split .hero-content {
+ max-width: 1280px;
+ padding: 32px;
+ }
+
+ .hero-section-split .hero-brand {
+ align-self: flex-start;
+ margin-bottom: 32px;
+ }
+
+ .hero-section-split .typewriter-wrapper {
+ height: auto !important;
+ container-type: normal;
+ }
+
+ .hero-section-split .hero-scalable {
+ display: grid;
+ grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
+ grid-template-rows: 1fr auto auto 1fr;
+ column-gap: 32px;
+ zoom: 1;
+ }
+
+ .hero-section-split .hero-stage {
+ display: contents;
+ }
+
+ .hero-section-split .hero-intro {
+ position: relative;
+ grid-column: 1;
+ grid-row: 1;
+ align-self: end;
+ align-items: flex-start;
+ gap: 16px;
+ padding-top: 0;
+ }
+
+ .hero-section-split .hero-intro > * {
+ padding-inline: 0;
+ margin-bottom: 0;
+ text-align: left;
+ }
+
+ .hero-section-split .hero-artwork {
+ position: relative;
+ grid-column: 2;
+ grid-row: 1 / 5;
+ height: clamp(320px, 42vw, 560px);
+ align-self: center;
+ min-width: 0;
+ }
+
+ .hero-section-split .typewriter-visual {
+ zoom: clamp(0.5, calc(100vw / 1500px), 0.9);
+ padding-bottom: 32px;
+ }
+
+ .hero-section-split .hero-clipboard,
+ .hero-section-split .hero-providers,
+ .hero-section-split .hero-ctas {
+ grid-column: 1;
+ justify-content: flex-start;
+ }
+
+ .hero-section-split .hero-ctas {
+ grid-row: 4;
+ align-self: start;
+ flex-wrap: wrap;
+ margin-top: 32px;
+ }
+
+ .hero-section-split .hero-ctas > a {
+ padding-inline: 16px;
+ font-size: clamp(12px, 1.2vw, 16px);
+ }
+}
+
/* ── Sonner toast: close button only on hover ── */
[data-sonner-toast] [data-close-button] {
opacity: 0;
diff --git a/src/web/src/components/home/hero-avatar-swarm.tsx b/src/web/src/components/home/hero-avatar-swarm.tsx
index aa84a77d2..21d2db683 100644
--- a/src/web/src/components/home/hero-avatar-swarm.tsx
+++ b/src/web/src/components/home/hero-avatar-swarm.tsx
@@ -1,5 +1,6 @@
import type { CSSProperties } from "react"
import { Avatar } from "@/components/community/avatar"
+import { LANDING_HUMAN_AVATARS } from "./landing-human-avatars"
import styles from "./hero-avatar-swarm.module.css"
type SwarmAvatar = {
@@ -60,7 +61,7 @@ export function HeroAvatarSwarm() {
>
<span className={styles.shadow} />
<span className={styles.face}>
- <Avatar label={avatar.name} seed={avatar.seed} size={avatar.size} />
+ <Avatar label={avatar.name} seed={avatar.seed} src={LANDING_HUMAN_AVATARS[avatar.seed]} size={avatar.size} />
</span>
</span>
))}
diff --git a/src/web/src/components/home/hero-brand.dom.test.tsx b/src/web/src/components/home/hero-brand.dom.test.tsx
new file mode 100644
index 000000000..5b918de05
--- /dev/null
+++ b/src/web/src/components/home/hero-brand.dom.test.tsx
@@ -0,0 +1,30 @@
+import React from "react";
+import { afterEach, expect, it, vi } from "vitest";
+import { fireEvent, render, screen } from "@/test/react-dom-harness";
+
+vi.mock("@gsap/react", () => ({ useGSAP: vi.fn() }));
+vi.mock("gsap", () => ({ default: { registerPlugin: vi.fn() } }));
+vi.mock("@/components/typewriter-visual", () => ({ TypewriterVisual: () => null }));
+
+import { HeroSection } from "./hero-section";
+
+afterEach(() => vi.unstubAllGlobals());
+
+it("reveals the home-logo faces over the combined hero brand and restores them on leave", () => {
+ vi.stubGlobal("matchMedia", (query: string) => ({
+ matches: query.includes("prefers-reduced-motion"),
+ addEventListener: vi.fn(),
+ removeEventListener: vi.fn(),
+ }));
+ render(<HeroSection isLoggedIn={false} showClipboard={false} showCommunityLinks={false} />);
+ const brand = screen.getByRole("link", { name: "Alook home" });
+ const logo = screen.getByRole("img", { name: "Alook" });
+ expect(logo.parentElement).toBe(brand);
+ expect(brand.textContent).toBe("Alook");
+ fireEvent.pointerEnter(brand);
+ expect(logo.getAttribute("data-state")).toBe("reveal");
+ fireEvent.pointerLeave(brand);
+ expect(logo.getAttribute("data-state")).toBe("default");
+ fireEvent.focus(brand);
+ expect(logo.getAttribute("data-state")).toBe("reveal");
+});
diff --git a/src/web/src/components/home/hero-scroll-cue.dom.test.tsx b/src/web/src/components/home/hero-scroll-cue.dom.test.tsx
new file mode 100644
index 000000000..39c0932fe
--- /dev/null
+++ b/src/web/src/components/home/hero-scroll-cue.dom.test.tsx
@@ -0,0 +1,23 @@
+import React from "react";
+import { afterEach, describe, expect, it, vi } from "vitest";
+import { fireEvent, render, screen } from "@/test/react-dom-harness";
+import { HeroScrollCue } from "./hero-scroll-cue";
+
+afterEach(() => vi.unstubAllGlobals());
+
+describe("hero scroll cue", () => {
+ it.each([false, true])("moves to the product section with reduced motion %s", (reduced) => {
+ vi.stubGlobal("IntersectionObserver", class {
+ observe() {}
+ disconnect() {}
+ });
+ vi.stubGlobal("matchMedia", () => ({ matches: reduced }));
+ render(<><HeroScrollCue targetId="product" /><section id="product" tabIndex={-1}>Product</section></>);
+ const product = document.getElementById("product")!;
+ const scroll = vi.fn();
+ product.scrollIntoView = scroll;
+ fireEvent.click(screen.getByRole("link", { name: "Explore what’s below" }));
+ expect(scroll).toHaveBeenCalledWith({ behavior: reduced ? "instant" : "smooth", block: "start" });
+ expect(document.activeElement).toBe(product);
+ });
+});
diff --git a/src/web/src/components/home/hero-scroll-cue.module.css b/src/web/src/components/home/hero-scroll-cue.module.css
new file mode 100644
index 000000000..ed6a1fb3f
--- /dev/null
+++ b/src/web/src/components/home/hero-scroll-cue.module.css
@@ -0,0 +1,36 @@
+.cue {
+ position: absolute;
+ bottom: 16px;
+ left: 50%;
+ z-index: 20;
+ display: grid;
+ place-items: center;
+ width: 44px;
+ height: 44px;
+ transform: translateX(-50%);
+ color: var(--landing-text-muted);
+}
+
+.cue:hover {
+ color: var(--landing-text);
+}
+
+.cue:focus-visible {
+ outline: 2px solid var(--landing-accent);
+ outline-offset: 4px;
+}
+
+.cue svg {
+ animation: nudge-down 2s ease-in-out infinite;
+}
+
+@keyframes nudge-down {
+ 0%, 100% { transform: translateY(-2px); }
+ 50% { transform: translateY(3px); }
+}
+
+@media (prefers-reduced-motion: reduce) {
+ .cue svg {
+ animation: none;
+ }
+}
diff --git a/src/web/src/components/home/hero-scroll-cue.tsx b/src/web/src/components/home/hero-scroll-cue.tsx
new file mode 100644
index 000000000..c5a4be5d2
--- /dev/null
+++ b/src/web/src/components/home/hero-scroll-cue.tsx
@@ -0,0 +1,49 @@
+"use client";
+
+import { useEffect, useRef, useState } from "react";
+import styles from "./hero-scroll-cue.module.css";
+
+export function HeroScrollCue({ targetId }: { targetId: string }) {
+ const ref = useRef<HTMLAnchorElement>(null);
+ const [active, setActive] = useState(false);
+
+ useEffect(() => {
+ const element = ref.current;
+ if (!element) return;
+ let visible = false;
+ const update = () => setActive(visible && !document.hidden);
+ const observer = new IntersectionObserver(([entry]) => {
+ visible = entry.isIntersecting;
+ update();
+ });
+ observer.observe(element);
+ document.addEventListener("visibilitychange", update);
+ return () => {
+ observer.disconnect();
+ document.removeEventListener("visibilitychange", update);
+ };
+ }, []);
+
+ return (
+ <a
+ ref={ref}
+ href={`#${targetId}`}
+ className={styles.cue}
+ aria-label="Explore what’s below"
+ onClick={(event) => {
+ const target = document.getElementById(targetId);
+ if (!target) return;
+ event.preventDefault();
+ target.scrollIntoView({
+ behavior: window.matchMedia("(prefers-reduced-motion: reduce)").matches ? "instant" : "smooth",
+ block: "start",
+ });
+ target.focus({ preventScroll: true });
+ }}
+ >
+ <svg viewBox="0 0 24 24" width="24" height="24" fill="none" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round" aria-hidden="true" style={{ animationPlayState: active ? "running" : "paused" }}>
+ <path d="M12 4v16m-6-6 6 6 6-6" />
+ </svg>
+ </a>
+ );
+}
diff --git a/src/web/src/components/home/hero-section.tsx b/src/web/src/components/home/hero-section.tsx
index a45bd0b26..f7d3b07ac 100644
--- a/src/web/src/components/home/hero-section.tsx
+++ b/src/web/src/components/home/hero-section.tsx
@@ -1,7 +1,6 @@
"use client";
import { useRef, useState, type CSSProperties, type ReactNode } from "react";
-import Image from "next/image";
import Link from "next/link";
import gsap from "gsap";
import { useGSAP } from "@gsap/react";
@@ -10,6 +9,8 @@ import { SplitText } from "gsap/SplitText";
import { TypewriterVisual } from "@/components/typewriter-visual";
import { trackLandingCtaClicked } from "@/lib/analytics";
import { GithubOutboundLink } from "@/components/github-outbound-link";
+import { HeroScrollCue } from "./hero-scroll-cue";
+import { AnimatedAlookLogo } from "@/components/community/shell/animated-alook-logo";
gsap.registerPlugin(ScrollTrigger, SplitText);
@@ -34,6 +35,8 @@ export function HeroSection({
showMobileDesktopHint = true,
testId,
backgroundDecoration,
+ desktopSplit = false,
+ nextSectionId,
}: {
isLoggedIn: boolean;
kicker?: string;
@@ -51,6 +54,8 @@ export function HeroSection({
showMobileDesktopHint?: boolean;
testId?: string;
backgroundDecoration?: ReactNode;
+ desktopSplit?: boolean;
+ nextSectionId?: string;
}) {
const sectionRef = useRef<HTMLDivElement>(null);
const headingRef = useRef<HTMLHeadingElement>(null);
@@ -111,7 +116,7 @@ export function HeroSection({
<section
ref={sectionRef}
data-testid={testId}
- className="hero-section relative flex h-screen items-center justify-center overflow-hidden"
+ className={`hero-section relative flex h-screen items-center justify-center overflow-hidden${desktopSplit ? " hero-section-split" : ""}${nextSectionId ? " hero-section-scrollable" : ""}`}
style={{ backgroundColor: "var(--landing-bg)" }}
>
{/* Paper noise */}
@@ -128,8 +133,8 @@ export function HeroSection({
<div className="hero-content relative z-10 mx-auto flex w-full max-w-4xl flex-col items-center px-4 sm:px-6 py-8 max-h-full">
{/* Brand */}
- <div className="hero-brand mb-6 flex shrink-0 items-center gap-2" style={{ opacity: 0 }}>
- <Image src="/alook.svg" alt="Alook" width={32} height={32} />
+ <Link href="/" aria-label="Alook home" className="hero-brand mb-6 flex min-h-11 shrink-0 items-center gap-2 focus-visible:outline-2 focus-visible:outline-offset-4 focus-visible:outline-current" style={{ opacity: 0 }}>
+ <AnimatedAlookLogo className="size-8" />
<span
className="text-2xl tracking-tight"
style={{
@@ -140,16 +145,16 @@ export function HeroSection({
>
Alook
</span>
- </div>
+ </Link>
{/* Scalable content zone — all content scales together on short viewports */}
<div className="typewriter-wrapper flex w-full shrink min-h-0 flex-col items-center" style={{ height: "clamp(192px, calc(100vh - 200px), 750px)" }}>
<div className="hero-scalable flex w-full flex-1 min-h-0 flex-col items-center">
{/* Typewriter + Slogan wrapper */}
- <div className="relative w-full shrink min-h-0 flex-1">
+ <div className="hero-stage relative w-full shrink min-h-0 flex-1">
{/* Slogan — positioned at top of typewriter area */}
- <div className="absolute top-0 left-0 right-0 z-10 flex flex-col items-center pt-2">
+ <div className="hero-intro absolute top-0 left-0 right-0 z-10 flex flex-col items-center pt-2">
{kicker && (
<p
className="mb-2 text-center text-[10px] uppercase tracking-[0.16em] sm:text-xs"
@@ -194,7 +199,7 @@ export function HeroSection({
</div>
{/* Full Typewriter */}
- <div className={`absolute inset-0 ${typewriterClassName ?? ""}`}>
+ <div className={`hero-artwork absolute inset-0 ${typewriterClassName ?? ""}`}>
<TypewriterVisual
entranceDelay={1.2}
className="absolute! inset-0"
@@ -327,7 +332,7 @@ export function HeroSection({
</div>}
{/* CTA */}
- <div ref={ctaRef} className="mt-8 shrink-0 flex flex-nowrap items-center justify-center gap-3" style={{ opacity: 0 }}>
+ <div ref={ctaRef} className="hero-ctas mt-8 shrink-0 flex flex-nowrap items-center justify-center gap-3" style={{ opacity: 0 }}>
{/* <a
href="https://github.com/alookai/alook"
className="inline-flex items-center gap-2 px-6 py-2 text-sm transition-all duration-200 hover:opacity-80"
@@ -440,6 +445,7 @@ export function HeroSection({
For the full experience, open on a desktop browser.
</p>}
</div>
+ {nextSectionId && <HeroScrollCue targetId={nextSectionId} />}
</section>
);
}
diff --git a/src/web/src/components/home/landing-demo-copy.ts b/src/web/src/components/home/landing-demo-copy.ts
new file mode 100644
index 000000000..0ff5d6928
--- /dev/null
+++ b/src/web/src/components/home/landing-demo-copy.ts
@@ -0,0 +1,5 @@
+export const LANDING_DEMO_REQUESTS = {
+ server: "The headline is hard to read on my phone. Can you make it larger?",
+ provider: "hello Alli",
+ continuity: "Alli, follow up on the website review and weekend plan we discussed.",
+} as const
diff --git a/src/web/src/components/home/landing-human-avatars.ts b/src/web/src/components/home/landing-human-avatars.ts
new file mode 100644
index 000000000..930187e7b
--- /dev/null
+++ b/src/web/src/components/home/landing-human-avatars.ts
@@ -0,0 +1,8 @@
+export const LANDING_HUMAN_AVATARS: Readonly<Record<string, string>> = {
+ gus: "/landing/people/lin.webp",
+ shelly: "/landing/people/alex.webp",
+ tracy: "/landing/people/nina.webp",
+ ruth: "/landing/people/priya.webp",
+ ruthann: "/landing/people/priya.webp",
+ noah: "/landing/people/sam.webp",
+}
diff --git a/src/web/src/components/home/landing-page.module.css b/src/web/src/components/home/landing-page.module.css
index 85267ff6d..13984d1bb 100644
--- a/src/web/src/components/home/landing-page.module.css
+++ b/src/web/src/components/home/landing-page.module.css
@@ -44,13 +44,23 @@
transform: translateY(-7%);
}
-@media (min-width: 640px) and (max-height: 1100px) {
+@media (min-width: 1024px) {
+ .landingHeroHeadline {
+ font-size: clamp(36px, 5vw, 72px) !important;
+ }
+
+ .landingHeroTypewriter {
+ transform: none;
+ }
+}
+
+@media (min-width: 640px) and (max-width: 1023px) and (max-height: 1100px) {
.landingHeroTypewriter {
transform: none;
}
}
-@media (min-width: 640px) and (max-height: 960px) {
+@media (min-width: 640px) and (max-width: 1023px) and (max-height: 960px) {
.landingHeroTypewriter {
zoom: 0.9;
}
diff --git a/src/web/src/components/home/landing-page.tsx b/src/web/src/components/home/landing-page.tsx
index c2f70fc72..e5f2e48bf 100644
--- a/src/web/src/components/home/landing-page.tsx
+++ b/src/web/src/components/home/landing-page.tsx
@@ -3,6 +3,7 @@
import Image from "next/image"
import Link from "next/link"
import { useEffect, useRef, type PointerEvent as ReactPointerEvent } from "react"
+import { LANDING_HUMAN_AVATARS } from "./landing-human-avatars"
import { GeneratedAvatar } from "@/components/avatar"
import { ProfileCard } from "@/components/community/social/profile-card"
import { ProviderLogo } from "@/components/provider-logo"
@@ -293,6 +294,8 @@ export function LandingPage({ isLoggedIn }: { isLoggedIn: boolean }) {
containerTestId={tid.landingHeaderContainer}
/>
<HeroSection
+ desktopSplit
+ nextSectionId="product"
isLoggedIn={isLoggedIn}
headline={(
<>
@@ -319,7 +322,7 @@ export function LandingPage({ isLoggedIn }: { isLoggedIn: boolean }) {
backgroundDecoration={<HeroAvatarSwarm />}
/>
- <section id="product" className={styles.productSection} data-testid="landing-product-proof">
+ <section id="product" tabIndex={-1} className={styles.productSection} data-testid="landing-product-proof">
<div className={styles.productLayout} data-testid={tid.landingMainContainer}>
<div className={styles.sectionIntro}>
<div className={styles.sectionLead}>
@@ -414,7 +417,11 @@ export function LandingPage({ isLoggedIn }: { isLoggedIn: boolean }) {
className={`${styles.closingCompanion} ${companion.className}`}
aria-hidden="true"
>
- <GeneratedAvatar seed={companion.seed} size="100%" className={styles.closingAvatar} />
+ {companion.seed === "Gus" ? (
+ <Image src={LANDING_HUMAN_AVATARS.gus} alt="" width={58} height={58} className={styles.closingAvatar} />
+ ) : (
+ <GeneratedAvatar seed={companion.seed} size="100%" className={styles.closingAvatar} />
+ )}
</span>
))}
<Link
diff --git a/src/web/src/components/home/landing-shell-motion-timeline.ts b/src/web/src/components/home/landing-shell-motion-timeline.ts
index 82f95240c..86c52da41 100644
--- a/src/web/src/components/home/landing-shell-motion-timeline.ts
+++ b/src/web/src/components/home/landing-shell-motion-timeline.ts
@@ -1,3 +1,5 @@
+import { LANDING_DEMO_REQUESTS } from "./landing-demo-copy"
+
export type LandingScene = "server" | "machine" | "provider" | "spaces" | "identity" | "continuity"
export type LandingRoom = "work" | "life" | "play"
@@ -155,7 +157,7 @@ export function sceneSnapshot(scene: LandingScene, requestedBeat: number): Scene
return {
beat,
visibleMessages: beat < 2 ? 0 : Math.min(4, beat - 1),
- composerText: beat === 1 ? "hello world" : "",
+ composerText: beat === 1 ? LANDING_DEMO_REQUESTS.server : "",
machineState: "empty",
pairSheet: "closed",
runtime: "claude",
@@ -209,7 +211,7 @@ export function sceneSnapshot(scene: LandingScene, requestedBeat: number): Scene
return {
beat,
visibleMessages: beat >= 8 ? 2 : beat >= 7 ? 1 : 0,
- composerText: beat === 6 ? "hello Alli" : "",
+ composerText: beat === 6 ? LANDING_DEMO_REQUESTS.provider : "",
machineState: "online",
pairSheet: "closed",
runtime: beat >= 4 ? "codex" : "claude",
@@ -241,7 +243,7 @@ export function sceneSnapshot(scene: LandingScene, requestedBeat: number): Scene
: studioAct
? beat >= 8 ? 2 : 1
: 2,
- composerText: beat === 1 ? "Alli, please move today’s priorities forward." : "",
+ composerText: beat === 1 ? LANDING_DEMO_REQUESTS.continuity : "",
machineState: "online",
pairSheet: "closed",
runtime: "claude",
diff --git a/src/web/src/components/home/landing-shell-motion.module.css b/src/web/src/components/home/landing-shell-motion.module.css
index 36db81269..ae8dea42d 100644
--- a/src/web/src/components/home/landing-shell-motion.module.css
+++ b/src/web/src/components/home/landing-shell-motion.module.css
@@ -280,18 +280,14 @@
display: block;
}
-.composerLayer:nth-child(2) {
- position: absolute;
- inset: 12px 48px;
-}
-
.typingText {
display: inline-block;
overflow: hidden;
- max-width: 0;
- white-space: nowrap;
+ max-width: 100%;
+ white-space: normal;
+ overflow-wrap: anywhere;
vertical-align: bottom;
- animation: typing 620ms steps(11, end) forwards;
+ animation: typing 620ms steps(var(--typing-steps, 11), end) both;
}
.stateStack {
@@ -380,8 +376,11 @@
}
@keyframes typing {
+ from {
+ clip-path: inset(0 100% 0 0);
+ }
to {
- max-width: var(--typing-width, 11ch);
+ clip-path: inset(0);
}
}
@@ -414,7 +413,7 @@
}
.typingText {
- max-width: var(--typing-width, 11ch);
+ clip-path: none;
}
}
diff --git a/src/web/src/components/home/landing-shell-motion.render.test.ts b/src/web/src/components/home/landing-shell-motion.render.test.ts
index bc8dbe1d7..76c6247e6 100644
--- a/src/web/src/components/home/landing-shell-motion.render.test.ts
+++ b/src/web/src/components/home/landing-shell-motion.render.test.ts
@@ -6,7 +6,7 @@ import {
LandingShellMotion,
landingChannelTreeScopeKey,
} from "./landing-shell-motion"
-import { SCENE_MAX_BEAT, type LandingScene } from "./landing-shell-motion-timeline"
+import { sceneSnapshot, SCENE_MAX_BEAT, type LandingScene } from "./landing-shell-motion-timeline"
vi.mock("./landing-shell-motion.module.css", () => ({
default: new Proxy({}, { get: (_target, key) => String(key) }),
@@ -105,3 +105,42 @@ describe("landing community preview rendering", () => {
expect(header).not.toContain("sm:ml-1")
})
})
+
+describe("landing human portraits", () => {
+ it.each(["server", "continuity", "spaces"] as const)("uses a photo for the owner in %s", (scene) => {
+ const markup = renderToStaticMarkup(createElement(LandingShellMotion, { scene, beat: SCENE_MAX_BEAT[scene] }))
+ expect(markup).toContain('data-avatar-kind="photo"')
+ expect(markup).toContain('data-avatar-kind="beam"')
+ })
+})
+
+describe("human teammates replying to Alli", () => {
+ it.each([["server", 6, 4], ["continuity", 9, 2], ["continuity", 14, 2]] as const)(
+ "renders human reply portraits in %s at beat %s",
+ (scene, beat, expectedPhotos) => {
+ const markup = renderToStaticMarkup(createElement(LandingShellMotion, { scene, beat }))
+ expect(markup.match(/data-avatar-kind="photo"/g)?.length).toBeGreaterThanOrEqual(expectedPhotos)
+ expect(markup).toContain('data-avatar-kind="beam"')
+ },
+ )
+})
+
+describe("composer-to-message continuity", () => {
+ it.each([["server", 1, 2], ["provider", 6, 7], ["continuity", 1, 2]] as const)(
+ "posts the same text typed in %s",
+ (scene, typingBeat, postedBeat) => {
+ const draft = sceneSnapshot(scene, typingBeat).composerText
+ expect(draft.length).toBeGreaterThan(0)
+ const typing = renderToStaticMarkup(createElement(LandingShellMotion, { scene, beat: typingBeat }))
+ const posted = renderToStaticMarkup(createElement(LandingShellMotion, { scene, beat: postedBeat }))
+ expect(typing).toContain(draft)
+ expect(posted).toContain(draft)
+ expect(sceneSnapshot(scene, postedBeat).composerText).toBe("")
+ },
+ )
+ it("uses the same request on the embedded phone", () => {
+ const draft = sceneSnapshot("server", 1).composerText
+ expect(renderToStaticMarkup(createElement(LandingMobileChatMotion, { beat: 1 }))).toContain(draft)
+ expect(renderToStaticMarkup(createElement(LandingMobileChatMotion, { beat: 2 }))).toContain(draft)
+ })
+})
diff --git a/src/web/src/components/home/landing-shell-motion.test.ts b/src/web/src/components/home/landing-shell-motion.test.ts
index ee6185be5..5bb31084b 100644
--- a/src/web/src/components/home/landing-shell-motion.test.ts
+++ b/src/web/src/components/home/landing-shell-motion.test.ts
@@ -18,7 +18,7 @@ import {
describe("landing shell motion timeline", () => {
it("reveals the server conversation in causal order", () => {
- expect(sceneSnapshot("server", 1)).toMatchObject({ composerText: "hello world", visibleMessages: 0, focus: "composer" })
+ expect(sceneSnapshot("server", 1)).toMatchObject({ composerText: "The headline is hard to read on my phone. Can you make it larger?", visibleMessages: 0, focus: "composer" })
expect(sceneSnapshot("server", 2)).toMatchObject({ visibleMessages: 1, focus: "message-gus" })
expect(sceneSnapshot("server", 3)).toMatchObject({ visibleMessages: 2, focus: "message-alli" })
expect(sceneSnapshot("server", 4)).toMatchObject({ visibleMessages: 3, focus: "message-ruth" })
@@ -32,7 +32,7 @@ describe("landing shell motion timeline", () => {
expect(sharedBeats.map(({ beat, composerText, visibleMessages }) => ({ beat, composerText, visibleMessages }))).toEqual([
{ beat: 0, composerText: "", visibleMessages: 0 },
- { beat: 1, composerText: "hello world", visibleMessages: 0 },
+ { beat: 1, composerText: "The headline is hard to read on my phone. Can you make it larger?", visibleMessages: 0 },
{ beat: 2, composerText: "", visibleMessages: 1 },
{ beat: 3, composerText: "", visibleMessages: 2 },
{ beat: 4, composerText: "", visibleMessages: 3 },
@@ -112,7 +112,7 @@ describe("landing shell motion timeline", () => {
it("turns one Gus request into two proactive exchanges discovered through unread inbox items", () => {
expect(sceneSnapshot("continuity", 0)).toMatchObject({ room: "work", visibleMessages: 0, focus: null })
- expect(sceneSnapshot("continuity", 1)).toMatchObject({ composerText: "Alli, please move today’s priorities forward.", visibleMessages: 0, focus: "continuity-dm-composer" })
+ expect(sceneSnapshot("continuity", 1)).toMatchObject({ composerText: "Alli, follow up on the website review and weekend plan we discussed.", visibleMessages: 0, focus: "continuity-dm-composer" })
expect(sceneSnapshot("continuity", 2)).toMatchObject({ composerText: "", visibleMessages: 1, focus: "continuity-dm-gus" })
expect(sceneSnapshot("continuity", 3)).toMatchObject({ visibleMessages: 2, focus: "continuity-dm-alli" })
expect(sceneSnapshot("continuity", 4)).toMatchObject({ focus: null, camera: { scale: 1 } })
diff --git a/src/web/src/components/home/landing-shell-motion.tsx b/src/web/src/components/home/landing-shell-motion.tsx
index f40847c10..e9d66cadf 100644
--- a/src/web/src/components/home/landing-shell-motion.tsx
+++ b/src/web/src/components/home/landing-shell-motion.tsx
@@ -65,6 +65,8 @@ import {
type SceneSnapshot,
} from "./landing-shell-motion-timeline"
import styles from "./landing-shell-motion.module.css"
+import { LANDING_DEMO_REQUESTS } from "./landing-demo-copy"
+import { LANDING_HUMAN_AVATARS } from "./landing-human-avatars"
import { useLandingMotionPlayback } from "./use-landing-motion-playback"
const SERVERS: Server[] = [
@@ -195,8 +197,8 @@ const MESSAGES: RenderMsg[] = [
type: "chat",
authorId: "gus",
authorName: "Gus",
- authorAvatar: "avatar:beam:gus",
- content: "The headline is hard to read on my phone. Can you make it larger?",
+ authorAvatar: LANDING_HUMAN_AVATARS.gus,
+ content: LANDING_DEMO_REQUESTS.server,
createdAt: "2026-08-06T04:20:00.000Z",
seq: 425,
grouped: false,
@@ -217,7 +219,7 @@ const MESSAGES: RenderMsg[] = [
type: "chat",
authorId: "ruth",
authorName: "Ruthann",
- authorAvatar: "avatar:beam:ruth",
+ authorAvatar: LANDING_HUMAN_AVATARS.ruth,
content: "The headline is clearer. Can you update the button text to match?",
createdAt: "2026-08-06T04:22:00.000Z",
seq: 427,
@@ -228,7 +230,7 @@ const MESSAGES: RenderMsg[] = [
type: "chat",
authorId: "shelly",
authorName: "Shelly",
- authorAvatar: "avatar:beam:shelly",
+ authorAvatar: LANDING_HUMAN_AVATARS.shelly,
content: "I’ve reviewed the updated page. It’s ready to use.",
createdAt: "2026-08-06T04:23:00.000Z",
seq: 428,
@@ -243,7 +245,7 @@ const SPACE_MESSAGES: Record<LandingRoom, RenderMsg[]> = {
type: "chat",
authorId: "gus",
authorName: "Gus",
- authorAvatar: "avatar:beam:gus",
+ authorAvatar: LANDING_HUMAN_AVATARS.gus,
content: "The new gallery story is ready.",
createdAt: "2026-08-06T06:00:00.000Z",
seq: 501,
@@ -254,7 +256,7 @@ const SPACE_MESSAGES: Record<LandingRoom, RenderMsg[]> = {
type: "chat",
authorId: "shelly",
authorName: "Shelly",
- authorAvatar: "avatar:beam:shelly",
+ authorAvatar: LANDING_HUMAN_AVATARS.shelly,
content: "I’ll ship it after review.",
createdAt: "2026-08-06T06:00:05.000Z",
seq: 502,
@@ -267,7 +269,7 @@ const SPACE_MESSAGES: Record<LandingRoom, RenderMsg[]> = {
type: "chat",
authorId: "gus-life",
authorName: "Gus",
- authorAvatar: "avatar:beam:gus",
+ authorAvatar: LANDING_HUMAN_AVATARS.gus,
content: "Dinner at seven?",
createdAt: "2026-08-06T06:01:00.000Z",
seq: 503,
@@ -302,7 +304,7 @@ const SPACE_MESSAGES: Record<LandingRoom, RenderMsg[]> = {
type: "chat",
authorId: "noah",
authorName: "Noah",
- authorAvatar: "avatar:beam:noah",
+ authorAvatar: LANDING_HUMAN_AVATARS.noah,
content: "Game night at eight.",
createdAt: "2026-08-06T06:02:00.000Z",
seq: 506,
@@ -324,7 +326,7 @@ const SPACE_MESSAGES: Record<LandingRoom, RenderMsg[]> = {
type: "chat",
authorId: "gus-play",
authorName: "Gus",
- authorAvatar: "avatar:beam:gus",
+ authorAvatar: LANDING_HUMAN_AVATARS.gus,
content: "Let’s go.",
createdAt: "2026-08-06T06:02:08.000Z",
seq: 508,
@@ -353,8 +355,8 @@ const DM_MESSAGES: RenderMsg[] = [
type: "chat",
authorId: "gus",
authorName: "Gus",
- authorAvatar: "avatar:beam:gus",
- content: "hello Alli",
+ authorAvatar: LANDING_HUMAN_AVATARS.gus,
+ content: LANDING_DEMO_REQUESTS.provider,
createdAt: "2026-08-06T04:21:00.000Z",
seq: 429,
grouped: false,
@@ -378,8 +380,8 @@ const CONTINUITY_DM_MESSAGES: RenderMsg[] = [
type: "chat",
authorId: "gus",
authorName: "Gus",
- authorAvatar: "avatar:beam:gus",
- content: "Alli, follow up on the website review and weekend plan we discussed.",
+ authorAvatar: LANDING_HUMAN_AVATARS.gus,
+ content: LANDING_DEMO_REQUESTS.continuity,
createdAt: "2026-08-07T08:30:00.000Z",
seq: 610,
grouped: false,
@@ -414,7 +416,7 @@ const CONTINUITY_WORK_MESSAGES: RenderMsg[] = [
type: "chat",
authorId: "shelly",
authorName: "Shelly",
- authorAvatar: "avatar:beam:shelly",
+ authorAvatar: LANDING_HUMAN_AVATARS.shelly,
content: "Yes. The headline is clearer. The button text still needs an update.",
createdAt: "2026-08-07T08:31:05.000Z",
seq: 613,
@@ -439,7 +441,7 @@ const CONTINUITY_LIFE_MESSAGES: RenderMsg[] = [
type: "chat",
authorId: "tracy",
authorName: "Tracy",
- authorAvatar: "avatar:beam:tracy",
+ authorAvatar: LANDING_HUMAN_AVATARS.tracy,
content: "Saturday at six works. I’ve added the address to our plan.",
createdAt: "2026-08-07T08:32:05.000Z",
seq: 615,
@@ -983,7 +985,7 @@ function PrototypeUserBar({
)}
<UserBar
breakpoint="desktop"
- user={{ id: "gus", name: "Gus", avatar: "avatar:beam:gus" }}
+ user={{ id: "gus", name: "Gus", avatar: LANDING_HUMAN_AVATARS.gus }}
onEditProfile={() => {}}
inbox={scene === "continuity" || scene === "server" || scene === "machine" ? <span /> : undefined}
hasUnread={hasUnread}
@@ -1445,7 +1447,7 @@ function PrototypeComposer({
<div
data-motion-target={target}
data-motion-anchor-x="0.24"
- className="relative px-12 py-3 text-base leading-6"
+ className="relative grid px-12 py-3 text-base leading-6"
>
<span
data-visible={!snapshot.composerText}
@@ -1460,12 +1462,13 @@ function PrototypeComposer({
{snapshot.composerText && (
<span
className={styles.typingText}
- style={{ "--typing-width": `${Math.max(11, snapshot.composerText.length)}ch` } as CSSProperties}
+ style={{ "--typing-steps": snapshot.composerText.length } as CSSProperties}
>
{snapshot.composerText}
+ <span data-composer-caret className="ml-0.5 inline-block h-5 w-px bg-foreground align-middle" />
</span>
)}
- <span className="ml-0.5 inline-block h-5 w-px bg-foreground align-middle" />
+ {!snapshot.composerText && <span data-composer-caret className="ml-0.5 inline-block h-5 w-px bg-foreground align-middle" />}
</span>
</div>
<button
diff --git a/src/web/src/components/typewriter-city-art.tsx b/src/web/src/components/typewriter-city-art.tsx
index 9d490d510..4c3f92e5c 100644
--- a/src/web/src/components/typewriter-city-art.tsx
+++ b/src/web/src/components/typewriter-city-art.tsx
@@ -15,20 +15,13 @@ export function TypewriterCityArt() {
if (!frame || !canvas) return;
let disposed = false;
let observer: ResizeObserver | undefined;
+ let animationFrame = 0;
+ const source = document.createElement("canvas");
+ source.width = 3200;
+ source.height = 1800;
const draw = () => {
- const source = document.createElement("canvas");
- source.width = 3200;
- source.height = 1800;
- const context = source.getContext("2d");
- if (!context) return;
- context.font = '20px "Alook Jgs5"';
- context.fillStyle = getComputedStyle(frame).color;
- context.textBaseline = "top";
- TYPEWRITER_CITY_ART.split("\n").forEach((line, index) => {
- context.fillText(line, 0, index * 20);
- });
- const width = Math.max(1, Math.min(3200, Math.round(frame.clientWidth * window.devicePixelRatio)));
+ const width = Math.max(1, Math.min(source.width, Math.round(frame.getBoundingClientRect().width * window.devicePixelRatio)));
let image = source;
while (image.width / 2 > width) {
const smaller = document.createElement("canvas");
@@ -47,16 +40,31 @@ export function TypewriterCityArt() {
output.drawImage(image, 0, 0, canvas.width, canvas.height);
setReady(true);
};
+ const scheduleDraw = () => {
+ cancelAnimationFrame(animationFrame);
+ animationFrame = requestAnimationFrame(draw);
+ };
void document.fonts?.load('20px "Alook Jgs5"').then(() => {
if (disposed) return;
+ const context = source.getContext("2d");
+ if (!context) return;
+ context.font = '20px "Alook Jgs5"';
+ context.fillStyle = getComputedStyle(frame).color;
+ context.textBaseline = "top";
+ TYPEWRITER_CITY_ART.split("\n").forEach((line, index) => {
+ context.fillText(line, 0, index * 20);
+ });
draw();
- observer = new ResizeObserver(draw);
+ observer = new ResizeObserver(scheduleDraw);
observer.observe(frame);
+ window.addEventListener("resize", scheduleDraw);
}).catch(() => {});
return () => {
disposed = true;
observer?.disconnect();
+ cancelAnimationFrame(animationFrame);
+ window.removeEventListener("resize", scheduleDraw);
};
}, []);
diff --git a/src/web/src/components/typewriter-visual.tsx b/src/web/src/components/typewriter-visual.tsx
index a0ade550b..7363d3ff3 100644
--- a/src/web/src/components/typewriter-visual.tsx
+++ b/src/web/src/components/typewriter-visual.tsx
@@ -93,7 +93,7 @@ export function TypewriterVisual({
<div className="tw-body-front">
<div className="tw-paper-track">
- <div className="tw-paper">
+ <div className={`tw-paper${paper == null ? " tw-paper-city" : ""}`}>
{paper ?? <TypewriterCityArt />}
</div>
</div>