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): briefing-first /home page behind hire-experts flag (#13926)
Abhimanyu Yadav6f0d822b2b45
diff --git a/autogpt_platform/frontend/src/app/(platform)/home/__tests__/main.test.tsx b/autogpt_platform/frontend/src/app/(platform)/home/__tests__/main.test.tsxnew file mode 100644index 0000000000..bcd25b91f2--- /dev/null+++ b/autogpt_platform/frontend/src/app/(platform)/home/__tests__/main.test.tsx@@ -0,0 +1,373 @@+import userEvent from "@testing-library/user-event";+import { http, HttpResponse } from "msw";+import { afterEach, expect, test, vi } from "vitest";+import type { HomeAgentStatus } from "@/app/api/__generated__/models/homeAgentStatus";+import type { HomeAttentionItem } from "@/app/api/__generated__/models/homeAttentionItem";+import type { HomeBriefingOutcome } from "@/app/api/__generated__/models/homeBriefingOutcome";+import type { HomeDashboardResponse } from "@/app/api/__generated__/models/homeDashboardResponse";+import { server } from "@/mocks/mock-server";+import { render, screen, waitFor } from "@/tests/integrations/test-utils";+import HomePage from "../page";++const { setFlagStatusMock } = vi.hoisted(() => ({+ setFlagStatusMock: vi.fn(() => ({ enabled: true, ready: true })),+}));++vi.mock("@/services/feature-flags/use-get-flag", async (importActual) => {+ const actual =+ await importActual<+ typeof import("@/services/feature-flags/use-get-flag")+ >();+ return {+ ...actual,+ useFlagStatus: (flag: string) =>+ flag === "hire-experts"+ ? setFlagStatusMock()+ : actual.useFlagStatus(flag as never),+ useGetFlag: (flag: string) => flag === actual.Flag.HIRE_EXPERTS,+ };+});++vi.mock("@/lib/auth/hooks/useAuth", () => ({+ useAuth: () => ({+ user: { user_metadata: { preferred_name: "Abhi" } },+ }),+}));++const notFoundMock = vi.hoisted(() => vi.fn());+vi.mock("next/navigation", () => ({+ useRouter: () => ({ push: vi.fn() }),+ usePathname: () => "/home",+ useSearchParams: () => new URLSearchParams(),+ useParams: () => ({}),+ notFound: () => {+ notFoundMock();+ throw new Error("NEXT_NOT_FOUND");+ },+}));++const NOW = new Date("2026-08-09T12:00:00Z");+const maria = {+ id: "maria",+ name: "Maria",+ role: "Planning",+ avatar_url: null,+};++const approvalItem: HomeAttentionItem = {+ id: "attention-approval",+ kind: "approval",+ priority: "high",+ title: "Approve the camera shortlist",+ description: "Maria wants to send the shortlist to your inbox.",+ why_it_matters: "The research run is paused until you decide.",+ expert: maria,+ primary_action: { label: "Review", href: "/library/runs/run-1" },+ review: {+ node_exec_id: "node-exec-1",+ graph_exec_id: "graph-exec-1",+ graph_id: "graph-1",+ graph_version: 1,+ user_id: "user-1",+ payload: {},+ editable: false,+ status: "WAITING",+ created_at: NOW,+ },+};++const dashboard: HomeDashboardResponse = {+ generated_at: NOW,+ timezone: "UTC",+ attention: [+ {+ id: "attention-1",+ kind: "setup",+ priority: "high",+ title: "Connect your calendar for Maria",+ description: "Maria cannot schedule your learning sessions yet.",+ why_it_matters: "Three planned sessions are waiting for this connection.",+ preview: "3 days · 7 stops · $620 estimated total",+ expert: maria,+ primary_action: { label: "Finish setup", href: "/team/maria" },+ },+ ],+ briefing: {+ generated_at: NOW,+ window_started_at: new Date("2026-08-08T12:00:00Z"),+ completed_count: 14,+ failed_count: 1,+ routine_count: 13,+ outcomes: [+ {+ id: "outcome-1",+ status: "completed",+ title: "Your camera research is ready",+ summary: "Compared 18 cameras and shortlisted the best three.",+ expert: maria,+ agent_name: "Product Researcher",+ occurred_at: NOW,+ duration_seconds: 812,+ cost_cents: 42,+ link: "/library",+ },+ {+ id: "outcome-2",+ status: "failed",+ title: "Learning sessions could not be scheduled",+ summary: "Nova needs Calendar access before the plan can continue.",+ expert: maria,+ agent_name: "Weekly Learning Coach",+ occurred_at: NOW,+ duration_seconds: 44,+ cost_cents: 3,+ link: "/team/maria",+ },+ ],+ },+ active_tasks: [+ {+ id: "active-1",+ title: "Checking recurring subscriptions",+ status: "running",+ expert: maria,+ started_at: new Date("2026-08-09T11:52:00Z"),+ link: "/library",+ },+ ],+ upcoming_tasks: [+ {+ id: "upcoming-1",+ title: "Spanish practice plan",+ kind: "agent",+ expert: maria,+ next_run_time: new Date("2026-08-09T13:20:00Z"),+ },+ ],+ team: { total: 10, ready: 7, working: 1, needs_attention: 2 },+ agents: [+ {+ expert: maria,+ status: "working",+ detail: "Checking recurring subscriptions",+ },+ ],+ week: {+ run_count: 32,+ completed_count: 27,+ review_count: 3,+ failed_count: 2,+ total_runtime_seconds: 18_120,+ timed_run_count: 30,+ total_cost_cents: 367,+ credits_balance: 15_600,+ daily: [+ {+ date: new Date("2026-08-09T00:00:00Z"),+ completed_count: 6,+ review_count: 1,+ failed_count: 0,+ },+ ],+ },+};++afterEach(() => {+ setFlagStatusMock.mockReturnValue({ enabled: true, ready: true });+});++function mockDashboard(response: HomeDashboardResponse) {+ server.use(+ http.get(/\/api\/proxy\/api\/home(?:\?.*)?$/, () =>+ HttpResponse.json(response),+ ),+ );+}++test("renders every Home tile from the aggregate API", async () => {+ mockDashboard(dashboard);++ render(<HomePage />);++ expect(await screen.findByText(/Abhi/)).toBeDefined();+ expect(screen.getByRole("heading", { name: "Needs you" })).toBeDefined();+ expect(screen.getByLabelText("1 item needs your attention")).toBeDefined();+ expect(screen.getByText("Connect your calendar for Maria")).toBeDefined();+ expect(screen.getByRole("heading", { name: "Your briefing" })).toBeDefined();+ expect(screen.getByText("Your camera research is ready")).toBeDefined();+ expect(screen.getByText(/13 routine tasks completed quietly/)).toBeDefined();+ expect(screen.getByRole("heading", { name: "Your agents" })).toBeDefined();+ expect(+ screen.getByRole("link", { name: /View all 10 agents/ }),+ ).toBeDefined();+ expect(screen.getByRole("heading", { name: "Now & next" })).toBeDefined();+ expect(+ screen.getAllByText("Checking recurring subscriptions").length,+ ).toBeGreaterThan(0);+ expect(screen.getByText("Spanish practice plan")).toBeDefined();+});++test("falls back to an Unknown badge for an unrecognised agent status", async () => {+ mockDashboard({+ ...dashboard,+ agents: [+ {+ ...dashboard.agents[0],+ status: "decommissioned" as HomeAgentStatus["status"],+ },+ ],+ });++ render(<HomePage />);++ expect(await screen.findByText("Unknown")).toBeDefined();+});++test("approving an item one-tap sends the review decision", async () => {+ const user = userEvent.setup();+ const reviewRequests: unknown[] = [];+ mockDashboard({ ...dashboard, attention: [approvalItem] });+ server.use(+ http.post("/api/proxy/api/review/action", async ({ request }) => {+ reviewRequests.push(await request.json());+ return HttpResponse.json({ failed_count: 0, processed_count: 1 });+ }),+ );++ render(<HomePage />);++ await user.click(+ await screen.findByRole("button", {+ name: "Approve: Approve the camera shortlist",+ }),+ );++ await waitFor(() => expect(reviewRequests).toHaveLength(1));+ expect(reviewRequests[0]).toEqual({+ reviews: [+ {+ node_exec_id: "node-exec-1",+ approved: true,+ auto_approve_future: false,+ },+ ],+ });+});++test("keeps a Review deep link alongside the approval shortcuts", async () => {+ mockDashboard({ ...dashboard, attention: [approvalItem] });++ render(<HomePage />);++ const reviewLink = await screen.findByRole("link", { name: "Review" });+ expect(reviewLink.getAttribute("href")).toBe("/library/runs/run-1");+});++test("shows calm, useful empty states without hiding the page structure", async () => {+ mockDashboard({+ ...dashboard,+ attention: [],+ briefing: {+ ...dashboard.briefing,+ completed_count: 0,+ failed_count: 0,+ routine_count: 0,+ outcomes: [],+ },+ active_tasks: [],+ upcoming_tasks: [],+ team: { total: 0, ready: 0, working: 0, needs_attention: 0 },+ agents: [],+ });++ render(<HomePage />);++ expect(await screen.findByText("You are all caught up")).toBeDefined();+ expect(screen.getByText("No new outcomes yet")).toBeDefined();+ expect(screen.getByText(/Nothing is scheduled/)).toBeDefined();+ expect(screen.getByRole("link", { name: "Browse experts" })).toBeDefined();+});++test("filters briefing outcomes by their real status", async () => {+ const user = userEvent.setup();+ mockDashboard(dashboard);++ render(<HomePage />);++ await user.click(+ await screen.findByRole("button", {+ name: "Filter briefing outcomes: All",+ }),+ );+ await user.click(screen.getByRole("menuitemradio", { name: "Failed" }));++ expect(+ screen.getByText("Learning sessions could not be scheduled"),+ ).toBeDefined();+ expect(screen.queryByText("Your camera research is ready")).toBeNull();+});++test("labels a filter option for an unrecognised briefing status", async () => {+ const user = userEvent.setup();+ mockDashboard({+ ...dashboard,+ briefing: {+ ...dashboard.briefing,+ outcomes: [+ dashboard.briefing.outcomes[0],+ {+ ...dashboard.briefing.outcomes[1],+ status: "cancelled" as HomeBriefingOutcome["status"],+ },+ ],+ },+ });++ render(<HomePage />);++ await user.click(+ await screen.findByRole("button", {+ name: "Filter briefing outcomes: All",+ }),+ );++ expect(+ screen.getByRole("menuitemradio", { name: "cancelled" }),+ ).toBeDefined();+});++test("shows a retryable page error when the aggregate cannot load", async () => {+ let attempts = 0;+ server.use(+ http.get(/\/api\/proxy\/api\/home(?:\?.*)?$/, () => {+ attempts += 1;+ return attempts === 1+ ? HttpResponse.json({ detail: "boom" }, { status: 500 })+ : HttpResponse.json(dashboard);+ }),+ );++ const user = userEvent.setup();+ render(<HomePage />);++ expect(+ await screen.findByText("Your Home briefing could not be loaded"),+ ).toBeDefined();++ await user.click(screen.getByRole("button", { name: /try again/i }));++ expect(+ await screen.findByRole("heading", { name: "Needs you" }),+ ).toBeDefined();+});++test("calls notFound when the experts feature is disabled", () => {+ mockDashboard(dashboard);+ setFlagStatusMock.mockReturnValueOnce({ enabled: false, ready: true });+ notFoundMock.mockClear();++ try {+ render(<HomePage />);+ } catch {}+ expect(notFoundMock).toHaveBeenCalled();+});diff --git a/autogpt_platform/frontend/src/app/(platform)/home/__tests__/needs-you.test.tsx b/autogpt_platform/frontend/src/app/(platform)/home/__tests__/needs-you.test.tsxnew file mode 100644index 0000000000..4bfc45a972--- /dev/null+++ b/autogpt_platform/frontend/src/app/(platform)/home/__tests__/needs-you.test.tsx@@ -0,0 +1,201 @@+import userEvent from "@testing-library/user-event";+import { http, HttpResponse } from "msw";+import { expect, test, vi } from "vitest";+import type { HomeAttentionItem } from "@/app/api/__generated__/models/homeAttentionItem";+import type { HomeDashboardResponse } from "@/app/api/__generated__/models/homeDashboardResponse";+import { server } from "@/mocks/mock-server";+import { render, screen, waitFor } from "@/tests/integrations/test-utils";+import HomePage from "../page";++vi.mock("@/services/feature-flags/use-get-flag", async (importActual) => {+ const actual =+ await importActual<+ typeof import("@/services/feature-flags/use-get-flag")+ >();+ return {+ ...actual,+ useFlagStatus: (flag: string) =>+ flag === "hire-experts"+ ? { enabled: true, ready: true }+ : actual.useFlagStatus(flag as never),+ useGetFlag: (flag: string) => flag === actual.Flag.HIRE_EXPERTS,+ };+});++vi.mock("@/lib/auth/hooks/useAuth", () => ({+ useAuth: () => ({ user: { user_metadata: { preferred_name: "Abhi" } } }),+}));++vi.mock("next/navigation", () => ({+ useRouter: () => ({ push: vi.fn() }),+ usePathname: () => "/home",+ useSearchParams: () => new URLSearchParams(),+ useParams: () => ({}),+ notFound: () => {+ throw new Error("NEXT_NOT_FOUND");+ },+}));++const NOW = new Date("2026-08-09T12:00:00Z");+const maria = {+ id: "maria",+ name: "Maria",+ role: "Planning",+ avatar_url: null,+};++function makeApproval(index: number): HomeAttentionItem {+ return {+ id: `approval-${index}`,+ kind: "approval",+ priority: "high",+ title: `Approve item ${index}`,+ description: "Maria is waiting on your decision.",+ why_it_matters: "The run is paused until you decide.",+ expert: maria,+ primary_action: { label: "Review", href: `/library/runs/run-${index}` },+ review: {+ node_exec_id: `node-exec-${index}`,+ graph_exec_id: `graph-exec-${index}`,+ graph_id: "graph-1",+ graph_version: 1,+ user_id: "user-1",+ payload: {},+ editable: false,+ status: "WAITING",+ created_at: NOW,+ },+ };+}++const setupItem: HomeAttentionItem = {+ id: "setup-1",+ kind: "setup",+ priority: "normal",+ title: "Connect your calendar",+ description: "Maria cannot schedule sessions yet.",+ why_it_matters: "Sessions are waiting on this connection.",+ expert: maria,+ primary_action: { label: "Finish setup", href: "/team/maria" },+};++function makeDashboard(attention: HomeAttentionItem[]): HomeDashboardResponse {+ return {+ generated_at: NOW,+ timezone: "UTC",+ attention,+ briefing: {+ generated_at: NOW,+ window_started_at: new Date("2026-08-08T12:00:00Z"),+ completed_count: 0,+ failed_count: 0,+ routine_count: 0,+ outcomes: [],+ },+ active_tasks: [],+ upcoming_tasks: [],+ team: { total: 0, ready: 0, working: 0, needs_attention: 0 },+ agents: [],+ week: {+ run_count: 0,+ completed_count: 0,+ review_count: 0,+ failed_count: 0,+ total_runtime_seconds: 0,+ timed_run_count: 0,+ total_cost_cents: 0,+ credits_balance: 0,+ daily: [],+ },+ };+}++function mockDashboard(attention: HomeAttentionItem[]) {+ server.use(+ http.get(/\/api\/proxy\/api\/home(?:\?.*)?$/, () =>+ HttpResponse.json(makeDashboard(attention)),+ ),+ );+}++test("lists every attention item without collapsing", async () => {+ mockDashboard([1, 2, 3, 4].map(makeApproval));++ render(<HomePage />);++ expect(await screen.findByText("Approve item 1")).toBeDefined();+ expect(screen.getByText("Approve item 4")).toBeDefined();+});++test("filters the attention list by kind", async () => {+ const user = userEvent.setup();+ mockDashboard([makeApproval(1), setupItem]);++ render(<HomePage />);++ await user.click(+ await screen.findByRole("button", { name: "Filter interventions: All" }),+ );+ await user.click(screen.getByRole("menuitemradio", { name: "Setup" }));++ expect(screen.getByText("Connect your calendar")).toBeDefined();+ expect(screen.queryByText("Approve item 1")).toBeNull();+});++test("requires a second press to confirm a decline", async () => {+ const user = userEvent.setup();+ const reviewRequests: unknown[] = [];+ mockDashboard([makeApproval(1)]);+ server.use(+ http.post("/api/proxy/api/review/action", async ({ request }) => {+ reviewRequests.push(await request.json());+ return HttpResponse.json({ failed_count: 0, processed_count: 1 });+ }),+ );++ render(<HomePage />);++ await user.click(+ await screen.findByRole("button", { name: "Decline: Approve item 1" }),+ );+ expect(reviewRequests).toHaveLength(0);++ await user.click(+ screen.getByRole("button", { name: "Confirm decline: Approve item 1" }),+ );++ await waitFor(() => expect(reviewRequests).toHaveLength(1));+ expect(reviewRequests[0]).toEqual({+ reviews: [+ {+ node_exec_id: "node-exec-1",+ approved: false,+ auto_approve_future: false,+ },+ ],+ });+});++test("keeps a rejected review actionable instead of dropping the row", async () => {+ const user = userEvent.setup();+ mockDashboard([makeApproval(1)]);+ server.use(+ http.post("/api/proxy/api/review/action", () =>+ HttpResponse.json({+ failed_count: 1,+ processed_count: 0,+ error: "Run already finished",+ }),+ ),+ );++ render(<HomePage />);++ const approve = await screen.findByRole("button", {+ name: "Approve: Approve item 1",+ });+ await user.click(approve);++ await waitFor(() => expect(approve.hasAttribute("disabled")).toBe(false));+ expect(screen.getByText("Approve item 1")).toBeDefined();+});diff --git a/autogpt_platform/frontend/src/app/(platform)/home/components/AgentTeam/AgentTeam.tsx b/autogpt_platform/frontend/src/app/(platform)/home/components/AgentTeam/AgentTeam.tsxnew file mode 100644index 0000000000..19141d4b7c--- /dev/null+++ b/autogpt_platform/frontend/src/app/(platform)/home/components/AgentTeam/AgentTeam.tsx@@ -0,0 +1,82 @@+import {+ ArrowRight01Icon,+ UserAdd01Icon,+ UserGroupIcon,+} from "@hugeicons/core-free-icons";+import Link from "next/link";+import type { HomeDashboardResponse } from "@/app/api/__generated__/models/homeDashboardResponse";+import { Icon } from "@/components/atoms/Icon/Icon";+import { Text } from "@/components/atoms/Text/Text";+import { HomeTileEmpty } from "../HomeTileEmpty/HomeTileEmpty";+import { HomeTile } from "../HomeTile/HomeTile";+import { AgentRow } from "./components/AgentRow";++interface Props {+ dashboard: HomeDashboardResponse;+ className?: string;+}++export function AgentTeam({ dashboard, className }: Props) {+ const { team, agents } = dashboard;+ const readyCount = team.ready + team.working;+ return (+ <HomeTile+ className={className}+ contentClassName="flex flex-col"+ title={+ <div className="flex items-start justify-between gap-3">+ <div className="flex min-w-0 items-center gap-2">+ <Icon+ icon={UserGroupIcon}+ size={18}+ className="text-zinc-500"+ aria-hidden="true"+ />+ <Text variant="h5" className="text-zinc-950">+ Your agents+ </Text>+ </div>+ <div className="flex shrink-0 items-center gap-2">+ {team.total > 0 ? (+ <span className="shrink-0 rounded-md bg-zinc-100 px-2 py-1 text-xs font-medium tabular-nums text-zinc-600">+ {readyCount}/{team.total} available+ </span>+ ) : null}+ </div>+ </div>+ }+ header={+ <Text variant="large" className="text-zinc-600">+ {team.working > 0+ ? `${team.working} working now · ${team.ready} ready`+ : `${team.ready} ready for work`}+ </Text>+ }+ >+ {agents.length === 0 ? (+ <HomeTileEmpty+ icon={UserAdd01Icon}+ title="Build your team"+ description="Hire an expert to start delegating work."+ action={{ href: "/marketplace", label: "Browse experts" }}+ />+ ) : (+ <div className="divide-y divide-zinc-100">+ {agents.slice(0, 3).map((agent) => (+ <AgentRow key={agent.expert.id} agent={agent} />+ ))}+ </div>+ )}++ {team.total > 0 ? (+ <Link+ href="/team"+ className="mt-2 flex items-center justify-between px-1 text-sm font-medium text-zinc-600 transition-colors hover:text-zinc-950 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-zinc-400"+ >+ View all {team.total} agents+ <Icon icon={ArrowRight01Icon} size={16} aria-hidden="true" />+ </Link>+ ) : null}+ </HomeTile>+ );+}diff --git a/autogpt_platform/frontend/src/app/(platform)/home/components/AgentTeam/components/AgentRow.tsx b/autogpt_platform/frontend/src/app/(platform)/home/components/AgentTeam/components/AgentRow.tsxnew file mode 100644index 0000000000..25673ce3eb--- /dev/null+++ b/autogpt_platform/frontend/src/app/(platform)/home/components/AgentTeam/components/AgentRow.tsx@@ -0,0 +1,52 @@+import { ArrowRight01Icon } from "@hugeicons/core-free-icons";+import Link from "next/link";+import type { HomeAgentStatus } from "@/app/api/__generated__/models/homeAgentStatus";+import { Icon } from "@/components/atoms/Icon/Icon";+import { Text } from "@/components/atoms/Text/Text";+import { ExpertAvatar } from "@/components/molecules/ExpertAvatar/ExpertAvatar";+import { formatUntil } from "../../NowNext/helpers";+import { StatusBadge } from "./StatusBadge";++interface Props {+ agent: HomeAgentStatus;+}++export function AgentRow({ agent }: Props) {+ return (+ <Link+ href={`/team/${agent.expert.id}`}+ className="group -mx-2 flex min-w-0 items-center gap-3 rounded-lg px-2 py-2.5 transition-colors hover:bg-zinc-50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-zinc-400"+ >+ <ExpertAvatar+ name={agent.expert.name}+ avatarUrl={agent.expert.avatar_url}+ />+ <div className="min-w-0 flex-1">+ <div className="flex items-center gap-2">+ <Text variant="body-medium" className="truncate text-zinc-900">+ {agent.expert.name}+ </Text>+ <StatusBadge status={agent.status} />+ </div>+ <Text variant="small" className="truncate text-zinc-500">+ {agent.detail}+ </Text>+ </div>+ {agent.next_run_time ? (+ <Text+ variant="small"+ className="shrink-0 tabular-nums text-zinc-400 group-hover:text-zinc-600"+ >+ {formatUntil(agent.next_run_time)}+ </Text>+ ) : (+ <Icon+ icon={ArrowRight01Icon}+ size={15}+ className="shrink-0 text-zinc-300 transition-transform group-hover:translate-x-0.5 group-hover:text-zinc-600"+ aria-hidden="true"+ />+ )}+ </Link>+ );+}diff --git a/autogpt_platform/frontend/src/app/(platform)/home/components/AgentTeam/components/StatusBadge.tsx b/autogpt_platform/frontend/src/app/(platform)/home/components/AgentTeam/components/StatusBadge.tsxnew file mode 100644index 0000000000..3bed204971--- /dev/null+++ b/autogpt_platform/frontend/src/app/(platform)/home/components/AgentTeam/components/StatusBadge.tsx@@ -0,0 +1,70 @@+import {+ AlertCircleIcon,+ CheckmarkCircle02Icon,+ HelpCircleIcon,+ Loading03Icon,+ PauseIcon,+ Settings01Icon,+} from "@hugeicons/core-free-icons";+import type { HomeAgentStatus } from "@/app/api/__generated__/models/homeAgentStatus";+import { Icon } from "@/components/atoms/Icon/Icon";+import { cn } from "@/lib/utils";++const STATUS_CONFIG = {+ working: {+ label: "Working",+ icon: Loading03Icon,+ className: "bg-primary/10 text-primary",+ },+ ready: {+ label: "Ready",+ icon: CheckmarkCircle02Icon,+ className: "bg-emerald-50 text-emerald-700",+ },+ needs_setup: {+ label: "Setup",+ icon: Settings01Icon,+ className: "bg-amber-50 text-amber-700",+ },+ paused: {+ label: "Paused",+ icon: PauseIcon,+ className: "bg-zinc-100 text-zinc-600",+ },+ failed: {+ label: "Failed",+ icon: AlertCircleIcon,+ className: "bg-rose-50 text-rose-700",+ },+};++const UNKNOWN_STATUS_CONFIG = {+ label: "Unknown",+ icon: HelpCircleIcon,+ className: "bg-zinc-100 text-zinc-600",+};++interface Props {+ status: HomeAgentStatus["status"];+}++export function StatusBadge({ status }: Props) {+ const config = STATUS_CONFIG[status] ?? UNKNOWN_STATUS_CONFIG;++ return (+ <span+ className={cn(+ "inline-flex shrink-0 items-center gap-1 rounded-md px-2 py-1 text-xs font-medium",+ config.className,+ )}+ >+ <Icon+ icon={config.icon}+ size={13}+ className={cn(status === "working" && "animate-spin")}+ aria-hidden="true"+ />+ {config.label}+ </span>+ );+}diff --git a/autogpt_platform/frontend/src/app/(platform)/home/components/HomeHeader/HomeHeader.tsx b/autogpt_platform/frontend/src/app/(platform)/home/components/HomeHeader/HomeHeader.tsxnew file mode 100644index 0000000000..a9e3ab4b63--- /dev/null+++ b/autogpt_platform/frontend/src/app/(platform)/home/components/HomeHeader/HomeHeader.tsx@@ -0,0 +1,65 @@+import { Calendar03Icon } from "@hugeicons/core-free-icons";+import type { HomeDashboardResponse } from "@/app/api/__generated__/models/homeDashboardResponse";+import { Icon } from "@/components/atoms/Icon/Icon";+import { Text } from "@/components/atoms/Text/Text";+import { formatHeaderDate, getHomeStatusLine } from "../../helpers";++interface Props {+ greeting: string;+ name: string;+ dashboard: HomeDashboardResponse;+}++export function HomeHeader({ greeting, name, dashboard }: Props) {+ const date = formatHeaderDate(dashboard.generated_at, dashboard.timezone);+ const status = getHomeStatusLine(dashboard);++ return (+ <header className="my-6 flex items-start justify-between gap-6 px-4 sm:px-5">+ <div className="min-w-0">+ <Text+ variant="h4"+ className="text-pretty tracking-[-0.025em] text-zinc-950"+ >+ {greeting},{" "}+ <span className="bg-gradient-to-r from-purple-500 to-purple-300 bg-clip-text text-transparent">+ {name}+ </span>+ </Text>+ <Text variant="large" className="mt-3 text-pretty text-zinc-500">+ {status.split(/(\d+)/).map((part, index) =>+ /^\d+$/.test(part) ? (+ <strong+ key={`${part}-${index}`}+ className="font-semibold tabular-nums text-zinc-700"+ >+ {part}+ </strong>+ ) : (+ part+ ),+ )}+ </Text>+ </div>+ <time+ dateTime={new Date(dashboard.generated_at).toISOString()}+ className="flex shrink-0 items-center gap-3 text-right"+ >+ <Icon+ icon={Calendar03Icon}+ size={22}+ className="text-zinc-500"+ aria-hidden="true"+ />+ <div>+ <Text variant="large" className="font-medium text-zinc-900">+ {date.weekday}+ </Text>+ <Text variant="body-medium" className="mt-0.5 text-zinc-500">+ {date.calendarDate}+ </Text>+ </div>+ </time>+ </header>+ );+}diff --git a/autogpt_platform/frontend/src/app/(platform)/home/components/HomeTile/HomeTile.tsx b/autogpt_platform/frontend/src/app/(platform)/home/components/HomeTile/HomeTile.tsxnew file mode 100644index 0000000000..52bc036fab--- /dev/null+++ b/autogpt_platform/frontend/src/app/(platform)/home/components/HomeTile/HomeTile.tsx@@ -0,0 +1,40 @@+import type { ReactNode } from "react";+import { cn } from "@/lib/utils";++interface Props {+ children: ReactNode;+ title: ReactNode;+ header?: ReactNode;+ className?: string;+ contentClassName?: string;+ surfaceClassName?: string;+ as?: "div" | "section";+}++export function HomeTile({+ children,+ title,+ header,+ className,+ contentClassName,+ surfaceClassName,+ as = "section",+}: Props) {+ const Component = as;+ return (+ <Component className={cn("relative flex min-w-0 flex-col", className)}>+ <div className="mb-2 flex flex-col justify-start px-4 sm:px-5">+ {title}+ {header ? <div className="mt-0.5">{header}</div> : null}+ </div>+ <div+ className={cn(+ "relative flex min-w-0 flex-1 flex-col rounded-[30px] bg-white p-4 shadow-zinc-950 smooth-shadow-ring-sm sm:p-5",+ surfaceClassName,+ )}+ >+ <div className={cn("min-w-0 flex-1", contentClassName)}>{children}</div>+ </div>+ </Component>+ );+}diff --git a/autogpt_platform/frontend/src/app/(platform)/home/components/HomeTileEmpty/HomeTileEmpty.tsx b/autogpt_platform/frontend/src/app/(platform)/home/components/HomeTileEmpty/HomeTileEmpty.tsxnew file mode 100644index 0000000000..a78490c05c--- /dev/null+++ b/autogpt_platform/frontend/src/app/(platform)/home/components/HomeTileEmpty/HomeTileEmpty.tsx@@ -0,0 +1,54 @@+import type { IconSvgElement } from "@hugeicons/react";+import { Button } from "@/components/atoms/Button/Button";+import { Icon } from "@/components/atoms/Icon/Icon";+import { Text } from "@/components/atoms/Text/Text";+import { cn } from "@/lib/utils";++interface Props {+ icon: IconSvgElement;+ title: string;+ description: string;+ action?: { href: string; label: string };+ className?: string;+}++export function HomeTileEmpty({+ icon,+ title,+ description,+ action,+ className,+}: Props) {+ return (+ <div+ className={cn(+ "flex min-h-[14rem] flex-1 flex-col items-center justify-center gap-1 px-4 py-10 text-center",+ className,+ )}+ >+ <Icon+ icon={icon}+ size={22}+ className="text-zinc-400"+ aria-hidden="true"+ />+ <Text variant="body-medium" className="mt-1 text-zinc-800">+ {title}+ </Text>+ <Text variant="small" className="max-w-xs text-pretty text-zinc-500">+ {description}+ </Text>+ {action ? (+ <Button+ as="NextLink"+ href={action.href}+ variant="secondary"+ size="small"+ className="mt-3"+ >+ {action.label}+ </Button>+ ) : null}+ </div>+ );+}diff --git a/autogpt_platform/frontend/src/app/(platform)/home/components/HomeTileFilter/HomeTileFilter.tsx b/autogpt_platform/frontend/src/app/(platform)/home/components/HomeTileFilter/HomeTileFilter.tsxnew file mode 100644index 0000000000..d7d11175d0--- /dev/null+++ b/autogpt_platform/frontend/src/app/(platform)/home/components/HomeTileFilter/HomeTileFilter.tsx@@ -0,0 +1,57 @@+"use client";++import { FilterHorizontalIcon } from "@hugeicons/core-free-icons";+import { Button } from "@/components/atoms/Button/Button";+import { Icon } from "@/components/atoms/Icon/Icon";+import {+ DropdownMenu,+ DropdownMenuContent,+ DropdownMenuRadioGroup,+ DropdownMenuRadioItem,+ DropdownMenuTrigger,+} from "@/components/molecules/DropdownMenu/DropdownMenu";++interface Props {+ ariaLabelPrefix: string;+ value: string;+ options: { value: string; label: string }[];+ onChange: (value: string) => void;+}++export function HomeTileFilter({+ ariaLabelPrefix,+ value,+ options,+ onChange,+}: Props) {+ const activeLabel =+ options.find((option) => option.value === value)?.label ?? value;++ return (+ <DropdownMenu>+ <DropdownMenuTrigger asChild>+ <Button+ variant="secondary"+ size="small"+ className="min-w-0"+ leftIcon={+ <Icon icon={FilterHorizontalIcon} size={15} aria-hidden="true" />+ }+ aria-label={`${ariaLabelPrefix}: ${activeLabel}`}+ unmask={false}+ >+ {activeLabel}+ </Button>+ </DropdownMenuTrigger>+ <DropdownMenuContent align="end" className="min-w-36">+ <DropdownMenuRadioGroup value={value} onValueChange={onChange}>+ {options.map((option) => (+ <DropdownMenuRadioItem key={option.value} value={option.value}>+ {option.label}+ </DropdownMenuRadioItem>+ ))}+ </DropdownMenuRadioGroup>+ </DropdownMenuContent>+ </DropdownMenu>+ );+}diff --git a/autogpt_platform/frontend/src/app/(platform)/home/components/MorningBriefing/MorningBriefing.tsx b/autogpt_platform/frontend/src/app/(platform)/home/components/MorningBriefing/MorningBriefing.tsxnew file mode 100644index 0000000000..4d118895d2--- /dev/null+++ b/autogpt_platform/frontend/src/app/(platform)/home/components/MorningBriefing/MorningBriefing.tsx@@ -0,0 +1,99 @@+"use client";++import {+ CheckmarkCircle02Icon,+ InboxIcon,+ TaskDone01Icon,+} from "@hugeicons/core-free-icons";+import type { HomeDashboardResponse } from "@/app/api/__generated__/models/homeDashboardResponse";+import { Icon } from "@/components/atoms/Icon/Icon";+import { Text } from "@/components/atoms/Text/Text";+import { HomeTileEmpty } from "../HomeTileEmpty/HomeTileEmpty";+import { HomeTileFilter } from "../HomeTileFilter/HomeTileFilter";+import { HomeTile } from "../HomeTile/HomeTile";+import { OutcomeRow } from "./components/OutcomeRow";+import { type BriefingFilter, useMorningBriefing } from "./useMorningBriefing";++interface Props {+ dashboard: HomeDashboardResponse;+ className?: string;+}++export function MorningBriefing({ dashboard, className }: Props) {+ const { briefing } = dashboard;+ const {+ filterOptions,+ hasFilters,+ selectedFilter,+ selectFilter,+ visibleOutcomes,+ } = useMorningBriefing({ outcomes: briefing.outcomes });++ return (+ <HomeTile+ className={className}+ contentClassName="flex flex-col gap-4"+ surfaceClassName="py-4 sm:py-4"+ title={+ <div className="flex items-start justify-between gap-3">+ <div className="flex min-w-0 items-center gap-2">+ <Icon+ icon={TaskDone01Icon}+ size={18}+ className="text-zinc-500"+ aria-hidden="true"+ />+ <Text variant="h5" className="text-zinc-950">+ Your briefing+ </Text>+ </div>+ <div className="flex shrink-0 flex-wrap items-center justify-end gap-2">+ <div className="flex items-center gap-3 text-xs font-medium tabular-nums text-zinc-500">+ <span>{briefing.completed_count} completed</span>+ {briefing.failed_count > 0 ? (+ <span className="text-rose-700">+ {briefing.failed_count} failed+ </span>+ ) : null}+ </div>+ {hasFilters ? (+ <HomeTileFilter+ ariaLabelPrefix="Filter briefing outcomes"+ value={selectedFilter}+ options={filterOptions}+ onChange={(value) => selectFilter(value as BriefingFilter)}+ />+ ) : null}+ </div>+ </div>+ }+ header={+ <Text variant="large" className="text-zinc-600">+ The outcomes worth knowing from the last 24 hours.+ </Text>+ }+ >+ {briefing.outcomes.length === 0 ? (+ <HomeTileEmpty+ icon={InboxIcon}+ title="No new outcomes yet"+ description="Completed work and useful exceptions will appear here."+ />+ ) : (+ <div className="-mx-4 divide-y divide-zinc-100 sm:-mx-5">+ {visibleOutcomes.map((outcome) => (+ <OutcomeRow key={outcome.id} outcome={outcome} />+ ))}+ </div>+ )}++ {briefing.routine_count > 0 ? (+ <div className="inline-flex items-center gap-1.5 self-end rounded-full border border-purple-500 bg-purple-100 px-2.5 py-1 text-sm font-medium text-purple-600">+ <Icon icon={CheckmarkCircle02Icon} size={15} aria-hidden="true" />+ Plus {briefing.routine_count} routine task+ {briefing.routine_count === 1 ? "" : "s"} completed quietly.+ </div>+ ) : null}+ </HomeTile>+ );+}diff --git a/autogpt_platform/frontend/src/app/(platform)/home/components/MorningBriefing/components/OutcomeRow.tsx b/autogpt_platform/frontend/src/app/(platform)/home/components/MorningBriefing/components/OutcomeRow.tsxnew file mode 100644index 0000000000..d85eea8a76--- /dev/null+++ b/autogpt_platform/frontend/src/app/(platform)/home/components/MorningBriefing/components/OutcomeRow.tsx@@ -0,0 +1,101 @@+import {+ AlertDiamondIcon,+ ArrowUpRight01Icon,+ CheckListIcon,+} from "@hugeicons/core-free-icons";+import Link from "next/link";+import type { HomeBriefingOutcome } from "@/app/api/__generated__/models/homeBriefingOutcome";+import { Icon } from "@/components/atoms/Icon/Icon";+import { Text } from "@/components/atoms/Text/Text";+import { ExpertAvatar } from "@/components/molecules/ExpertAvatar/ExpertAvatar";+import { cn } from "@/lib/utils";+import { formatCurrency, formatDuration } from "../../../helpers";++interface Props {+ outcome: HomeBriefingOutcome;+}++export function OutcomeRow({ outcome }: Props) {+ const failed = outcome.status === "failed";+ const content = (+ <>+ <span+ className={cn(+ "mt-0.5 flex size-8 shrink-0 items-center justify-center rounded-lg",+ failed ? "bg-rose-50 text-rose-600" : "bg-zinc-100 text-zinc-500",+ )}+ >+ <Icon+ icon={failed ? AlertDiamondIcon : CheckListIcon}+ size={16}+ aria-hidden="true"+ />+ </span>+ <div className="min-w-0 flex-1">+ <Text variant="body-medium" className="text-pretty text-zinc-950">+ {outcome.title}+ </Text>+ <Text+ variant="large"+ className="mt-1 line-clamp-2 text-pretty text-zinc-600"+ >+ {outcome.summary}+ </Text>+ <div className="mt-1.5 flex flex-wrap items-center gap-x-2 gap-y-1 text-xs text-zinc-400">+ {outcome.expert ? (+ <ExpertAvatar+ name={outcome.expert.name}+ avatarUrl={outcome.expert.avatar_url}+ size={22}+ />+ ) : null}+ <span>{outcome.expert?.name ?? outcome.agent_name}</span>+ <span aria-hidden="true">·</span>+ <span>{formatOccurredAt(outcome.occurred_at)}</span>+ {outcome.duration_seconds ? (+ <>+ <span aria-hidden="true">·</span>+ <span>{formatDuration(outcome.duration_seconds)}</span>+ </>+ ) : null}+ {outcome.cost_cents ? (+ <>+ <span aria-hidden="true">·</span>+ <span>{formatCurrency(outcome.cost_cents)}</span>+ </>+ ) : null}+ </div>+ </div>+ {outcome.link ? (+ <Icon+ icon={ArrowUpRight01Icon}+ size={17}+ className="mt-1 shrink-0 text-zinc-300 transition-colors group-hover:text-zinc-700"+ aria-hidden="true"+ />+ ) : null}+ </>+ );++ if (!outcome.link) {+ return (+ <article className="flex gap-3 px-4 py-3 sm:px-5">{content}</article>+ );+ }+ return (+ <Link+ href={outcome.link}+ className="group flex gap-3 px-4 py-3 outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-zinc-400 sm:px-5"+ >+ {content}+ </Link>+ );+}++function formatOccurredAt(value: Date | null | undefined) {+ if (!value) return "Recently";+ return new Intl.DateTimeFormat(undefined, {+ hour: "numeric",+ minute: "2-digit",+ }).format(new Date(value));+}diff --git a/autogpt_platform/frontend/src/app/(platform)/home/components/MorningBriefing/useMorningBriefing.ts b/autogpt_platform/frontend/src/app/(platform)/home/components/MorningBriefing/useMorningBriefing.tsnew file mode 100644index 0000000000..17408baf71--- /dev/null+++ b/autogpt_platform/frontend/src/app/(platform)/home/components/MorningBriefing/useMorningBriefing.ts@@ -0,0 +1,41 @@+"use client";++import { useState } from "react";+import type { HomeBriefingOutcome } from "@/app/api/__generated__/models/homeBriefingOutcome";++export type BriefingFilter = "all" | HomeBriefingOutcome["status"];++const FILTER_LABELS: Partial<Record<BriefingFilter, string>> = {+ all: "All",+ completed: "Completed",+ failed: "Failed",+};++export function useMorningBriefing({+ outcomes,+}: {+ outcomes: HomeBriefingOutcome[];+}) {+ const [activeFilter, setActiveFilter] = useState<BriefingFilter>("all");+ const filterStatuses = Array.from(+ new Set(outcomes.map((outcome) => outcome.status)),+ );+ const selectedFilter: BriefingFilter =+ activeFilter !== "all" && filterStatuses.includes(activeFilter)+ ? activeFilter+ : "all";+ const visibleOutcomes =+ selectedFilter === "all"+ ? outcomes+ : outcomes.filter((outcome) => outcome.status === selectedFilter);++ return {+ filterOptions: (["all", ...filterStatuses] as BriefingFilter[]).map(+ (value) => ({ value, label: FILTER_LABELS[value] ?? value }),+ ),+ hasFilters: filterStatuses.length > 1,+ selectedFilter,+ selectFilter: setActiveFilter,+ visibleOutcomes,+ };+}diff --git a/autogpt_platform/frontend/src/app/(platform)/home/components/NeedsYou/NeedsYou.tsx b/autogpt_platform/frontend/src/app/(platform)/home/components/NeedsYou/NeedsYou.tsxnew file mode 100644index 0000000000..e1d9a2e432--- /dev/null+++ b/autogpt_platform/frontend/src/app/(platform)/home/components/NeedsYou/NeedsYou.tsx@@ -0,0 +1,69 @@+"use client";++import { CheckmarkCircle02Icon } from "@hugeicons/core-free-icons";+import type { HomeDashboardResponse } from "@/app/api/__generated__/models/homeDashboardResponse";+import { Text } from "@/components/atoms/Text/Text";+import { HomeTileEmpty } from "../HomeTileEmpty/HomeTileEmpty";+import { HomeTile } from "../HomeTile/HomeTile";+import { AttentionRow } from "./components/AttentionRow";+import { NeedsYouTitle } from "./components/NeedsYouTitle";+import { useNeedsYou } from "./useNeedsYou";++interface Props {+ dashboard: HomeDashboardResponse;+ className?: string;+}++export function NeedsYou({ dashboard, className }: Props) {+ const {+ visibleItems,+ filterOptions,+ hasFilters,+ selectedKind,+ selectKind,+ pendingIDs,+ decide,+ } = useNeedsYou({ items: dashboard.attention });+ const itemCount = dashboard.attention.length;++ return (+ <HomeTile+ className={className}+ contentClassName="flex flex-col gap-3"+ surfaceClassName="py-4 sm:py-4"+ title={+ <NeedsYouTitle+ itemCount={itemCount}+ hasFilters={hasFilters}+ selectedKind={selectedKind}+ filterOptions={filterOptions}+ onSelectKind={selectKind}+ />+ }+ header={+ <Text variant="large" className="max-w-xl text-pretty text-zinc-600">+ Decisions and blockers that require your input.+ </Text>+ }+ >+ {itemCount === 0 ? (+ <HomeTileEmpty+ icon={CheckmarkCircle02Icon}+ title="You are all caught up"+ description="Your agents can keep moving without you."+ />+ ) : (+ <div className="-mx-4 divide-y divide-zinc-100 sm:-mx-5">+ {visibleItems.map((item) => (+ <AttentionRow+ key={item.id}+ item={item}+ isProcessing={pendingIDs.has(item.id)}+ onDecision={decide}+ />+ ))}+ </div>+ )}+ </HomeTile>+ );+}diff --git a/autogpt_platform/frontend/src/app/(platform)/home/components/NeedsYou/components/AttentionRow.tsx b/autogpt_platform/frontend/src/app/(platform)/home/components/NeedsYou/components/AttentionRow.tsxnew file mode 100644index 0000000000..50718b7da1--- /dev/null+++ b/autogpt_platform/frontend/src/app/(platform)/home/components/NeedsYou/components/AttentionRow.tsx@@ -0,0 +1,106 @@+import {+ AlertCircleIcon,+ CoinsDollarIcon,+ PauseIcon,+ Settings02Icon,+} from "@hugeicons/core-free-icons";+import type { IconSvgElement } from "@hugeicons/react";+import { useState } from "react";+import type { HomeAttentionItem } from "@/app/api/__generated__/models/homeAttentionItem";+import { Icon } from "@/components/atoms/Icon/Icon";+import { Text } from "@/components/atoms/Text/Text";+import { ExpertAvatar } from "@/components/molecules/ExpertAvatar/ExpertAvatar";+import { AttentionRowActions } from "./AttentionRowActions";++interface Props {+ item: HomeAttentionItem;+ isProcessing: boolean;+ onDecision: (item: HomeAttentionItem, approved: boolean) => void;+}++const ICONS: Record<HomeAttentionItem["kind"], IconSvgElement> = {+ approval: AlertCircleIcon,+ setup: Settings02Icon,+ paused: PauseIcon,+ credits: CoinsDollarIcon,+};++const KIND_LABELS: Record<HomeAttentionItem["kind"], string> = {+ approval: "Approval",+ setup: "Setup",+ paused: "Paused",+ credits: "Credits",+};++export function AttentionRow({ item, isProcessing, onDecision }: Props) {+ const [confirmDecline, setConfirmDecline] = useState(false);++ function handleDecline() {+ if (!confirmDecline) {+ setConfirmDecline(true);+ return;+ }+ setConfirmDecline(false);+ onDecision(item, false);+ }++ return (+ <article className="px-4 py-4 sm:px-5">+ <div className="flex flex-col gap-3 sm:flex-row sm:items-start">+ <div className="flex min-w-0 flex-1 items-start gap-3">+ {item.expert ? (+ <ExpertAvatar+ name={item.expert.name}+ avatarUrl={item.expert.avatar_url}+ />+ ) : (+ <span className="flex size-9 shrink-0 items-center justify-center rounded-lg bg-zinc-50 text-zinc-500 ring-1 ring-inset ring-zinc-200">+ <Icon icon={ICONS[item.kind]} size={17} aria-hidden="true" />+ </span>+ )}+ <div className="min-w-0 flex-1">+ <div className="flex flex-wrap items-center gap-2">+ <Text variant="body-medium" className="text-pretty text-zinc-950">+ {item.title}+ </Text>+ {item.priority === "high" ? (+ <span className="rounded-md bg-amber-50 px-1.5 py-0.5 text-[10px] font-semibold text-amber-700">+ Waiting+ </span>+ ) : null}+ </div>+ <Text+ variant="large"+ className="mt-1 line-clamp-2 text-pretty text-zinc-600"+ >+ {item.description}+ </Text>+ <div className="mt-1.5 flex min-w-0 flex-wrap items-center gap-x-1.5 text-xs text-zinc-400">+ <span className="font-medium text-zinc-500">+ {item.expert?.name ?? KIND_LABELS[item.kind]}+ </span>+ <span aria-hidden="true">·</span>+ <span className="line-clamp-1 min-w-0">+ {item.why_it_matters}+ </span>+ </div>+ </div>+ </div>++ <div className="flex shrink-0 items-center gap-2 self-end sm:self-center">+ <AttentionRowActions+ item={item}+ isProcessing={isProcessing}+ confirmDecline={confirmDecline}+ onApprove={() => onDecision(item, true)}+ onDecline={handleDecline}+ onDeclineBlur={() => setConfirmDecline(false)}+ />+ </div>+ </div>+ <span className="sr-only" aria-live="polite">+ {confirmDecline ? `Press again to decline ${item.title}` : ""}+ </span>+ </article>+ );+}diff --git a/autogpt_platform/frontend/src/app/(platform)/home/components/NeedsYou/components/AttentionRowActions.tsx b/autogpt_platform/frontend/src/app/(platform)/home/components/NeedsYou/components/AttentionRowActions.tsxnew file mode 100644index 0000000000..08273589fe--- /dev/null+++ b/autogpt_platform/frontend/src/app/(platform)/home/components/NeedsYou/components/AttentionRowActions.tsx@@ -0,0 +1,69 @@+import { Cancel01Icon, Tick02Icon } from "@hugeicons/core-free-icons";+import type { HomeAttentionItem } from "@/app/api/__generated__/models/homeAttentionItem";+import { Button } from "@/components/atoms/Button/Button";+import { Icon } from "@/components/atoms/Icon/Icon";+import { cn } from "@/lib/utils";++interface Props {+ item: HomeAttentionItem;+ isProcessing: boolean;+ confirmDecline: boolean;+ onApprove: () => void;+ onDecline: () => void;+ onDeclineBlur: () => void;+}++export function AttentionRowActions({+ item,+ isProcessing,+ confirmDecline,+ onApprove,+ onDecline,+ onDeclineBlur,+}: Props) {+ const primaryAction = (+ <Button+ as="NextLink"+ href={item.primary_action.href}+ variant="secondary"+ size="small"+ >+ {item.primary_action.label}+ </Button>+ );++ if (item.kind !== "approval" || !item.review) {+ return primaryAction;+ }++ return (+ <>+ {primaryAction}+ <Button+ variant="icon"+ size="icon"+ className="size-10 border-zinc-800 bg-zinc-800 p-0 text-white hover:border-zinc-900 hover:bg-zinc-900"+ disabled={isProcessing}+ aria-label={`Approve: ${item.title}`}+ onClick={onApprove}+ >+ <Icon icon={Tick02Icon} size={18} aria-hidden="true" />+ </Button>+ <Button+ variant="icon"+ size="icon"+ className={cn(+ "size-10 p-0",+ confirmDecline &&+ "border-red-500 bg-red-500 text-white hover:border-red-600 hover:bg-red-600",+ )}+ disabled={isProcessing}+ aria-label={`${confirmDecline ? "Confirm decline" : "Decline"}: ${item.title}`}+ onClick={onDecline}+ onBlur={onDeclineBlur}+ >+ <Icon icon={Cancel01Icon} size={18} aria-hidden="true" />+ </Button>+ </>+ );+}diff --git a/autogpt_platform/frontend/src/app/(platform)/home/components/NeedsYou/components/NeedsYouTitle.tsx b/autogpt_platform/frontend/src/app/(platform)/home/components/NeedsYou/components/NeedsYouTitle.tsxnew file mode 100644index 0000000000..389b03a314--- /dev/null+++ b/autogpt_platform/frontend/src/app/(platform)/home/components/NeedsYou/components/NeedsYouTitle.tsx@@ -0,0 +1,58 @@+import { AlertCircleIcon } from "@hugeicons/core-free-icons";+import type { HomeAttentionItem } from "@/app/api/__generated__/models/homeAttentionItem";+import { Icon } from "@/components/atoms/Icon/Icon";+import { Text } from "@/components/atoms/Text/Text";+import { HomeTileFilter } from "../../HomeTileFilter/HomeTileFilter";++type AttentionFilter = "all" | HomeAttentionItem["kind"];++interface Props {+ itemCount: number;+ hasFilters: boolean;+ selectedKind: AttentionFilter;+ filterOptions: { value: string; label: string }[];+ onSelectKind: (kind: AttentionFilter) => void;+}++export function NeedsYouTitle({+ itemCount,+ hasFilters,+ selectedKind,+ filterOptions,+ onSelectKind,+}: Props) {+ return (+ <div className="flex items-start justify-between gap-3">+ <div className="flex min-w-0 items-center gap-2">+ <Icon+ icon={AlertCircleIcon}+ size={18}+ className="text-zinc-500"+ aria-hidden="true"+ />+ <Text variant="h5" className="text-zinc-950">+ Needs you+ </Text>+ </div>+ <div className="flex shrink-0 flex-wrap items-center justify-end gap-2">+ {itemCount > 0 ? (+ <span+ role="status"+ aria-label={`${itemCount} ${itemCount === 1 ? "item needs" : "items need"} your attention`}+ className="flex size-6 items-center justify-center rounded-full bg-zinc-900 text-xs font-semibold tabular-nums text-white"+ >+ {itemCount}+ </span>+ ) : null}+ {hasFilters ? (+ <HomeTileFilter+ ariaLabelPrefix="Filter interventions"+ value={selectedKind}+ options={filterOptions}+ onChange={(value) => onSelectKind(value as AttentionFilter)}+ />+ ) : null}+ </div>+ </div>+ );+}diff --git a/autogpt_platform/frontend/src/app/(platform)/home/components/NeedsYou/useAttentionDecisions.ts b/autogpt_platform/frontend/src/app/(platform)/home/components/NeedsYou/useAttentionDecisions.tsnew file mode 100644index 0000000000..2418f975ef--- /dev/null+++ b/autogpt_platform/frontend/src/app/(platform)/home/components/NeedsYou/useAttentionDecisions.ts@@ -0,0 +1,57 @@+import { useQueryClient } from "@tanstack/react-query";+import { useState } from "react";+import { getGetHomeDashboardQueryKey } from "@/app/api/__generated__/endpoints/home/home";+import type { HomeAttentionItem } from "@/app/api/__generated__/models/homeAttentionItem";+import { useToast } from "@/components/molecules/Toast/use-toast";+import { useProcessReviews } from "@/hooks/useProcessReviews";++export function useAttentionDecisions() {+ const queryClient = useQueryClient();+ const { processReviews } = useProcessReviews();+ const { toast } = useToast();+ const [pendingIDs, setPendingIDs] = useState<Set<string>>(new Set());++ function setPending(itemID: string, pending: boolean) {+ setPendingIDs((current) => {+ const next = new Set(current);+ if (pending) next.add(itemID);+ else next.delete(itemID);+ return next;+ });+ }++ async function decide(item: HomeAttentionItem, approved: boolean) {+ if (!item.review) return;+ setPending(item.id, true);+ try {+ const response = await processReviews(+ [+ {+ node_exec_id: item.review.node_exec_id,+ approved,+ auto_approve_future: false,+ },+ ],+ [item.review.graph_exec_id],+ );+ if (response.status !== 200 || response.data.failed_count > 0) {+ const message = response.status === 200 ? response.data.error : null;+ throw new Error(message || "The review could not be processed.");+ }+ toast({ title: approved ? "Approved" : "Declined" });+ await queryClient.invalidateQueries({+ queryKey: getGetHomeDashboardQueryKey(),+ });+ } catch (error) {+ toast({+ title: approved ? "Could not approve" : "Could not decline",+ description: error instanceof Error ? error.message : "Try again.",+ variant: "destructive",+ });+ } finally {+ setPending(item.id, false);+ }+ }++ return { pendingIDs, decide };+}diff --git a/autogpt_platform/frontend/src/app/(platform)/home/components/NeedsYou/useNeedsYou.ts b/autogpt_platform/frontend/src/app/(platform)/home/components/NeedsYou/useNeedsYou.tsnew file mode 100644index 0000000000..68e6bee01f--- /dev/null+++ b/autogpt_platform/frontend/src/app/(platform)/home/components/NeedsYou/useNeedsYou.ts@@ -0,0 +1,47 @@+import { useState } from "react";+import type { HomeAttentionItem } from "@/app/api/__generated__/models/homeAttentionItem";+import { useAttentionDecisions } from "./useAttentionDecisions";++interface Args {+ items: HomeAttentionItem[];+}++type AttentionFilter = "all" | HomeAttentionItem["kind"];++const FILTER_LABELS: Partial<Record<AttentionFilter, string>> = {+ all: "All",+ approval: "Approvals",+ setup: "Setup",+ paused: "Paused",+ credits: "Credits",+};++export function useNeedsYou({ items }: Args) {+ const { pendingIDs, decide } = useAttentionDecisions();+ const [activeKind, setActiveKind] = useState<AttentionFilter>("all");+ const filterKinds = Array.from(new Set(items.map((item) => item.kind)));+ const selectedKind: AttentionFilter =+ activeKind !== "all" && filterKinds.includes(activeKind)+ ? activeKind+ : "all";+ const visibleItems =+ selectedKind === "all"+ ? items+ : items.filter((item) => item.kind === selectedKind);++ function selectKind(kind: AttentionFilter) {+ setActiveKind(kind);+ }++ return {+ visibleItems,+ filterOptions: (["all", ...filterKinds] as AttentionFilter[]).map(+ (value) => ({ value, label: FILTER_LABELS[value] ?? value }),+ ),+ hasFilters: filterKinds.length > 1,+ selectedKind,+ selectKind,+ pendingIDs,+ decide,+ };+}diff --git a/autogpt_platform/frontend/src/app/(platform)/home/components/NowNext/NowNext.tsx b/autogpt_platform/frontend/src/app/(platform)/home/components/NowNext/NowNext.tsxnew file mode 100644index 0000000000..0e9c2fe853--- /dev/null+++ b/autogpt_platform/frontend/src/app/(platform)/home/components/NowNext/NowNext.tsx@@ -0,0 +1,72 @@+import { Calendar03Icon, Clock01Icon } from "@hugeicons/core-free-icons";+import type { HomeDashboardResponse } from "@/app/api/__generated__/models/homeDashboardResponse";+import { Icon } from "@/components/atoms/Icon/Icon";+import { Text } from "@/components/atoms/Text/Text";+import { HomeTileEmpty } from "../HomeTileEmpty/HomeTileEmpty";+import { HomeTile } from "../HomeTile/HomeTile";+import { ActiveRow } from "./components/ActiveRow";+import { UpcomingRow } from "./components/UpcomingRow";++interface Props {+ dashboard: HomeDashboardResponse;+ className?: string;+}++export function NowNext({ dashboard, className }: Props) {+ return (+ <HomeTile+ className={className}+ contentClassName="flex flex-col gap-4"+ title={+ <div className="flex items-center gap-2">+ <Icon+ icon={Calendar03Icon}+ size={18}+ className="text-zinc-500"+ aria-hidden="true"+ />+ <Text variant="h5" className="text-zinc-950">+ Now & next+ </Text>+ </div>+ }+ header={+ <Text variant="large" className="text-zinc-600">+ Live work and the next scheduled handoffs.+ </Text>+ }+ >+ {dashboard.active_tasks.length > 0 ? (+ <div>+ <Text variant="small" className="font-medium text-zinc-500">+ Working now+ </Text>+ <div className="relative mt-1 before:absolute before:bottom-4 before:left-4 before:top-4 before:w-px before:bg-zinc-200">+ {dashboard.active_tasks.map((item) => (+ <ActiveRow key={item.id} item={item} />+ ))}+ </div>+ </div>+ ) : null}++ <div>+ <Text variant="small" className="font-medium text-zinc-500">+ Coming up+ </Text>+ {dashboard.upcoming_tasks.length === 0 ? (+ <HomeTileEmpty+ icon={Clock01Icon}+ title="Nothing is scheduled"+ description="Your agents are ready when you are."+ />+ ) : (+ <div className="relative mt-1 before:absolute before:bottom-4 before:left-4 before:top-4 before:w-px before:bg-zinc-200">+ {dashboard.upcoming_tasks.map((item) => (+ <UpcomingRow key={item.id} item={item} />+ ))}+ </div>+ )}+ </div>+ </HomeTile>+ );+}diff --git a/autogpt_platform/frontend/src/app/(platform)/home/components/NowNext/components/ActiveRow.tsx b/autogpt_platform/frontend/src/app/(platform)/home/components/NowNext/components/ActiveRow.tsxnew file mode 100644index 0000000000..997ef5bfa7--- /dev/null+++ b/autogpt_platform/frontend/src/app/(platform)/home/components/NowNext/components/ActiveRow.tsx@@ -0,0 +1,52 @@+import Link from "next/link";+import type { HomeActiveTask } from "@/app/api/__generated__/models/homeActiveTask";+import { Text } from "@/components/atoms/Text/Text";+import { ExpertAvatar } from "@/components/molecules/ExpertAvatar/ExpertAvatar";+import { cn } from "@/lib/utils";+import { formatRunningFor } from "../helpers";++interface Props {+ item: HomeActiveTask;+}++export function ActiveRow({ item }: Props) {+ const content = (+ <>+ <span className="absolute left-0 top-1/2 z-10 flex size-8 -translate-y-1/2 items-center justify-center rounded-full bg-white">+ {item.expert ? (+ <ExpertAvatar+ name={item.expert.name}+ avatarUrl={item.expert.avatar_url}+ size={32}+ />+ ) : (+ <span className="size-2.5 rounded-full bg-primary" />+ )}+ </span>+ <div className="min-w-0 flex-1">+ <Text variant="body-medium" className="truncate text-zinc-900">+ {item.title}+ </Text>+ <Text variant="small" className="truncate text-zinc-500">+ {item.status === "queued"+ ? "Queued"+ : (formatRunningFor(item.started_at) ?? "Running now")}+ </Text>+ </div>+ </>+ );+ const classes = "relative flex items-center gap-3 rounded-xl py-3 pl-12 pr-2";++ if (!item.link) return <div className={classes}>{content}</div>;+ return (+ <Link+ href={item.link}+ className={cn(+ classes,+ "transition-colors hover:bg-zinc-50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-zinc-400",+ )}+ >+ {content}+ </Link>+ );+}diff --git a/autogpt_platform/frontend/src/app/(platform)/home/components/NowNext/components/UpcomingRow.tsx b/autogpt_platform/frontend/src/app/(platform)/home/components/NowNext/components/UpcomingRow.tsxnew file mode 100644index 0000000000..02e07b7ead--- /dev/null+++ b/autogpt_platform/frontend/src/app/(platform)/home/components/NowNext/components/UpcomingRow.tsx@@ -0,0 +1,38 @@+import { Calendar03Icon, Clock01Icon } from "@hugeicons/core-free-icons";+import type { HomeUpcomingTask } from "@/app/api/__generated__/models/homeUpcomingTask";+import { Icon } from "@/components/atoms/Icon/Icon";+import { Text } from "@/components/atoms/Text/Text";+import { formatUntil } from "../helpers";++interface Props {+ item: HomeUpcomingTask;+}++export function UpcomingRow({ item }: Props) {+ return (+ <div className="relative flex items-center gap-3 rounded-xl py-3 pl-12 pr-2">+ <span className="absolute left-0 top-1/2 z-10 flex size-8 -translate-y-1/2 items-center justify-center rounded-full bg-zinc-100 text-zinc-500">+ <Icon+ icon={item.kind === "followup" ? Calendar03Icon : Clock01Icon}+ size={15}+ aria-hidden="true"+ />+ </span>+ <div className="min-w-0 flex-1">+ <Text variant="body-medium" className="truncate text-zinc-900">+ {item.title}+ </Text>+ <Text variant="small" className="truncate text-zinc-500">+ {item.expert?.name ??+ (item.kind === "followup" ? "Follow-up" : "Scheduled task")}+ </Text>+ </div>+ <Text+ variant="small"+ className="shrink-0 font-medium tabular-nums text-zinc-700"+ >+ {formatUntil(item.next_run_time)}+ </Text>+ </div>+ );+}diff --git a/autogpt_platform/frontend/src/app/(platform)/home/components/NowNext/helpers.test.ts b/autogpt_platform/frontend/src/app/(platform)/home/components/NowNext/helpers.test.tsnew file mode 100644index 0000000000..0e841834d8--- /dev/null+++ b/autogpt_platform/frontend/src/app/(platform)/home/components/NowNext/helpers.test.ts@@ -0,0 +1,31 @@+import { describe, expect, it } from "vitest";+import { formatRunningFor, formatUntil } from "./helpers";++const NOW = new Date("2026-08-09T09:00:00Z");++describe("formatUntil", () => {+ it("renders imminent and same-day runs distinctly", () => {+ expect(formatUntil(new Date(NOW.getTime() + 30_000), NOW)).toBe("now");+ expect(formatUntil(new Date(NOW.getTime() + 90 * 60_000), NOW)).toBe(+ "in 1h 30m",+ );+ });++ it("reads an overdue run as due now rather than a negative countdown", () => {+ expect(formatUntil(new Date(NOW.getTime() - 5 * 60_000), NOW)).toBe("now");+ });+});++describe("formatRunningFor", () => {+ it("scales from minutes to hours", () => {+ const startedAt = (minutes: number) =>+ new Date(NOW.getTime() - minutes * 60_000);+ expect(formatRunningFor(startedAt(0), NOW)).toBe(+ "Running for less than a minute",+ );+ expect(formatRunningFor(startedAt(4), NOW)).toBe("Running for 4m");+ expect(formatRunningFor(startedAt(60), NOW)).toBe("Running for 1h");+ expect(formatRunningFor(startedAt(75), NOW)).toBe("Running for 1h 15m");+ expect(formatRunningFor(null, NOW)).toBeNull();+ });+});diff --git a/autogpt_platform/frontend/src/app/(platform)/home/components/NowNext/helpers.ts b/autogpt_platform/frontend/src/app/(platform)/home/components/NowNext/helpers.tsnew file mode 100644index 0000000000..d3a7fc1111--- /dev/null+++ b/autogpt_platform/frontend/src/app/(platform)/home/components/NowNext/helpers.ts@@ -0,0 +1,38 @@+const HOUR_MS = 60 * 60 * 1000;+const DAY_MS = 24 * HOUR_MS;++export function formatUntil(nextRunTime: Date, now = new Date()) {+ const runAt = new Date(nextRunTime);+ const diffMs = runAt.getTime() - now.getTime();+ if (Number.isNaN(runAt.getTime())) return "";+ if (diffMs <= 60_000) return "now";+ if (diffMs < DAY_MS) {+ const totalMinutes = Math.round(diffMs / 60_000);+ const hours = Math.floor(totalMinutes / 60);+ const minutes = totalMinutes % 60;+ if (hours === 0) return `in ${minutes}m`;+ return minutes > 0 ? `in ${hours}h ${minutes}m` : `in ${hours}h`;+ }+ return runAt.toLocaleString(undefined, {+ weekday: "short",+ hour: "numeric",+ minute: "2-digit",+ });+}++export function formatRunningFor(+ startedAt: Date | null | undefined,+ now = new Date(),+) {+ if (!startedAt) return null;+ const started = new Date(startedAt);+ if (Number.isNaN(started.valueOf())) return null;+ const totalMinutes = Math.floor((now.getTime() - started.getTime()) / 60_000);+ if (totalMinutes < 1) return "Running for less than a minute";+ if (totalMinutes < 60) return `Running for ${totalMinutes}m`;+ const hours = Math.floor(totalMinutes / 60);+ const minutes = totalMinutes % 60;+ return minutes > 0+ ? `Running for ${hours}h ${minutes}m`+ : `Running for ${hours}h`;+}diff --git a/autogpt_platform/frontend/src/app/(platform)/home/helpers.test.ts b/autogpt_platform/frontend/src/app/(platform)/home/helpers.test.tsnew file mode 100644index 0000000000..ebdd1fb281--- /dev/null+++ b/autogpt_platform/frontend/src/app/(platform)/home/helpers.test.ts@@ -0,0 +1,58 @@+import { describe, expect, it } from "vitest";+import type { HomeDashboardResponse } from "@/app/api/__generated__/models/homeDashboardResponse";+import {+ formatCurrency,+ formatDuration,+ formatHeaderDate,+ getHomeStatusLine,+ getTimeOfDayGreeting,+} from "./helpers";++describe("getTimeOfDayGreeting", () => {+ it("maps hours to greetings", () => {+ expect(getTimeOfDayGreeting(8)).toBe("Good morning");+ expect(getTimeOfDayGreeting(14)).toBe("Good afternoon");+ expect(getTimeOfDayGreeting(21)).toBe("Good evening");+ });+});++describe("getHomeStatusLine", () => {+ const dashboard = {+ attention: [{}, {}],+ active_tasks: [{}],+ } as HomeDashboardResponse;++ it("leads with decisions and active work", () => {+ expect(getHomeStatusLine(dashboard)).toBe(+ "2 decisions waiting · 1 agent is working now",+ );+ });++ it("reports an all-clear state", () => {+ expect(+ getHomeStatusLine({+ ...dashboard,+ attention: [],+ active_tasks: [],+ }),+ ).toBe("Nothing needs you right now");+ });+});++describe("formatters", () => {+ it("formats the briefing day in its configured timezone", () => {+ expect(+ formatHeaderDate(+ new Date("2026-08-09T23:30:00Z"),+ "Asia/Kolkata",+ "en-US",+ ),+ ).toEqual({ weekday: "Monday", calendarDate: "August 10" });+ });++ it("formats measured runtime and cost", () => {+ expect(formatDuration(18_120)).toBe("5h 2m");+ expect(formatDuration(120)).toBe("2m");+ expect(formatCurrency(367)).toBe("$3.67");+ });+});diff --git a/autogpt_platform/frontend/src/app/(platform)/home/helpers.ts b/autogpt_platform/frontend/src/app/(platform)/home/helpers.tsnew file mode 100644index 0000000000..64365f2437--- /dev/null+++ b/autogpt_platform/frontend/src/app/(platform)/home/helpers.ts@@ -0,0 +1,60 @@+import type { HomeDashboardResponse } from "@/app/api/__generated__/models/homeDashboardResponse";++export function getTimeOfDayGreeting(hour = new Date().getHours()) {+ if (hour < 12) return "Good morning";+ if (hour < 18) return "Good afternoon";+ return "Good evening";+}++export function getHomeStatusLine(dashboard: HomeDashboardResponse): string {+ const attention = dashboard.attention.length;+ const active = dashboard.active_tasks.length;+ if (attention > 0 && active > 0) {+ return `${attention} ${attention === 1 ? "decision" : "decisions"} waiting · ${active} ${active === 1 ? "agent is" : "agents are"} working now`;+ }+ if (attention > 0) {+ return `${attention} ${attention === 1 ? "decision needs" : "decisions need"} you`;+ }+ if (active > 0) {+ return `All clear · ${active} ${active === 1 ? "agent is" : "agents are"} working now`;+ }+ return "Nothing needs you right now";+}++export function formatHeaderDate(+ value: Date,+ timeZone: string,+ locale?: string,+) {+ const date = new Date(value);+ const options = { timeZone };++ return {+ weekday: new Intl.DateTimeFormat(locale, {+ ...options,+ weekday: "long",+ }).format(date),+ calendarDate: new Intl.DateTimeFormat(locale, {+ ...options,+ month: "long",+ day: "numeric",+ }).format(date),+ };+}++export function formatDuration(totalSeconds: number): string {+ const totalMinutes = Math.round(totalSeconds / 60);+ const hours = Math.floor(totalMinutes / 60);+ const minutes = totalMinutes % 60;+ if (hours === 0) return `${minutes}m`;+ if (minutes === 0) return `${hours}h`;+ return `${hours}h ${minutes}m`;+}++export function formatCurrency(cents: number): string {+ return new Intl.NumberFormat(undefined, {+ style: "currency",+ currency: "USD",+ minimumFractionDigits: 2,+ }).format(cents / 100);+}diff --git a/autogpt_platform/frontend/src/app/(platform)/home/page.tsx b/autogpt_platform/frontend/src/app/(platform)/home/page.tsxnew file mode 100644index 0000000000..4b2e438afa--- /dev/null+++ b/autogpt_platform/frontend/src/app/(platform)/home/page.tsx@@ -0,0 +1,114 @@+"use client";++import { notFound } from "next/navigation";+import { getGreetingName } from "@/app/(platform)/copilot/components/EmptySession/helpers";+import { Skeleton } from "@/components/atoms/Skeleton/Skeleton";+import { ErrorCard } from "@/components/molecules/ErrorCard/ErrorCard";+import { useAuth } from "@/lib/auth/hooks/useAuth";+import { Flag, useFlagStatus } from "@/services/feature-flags/use-get-flag";+import { AgentTeam } from "./components/AgentTeam/AgentTeam";+import { HomeHeader } from "./components/HomeHeader/HomeHeader";+import { MorningBriefing } from "./components/MorningBriefing/MorningBriefing";+import { NeedsYou } from "./components/NeedsYou/NeedsYou";+import { NowNext } from "./components/NowNext/NowNext";+import { getTimeOfDayGreeting } from "./helpers";+import { useHomePage } from "./useHomePage";++const SHELL_CLASS = "min-h-screen bg-zinc-50 px-4 pb-16 pt-5 sm:px-6 lg:px-8";+const CONTENT_CLASS = "mx-auto w-full max-w-[1180px]";+const GRID_CLASS = "grid grid-cols-1 items-start gap-7 xl:grid-cols-12";++export default function HomePage() {+ const { enabled, ready } = useFlagStatus(Flag.HIRE_EXPERTS);+ const { user } = useAuth();+ const { dashboard, isLoading, isError, refetch } = useHomePage({+ enabled: Boolean(enabled) && ready,+ });++ if (!ready || isLoading) {+ return <HomeSkeleton />;+ }+ if (!enabled) {+ notFound();+ }+ if (isError || !dashboard) {+ return (+ <main className={SHELL_CLASS}>+ <div className={CONTENT_CLASS}>+ <ErrorCard+ context="home"+ httpError={{ message: "Your Home briefing could not be loaded" }}+ onRetry={() => refetch()}+ />+ </div>+ </main>+ );+ }++ return (+ <main className={SHELL_CLASS}>+ <div className={`${CONTENT_CLASS} flex flex-col gap-2.5`}>+ <HomeHeader+ greeting={getTimeOfDayGreeting()}+ name={getGreetingName(user)}+ dashboard={dashboard}+ />+ <div className={GRID_CLASS}>+ <div className="flex min-w-0 flex-col gap-7 xl:col-span-8">+ <NeedsYou dashboard={dashboard} />+ <MorningBriefing dashboard={dashboard} />+ </div>+ <div className="flex min-w-0 flex-col gap-7 xl:col-span-4">+ <AgentTeam dashboard={dashboard} />+ <NowNext dashboard={dashboard} />+ </div>+ </div>+ </div>+ </main>+ );+}++function HomeSkeleton() {+ return (+ <main className={SHELL_CLASS} aria-label="Loading Home…">+ <div className={`${CONTENT_CLASS} flex flex-col gap-2.5`}>+ <div className="my-6 flex items-start justify-between gap-6 px-4 sm:px-5">+ <div className="space-y-2">+ <Skeleton className="h-9 w-72" />+ <Skeleton className="h-5 w-96 max-w-full" />+ </div>+ <div className="flex shrink-0 flex-col items-end gap-1.5">+ <Skeleton className="h-5 w-16" />+ <Skeleton className="h-4 w-24" />+ </div>+ </div>+ <div className={GRID_CLASS}>+ <div className="flex flex-col gap-7 xl:col-span-8">+ <HomeTileSkeleton cardClassName="h-80" />+ <HomeTileSkeleton cardClassName="h-72" />+ </div>+ <div className="flex flex-col gap-7 xl:col-span-4">+ <HomeTileSkeleton cardClassName="h-56" />+ <HomeTileSkeleton cardClassName="h-72" />+ </div>+ </div>+ </div>+ </main>+ );+}++interface Props {+ cardClassName: string;+}++function HomeTileSkeleton({ cardClassName }: Props) {+ return (+ <div className="flex flex-col gap-2">+ <div className="flex flex-col justify-start space-y-1 px-4 sm:px-5">+ <Skeleton className="h-5 w-32" />+ <Skeleton className="h-4 w-56 max-w-[70%]" />+ </div>+ <Skeleton className={`${cardClassName} rounded-[30px]`} />+ </div>+ );+}diff --git a/autogpt_platform/frontend/src/app/(platform)/home/useHomePage.ts b/autogpt_platform/frontend/src/app/(platform)/home/useHomePage.tsnew file mode 100644index 0000000000..d1e7a01966--- /dev/null+++ b/autogpt_platform/frontend/src/app/(platform)/home/useHomePage.ts@@ -0,0 +1,24 @@+import { useGetHomeDashboard } from "@/app/api/__generated__/endpoints/home/home";+import { okData } from "@/app/api/helpers";++interface Args {+ enabled: boolean;+}++export function useHomePage({ enabled }: Args) {+ const query = useGetHomeDashboard({+ query: {+ select: (response) => okData(response) ?? null,+ enabled,+ refetchInterval: 60_000,+ refetchOnWindowFocus: true,+ },+ });++ return {+ dashboard: query.data ?? null,+ isLoading: enabled && query.isLoading,+ isError: query.isError,+ refetch: query.refetch,+ };+}diff --git a/autogpt_platform/frontend/src/components/layout/AppSidebar/AppSidebar.tsx b/autogpt_platform/frontend/src/components/layout/AppSidebar/AppSidebar.tsxindex 5c0087357e..2c7dc4de22 100644--- a/autogpt_platform/frontend/src/components/layout/AppSidebar/AppSidebar.tsx+++ b/autogpt_platform/frontend/src/components/layout/AppSidebar/AppSidebar.tsx@@ -35,6 +35,7 @@ import {FlowIcon,Folder01Icon,GridViewIcon,+ Home01Icon,NoteEditIcon,Store01Icon,UserGroup02Icon,@@ -54,6 +55,10 @@ const MAIN_LINKS: NavLink[] = [{ name: "Build", href: "/build", icon: FlowIcon },];+// /home 404s without the experts flag, so the entry only exists for the+// cohort that has a home to go to.+const HOME_LINK: NavLink = { name: "Home", href: "/home", icon: Home01Icon };+const WORKSPACE_LINKS: NavLink[] = [{ name: "Files", href: "/artifacts", icon: Folder01Icon },];@@ -234,7 +239,7 @@ export function AppSidebar(props: Props) {const isHireExpertsEnabled = useGetFlag(Flag.HIRE_EXPERTS);const isBrainDumpEnabled = useGetFlag(Flag.ONBOARDING_BRAIN_DUMP);const mainLinks = isHireExpertsEnabled- ? MAIN_LINKS.filter((link) => link.href !== "/library")+ ? [HOME_LINK, ...MAIN_LINKS.filter((link) => link.href !== "/library")]: MAIN_LINKS;const workspaceLinks = isHireExpertsEnabled? [diff --git a/autogpt_platform/frontend/src/components/layout/AppSidebar/__tests__/AppSidebar.test.tsx b/autogpt_platform/frontend/src/components/layout/AppSidebar/__tests__/AppSidebar.test.tsxindex 8325890fa4..ae6e11055e 100644--- a/autogpt_platform/frontend/src/components/layout/AppSidebar/__tests__/AppSidebar.test.tsx+++ b/autogpt_platform/frontend/src/components/layout/AppSidebar/__tests__/AppSidebar.test.tsx@@ -63,6 +63,8 @@ describe("AppSidebar", () => {expect(screen.getByText("Marketplace")).toBeDefined();expect(screen.getByText("Build")).toBeDefined();expect(screen.getByText("Files")).toBeDefined();+ // /home 404s without the experts flag, so it must not be offered here.+ expect(screen.queryByText("Home")).toBeNull();});it("shows Team instead of Agents when the hire-experts flag is on", () => {@@ -73,6 +75,13 @@ describe("AppSidebar", () => {expect(screen.queryByText("Agents")).toBeNull();});+ it("adds a Home link when the hire-experts flag is on", () => {+ useGetFlagMock.mockReturnValue(true);+ renderSidebar();+ const homeLink = screen.getByRole("link", { name: /home/i });+ expect(homeLink.getAttribute("href")).toBe("/home");+ });+it("renders the New Task call-to-action pointing at /copilot", () => {renderSidebar();const newTask = screen.getByRole("link", { name: /new task/i });diff --git a/autogpt_platform/frontend/src/lib/auth/helpers.ts b/autogpt_platform/frontend/src/lib/auth/helpers.tsindex 74d3285dfb..159622c733 100644--- a/autogpt_platform/frontend/src/lib/auth/helpers.ts+++ b/autogpt_platform/frontend/src/lib/auth/helpers.ts@@ -5,6 +5,7 @@ export const PROTECTED_PAGES = ["/auth/authorize","/auth/integrations","/copilot",+ "/home","/monitor","/build","/onboarding",diff --git a/autogpt_platform/frontend/tailwind.config.ts b/autogpt_platform/frontend/tailwind.config.tsindex 7c46e9578b..e513f33a1e 100644--- a/autogpt_platform/frontend/tailwind.config.ts+++ b/autogpt_platform/frontend/tailwind.config.ts@@ -1,8 +1,35 @@import scrollbar from "tailwind-scrollbar";import type { Config } from "tailwindcss";+import plugin from "tailwindcss/plugin";import tailwindcssAnimate from "tailwindcss-animate";import { colors } from "./src/components/styles/colors";+const SMOOTH_SHADOW_SM =+ "0 18px 47px 0 color-mix(in srgb, var(--smooth-shadow-color) 3%, transparent), 0 7.5px 19px 0 color-mix(in srgb, var(--smooth-shadow-color) 2%, transparent), 0 4px 10.5px 0 color-mix(in srgb, var(--smooth-shadow-color) 2%, transparent), 0 2.3px 5.8px 0 color-mix(in srgb, var(--smooth-shadow-color) 1%, transparent), 0 1.2px 3.1px 0 color-mix(in srgb, var(--smooth-shadow-color) 1%, transparent), 0 0.5px 1.3px 0 color-mix(in srgb, var(--smooth-shadow-color) 1%, transparent)";+const SMOOTH_RING =+ "0 0 0 var(--smooth-ring-width, 1px) var(--smooth-ring-color)";++const smoothShadowRing = plugin(function smoothShadowRing({+ addBase,+ addUtilities,+}) {+ addBase({+ ":root": {+ "--smooth-ring-color": "rgba(0, 0, 0, 0.05)",+ "--smooth-ring-width": "1px",+ },+ '.dark, .dark-mode, [data-theme="dark"]': {+ "--smooth-ring-color": "rgba(255, 255, 255, 0.18)",+ },+ });+ addUtilities({+ ".smooth-shadow-ring-sm": {+ "--smooth-shadow-color": "var(--tw-shadow-color, rgb(0 0 0))",+ boxShadow: `${SMOOTH_SHADOW_SM}, ${SMOOTH_RING}`,+ },+ });+});+const config = {darkMode: ["class", ".dark-mode"], // ignore dark: prefix classes for now until we fully support dark modecontent: ["./src/**/*.{ts,tsx}", "./node_modules/streamdown/dist/**/*.js"],@@ -249,7 +276,11 @@ const config = {},},},- plugins: [tailwindcssAnimate, scrollbar({ nocompatible: true })],+ plugins: [+ tailwindcssAnimate,+ scrollbar({ nocompatible: true }),+ smoothShadowRing,+ ],} satisfies Config;export default config;