Skip to content

AutoGPT is the vision of accessible AI for everyone, to use and to build on. Our mission is to provide the tools, so that you can focus on what matters.

feat(frontend): restyle login and signup to match the app, drop costly animations (#15876)

Ubbea70dc47b0d43
diff --git a/autogpt_platform/frontend/package.json b/autogpt_platform/frontend/package.json
index d6c155796c..1d55dd3f0b 100644
--- a/autogpt_platform/frontend/package.json
+++ b/autogpt_platform/frontend/package.json
@@ -124,7 +124,6 @@
"remark-math": "6.0.0",
"shepherd.js": "15.3.0",
"shiki": "^3.21.0",
- "simplex-noise": "4.0.3",
"sonner": "2.0.7",
"streamdown": "2.1.0",
"tailwind-merge": "2.6.0",
diff --git a/autogpt_platform/frontend/pnpm-lock.yaml b/autogpt_platform/frontend/pnpm-lock.yaml
index 7dfe48f435..cc472be0fd 100644
--- a/autogpt_platform/frontend/pnpm-lock.yaml
+++ b/autogpt_platform/frontend/pnpm-lock.yaml
@@ -274,9 +274,6 @@ importers:
shiki:
specifier: ^3.21.0
version: 3.21.0
- simplex-noise:
- specifier: 4.0.3
- version: 4.0.3
sonner:
specifier: 2.0.7
@@ -8806,9 +8803,6 @@ packages:
resolution: {integrity: sha512-LH7FpTAkeD+y5xQC4fzS+tFtaNlvt3Ib1zKzvhjv/Y+cioV4zIuw4IZr2yhRLu67CWL7FR9/6KXKnjRoZTvGGQ==}
engines: {node: '>=12'}
- resolution: {integrity: sha512-qSE2I4AngLQG7BXqoZj51jokT4WUXe8mOBrvfOXpci8+6Yu44+/dD5zqDpOx3Ux792eamTd2lLcI8jqFntk/lg==}
-
resolution: {integrity: sha512-kUMbT1oBJCpgrnKoSr0o6wPtvRWT9W9UKvGLwfJYO2WuahZRHOpEyL1ckyMGgMWh0UdpmaoFqKKD29WTomNEGA==}
engines: {node: '>=8'}
@@ -19240,8 +19234,6 @@ snapshots:
dependencies:
jsep: 1.4.0
-
dependencies:
unicode-emoji-modifier-base: 1.0.0
diff --git a/autogpt_platform/frontend/src/app/(no-navbar)/login/page.tsx b/autogpt_platform/frontend/src/app/(no-navbar)/login/page.tsx
index c725992a38..134f9b6703 100644
--- a/autogpt_platform/frontend/src/app/(no-navbar)/login/page.tsx
+++ b/autogpt_platform/frontend/src/app/(no-navbar)/login/page.tsx
@@ -70,7 +70,7 @@ export default function LoginPage() {
return (
<AuthSplitLayout marketing={<LoginMarketingPanel />}>
<div className="mb-8">
- <Text variant="h3" as="h1" className="!text-slate-950">
+ <Text variant="h3" as="h1" className="!text-zinc-900">
Log in to your account to continue
</Text>
</div>
@@ -159,7 +159,7 @@ export default function LoginPage() {
</Form>
<div className="mt-6 inline-flex w-full items-center justify-center gap-1">
- <Text variant="body-medium" className="!text-slate-500">
+ <Text variant="body-medium" className="!text-zinc-500">
Don&apos;t have an account?
</Text>
<Link href={signupHref} variant="secondary">
diff --git a/autogpt_platform/frontend/src/app/(no-navbar)/signup/components/SignupMarketingPanel.tsx b/autogpt_platform/frontend/src/app/(no-navbar)/signup/components/SignupMarketingPanel.tsx
index fd297ec332..651186b1ab 100644
--- a/autogpt_platform/frontend/src/app/(no-navbar)/signup/components/SignupMarketingPanel.tsx
+++ b/autogpt_platform/frontend/src/app/(no-navbar)/signup/components/SignupMarketingPanel.tsx
@@ -12,7 +12,7 @@ export function SignupMarketingPanel() {
headingLines={[
"AI agents",
<span key="line-2">
- that work <span className="text-slate-400">for you.</span>
+ that work <span className="text-violet-600">for you.</span>
</span>,
]}
description="Discover, build, and deploy AI agents that automate real work — no code required. Start building agents in minutes."
diff --git a/autogpt_platform/frontend/src/app/(no-navbar)/signup/page.tsx b/autogpt_platform/frontend/src/app/(no-navbar)/signup/page.tsx
index 23387959f6..167c01c29d 100644
--- a/autogpt_platform/frontend/src/app/(no-navbar)/signup/page.tsx
+++ b/autogpt_platform/frontend/src/app/(no-navbar)/signup/page.tsx
@@ -71,10 +71,10 @@ export default function SignupPage() {
return (
<AuthSplitLayout marketing={<SignupMarketingPanel />}>
<div className="mb-8">
- <Text variant="h3" as="h1" className="!text-slate-950">
+ <Text variant="h3" as="h1" className="!text-zinc-900">
Create your account
</Text>
- <Text variant="body" className="mt-1 !text-slate-500">
+ <Text variant="body" className="mt-1 !text-zinc-500">
Already a member?{" "}
<Link href={loginHref} variant="secondary">
Log in
diff --git a/autogpt_platform/frontend/src/components/auth/AuthSplitLayout/AnimatedHeading.tsx b/autogpt_platform/frontend/src/components/auth/AuthSplitLayout/AnimatedHeading.tsx
deleted file mode 100644
index cb93e0e28a..0000000000
--- a/autogpt_platform/frontend/src/components/auth/AuthSplitLayout/AnimatedHeading.tsx
+++ /dev/null
@@ -1,49 +0,0 @@
-"use client";
-
-import { motion, useReducedMotion, type Variants } from "framer-motion";
-import { ReactNode } from "react";
-
-interface Props {
- lines: ReactNode[];
-}
-
-const lineVariants: Variants = {
- hidden: { opacity: 0, y: 24, filter: "blur(10px)" },
- visible: (i: number) => ({
- opacity: 1,
- y: 0,
- filter: "blur(0px)",
- transition: {
- delay: 0.1 + i * 0.12,
- duration: 0.65,
- ease: [0.22, 1, 0.36, 1],
- },
- }),
-};
-
-const reducedVariants: Variants = {
- hidden: { opacity: 0 },
- visible: { opacity: 1, transition: { duration: 0.2 } },
-};
-
-export function AnimatedHeading({ lines }: Props) {
- const prefersReducedMotion = useReducedMotion();
- const variants = prefersReducedMotion ? reducedVariants : lineVariants;
-
- return (
- <>
- {lines.map((line, i) => (
- <motion.span
- key={i}
- custom={i}
- initial="hidden"
- animate="visible"
- variants={variants}
- className="block"
- >
- {line}
- </motion.span>
- ))}
- </>
- );
-}
diff --git a/autogpt_platform/frontend/src/components/auth/AuthSplitLayout/AuthDivider.tsx b/autogpt_platform/frontend/src/components/auth/AuthSplitLayout/AuthDivider.tsx
index ce0083e07e..61017ec348 100644
--- a/autogpt_platform/frontend/src/components/auth/AuthSplitLayout/AuthDivider.tsx
+++ b/autogpt_platform/frontend/src/components/auth/AuthSplitLayout/AuthDivider.tsx
@@ -3,11 +3,11 @@ import { Text } from "@/components/atoms/Text/Text";
export function AuthDivider() {
return (
<div className="my-5 flex w-full items-center gap-3">
- <span className="h-px flex-1 bg-slate-200" />
- <Text variant="small-medium" className="!text-slate-500">
+ <span className="h-px flex-1 bg-zinc-200" />
+ <Text variant="small-medium" className="!text-zinc-500">
or
</Text>
- <span className="h-px flex-1 bg-slate-200" />
+ <span className="h-px flex-1 bg-zinc-200" />
</div>
);
}
diff --git a/autogpt_platform/frontend/src/components/auth/AuthSplitLayout/AuthMarketingPanel.tsx b/autogpt_platform/frontend/src/components/auth/AuthSplitLayout/AuthMarketingPanel.tsx
index 1e6d98b0dd..42d170d3d8 100644
--- a/autogpt_platform/frontend/src/components/auth/AuthSplitLayout/AuthMarketingPanel.tsx
+++ b/autogpt_platform/frontend/src/components/auth/AuthSplitLayout/AuthMarketingPanel.tsx
@@ -1,5 +1,4 @@
import { ReactNode } from "react";
-import { Vortex } from "@/components/ui/vortex";
import { FeatureList } from "./components/FeatureList";
import { FeatureItem } from "./components/FeatureListItem";
import { MarketingFooter } from "./components/MarketingFooter";
@@ -21,22 +20,8 @@ export function AuthMarketingPanel({
footerText = "Connects with the tools you already use",
}: Props) {
return (
- <Vortex
- containerClassName="absolute inset-0 h-full w-full"
- className="relative flex h-full w-full flex-col justify-between px-12 pb-12 pt-10 xl:px-16 xl:pb-16"
- backgroundColor="transparent"
- particleCount={350}
- baseHue={260}
- baseSpeed={0.08}
- rangeSpeed={0.22}
- baseRadius={1}
- rangeRadius={2}
- >
- <div
- aria-hidden
- className="pointer-events-none absolute inset-0 bg-[radial-gradient(circle_at_center,transparent_30%,rgba(2,6,23,0.55)_85%)]"
- />
- <div className="relative z-10 flex flex-col gap-12">
+ <div className="flex h-full w-full flex-col justify-between gap-12 px-12 pb-12 pt-10 xl:px-16 xl:pb-16">
+ <div className="flex flex-col gap-12">
<MarketingHeader
headingLines={headingLines}
description={description}
@@ -44,6 +29,6 @@ export function AuthMarketingPanel({
<FeatureList itemsTitle={itemsTitle} items={items} />
</div>
<MarketingFooter footerText={footerText} />
- </Vortex>
+ </div>
);
}
diff --git a/autogpt_platform/frontend/src/components/auth/AuthSplitLayout/AuthSplitLayout.tsx b/autogpt_platform/frontend/src/components/auth/AuthSplitLayout/AuthSplitLayout.tsx
index 694c101061..c38f6a7453 100644
--- a/autogpt_platform/frontend/src/components/auth/AuthSplitLayout/AuthSplitLayout.tsx
+++ b/autogpt_platform/frontend/src/components/auth/AuthSplitLayout/AuthSplitLayout.tsx
@@ -1,7 +1,6 @@
import { ReactNode } from "react";
import { AutoGPTLogo } from "@/components/atoms/AutoGPTLogo/AutoGPTLogo";
import { CookieSettingsLink } from "@/components/molecules/CookieSettingsLink/CookieSettingsLink";
-import { AuroraBackground } from "@/components/ui/aurora-background";
import { cn } from "@/lib/utils";
interface Props {
@@ -13,20 +12,15 @@ interface Props {
export function AuthSplitLayout({ marketing, children, className }: Props) {
return (
<div className={cn("flex min-h-screen w-full flex-1", className)}>
- <aside className="relative hidden flex-1 overflow-hidden bg-slate-950 text-white lg:flex">
+ <aside className="relative hidden flex-1 border-r border-zinc-200 bg-[#f9f9f9] lg:flex">
{marketing}
</aside>
<section className="relative flex flex-1 flex-col items-center bg-white px-6 pb-4 pt-12 sm:px-10">
- <AuroraBackground
- aria-hidden
- showRadialGradient={false}
- className="absolute inset-0 h-full w-full lg:hidden"
- />
- <div className="relative z-10 flex w-full max-w-[26rem] flex-1 flex-col justify-center">
+ <div className="flex w-full max-w-[26rem] flex-1 flex-col justify-center">
<AutoGPTLogo className="mx-auto mb-10 h-auto w-32 sm:w-40 lg:hidden" />
{children}
</div>
- <CookieSettingsLink className="relative z-10 mt-6" />
+ <CookieSettingsLink className="mt-6" />
</section>
</div>
);
diff --git a/autogpt_platform/frontend/src/components/auth/AuthSplitLayout/components/FeatureList.tsx b/autogpt_platform/frontend/src/components/auth/AuthSplitLayout/components/FeatureList.tsx
index 9503c62aa2..407840c574 100644
--- a/autogpt_platform/frontend/src/components/auth/AuthSplitLayout/components/FeatureList.tsx
+++ b/autogpt_platform/frontend/src/components/auth/AuthSplitLayout/components/FeatureList.tsx
@@ -12,12 +12,12 @@ export function FeatureList({ itemsTitle, items }: Props) {
{itemsTitle ? (
<Text
variant="small-medium"
- className="uppercase tracking-[0.14em] !text-slate-400"
+ className="uppercase tracking-[0.14em] !text-zinc-500"
>
{itemsTitle}
</Text>
) : null}
- <ul className="flex flex-col gap-3">
+ <ul className="flex max-w-lg flex-col gap-3">
{items.map((item) => (
<FeatureListItem key={item.title} item={item} />
))}
diff --git a/autogpt_platform/frontend/src/components/auth/AuthSplitLayout/components/FeatureListItem.tsx b/autogpt_platform/frontend/src/components/auth/AuthSplitLayout/components/FeatureListItem.tsx
index 278f049168..250a2f76d4 100644
--- a/autogpt_platform/frontend/src/components/auth/AuthSplitLayout/components/FeatureListItem.tsx
+++ b/autogpt_platform/frontend/src/components/auth/AuthSplitLayout/components/FeatureListItem.tsx
@@ -13,16 +13,16 @@ interface Props {
export function FeatureListItem({ item }: Props) {
return (
- <li className="flex items-start gap-4 rounded-xl border border-white/5 bg-white/[0.03] p-4 backdrop-blur-sm">
- <span className="flex h-10 w-10 shrink-0 items-center justify-center rounded-lg bg-gradient-to-br from-indigo-500/30 to-purple-500/30 text-white ring-1 ring-white/10">
+ <li className="flex items-start gap-4 rounded-2xl bg-white p-4 smooth-shadow-ring-sm">
+ <span className="flex size-10 shrink-0 items-center justify-center rounded-lg bg-violet-50 text-violet-600">
{item.icon}
</span>
<div className="flex flex-col gap-0.5">
- <Text variant="body-medium" className="!text-white">
+ <Text variant="body-medium" className="!text-zinc-900">
{item.title}
</Text>
{item.description ? (
- <Text variant="small" className="!text-slate-400">
+ <Text variant="small" className="!text-zinc-500">
{item.description}
</Text>
) : null}
diff --git a/autogpt_platform/frontend/src/components/auth/AuthSplitLayout/components/MarketingFooter.tsx b/autogpt_platform/frontend/src/components/auth/AuthSplitLayout/components/MarketingFooter.tsx
index f8734b28e9..dd3ae67aaa 100644
--- a/autogpt_platform/frontend/src/components/auth/AuthSplitLayout/components/MarketingFooter.tsx
+++ b/autogpt_platform/frontend/src/components/auth/AuthSplitLayout/components/MarketingFooter.tsx
@@ -1,5 +1,16 @@
+import Image from "next/image";
import { Text } from "@/components/atoms/Text/Text";
-import { IntegrationsMarquee } from "@/components/molecules/IntegrationsMarquee/IntegrationsMarquee";
+
+const INTEGRATIONS = [
+ { id: "github", name: "GitHub" },
+ { id: "google", name: "Google" },
+ { id: "notion", name: "Notion" },
+ { id: "slack", name: "Slack" },
+ { id: "hubspot", name: "HubSpot" },
+ { id: "linear", name: "Linear" },
+ { id: "airtable", name: "Airtable" },
+ { id: "discord", name: "Discord" },
+];
interface Props {
footerText: string;
@@ -7,17 +18,29 @@ interface Props {
export function MarketingFooter({ footerText }: Props) {
return (
- <div className="relative z-10 mt-12 flex flex-col gap-3">
+ <div className="flex flex-col gap-3">
<Text
variant="small-medium"
- className="uppercase tracking-[0.14em] !text-slate-400"
+ className="uppercase tracking-[0.14em] !text-zinc-500"
>
{footerText}
</Text>
- <IntegrationsMarquee
- variant="dark"
- className="h-[140px] w-full max-w-[460px]"
- />
+ <ul className="flex flex-wrap gap-2">
+ {INTEGRATIONS.map(({ id, name }) => (
+ <li
+ key={id}
+ className="flex size-11 items-center justify-center rounded-xl bg-white smooth-shadow-ring-sm"
+ >
+ <Image
+ src={`/integrations/${id}.png`}
+ alt={name}
+ width={22}
+ height={22}
+ className="size-[22px] rounded-sm object-contain"
+ />
+ </li>
+ ))}
+ </ul>
</div>
);
}
diff --git a/autogpt_platform/frontend/src/components/auth/AuthSplitLayout/components/MarketingHeader.tsx b/autogpt_platform/frontend/src/components/auth/AuthSplitLayout/components/MarketingHeader.tsx
index f3dfc144eb..30452ec460 100644
--- a/autogpt_platform/frontend/src/components/auth/AuthSplitLayout/components/MarketingHeader.tsx
+++ b/autogpt_platform/frontend/src/components/auth/AuthSplitLayout/components/MarketingHeader.tsx
@@ -1,7 +1,7 @@
import { ReactNode } from "react";
-import { AutoGPTLogoWhite } from "@/components/atoms/AutoGPTLogo/AutoGPTLogoWhite";
+import { AutoGPTLogo } from "@/components/atoms/AutoGPTLogo/AutoGPTLogo";
import { Text } from "@/components/atoms/Text/Text";
-import { AnimatedHeading } from "../AnimatedHeading";
+import { TeamAvatars } from "./TeamAvatars";
interface Props {
headingLines: ReactNode[];
@@ -11,29 +11,27 @@ interface Props {
export function MarketingHeader({ headingLines, description }: Props) {
return (
<>
- <div className="relative isolate w-fit">
- <div
- aria-hidden
- className="absolute inset-0 -z-10 scale-[1.8] rounded-full bg-[radial-gradient(circle,rgba(139,92,246,0.55),rgba(99,102,241,0.25)_45%,transparent_70%)] blur-2xl"
- />
- <AutoGPTLogoWhite
- hideText
- className="h-auto w-[3.5rem] drop-shadow-[0_0_18px_rgba(167,139,250,0.45)]"
- />
- </div>
- <div className="flex flex-col gap-4">
- <Text
- variant="h1"
- as="h1"
- className="!w-full !text-[3rem] !font-semibold !leading-[1.05] tracking-[-0.025em] !text-white"
- >
- <AnimatedHeading lines={headingLines} />
- </Text>
- {description ? (
- <Text variant="large" className="max-w-md !text-slate-300">
- {description}
+ <AutoGPTLogo className="h-auto w-28" />
+ <div className="flex flex-col gap-6">
+ <TeamAvatars />
+ <div className="flex flex-col gap-4">
+ <Text
+ variant="h1"
+ as="h1"
+ className="!w-full !text-[3rem] !font-semibold !leading-[1.05] tracking-[-0.02em] !text-zinc-900"
+ >
+ {headingLines.map((line, i) => (
+ <span key={i} className="block">
+ {line}
+ </span>
+ ))}
</Text>
- ) : null}
+ {description ? (
+ <Text variant="large" className="max-w-md !text-zinc-500">
+ {description}
+ </Text>
+ ) : null}
+ </div>
</div>
</>
);
diff --git a/autogpt_platform/frontend/src/components/auth/AuthSplitLayout/components/TeamAvatars.tsx b/autogpt_platform/frontend/src/components/auth/AuthSplitLayout/components/TeamAvatars.tsx
new file mode 100644
index 0000000000..6f993d91cd
--- /dev/null
+++ b/autogpt_platform/frontend/src/components/auth/AuthSplitLayout/components/TeamAvatars.tsx
@@ -0,0 +1,40 @@
+import { cn } from "@/lib/utils";
+import { AutopilotAvatar } from "@/components/molecules/AutopilotAvatar/AutopilotAvatar";
+import { ExpertAvatar } from "@/components/molecules/ExpertAvatar/ExpertAvatar";
+
+const AVATAR_CLASS =
+ "rounded-full border border-[#e3e3e3] ring-2 ring-[#f9f9f9]";
+
+const FLANK = [
+ {
+ name: "Maya",
+ avatarUrl: "/autogpt-characters/v2.1/expert-maya/neutral/128.webp",
+ className: "left-0 top-1 -rotate-6",
+ },
+ {
+ name: "Devon",
+ avatarUrl: "/autogpt-characters/v2.1/expert-devon/neutral/128.webp",
+ className: "right-0 top-1 rotate-6",
+ },
+];
+
+/** Otto flanked by two experts, as on the Team page header. */
+export function TeamAvatars() {
+ return (
+ <div aria-hidden className="relative h-14 w-28 shrink-0">
+ {FLANK.map((expert) => (
+ <span key={expert.name} className={cn("absolute", expert.className)}>
+ <ExpertAvatar
+ name={expert.name}
+ avatarUrl={expert.avatarUrl}
+ size={44}
+ className={AVATAR_CLASS}
+ />
+ </span>
+ ))}
+ <span className="absolute left-1/2 top-0 z-10 -translate-x-1/2">
+ <AutopilotAvatar size={52} className={AVATAR_CLASS} />
+ </span>
+ </div>
+ );
+}
diff --git a/autogpt_platform/frontend/src/components/ui/__tests__/vortex.test.tsx b/autogpt_platform/frontend/src/components/ui/__tests__/vortex.test.tsx
deleted file mode 100644
index daa74edb8f..0000000000
--- a/autogpt_platform/frontend/src/components/ui/__tests__/vortex.test.tsx
+++ /dev/null
@@ -1,158 +0,0 @@
-import { render } from "@testing-library/react";
-import { afterEach, beforeEach, describe, expect, test, vi } from "vitest";
-import { Vortex } from "../vortex";
-
-type ObserverCallback = (entries: Array<{ isIntersecting: boolean }>) => void;
-
-const rafCallbacks = new Map<number, FrameRequestCallback>();
-let rafId = 0;
-const intersectionCallbacks: ObserverCallback[] = [];
-const resizeCallbacks: Array<() => void> = [];
-const disconnectSpy = vi.fn();
-let mockSize = { width: 800, height: 600 };
-let mockCtx: ReturnType<typeof createMockContext>;
-
-function createMockContext() {
- return {
- clearRect: vi.fn(),
- fillRect: vi.fn(),
- beginPath: vi.fn(),
- moveTo: vi.fn(),
- lineTo: vi.fn(),
- stroke: vi.fn(),
- fillStyle: "",
- strokeStyle: "",
- lineCap: "",
- lineWidth: 0,
- globalCompositeOperation: "",
- };
-}
-
-function flushFrames(count = 1) {
- for (let i = 0; i < count; i++) {
- const pending = Array.from(rafCallbacks.values());
- rafCallbacks.clear();
- for (const callback of pending) callback(performance.now());
- }
-}
-
-function setReducedMotion(matches: boolean) {
- vi.stubGlobal("matchMedia", vi.fn().mockReturnValue({ matches }));
-}
-
-beforeEach(() => {
- rafCallbacks.clear();
- rafId = 0;
- intersectionCallbacks.length = 0;
- resizeCallbacks.length = 0;
- disconnectSpy.mockClear();
- mockSize = { width: 800, height: 600 };
- mockCtx = createMockContext();
-
- vi.stubGlobal("requestAnimationFrame", (cb: FrameRequestCallback) => {
- rafCallbacks.set(++rafId, cb);
- return rafId;
- });
- vi.stubGlobal("cancelAnimationFrame", (id: number) => {
- rafCallbacks.delete(id);
- });
- vi.stubGlobal(
- "IntersectionObserver",
- class {
- constructor(cb: ObserverCallback) {
- intersectionCallbacks.push(cb);
- }
- observe() {}
- disconnect = disconnectSpy;
- },
- );
- vi.stubGlobal(
- "ResizeObserver",
- class {
- constructor(cb: () => void) {
- resizeCallbacks.push(cb);
- }
- observe() {
- for (const cb of resizeCallbacks) cb();
- }
- disconnect = disconnectSpy;
- },
- );
- setReducedMotion(false);
-
- vi.spyOn(HTMLCanvasElement.prototype, "getContext").mockReturnValue(
- mockCtx as unknown as CanvasRenderingContext2D,
- );
- Object.defineProperty(HTMLElement.prototype, "clientWidth", {
- configurable: true,
- get: () => mockSize.width,
- });
- Object.defineProperty(HTMLElement.prototype, "clientHeight", {
- configurable: true,
- get: () => mockSize.height,
- });
-});
-
-afterEach(() => {
- vi.unstubAllGlobals();
- vi.restoreAllMocks();
- Reflect.deleteProperty(HTMLElement.prototype, "clientWidth");
- Reflect.deleteProperty(HTMLElement.prototype, "clientHeight");
-});
-
-describe("Vortex", () => {
- test("animates while visible and stops when hidden", () => {
- render(<Vortex particleCount={10} />);
-
- const [onIntersection] = intersectionCallbacks;
- onIntersection([{ isIntersecting: true }]);
- flushFrames(2);
- expect(mockCtx.stroke).toHaveBeenCalled();
-
- onIntersection([{ isIntersecting: false }]);
- expect(rafCallbacks.size).toBe(0);
- });
-
- test("acts on the last entry when intersection records are batched", () => {
- render(<Vortex particleCount={10} />);
-
- intersectionCallbacks[0]([
- { isIntersecting: true },
- { isIntersecting: false },
- ]);
- expect(rafCallbacks.size).toBe(0);
- expect(mockCtx.stroke).not.toHaveBeenCalled();
- });
-
- test("renders a single static frame under prefers-reduced-motion", () => {
- setReducedMotion(true);
- render(<Vortex particleCount={10} />);
-
- expect(intersectionCallbacks.length).toBe(0);
- flushFrames(1);
- expect(mockCtx.stroke).toHaveBeenCalled();
- expect(rafCallbacks.size).toBe(0);
- });
-
- test("sizes the canvas to its container and follows resizes", () => {
- mockSize = { width: 0, height: 0 };
- const { container } = render(<Vortex particleCount={10} />);
- const canvas = container.querySelector("canvas");
-
- expect(canvas?.width).toBe(0);
-
- mockSize = { width: 640, height: 480 };
- for (const cb of resizeCallbacks) cb();
- expect(canvas?.width).toBe(640);
- expect(canvas?.height).toBe(480);
- });
-
- test("disconnects observers and cancels frames on unmount", () => {
- const { unmount } = render(<Vortex particleCount={10} />);
- intersectionCallbacks[0]([{ isIntersecting: true }]);
-
- unmount();
- expect(disconnectSpy).toHaveBeenCalledTimes(2);
- expect(rafCallbacks.size).toBe(0);
- });
-});
diff --git a/autogpt_platform/frontend/src/components/ui/aurora-background.tsx b/autogpt_platform/frontend/src/components/ui/aurora-background.tsx
deleted file mode 100644
index e31fa97b79..0000000000
--- a/autogpt_platform/frontend/src/components/ui/aurora-background.tsx
+++ /dev/null
@@ -1,47 +0,0 @@
-"use client";
-import { cn } from "@/lib/utils";
-import React, { ReactNode } from "react";
-
-interface Props extends React.HTMLProps<HTMLDivElement> {
- children?: ReactNode;
- showRadialGradient?: boolean;
-}
-
-export function AuroraBackground({
- className,
- children,
- showRadialGradient = true,
- ...props
-}: Props) {
- return (
- <div
- className={cn(
- "transition-bg relative flex flex-col items-center justify-center overflow-hidden",
- className,
- )}
- {...props}
- >
- <div
- aria-hidden
- className="absolute inset-0 overflow-hidden"
- style={
- {
- "--aurora":
- "repeating-linear-gradient(100deg, #3b82f6 10%, #a5b4fc 15%, #93c5fd 20%, #ddd6fe 25%, #60a5fa 30%)",
- "--white-gradient":
- "repeating-linear-gradient(100deg, #fff 0%, #fff 7%, transparent 10%, transparent 12%, #fff 16%)",
- } as React.CSSProperties
- }
- >
- <div
- className={cn(
- `pointer-events-none absolute -inset-[10px] opacity-10 blur-[10px] invert filter will-change-transform [background-image:var(--white-gradient),var(--aurora)] [background-position:50%_50%,50%_50%] [background-size:300%,_200%] after:absolute after:inset-0 after:animate-aurora after:mix-blend-difference after:content-[""] after:[background-attachment:fixed] after:[background-image:var(--white-gradient),var(--aurora)] after:[background-size:200%,_100%]`,
- showRadialGradient &&
- `[mask-image:radial-gradient(ellipse_at_100%_0%,black_10%,transparent_70%)]`,
- )}
- />
- </div>
- {children}
- </div>
- );
-}
diff --git a/autogpt_platform/frontend/src/components/ui/vortex.tsx b/autogpt_platform/frontend/src/components/ui/vortex.tsx
deleted file mode 100644
index e74781b21a..0000000000
--- a/autogpt_platform/frontend/src/components/ui/vortex.tsx
+++ /dev/null
@@ -1,316 +0,0 @@
-"use client";
-import { cn } from "@/lib/utils";
-import { ReactNode, useRef } from "react";
-import { createNoise3D } from "simplex-noise";
-import { motion } from "motion/react";
-import { useMountEffect } from "@/hooks/useMountEffect";
-
-interface VortexProps {
- children?: ReactNode;
- className?: string;
- containerClassName?: string;
- particleCount?: number;
- rangeY?: number;
- baseHue?: number;
- baseSpeed?: number;
- rangeSpeed?: number;
- baseRadius?: number;
- rangeRadius?: number;
- backgroundColor?: string;
-}
-
-export function Vortex(props: VortexProps) {
- const canvasRef = useRef<HTMLCanvasElement>(null);
- const containerRef = useRef<HTMLDivElement>(null);
- const animationFrameId = useRef<number>(undefined);
- const particleCount = props.particleCount || 700;
- const particlePropCount = 9;
- const particlePropsLength = particleCount * particlePropCount;
- const rangeY = props.rangeY || 100;
- const baseTTL = 50;
- const rangeTTL = 150;
- const baseSpeed = props.baseSpeed || 0.0;
- const rangeSpeed = props.rangeSpeed || 1.5;
- const baseRadius = props.baseRadius || 1;
- const rangeRadius = props.rangeRadius || 2;
- const baseHue = props.baseHue || 220;
- const rangeHue = 100;
- const noiseSteps = 3;
- const xOff = 0.00125;
- const yOff = 0.00125;
- const zOff = 0.0005;
- const backgroundColor = props.backgroundColor || "#000000";
- let tick = 0;
- let lastTime = 0;
- let dtFrames = 1;
- let isRunning = false;
- const noise3D = createNoise3D();
- let particleProps = new Float32Array(particlePropsLength);
- const center: [number, number] = [0, 0];
-
- const TAU: number = 2 * Math.PI;
-
- function rand(n: number): number {
- return n * Math.random();
- }
-
- function randRange(n: number): number {
- return n - rand(2 * n);
- }
-
- function fadeInOut(t: number, m: number): number {
- const hm = 0.5 * m;
- return Math.abs(((t + hm) % m) - hm) / hm;
- }
-
- function lerp(n1: number, n2: number, speed: number): number {
- return (1 - speed) * n1 + speed * n2;
- }
-
- function initParticles() {
- tick = 0;
- particleProps = new Float32Array(particlePropsLength);
-
- for (let i = 0; i < particlePropsLength; i += particlePropCount) {
- initParticle(i);
- }
- }
-
- function initParticle(i: number) {
- const canvas = canvasRef.current;
- if (!canvas) return;
-
- const x = rand(canvas.width);
- const y = center[1] + randRange(rangeY);
- const vx = 0;
- const vy = 0;
- const life = 0;
- const ttl = baseTTL + rand(rangeTTL);
- const speed = baseSpeed + rand(rangeSpeed);
- const radius = baseRadius + rand(rangeRadius);
- const hue = baseHue + rand(rangeHue);
-
- particleProps.set([x, y, vx, vy, life, ttl, speed, radius, hue], i);
- }
-
- function startLoop() {
- const canvas = canvasRef.current;
- const ctx = canvas?.getContext("2d");
- if (!canvas || !ctx || isRunning) return;
-
- isRunning = true;
- lastTime = performance.now();
- animationFrameId.current = window.requestAnimationFrame(() =>
- loop(canvas, ctx),
- );
- }
-
- function stopLoop() {
- isRunning = false;
- if (animationFrameId.current) {
- window.cancelAnimationFrame(animationFrameId.current);
- }
- }
-
- function loop(canvas: HTMLCanvasElement, ctx: CanvasRenderingContext2D) {
- const now = performance.now();
- const dt = Math.min((now - lastTime) / 1000, 1 / 30);
- lastTime = now;
- dtFrames = dt * 60;
- tick += dtFrames;
-
- renderFrame(canvas, ctx);
-
- if (isRunning) {
- animationFrameId.current = window.requestAnimationFrame(() =>
- loop(canvas, ctx),
- );
- }
- }
-
- function renderFrame(
- canvas: HTMLCanvasElement,
- ctx: CanvasRenderingContext2D,
- ) {
- ctx.clearRect(0, 0, canvas.width, canvas.height);
-
- ctx.fillStyle = backgroundColor;
- ctx.fillRect(0, 0, canvas.width, canvas.height);
-
- ctx.lineCap = "round";
- ctx.globalCompositeOperation = "lighter";
- stepParticles(ctx);
- ctx.globalCompositeOperation = "source-over";
- }
-
- function drawStaticFrame(
- canvas: HTMLCanvasElement,
- ctx: CanvasRenderingContext2D,
- ) {
- dtFrames = 1;
- for (let i = 0; i < 90; i++) {
- tick += 1;
- stepParticles(null);
- }
- renderFrame(canvas, ctx);
- }
-
- function stepParticles(ctx: CanvasRenderingContext2D | null) {
- for (let i = 0; i < particlePropsLength; i += particlePropCount) {
- updateParticle(i, ctx);
- }
- }
-
- function updateParticle(i: number, ctx: CanvasRenderingContext2D | null) {
- const canvas = canvasRef.current;
- if (!canvas) return;
-
- const i2 = 1 + i,
- i3 = 2 + i,
- i4 = 3 + i,
- i5 = 4 + i,
- i6 = 5 + i,
- i7 = 6 + i,
- i8 = 7 + i,
- i9 = 8 + i;
-
- const x = particleProps[i];
- const y = particleProps[i2];
- const n = noise3D(x * xOff, y * yOff, tick * zOff) * noiseSteps * TAU;
- const smoothing = 1 - Math.pow(0.5, dtFrames);
- const vx = lerp(particleProps[i3], Math.cos(n), smoothing);
- const vy = lerp(particleProps[i4], Math.sin(n), smoothing);
- let life = particleProps[i5];
- const ttl = particleProps[i6];
- const speed = particleProps[i7];
- const x2 = x + vx * speed * dtFrames;
- const y2 = y + vy * speed * dtFrames;
- const radius = particleProps[i8];
- const hue = particleProps[i9];
-
- if (ctx) {
- drawParticle(x, y, x2, y2, life, ttl, radius, hue, ctx);
- }
-
- life += dtFrames;
-
- particleProps[i] = x2;
- particleProps[i2] = y2;
- particleProps[i3] = vx;
- particleProps[i4] = vy;
- particleProps[i5] = life;
-
- if (checkBounds(x, y, canvas) || life > ttl) {
- initParticle(i);
- }
- }
-
- function drawParticle(
- x: number,
- y: number,
- x2: number,
- y2: number,
- life: number,
- ttl: number,
- radius: number,
- hue: number,
- ctx: CanvasRenderingContext2D,
- ) {
- const alpha = fadeInOut(life, ttl);
-
- ctx.beginPath();
- ctx.moveTo(x, y);
- ctx.lineTo(x2, y2);
- ctx.lineWidth = radius * 3;
- ctx.strokeStyle = `hsla(${hue},100%,60%,${0.3 * alpha})`;
- ctx.stroke();
-
- ctx.beginPath();
- ctx.moveTo(x, y);
- ctx.lineTo(x2, y2);
- ctx.lineWidth = radius;
- ctx.strokeStyle = `hsla(${hue},100%,70%,${alpha})`;
- ctx.stroke();
- }
-
- function checkBounds(x: number, y: number, canvas: HTMLCanvasElement) {
- return x > canvas.width || x < 0 || y > canvas.height || y < 0;
- }
-
- function resize(canvas: HTMLCanvasElement, container: HTMLElement) {
- canvas.width = container.clientWidth;
- canvas.height = container.clientHeight;
-
- center[0] = 0.5 * canvas.width;
- center[1] = 0.5 * canvas.height;
- }
-
- useMountEffect(() => {
- const canvas = canvasRef.current;
- const container = containerRef.current;
- const ctx = canvas?.getContext("2d");
- if (!canvas || !container || !ctx) return;
-
- resize(canvas, container);
- initParticles();
-
- if (window.matchMedia("(prefers-reduced-motion: reduce)").matches) {
- let staticRedrawFrame: number | undefined;
- const staticResizeObserver = new ResizeObserver(() => {
- if (staticRedrawFrame) window.cancelAnimationFrame(staticRedrawFrame);
- staticRedrawFrame = window.requestAnimationFrame(() => {
- resize(canvas, container);
- initParticles();
- drawStaticFrame(canvas, ctx);
- });
- });
- staticResizeObserver.observe(container);
- return () => {
- if (staticRedrawFrame) window.cancelAnimationFrame(staticRedrawFrame);
- staticResizeObserver.disconnect();
- };
- }
-
- const resizeObserver = new ResizeObserver(() => {
- const wasEmpty = canvas.width === 0 || canvas.height === 0;
- resize(canvas, container);
- if (wasEmpty && canvas.width > 0 && canvas.height > 0) {
- initParticles();
- }
- });
- resizeObserver.observe(container);
-
- const intersectionObserver = new IntersectionObserver((entries) => {
- const entry = entries[entries.length - 1];
- if (entry.isIntersecting) {
- startLoop();
- } else {
- stopLoop();
- }
- });
- intersectionObserver.observe(container);
-
- return () => {
- resizeObserver.disconnect();
- intersectionObserver.disconnect();
- stopLoop();
- };
- });
-
- return (
- <div className={cn("relative h-full w-full", props.containerClassName)}>
- <motion.div
- initial={{ opacity: 0 }}
- animate={{ opacity: 1 }}
- ref={containerRef}
- className="absolute inset-0 z-0 flex h-full w-full items-center justify-center bg-transparent"
- >
- <canvas ref={canvasRef}></canvas>
- </motion.div>
-
- <div className={cn("relative z-10", props.className)}>
- {props.children}
- </div>
- </div>
- );
-}
diff --git a/autogpt_platform/frontend/tailwind.config.ts b/autogpt_platform/frontend/tailwind.config.ts
index 9133742d39..550ac0de39 100644
--- a/autogpt_platform/frontend/tailwind.config.ts
+++ b/autogpt_platform/frontend/tailwind.config.ts
@@ -283,10 +283,6 @@ const config = {
"60%": { transform: "translateX(-3px)" },
"80%": { transform: "translateX(3px)" },
},
- aurora: {
- "0%": { backgroundPosition: "50% 50%, 50% 50%" },
- "100%": { backgroundPosition: "350% 50%, 350% 50%" },
- },
"marquee-x": {
"0%": { transform: "translateX(0)" },
"100%": { transform: "translateX(-50%)" },
@@ -325,7 +321,6 @@ const config = {
shimmer: "shimmer 4s ease-in-out infinite",
loader: "loader 1s infinite",
shake: "shake 0.5s ease-in-out",
- aurora: "aurora 60s linear infinite",
"marquee-x": "marquee-x 40s linear infinite",
"progress-bar":
"progress-bar 1.4s cubic-bezier(0.65, 0, 0.35, 1) infinite",