Skip to content

armgit / alook

Public Imported from GitHub
0

Multi-Agent Collaboration for Team and Friends

feat(web): add 404 page, dashboard nav link, and fix landing/sign-in layout

Gener0c5704cdf1e7
diff --git a/src/web/src/app/(auth)/sign-in/page.tsx b/src/web/src/app/(auth)/sign-in/page.tsx
index b4f666a6b..4883d4732 100644
--- a/src/web/src/app/(auth)/sign-in/page.tsx
+++ b/src/web/src/app/(auth)/sign-in/page.tsx
@@ -279,7 +279,7 @@ export default function SignInPage() {
<div className="p-6 md:p-8 md:min-h-[420px] flex flex-col justify-center">
{isProd ? <OTPSignIn /> : <PasswordSignIn />}
</div>
- <div className="hidden bg-muted md:flex items-center justify-center overflow-clip min-h-[320px]">
+ <div className="hidden bg-muted md:flex items-center justify-center overflow-clip min-h-[320px] pt-24">
<TypewriterVisual className="scale-[0.55] shrink-0" />
</div>
</CardContent>
diff --git a/src/web/src/app/not-found.tsx b/src/web/src/app/not-found.tsx
new file mode 100644
index 000000000..21fc0515a
--- /dev/null
+++ b/src/web/src/app/not-found.tsx
@@ -0,0 +1,85 @@
+"use client";
+
+import Link from "next/link";
+import { TypewriterVisual } from "@/components/typewriter-visual";
+
+export default function NotFound() {
+ return (
+ <div
+ className="landing flex flex-1 flex-col items-center justify-center px-6"
+ style={{ backgroundColor: "var(--landing-bg)" }}
+ >
+ <div className="w-full max-w-md">
+ <TypewriterVisual
+ entranceDelay={0.3}
+ paper={
+ <>
+ <div
+ className="tw-email-headers"
+ style={{
+ fontFamily: "var(--font-crt)",
+ fontSize: "15px",
+ color: "var(--landing-text-muted)",
+ lineHeight: 1.7,
+ borderBottom: "1px solid oklch(0.15 0.01 55 / 10%)",
+ paddingBottom: "10px",
+ marginBottom: "12px",
+ }}
+ >
+ <div className="tw-email-line">
+ <span style={{ color: "var(--landing-text)" }}>From:</span>{" "}
+ </div>
+ <div className="tw-email-line">
+ <span style={{ color: "var(--landing-text)" }}>To:</span>{" "}
+ you
+ </div>
+ <div className="tw-email-line">
+ <span style={{ color: "var(--landing-text)" }}>Subject:</span>{" "}
+ Undeliverable — page not found
+ </div>
+ </div>
+
+ <div
+ className="tw-email-body"
+ style={{
+ fontFamily: "var(--font-crt)",
+ color: "var(--landing-text)",
+ fontSize: "17px",
+ lineHeight: 1.6,
+ }}
+ >
+ The page you&#39;re looking for doesn&#39;t exist or has been
+ moved. Check the address and try again.
+ </div>
+ </>
+ }
+ />
+ </div>
+
+ <Link
+ href="/"
+ className="mt-8 inline-flex items-center gap-2 px-5 py-2 text-xs uppercase tracking-widest transition-opacity duration-150 hover:opacity-70"
+ style={{
+ fontFamily: "var(--font-mono)",
+ color: "var(--landing-bg)",
+ backgroundColor: "var(--landing-text)",
+ }}
+ >
+ <svg
+ width="14"
+ height="14"
+ viewBox="0 0 24 24"
+ fill="none"
+ stroke="currentColor"
+ strokeWidth="2.5"
+ strokeLinecap="round"
+ strokeLinejoin="round"
+ >
+ <path d="M19 12H5M12 19l-7-7 7-7" />
+ </svg>
+ Go home
+ </Link>
+ </div>
+ );
+}
diff --git a/src/web/src/app/page.tsx b/src/web/src/app/page.tsx
index e18f3a9fb..04eba4cb0 100644
--- a/src/web/src/app/page.tsx
+++ b/src/web/src/app/page.tsx
@@ -1,9 +1,7 @@
import { getSession } from "@/lib/session";
-import { redirect } from "next/navigation";
import { HomePage } from "@/components/home/home-page";
export default async function Page() {
const session = await getSession();
- if (session) redirect("/workspaces?auto");
- return <HomePage />;
+ return <HomePage isLoggedIn={!!session} />;
}
diff --git a/src/web/src/components/home/home-page.tsx b/src/web/src/components/home/home-page.tsx
index 05558ca5f..845bc5e64 100644
--- a/src/web/src/components/home/home-page.tsx
+++ b/src/web/src/components/home/home-page.tsx
@@ -22,7 +22,7 @@ if (typeof window !== "undefined") {
}
}
-export function HomePage() {
+export function HomePage({ isLoggedIn }: { isLoggedIn: boolean }) {
const mainRef = useRef<HTMLDivElement>(null);
useGSAP(
@@ -53,10 +53,10 @@ export function HomePage() {
return (
<div
ref={mainRef}
- className="landing relative overflow-x-hidden"
+ className="landing relative flex-1 overflow-x-clip"
style={{ backgroundColor: "var(--landing-bg)" }}
>
- <MarketingNav />
+ <MarketingNav isLoggedIn={isLoggedIn} />
<HeroSection />
<FeatureShowcase />
<EmailDemo />
diff --git a/src/web/src/components/home/marketing-nav.tsx b/src/web/src/components/home/marketing-nav.tsx
index 2de530f76..8caea305e 100644
--- a/src/web/src/components/home/marketing-nav.tsx
+++ b/src/web/src/components/home/marketing-nav.tsx
@@ -3,7 +3,7 @@
import Image from "next/image";
import Link from "next/link";
-export function MarketingNav() {
+export function MarketingNav({ isLoggedIn }: { isLoggedIn: boolean }) {
return (
<nav
className="marketing-nav fixed top-0 right-0 left-0 z-50 invisible opacity-0"
@@ -28,20 +28,52 @@ export function MarketingNav() {
</span>
</Link>
- <a
- href="https://github.com/alookai/alook"
- className="inline-flex items-center gap-2 px-4 py-1.5 text-xs uppercase tracking-widest transition-opacity duration-150 hover:opacity-70"
- style={{
- fontFamily: "var(--font-mono)",
- color: "var(--landing-bg)",
- backgroundColor: "var(--landing-text)",
- }}
- >
- <svg width="14" height="14" viewBox="0 0 24 24" fill="currentColor">
- <path d="M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z" />
- </svg>
- Source
- </a>
+ <div className="flex items-center gap-3">
+ <a
+ href="https://github.com/alookai/alook"
+ className="inline-flex items-center gap-2 px-4 py-1.5 text-xs uppercase tracking-widest transition-opacity duration-150 hover:opacity-70"
+ style={{
+ fontFamily: "var(--font-mono)",
+ color: "var(--landing-bg)",
+ backgroundColor: "var(--landing-text)",
+ }}
+ >
+ <svg
+ width="14"
+ height="14"
+ viewBox="0 0 24 24"
+ fill="currentColor"
+ >
+ <path d="M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z" />
+ </svg>
+ Source
+ </a>
+ {isLoggedIn && (
+ <Link
+ href="/workspaces?auto"
+ className="inline-flex items-center gap-1.5 px-4 py-1.5 text-xs uppercase tracking-widest transition-opacity duration-150 hover:opacity-70"
+ style={{
+ fontFamily: "var(--font-mono)",
+ color: "var(--landing-text)",
+ border: "1px solid var(--landing-text)",
+ }}
+ >
+ Dashboard
+ <svg
+ width="12"
+ height="12"
+ viewBox="0 0 24 24"
+ fill="none"
+ stroke="currentColor"
+ strokeWidth="2.5"
+ strokeLinecap="round"
+ strokeLinejoin="round"
+ >
+ <path d="M5 12h14M12 5l7 7-7 7" />
+ </svg>
+ </Link>
+ )}
+ </div>
</div>
</nav>
);
diff --git a/src/web/src/components/typewriter-visual.tsx b/src/web/src/components/typewriter-visual.tsx
index 2c544bf30..7e7d15066 100644
--- a/src/web/src/components/typewriter-visual.tsx
+++ b/src/web/src/components/typewriter-visual.tsx
@@ -64,6 +64,8 @@ interface TypewriterVisualProps {
interactive?: boolean;
/** Delay (seconds) before the paper-feed entrance animation starts. */
entranceDelay?: number;
+ /** Custom paper content. When provided, replaces the default email carousel and disables cycling. */
+ paper?: React.ReactNode;
}
/**
@@ -75,6 +77,7 @@ export function TypewriterVisual({
className,
interactive = false,
entranceDelay = 0.3,
+ paper,
}: TypewriterVisualProps) {
const containerRef = useRef<HTMLDivElement>(null);
const paperTlRef = useRef<gsap.core.Timeline | null>(null);
@@ -260,44 +263,48 @@ export function TypewriterVisual({
<div className="tw-body-front">
{/* Paper track — clips paper as it feeds out */}
<div className="tw-paper-track">
- <div className="tw-paper" key={emailIndex}>
- <div
- className="tw-email-headers"
- style={{
- fontFamily: "var(--font-crt)",
- fontSize: "15px",
- color: "var(--landing-text-muted)",
- lineHeight: 1.7,
- borderBottom: "1px solid oklch(0.15 0.01 55 / 10%)",
- paddingBottom: "10px",
- marginBottom: "12px",
- }}
- >
- <div className="tw-email-line">
- <span style={{ color: "var(--landing-text)" }}>From:</span>{" "}
- {email.from}
- </div>
- <div className="tw-email-line">
- <span style={{ color: "var(--landing-text)" }}>To:</span>{" "}
- {email.to}
- </div>
- <div className="tw-email-line">
- <span style={{ color: "var(--landing-text)" }}>Subject:</span>{" "}
- {email.subject}
- </div>
- </div>
-
- <div
- className="tw-email-body"
- style={{
- fontFamily: "var(--font-crt)",
- color: "var(--landing-text)",
- fontSize: "17px",
- lineHeight: 1.6,
- }}
- >
- {email.body}
- </div>
+ <div className="tw-paper" key={paper ? "custom" : emailIndex}>
+ {paper ?? (
+ <>
+ <div
+ className="tw-email-headers"
+ style={{
+ fontFamily: "var(--font-crt)",
+ fontSize: "15px",
+ color: "var(--landing-text-muted)",
+ lineHeight: 1.7,
+ borderBottom: "1px solid oklch(0.15 0.01 55 / 10%)",
+ paddingBottom: "10px",
+ marginBottom: "12px",
+ }}
+ >
+ <div className="tw-email-line">
+ <span style={{ color: "var(--landing-text)" }}>From:</span>{" "}
+ {email.from}
+ </div>
+ <div className="tw-email-line">
+ <span style={{ color: "var(--landing-text)" }}>To:</span>{" "}
+ {email.to}
+ </div>
+ <div className="tw-email-line">
+ <span style={{ color: "var(--landing-text)" }}>Subject:</span>{" "}
+ {email.subject}
+ </div>
+ </div>
+
+ <div
+ className="tw-email-body"
+ style={{
+ fontFamily: "var(--font-crt)",
+ color: "var(--landing-text)",
+ fontSize: "17px",
+ lineHeight: 1.6,
+ }}
+ >
+ {email.body}
+ </div>
+ </>
+ )}
</div>
</div>
@@ -318,7 +325,7 @@ export function TypewriterVisual({
{Array.from({ length: count }).map((_, ki) => (
<div key={ki} className="tw-key" />
))}
- {ri === 1 && (
+ {ri === 1 && !paper && (
<button
className="tw-key tw-return-key"
onClick={handleReturnKey}