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): tidy copilot chrome and move recent workflow runs to the home briefing (#14304)
Ubbe44020abc9e52
diff --git a/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatInput/ChatInput.tsx b/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatInput/ChatInput.tsxindex 041c6cc458..75851127a3 100644--- a/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatInput/ChatInput.tsx+++ b/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatInput/ChatInput.tsx@@ -326,12 +326,6 @@ export function ChatInput({}/>{recipientPicker}- {/* Connection and tier are per-message settings, so they remain- changeable between turns in an existing session. The card- composer leaves this to the page's top-right control. */}- {!stacked && (!hasSession || !isStreaming) && (- <ConnectionPicker connectionLocked={hasSession} />- )}</InputGroupAddon>{/* Must be a real flex item: `order`/`w-full` are ignored on a`display: contents` box, which is what PromptInputBody was. */}@@ -370,6 +364,12 @@ export function ChatInput({stacked && "gap-1.5 p-0",)}>+ {/* Connection and tier are per-message settings, so they remain+ changeable between turns in an existing session. The card+ composer leaves this to the page's top-right control. */}+ {!stacked && (!hasSession || !isStreaming) && (+ <ConnectionPicker connectionLocked={hasSession} />+ )}{showAdvancedComposerControls && !hasSession && (<DryRunToggleButtonisDryRun={isDryRun}diff --git a/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatInput/components/ConnectionPicker/ConnectionPicker.tsx b/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatInput/components/ConnectionPicker/ConnectionPicker.tsxindex 4499742e76..c250919458 100644--- a/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatInput/components/ConnectionPicker/ConnectionPicker.tsx+++ b/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatInput/components/ConnectionPicker/ConnectionPicker.tsx@@ -5,6 +5,11 @@ import {PopoverContent,PopoverTrigger,} from "@/components/molecules/Popover/Popover";+import {+ Tooltip,+ TooltipContent,+ TooltipTrigger,+} from "@/components/ui/tooltip";import type { AIConnectionOffer } from "@/app/api/__generated__/models/aIConnectionOffer";import {AlertCircleIcon,@@ -83,7 +88,7 @@ export function ConnectionPicker({<spanaria-label="AI connections unavailable"className={cn(- "ml-2 inline-flex h-9 items-center gap-1.5 rounded-full border border-destructive/20 bg-destructive/10 px-2.5 text-xs font-medium text-destructive",+ "inline-flex h-9 items-center gap-1.5 rounded-full border border-destructive/20 bg-destructive/10 px-2.5 text-xs font-medium text-destructive",className,)}>@@ -99,7 +104,7 @@ export function ConnectionPicker({href="/settings/integrations"aria-label="Set up an AI connection"className={cn(- "ml-2 inline-flex h-9 items-center gap-1.5 rounded-full border border-border bg-muted px-2.5 text-xs font-medium text-foreground transition-colors hover:bg-muted/80",+ "inline-flex h-9 items-center gap-1.5 rounded-full border border-border bg-muted px-2.5 text-xs font-medium text-foreground transition-colors hover:bg-muted/80",className,)}>@@ -153,43 +158,64 @@ export function ConnectionPicker({(!connectionLocked || onlyOfferIsLocked) &&(offers.length > 1 || onlyOfferIsLocked);- return (- <Popover>- <PopoverTrigger asChild>- <Button- type="button"- variant="ghost"- size="small"- unmask={false}- aria-label={- showsTier- ? `Model tier ${label} — change`- : `Runs on ${triggerLabel} — change`- }- className={cn(- "ml-2 h-9 min-w-0 gap-1.5 px-2.5 py-1 text-sm",- className,- )}- >- {/* The tier the next turn runs at, whichever half of the setting- the label happens to be naming. It swaps on the same beat as the- label beside it, so the two read as one change. */}- <Swap swapKey={tier} className="flex-none">- <Icon- icon={tier === "advanced" ? AiBrain01Icon : FlashIcon}- size={16}- />- </Swap>- <span className="hidden sm:inline">- <Swap>{triggerLabel}</Swap>- </span>+ // Naming only the tier, the chip folds down to its glyph among the other+ // quiet icons on the composer's right; the tier and its model wait in the+ // tooltip. A connection name is a decision the user has to read, so that+ // form keeps its label.+ const trigger = (+ <PopoverTrigger asChild>+ <Button+ type="button"+ variant="ghost"+ size={showsTier ? "icon" : "small"}+ unmask={false}+ aria-label={+ showsTier+ ? `Model tier ${label} — change`+ : `Runs on ${triggerLabel} — change`+ }+ className={cn(+ showsTier+ ? "size-8 p-0 text-zinc-500 hover:bg-zinc-100 hover:text-zinc-700"+ : "h-9 min-w-0 gap-1.5 px-2.5 py-1 text-sm",+ className,+ )}+ >+ {/* The tier the next turn runs at, whichever half of the setting+ the label happens to be naming. It swaps on the same beat as the+ label beside it, so the two read as one change. */}+ <Swap swapKey={tier} className="flex-none"><Icon- icon={ArrowDown01Icon}- size={14}- className="text-muted-foreground"+ icon={tier === "advanced" ? AiBrain01Icon : FlashIcon}+ size={16}/>- </Button>- </PopoverTrigger>+ </Swap>+ {!showsTier && (+ <>+ <span className="hidden sm:inline">+ <Swap>{triggerLabel}</Swap>+ </span>+ <Icon+ icon={ArrowDown01Icon}+ size={14}+ className="text-muted-foreground"+ />+ </>+ )}+ </Button>+ </PopoverTrigger>+ );++ return (+ <Popover>+ {showsTier ? (+ <Tooltip>+ <TooltipTrigger asChild>{trigger}</TooltipTrigger>+ <TooltipContent side="top">{tierLabel(active, tier)}</TooltipContent>+ </Tooltip>+ ) : (+ trigger+ )}<PopoverContentalign="end"diff --git a/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatInput/components/__tests__/ConnectionPicker.test.tsx b/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatInput/components/__tests__/ConnectionPicker.test.tsxindex 76d95871a4..f957e1813c 100644--- a/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatInput/components/__tests__/ConnectionPicker.test.tsx+++ b/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatInput/components/__tests__/ConnectionPicker.test.tsx@@ -749,7 +749,8 @@ describe("ConnectionPicker", () => {render(<ConnectionPicker />);const trigger = await screen.findByRole("button", { name: /Model tier/ });- // The tier glyph and the dropdown chevron.- expect(trigger.querySelectorAll("svg")).toHaveLength(2);+ // Naming only the tier, the chip folds down to the glyph alone: no label+ // and no chevron, so the one SVG is the tier.+ expect(trigger.querySelectorAll("svg")).toHaveLength(1);});});diff --git a/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatMessagesContainer/components/ExpertIntegrations/ExpertIntegrations.tsx b/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatMessagesContainer/components/ExpertIntegrations/ExpertIntegrations.tsxindex 9bec976368..03e2a981ba 100644--- a/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatMessagesContainer/components/ExpertIntegrations/ExpertIntegrations.tsx+++ b/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatMessagesContainer/components/ExpertIntegrations/ExpertIntegrations.tsx@@ -36,7 +36,7 @@ export function ExpertIntegrations({ expertId, expertName }: Props) {return (<Popover><PopoverTrigger- className="ml-2 flex shrink-0 items-center gap-1 rounded-full px-1.5 py-1 hover:bg-zinc-100"+ className="flex shrink-0 items-center gap-1 rounded-full py-1 pl-1.5 pr-3 transition-colors hover:bg-zinc-100/80"aria-label={`${expertName}'s integrations`}data-testid="expert-integrations">diff --git a/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatMessagesContainer/components/ThreadHeader.tsx b/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatMessagesContainer/components/ThreadHeader.tsxindex 07ad2ff9e1..01fd66644b 100644--- a/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatMessagesContainer/components/ThreadHeader.tsx+++ b/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatMessagesContainer/components/ThreadHeader.tsx@@ -117,8 +117,9 @@ export function ThreadHeader({>{/* The integrations popover is its own button, so the chip is acontainer and only the identity half opens the activity card —- nesting the two triggers would be button-in-button. */}- <div className="pointer-events-auto flex items-center whitespace-nowrap rounded-full border border-zinc-200/70 bg-white/75 py-1 pl-1.5 pr-3 shadow-sm backdrop-blur-md">+ nesting the two triggers would be button-in-button. Each half+ carries its own padding so its hover fill reaches the chip's edge. */}+ <div className="pointer-events-auto flex items-center whitespace-nowrap rounded-full border border-zinc-200/70 bg-white/75 shadow-sm backdrop-blur-md"><TooltipProvider><Tooltip><TooltipTrigger asChild>@@ -131,7 +132,7 @@ export function ThreadHeader({: `${name}, ${role}. Open session activity`}onClick={() => toggleContextPanelTab("files")}- className="-my-1 -ml-1.5 flex min-w-0 items-center gap-2 rounded-full py-1 pl-1.5 pr-1.5 transition-colors hover:bg-zinc-100/80"+ className="flex min-w-0 items-center gap-2 rounded-full py-1 pl-1.5 pr-3 transition-colors hover:bg-zinc-100/80">{chipContent}</button>@@ -143,7 +144,7 @@ export function ThreadHeader({<divtabIndex={0}aria-label={`${name} — ${role}`}- className="flex min-w-0 items-center gap-2 rounded-full"+ className="flex min-w-0 items-center gap-2 rounded-full py-1 pl-1.5 pr-3">{chipContent}</div>diff --git a/autogpt_platform/frontend/src/app/(platform)/copilot/components/CopilotHome/CopilotHome.tsx b/autogpt_platform/frontend/src/app/(platform)/copilot/components/CopilotHome/CopilotHome.tsxindex 72435a3252..410be72bec 100644--- a/autogpt_platform/frontend/src/app/(platform)/copilot/components/CopilotHome/CopilotHome.tsx+++ b/autogpt_platform/frontend/src/app/(platform)/copilot/components/CopilotHome/CopilotHome.tsx@@ -3,18 +3,13 @@import { ErrorCard } from "@/components/molecules/ErrorCard/ErrorCard";import { BriefingCard } from "@/components/organisms/BriefingCard/BriefingCard";import { hasRecapContent } from "@/components/organisms/BriefingCard/helpers";-import type { ReactNode } from "react";import { useCopilotHome } from "./useCopilotHome";-interface Props {- fallback: ReactNode;-}-// The short briefing recap under the composer. It is a recap only — the// decisions inbox and team status live on /home — so the copilot's empty// state keeps its onboarding surface (welcome dialog, greeting flow,// suggestion themes) and the composer's recipient picker.-export function CopilotHome({ fallback }: Props) {+export function CopilotHome() {const { briefing, isLoadingBriefing, isBriefingError, refetchBriefing } =useCopilotHome();@@ -35,8 +30,9 @@ export function CopilotHome({ fallback }: Props) {// Not just "no briefing": a briefing of nothing but pending decisions has// no runs to recap, and the card would render null. The inbox that used to- // carry that case lives on /home now, so the fallback has to.- if (!hasRecapContent(briefing)) return <>{fallback}</>;+ // carry that case lives on /home now, as does the workflow-runs strip that+ // once stood in here, so the empty state simply stays quiet.+ if (!hasRecapContent(briefing)) return null;return <BriefingCard briefing={briefing} />;}diff --git a/autogpt_platform/frontend/src/app/(platform)/copilot/components/CopilotHome/__tests__/flag-off.test.tsx b/autogpt_platform/frontend/src/app/(platform)/copilot/components/CopilotHome/__tests__/flag-off.test.tsxindex beeb6d8127..3292d3b449 100644--- a/autogpt_platform/frontend/src/app/(platform)/copilot/components/CopilotHome/__tests__/flag-off.test.tsx+++ b/autogpt_platform/frontend/src/app/(platform)/copilot/components/CopilotHome/__tests__/flag-off.test.tsx@@ -1,17 +1,12 @@import { expect, test, vi } from "vitest";import { render, screen } from "@/tests/integrations/test-utils";import { server } from "@/mocks/mock-server";-import {- getGetV2ListLibraryAgentsMockHandler,- getGetV2ListLibraryAgentsResponseMock,-} from "@/app/api/__generated__/endpoints/library/library.msw";-import { getGetV1ListAllExecutionsMockHandler } from "@/app/api/__generated__/endpoints/graphs/graphs.msw";import { getGetBriefingsGetLatestBriefingMockHandler200 } from "@/app/api/__generated__/endpoints/briefings/briefings.msw";import { EmptySession } from "../../EmptySession/EmptySession";// The mirror of main.test.tsx: everything the briefing recap adds rides the-// experts flag, so with it off the pre-existing pulse strip must be what-// renders and none of the new surfaces may mount.+// experts flag, so with it off none of its surfaces may mount — the empty+// state is just the composer and its suggestions.vi.mock("@/services/feature-flags/use-get-flag", async (importActual) => {const actual =await importActual<@@ -30,21 +25,7 @@ const baseProps = {};function mockHomeData() {- const base = getGetV2ListLibraryAgentsResponseMock();server.use(- getGetV2ListLibraryAgentsMockHandler({- ...base,- agents: [- { ...base.agents[0], graph_id: "g-1", has_external_trigger: true },- ],- pagination: {- total_items: 1,- total_pages: 1,- current_page: 1,- page_size: 100,- },- }),- getGetV1ListAllExecutionsMockHandler([]),// Would render something if the briefing recap mounted anyway.getGetBriefingsGetLatestBriefingMockHandler200({id: "briefing-1",@@ -75,7 +56,7 @@ function mockHomeData() {);}-test("keeps the pulse strip and mounts no briefing home when experts is off", async () => {+test("mounts no briefing home when experts is off", async () => {mockHomeData();// Absence of the rendered text alone could pass just because the briefing@@ -91,12 +72,9 @@ test("keeps the pulse strip and mounts no briefing home when experts is off", astry {render(<EmptySession {...baseProps} />);- // The pulse strip only renders once its own library + executions- // requests have resolved, so by here a mounted CopilotHome would have- // fired its queries too.- expect(- await screen.findByText("What's happening with your agents"),- ).toBeDefined();+ // The composer mounts on the same render a CopilotHome would, so by the+ // time it is on screen a mounted recap would have fired its query.+ expect(await screen.findByPlaceholderText(/./)).toBeDefined();expect(requestedPaths.some((path) => path.includes("briefing"))).toBe(false,diff --git a/autogpt_platform/frontend/src/app/(platform)/copilot/components/CopilotHome/__tests__/main.test.tsx b/autogpt_platform/frontend/src/app/(platform)/copilot/components/CopilotHome/__tests__/main.test.tsxindex b99f1aef2c..7e4a344f82 100644--- a/autogpt_platform/frontend/src/app/(platform)/copilot/components/CopilotHome/__tests__/main.test.tsx+++ b/autogpt_platform/frontend/src/app/(platform)/copilot/components/CopilotHome/__tests__/main.test.tsx@@ -1,13 +1,8 @@import { expect, test, vi } from "vitest";import { http, HttpResponse } from "msw";import userEvent from "@testing-library/user-event";-import { render, screen } from "@/tests/integrations/test-utils";+import { render, screen, waitFor } from "@/tests/integrations/test-utils";import { server } from "@/mocks/mock-server";-import {- getGetV2ListLibraryAgentsMockHandler,- getGetV2ListLibraryAgentsResponseMock,-} from "@/app/api/__generated__/endpoints/library/library.msw";-import { getGetV1ListAllExecutionsMockHandler } from "@/app/api/__generated__/endpoints/graphs/graphs.msw";import { getGetBriefingsGetLatestBriefingMockHandler200 } from "@/app/api/__generated__/endpoints/briefings/briefings.msw";import { EmptySession } from "../../EmptySession/EmptySession";@@ -32,30 +27,26 @@ const baseProps = {onSend: vi.fn(),};-// Guarantees the pulse strip has at least one chip regardless of faker's-// random defaults — an agent with an external trigger always produces a-// "listening" sitrep item.-function mockPulseStripAgent() {- const base = getGetV2ListLibraryAgentsResponseMock();- server.use(- getGetV2ListLibraryAgentsMockHandler({- ...base,- agents: [- { ...base.agents[0], graph_id: "g-1", has_external_trigger: true },- ],- pagination: {- total_items: 1,- total_pages: 1,- current_page: 1,- page_size: 100,- },- }),- getGetV1ListAllExecutionsMockHandler([]),- );+// The recap renders nothing until its briefing request settles, so tests+// that assert its absence wait for the mocked response rather than trusting+// a blank screen that may only mean "still loading".+function trackResponses() {+ const paths: string[] = [];+ function record({ request }: { request: Request }) {+ paths.push(new URL(request.url).pathname);+ }+ server.events.on("response:mocked", record);+ return {+ paths,+ briefingSettled: () =>+ waitFor(() =>+ expect(paths.some((path) => path.includes("briefings"))).toBe(true),+ ),+ stop: () => server.events.removeListener("response:mocked", record),+ };}test("renders greeting and composer", async () => {- mockPulseStripAgent();render(<EmptySession {...baseProps} />);expect(await screen.findByPlaceholderText(/./)).toBeDefined();});@@ -69,17 +60,25 @@ test("shows a named kickoff status and withholds the empty composer", () => {expect(screen.queryByPlaceholderText(/./)).toBeNull();});-test("falls back to pulse strip when there is no briefing", async () => {- mockPulseStripAgent();+test("leaves the space under the composer empty when there is no briefing", async () => {+ // The workflow-runs strip that used to fill this gap lives on /home now,+ // under the briefing tile.server.use(getGetBriefingsGetLatestBriefingMockHandler200(null));- render(<EmptySession {...baseProps} />);- expect(- await screen.findByText("What's happening with your agents"),- ).toBeDefined();+ const responses = trackResponses();++ try {+ render(<EmptySession {...baseProps} />);+ expect(await screen.findByPlaceholderText(/./)).toBeDefined();+ await responses.briefingSettled();++ expect(screen.queryByText("Recap")).toBeNull();+ expect(screen.queryByText("What's happening with your agents")).toBeNull();+ } finally {+ responses.stop();+ }});test("renders briefing sections when a briefing is available", async () => {- mockPulseStripAgent();server.use(getGetBriefingsGetLatestBriefingMockHandler200({id: "briefing-1",@@ -145,7 +144,6 @@ test("renders briefing sections when a briefing is available", async () => {});test("shows three runs, then all of them behind the show-all toggle", async () => {- mockPulseStripAgent();server.use(getGetBriefingsGetLatestBriefingMockHandler200({id: "briefing-1",@@ -190,7 +188,6 @@ test("shows three runs, then all of them behind the show-all toggle", async () =});test("links each row straight at its run", async () => {- mockPulseStripAgent();server.use(getGetBriefingsGetLatestBriefingMockHandler200({id: "briefing-1",@@ -231,29 +228,23 @@ test("keeps the decisions inbox and team status off the copilot recap", async ()// what keeps the inbox from creeping back in: absent text alone would// also pass while the request was still in flight. (The experts query has// no such tell — the composer's recipient picker still needs it.)- mockPulseStripAgent();server.use(getGetBriefingsGetLatestBriefingMockHandler200(null));-- const requestedPaths: string[] = [];- function record({ request }: { request: Request }) {- requestedPaths.push(new URL(request.url).pathname);- }- server.events.on("request:start", record);+ const responses = trackResponses();try {render(<EmptySession {...baseProps} />);- await screen.findByText("What's happening with your agents");+ await screen.findByPlaceholderText(/./);+ await responses.briefingSettled();- expect(requestedPaths.some((path) => path.includes("review"))).toBe(false);+ expect(responses.paths.some((path) => path.includes("review"))).toBe(false);expect(screen.queryByText(/Needs your attention/)).toBeNull();expect(screen.queryByRole("link", { name: /Chat with/ })).toBeNull();} finally {- server.events.removeListener("request:start", record);+ responses.stop();}});-test("shows an error card instead of the pulse strip when the briefing fetch fails", async () => {- mockPulseStripAgent();+test("shows an error card when the briefing fetch fails", async () => {server.use(http.get("/api/proxy/api/briefings/latest", () =>HttpResponse.json({ detail: "boom" }, { status: 500 }),@@ -262,14 +253,12 @@ test("shows an error card instead of the pulse strip when the briefing fetch fairender(<EmptySession {...baseProps} />);expect(await screen.findByText("Failed to load your briefing")).toBeDefined();- expect(screen.queryByText("What's happening with your agents")).toBeNull();});test("keeps the onboarding surface and recipient picker with the experts flag on", async () => {// hire-experts and onboarding-brain-dump are independent flags aimed at// overlapping beta cohorts; the briefing recap must not cancel the other// rollout out from under a brand-new user.- mockPulseStripAgent();server.use(getGetBriefingsGetLatestBriefingMockHandler200(null));render(<EmptySession {...baseProps} />);@@ -281,7 +270,6 @@ test("keeps the onboarding surface and recipient picker with the experts flag on});test("renders a run row without a link when the briefing has no deep link", async () => {- mockPulseStripAgent();server.use(getGetBriefingsGetLatestBriefingMockHandler200({id: "briefing-1",@@ -320,7 +308,7 @@ test("renders a run row without a link when the briefing has no deep link", asyntest("does not render a hollow briefing card when there are no runs", async () => {// A run paused on an approval is not terminal, so it never lands in the// run list — leaving a card that would show only a date.- mockPulseStripAgent();+ const responses = trackResponses();server.use(getGetBriefingsGetLatestBriefingMockHandler200({id: "briefing-1",@@ -347,13 +335,17 @@ test("does not render a hollow briefing card when there are no runs", async () =},}),);- render(<EmptySession {...baseProps} />);- // The pulse strip has to take over: the decisions inbox that used to carry- // this case is on /home now, so without it the empty state is blank.- expect(- await screen.findByText("What's happening with your agents"),- ).toBeDefined();- expect(screen.queryByText("This morning")).toBeNull();- expect(screen.queryByText("Recap")).toBeNull();+ try {+ render(<EmptySession {...baseProps} />);+ await screen.findByPlaceholderText(/./);+ await responses.briefingSettled();++ // The decisions inbox that used to carry this case is on /home now, so+ // the empty state stays blank rather than showing a dated, empty card.+ expect(screen.queryByText("This morning")).toBeNull();+ expect(screen.queryByText("Recap")).toBeNull();+ } finally {+ responses.stop();+ }});diff --git a/autogpt_platform/frontend/src/app/(platform)/copilot/components/EmptySession/EmptySession.tsx b/autogpt_platform/frontend/src/app/(platform)/copilot/components/EmptySession/EmptySession.tsxindex 48714afdf2..90b16fc3cb 100644--- a/autogpt_platform/frontend/src/app/(platform)/copilot/components/EmptySession/EmptySession.tsx+++ b/autogpt_platform/frontend/src/app/(platform)/copilot/components/EmptySession/EmptySession.tsx@@ -17,8 +17,6 @@ import { SuggestionThemes } from "./components/SuggestionThemes/SuggestionThemesimport { OnboardingIntroCard } from "../OnboardingIntroCard/OnboardingIntroCard";import { OnboardingWelcomeDialog } from "../OnboardingWelcomeDialog/OnboardingWelcomeDialog";import { useOnboardingIntroCard } from "../OnboardingIntroCard/useOnboardingIntroCard";-import { PulseChips } from "../PulseChips/PulseChips";-import { usePulseChips } from "../PulseChips/usePulseChips";import { Flag, useGetFlag } from "@/services/feature-flags/use-get-flag";import type { WorkspaceAttachment } from "../../helpers/workspaceAttachments";import { EmptyHero } from "./components/EmptyHero";@@ -59,9 +57,7 @@ export function EmptySession({const greetingName = getGreetingName(user);const intro = useOnboardingIntroCard();const isBrainDumpEnabled = useGetFlag(Flag.ONBOARDING_BRAIN_DUMP);- const isAgentBriefingEnabled = useGetFlag(Flag.AGENT_BRIEFING);const isExpertsEnabled = useGetFlag(Flag.HIRE_EXPERTS);- const pulseChips = usePulseChips();const { options, recipient, isLoadingRecipient, selectRecipient } =useRecipientPicker();const isComposerDisabled = isCreatingSession || !!isInteractionLocked;@@ -219,24 +215,16 @@ export function EmptySession({{/* The recap sits under the composer: the empty state's job is toget a message typed, so the briefing reads as context below it- rather than as a wall above it. */}+ rather than as a wall above it. Workflow activity lives on+ /home, under the briefing, so nothing stands in for a missing+ recap here. */}{!intro.isVisible &&!intro.isAwaitingGreeting &&- (isExpertsEnabled ? (+ isExpertsEnabled && (<div className="mx-auto mb-6 w-full max-w-[42rem]">- <CopilotHome- fallback={- isAgentBriefingEnabled ? (- <PulseChips chips={pulseChips} onChipClick={onSend} />- ) : null- }- />+ <CopilotHome /></div>- ) : (- isAgentBriefingEnabled && (- <PulseChips chips={pulseChips} onChipClick={onSend} />- )- ))}+ )}</div>{/* The greeting page is deliberately quiet: its own prompts arediff --git a/autogpt_platform/frontend/src/app/(platform)/copilot/components/OnboardingIntroCard/__tests__/useOnboardingIntroCard.test.tsx b/autogpt_platform/frontend/src/app/(platform)/copilot/components/OnboardingIntroCard/__tests__/useOnboardingIntroCard.test.tsxindex b6caf22cfb..2e19fac52d 100644--- a/autogpt_platform/frontend/src/app/(platform)/copilot/components/OnboardingIntroCard/__tests__/useOnboardingIntroCard.test.tsx+++ b/autogpt_platform/frontend/src/app/(platform)/copilot/components/OnboardingIntroCard/__tests__/useOnboardingIntroCard.test.tsx@@ -109,7 +109,7 @@ describe("useOnboardingIntroCard — flag gating", () => {// The regression: with the flag off the intro query is disabled, so it// never answers — and "no answer yet" was read as "still generating".// isAwaitingGreeting stayed true forever and EmptySession hides the- // composer, PulseChips and SuggestionThemes behind it, so the default+ // composer and SuggestionThemes behind it, so the default// flag-off copilot rendered a hero with no way to type.flags.current = {};diff --git a/autogpt_platform/frontend/src/app/(platform)/copilot/components/PulseChips/PulseChips.module.css b/autogpt_platform/frontend/src/app/(platform)/copilot/components/PulseChips/PulseChips.module.cssdeleted file mode 100644index da221fb7d8..0000000000--- a/autogpt_platform/frontend/src/app/(platform)/copilot/components/PulseChips/PulseChips.module.css+++ /dev/null@@ -1,93 +0,0 @@-.glassPanel {- position: relative;- isolation: isolate;-}--.glassPanel::before {- content: "";- position: absolute;- inset: 0;- border-radius: inherit;- padding: 1px;- background: conic-gradient(- from var(--border-angle, 0deg),- rgba(129, 120, 228, 0.08),- rgba(129, 120, 228, 0.28),- rgba(168, 130, 255, 0.18),- rgba(129, 120, 228, 0.08),- rgba(99, 102, 241, 0.24),- rgba(129, 120, 228, 0.08)- );- -webkit-mask:- linear-gradient(#000 0 0) content-box,- linear-gradient(#000 0 0);- mask:- linear-gradient(#000 0 0) content-box,- linear-gradient(#000 0 0);- -webkit-mask-composite: xor;- mask-composite: exclude;- animation: rotate-border 6s linear infinite;- pointer-events: none;- z-index: -1;-}--@property --border-angle {- syntax: "<angle>";- initial-value: 0deg;- inherits: false;-}--@keyframes rotate-border {- to {- --border-angle: 360deg;- }-}--.chip {- overflow: hidden;-}--@media (hover: hover) {- .chip {- padding-bottom: 0.9rem;- }-}--@media (hover: none) {- .chip {- padding-bottom: 2.25rem;- }-}--.chipActions {- position: absolute;- inset-inline: 0;- bottom: 0;- background: rgba(255, 255, 255, 0.95);- backdrop-filter: blur(4px);- -webkit-backdrop-filter: blur(4px);-}--@media (hover: hover) {- .chipActions {- opacity: 0;- transform: translateY(100%);- transition:- opacity 0.2s ease-out,- transform 0.2s ease-out;- }-- .chip:hover .chipActions {- opacity: 1;- transform: translateY(0);- }-- .chipContent {- transition: filter 0.2s ease-out;- }-- .chip:hover .chipContent {- filter: blur(2px);- opacity: 0.5;- }-}diff --git a/autogpt_platform/frontend/src/app/(platform)/copilot/components/PulseChips/PulseChips.tsx b/autogpt_platform/frontend/src/app/(platform)/copilot/components/PulseChips/PulseChips.tsxdeleted file mode 100644index 128a59a8da..0000000000--- a/autogpt_platform/frontend/src/app/(platform)/copilot/components/PulseChips/PulseChips.tsx+++ /dev/null@@ -1,117 +0,0 @@-"use client";--import { Text } from "@/components/atoms/Text/Text";-import NextLink from "next/link";-import { StatusBadge } from "@/app/(platform)/library/components/StatusBadge/StatusBadge";-import styles from "./PulseChips.module.css";-import type { PulseChipData } from "./types";-import {- ArrowRight02Icon,- Chatting01Icon,- EyeIcon,-} from "@hugeicons/core-free-icons";-import { Icon } from "@/components/atoms/Icon/Icon";--interface Props {- chips: PulseChipData[];- onChipClick?: (prompt: string) => void;-}--export function PulseChips({ chips, onChipClick }: Props) {- if (chips.length === 0) return null;-- return (- <div- className={`${styles.glassPanel} mx-[0.6875rem] mb-5 rounded-large p-5`}- >- <div className="mb-3 flex items-center gap-3">- <Text variant="body-medium" className="text-zinc-600">- What's happening with your agents- </Text>- <NextLink- href="/library"- className="flex items-center gap-1 text-xs text-zinc-500 hover:text-zinc-700"- >- View all <Icon icon={ArrowRight02Icon} size={12} />- </NextLink>- </div>- <div className="flex gap-2 overflow-x-auto pb-1 scrollbar-thin scrollbar-track-transparent scrollbar-thumb-zinc-300">- {chips.map((chip) => (- <PulseChip key={chip.id} chip={chip} onAsk={onChipClick} />- ))}- </div>- </div>- );-}--interface ChipProps {- chip: PulseChipData;- onAsk?: (prompt: string) => void;-}--function PulseChip({ chip, onAsk }: ChipProps) {- function handleAsk() {- const prompt = buildChipPrompt(chip);- onAsk?.(prompt);- }-- return (- <div- className={`${styles.chip} relative flex w-[15rem] shrink-0 flex-col items-start gap-2 rounded-medium border border-zinc-100 bg-white px-3 py-2`}- >- <div className={`${styles.chipContent} w-full text-left`}>- {chip.priority === "success" ? (- <span className="inline-flex items-center gap-1.5 rounded-full px-2 py-0.5 text-xs font-medium text-emerald-600">- <span className="h-1.5 w-1.5 rounded-full bg-emerald-500" />- Completed- </span>- ) : (- <StatusBadge status={chip.status} />- )}- <div className="mt-2 min-w-0">- <Text variant="small-medium" className="truncate text-zinc-900">- {chip.name}- </Text>- <Text variant="small" className="truncate text-zinc-500">- {chip.shortMessage}- </Text>- </div>- </div>- <div- className={`${styles.chipActions} flex items-center justify-center gap-1.5 rounded-b-medium px-3 py-1.5`}- >- <NextLink- href={`/library/agents/${chip.agentID}`}- className="flex items-center gap-1 rounded-md px-2 py-1 text-xs text-zinc-500 transition-colors hover:bg-zinc-100 hover:text-zinc-700"- >- <Icon icon={EyeIcon} size={14} />- See- </NextLink>- <button- type="button"- onClick={handleAsk}- className="flex items-center gap-1 rounded-md px-2 py-1 text-xs text-zinc-500 transition-colors hover:bg-zinc-100 hover:text-zinc-700"- >- <Icon icon={Chatting01Icon} size={14} />- Ask- </button>- </div>- </div>- );-}--function buildChipPrompt(chip: PulseChipData): string {- if (chip.priority === "success") {- return `${chip.name} just finished a run — can you summarize what it did?`;- }- switch (chip.status) {- case "error":- return `What happened with ${chip.name}? It has an error — can you check?`;- case "running":- return `Give me a status update on ${chip.name} — what has it done so far?`;- case "idle":- return `${chip.name} hasn't run recently. Should I keep it or update and re-run it?`;- default:- return `Tell me about ${chip.name} — what's its current status?`;- }-}diff --git a/autogpt_platform/frontend/src/app/(platform)/copilot/components/PulseChips/__tests__/PulseChips.test.tsx b/autogpt_platform/frontend/src/app/(platform)/copilot/components/PulseChips/__tests__/PulseChips.test.tsxdeleted file mode 100644index 2496929b58..0000000000--- a/autogpt_platform/frontend/src/app/(platform)/copilot/components/PulseChips/__tests__/PulseChips.test.tsx+++ /dev/null@@ -1,105 +0,0 @@-import { describe, expect, test, vi } from "vitest";-import { render, screen, fireEvent } from "@/tests/integrations/test-utils";-import { PulseChips } from "../PulseChips";-import type { PulseChipData } from "../types";--function makeChip(overrides: Partial<PulseChipData> = {}): PulseChipData {- return {- id: "chip-1",- agentID: "agent-1",- name: "Test Agent",- status: "running",- priority: "running",- shortMessage: "Doing work…",- ...overrides,- };-}--describe("PulseChips", () => {- test("renders nothing when chips array is empty", () => {- const { container } = render(<PulseChips chips={[]} />);- expect(container.innerHTML).toBe("");- });-- test("renders chip names and messages", () => {- const chips = [- makeChip({ id: "1", name: "Alpha Bot", shortMessage: "Running task A" }),- makeChip({ id: "2", name: "Beta Bot", shortMessage: "Running task B" }),- ];-- render(<PulseChips chips={chips} />);-- expect(screen.getByText("Alpha Bot")).toBeDefined();- expect(screen.getByText("Running task A")).toBeDefined();- expect(screen.getByText("Beta Bot")).toBeDefined();- expect(screen.getByText("Running task B")).toBeDefined();- });-- test("renders section heading and View all link", () => {- render(<PulseChips chips={[makeChip()]} />);-- expect(screen.getByText("What's happening with your agents")).toBeDefined();- expect(screen.getByText("View all")).toBeDefined();- });-- test("shows Completed badge for success priority chips", () => {- render(- <PulseChips- chips={[makeChip({ priority: "success", status: "idle" })]}- />,- );-- expect(screen.getByText("Completed")).toBeDefined();- });-- test("calls onChipClick with generated prompt when Ask is clicked", () => {- const onChipClick = vi.fn();- render(- <PulseChips- chips={[- makeChip({- name: "Error Agent",- status: "error",- priority: "error",- }),- ]}- onChipClick={onChipClick}- />,- );-- fireEvent.click(screen.getByText("Ask"));-- expect(onChipClick).toHaveBeenCalledWith(- "What happened with Error Agent? It has an error — can you check?",- );- });-- test("generates success prompt for completed chips", () => {- const onChipClick = vi.fn();- render(- <PulseChips- chips={[- makeChip({- name: "Done Agent",- priority: "success",- status: "idle",- }),- ]}- onChipClick={onChipClick}- />,- );-- fireEvent.click(screen.getByText("Ask"));-- expect(onChipClick).toHaveBeenCalledWith(- "Done Agent just finished a run — can you summarize what it did?",- );- });-- test("renders See link pointing to agent detail page", () => {- render(<PulseChips chips={[makeChip({ agentID: "agent-xyz" })]} />);-- const seeLink = screen.getByText("See").closest("a");- expect(seeLink?.getAttribute("href")).toBe("/library/agents/agent-xyz");- });-});diff --git a/autogpt_platform/frontend/src/app/(platform)/copilot/components/PulseChips/types.ts b/autogpt_platform/frontend/src/app/(platform)/copilot/components/PulseChips/types.tsdeleted file mode 100644index 7650afe5ee..0000000000--- a/autogpt_platform/frontend/src/app/(platform)/copilot/components/PulseChips/types.ts+++ /dev/null@@ -1,13 +0,0 @@-import type {- AgentStatus,- SitrepPriority,-} from "@/app/(platform)/library/types";--export interface PulseChipData {- id: string;- agentID: string;- name: string;- status: AgentStatus;- priority: SitrepPriority;- shortMessage: string;-}diff --git a/autogpt_platform/frontend/src/app/(platform)/copilot/components/PulseChips/usePulseChips.ts b/autogpt_platform/frontend/src/app/(platform)/copilot/components/PulseChips/usePulseChips.tsdeleted file mode 100644index 9c4bab2e66..0000000000--- a/autogpt_platform/frontend/src/app/(platform)/copilot/components/PulseChips/usePulseChips.ts+++ /dev/null@@ -1,25 +0,0 @@-"use client";--import { useLibraryAgents } from "@/hooks/useLibraryAgents/useLibraryAgents";-import { useSitrepItems } from "@/app/(platform)/library/components/SitrepItem/useSitrepItems";-import type { PulseChipData } from "./types";-import { useMemo } from "react";--const THREE_DAYS_MS = 3 * 24 * 60 * 60 * 1000;--export function usePulseChips(): PulseChipData[] {- const { agents } = useLibraryAgents();-- const sitrepItems = useSitrepItems(agents, 5, THREE_DAYS_MS);-- return useMemo(() => {- return sitrepItems.map((item) => ({- id: item.id,- agentID: item.agentID,- name: item.agentName,- status: item.status,- priority: item.priority,- shortMessage: item.message,- }));- }, [sitrepItems]);-}diff --git a/autogpt_platform/frontend/src/app/(platform)/copilot/components/WorkspaceFileCards/WorkspaceFileCards.tsx b/autogpt_platform/frontend/src/app/(platform)/copilot/components/WorkspaceFileCards/WorkspaceFileCards.tsxindex 8bb0727d18..feaecd64fe 100644--- a/autogpt_platform/frontend/src/app/(platform)/copilot/components/WorkspaceFileCards/WorkspaceFileCards.tsx+++ b/autogpt_platform/frontend/src/app/(platform)/copilot/components/WorkspaceFileCards/WorkspaceFileCards.tsx@@ -69,7 +69,7 @@ function OpenWorkspaceFileCards({ sessionId }: { sessionId: string }) {animate={{ opacity: 1, x: 0, scale: 1 }}exit={{ opacity: 0, x: 12, scale: 0.98 }}transition={CARD_TRANSITION}- className="absolute right-8 top-18 z-30 flex w-80 max-w-[calc(100%-2rem)] flex-col gap-3"+ className="absolute right-8 top-3 z-30 flex w-80 max-w-[calc(100%-2rem)] flex-col gap-3">{!showFilesCard && !hasActivity && (<div className="rounded-3xl bg-white/90 px-4 py-3 backdrop-blur smooth-shadow-ring-sm">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.tsxindex a489ff0be0..546151df79 100644--- a/autogpt_platform/frontend/src/app/(platform)/home/__tests__/main.test.tsx+++ b/autogpt_platform/frontend/src/app/(platform)/home/__tests__/main.test.tsx@@ -193,12 +193,12 @@ test("renders every Home tile from the aggregate API", async () => {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.getByRole("heading", { name: "Recent work" })).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("heading", { name: "Your team" })).toBeDefined();expect(- screen.getByRole("link", { name: /View all 10 agents/ }),+ screen.getByRole("link", { name: /View all 10 experts/ }),).toBeDefined();expect(screen.getByRole("heading", { name: "Now & next" })).toBeDefined();expect(@@ -224,16 +224,20 @@ test("shows weekly spend per agent and on the team line", async () => {render(<HomePage />);- // Spend sits in its own non-truncating element, so a long detail line can- // never clip the figure this tile exists to show.- const spend = await screen.findByText("· $9.00 this week");- expect(spend.className).toContain("shrink-0");+ expect(await screen.findByText(/\$9\.00 this week/)).toBeDefined();expect(screen.getByText("1 working now · 7 ready · $12.50 this week"),).toBeDefined();- // An expert with no attributed spend keeps its detail line unadorned.- expect(screen.getByText("Ready for the next task")).toBeDefined();- expect(screen.queryByText("· $0.00 this week")).toBeNull();+ // An expert with no attributed spend shows no spend line at all, and the+ // setup detail stays with Needs you rather than repeating here.+ expect(screen.queryByText(/\$0\.00 this week/)).toBeNull();+ expect(screen.queryByText("Ready for the next task")).toBeNull();+ expect(+ screen.getAllByRole("link", { name: /^Chat with / }).length,+ ).toBeGreaterThan(0);+ expect(+ screen.getAllByRole("link", { name: /^Manage / }).length,+ ).toBeGreaterThan(0);});test("falls back to an Unknown badge for an unrecognised agent status", async () => {@@ -292,7 +296,7 @@ test("keeps a Review deep link alongside the approval shortcuts", async () => {expect(reviewLink.getAttribute("href")).toBe("/library/runs/run-1");});-test("shows calm, useful empty states without hiding the page structure", async () => {+test("shows calm, useful empty states and drops the empty inbox", async () => {mockDashboard({...dashboard,attention: [],@@ -311,8 +315,11 @@ test("shows calm, useful empty states without hiding the page structure", asyncrender(<HomePage />);- expect(await screen.findByText("You are all caught up")).toBeDefined();- expect(screen.getByText("No new outcomes yet")).toBeDefined();+ expect(await screen.findByText("Nothing to show yet")).toBeDefined();+ // The header already says nothing needs you, so an empty "Needs you"+ // tile would only repeat it.+ expect(screen.queryByRole("heading", { name: "Needs you" })).toBeNull();+ expect(screen.queryByText("You are all caught up")).toBeNull();expect(screen.getByText(/Nothing is scheduled/)).toBeDefined();expect(screen.getByRole("link", { name: "Browse experts" })).toBeDefined();});@@ -427,7 +434,7 @@ test("renders the briefing unchanged when no narrative was generated", async ()render(<HomePage />);expect(- await screen.findByRole("heading", { name: "Your briefing" }),+ await screen.findByRole("heading", { name: "Recent work" }),).toBeDefined();expect(screen.getByText("Your camera research is ready")).toBeDefined();});diff --git a/autogpt_platform/frontend/src/app/(platform)/home/__tests__/recent-work.test.tsx b/autogpt_platform/frontend/src/app/(platform)/home/__tests__/recent-work.test.tsxindex 5b1d19a93f..cb67888750 100644--- a/autogpt_platform/frontend/src/app/(platform)/home/__tests__/recent-work.test.tsx+++ b/autogpt_platform/frontend/src/app/(platform)/home/__tests__/recent-work.test.tsx@@ -169,7 +169,7 @@ test("shows a calm empty state when agents produced nothing yet", async () => {render(<HomePage />);- expect(await screen.findByText("No work delivered yet")).toBeDefined();+ expect(await screen.findByText("Nothing to show yet")).toBeDefined();});test("renders the rest of the page when recent_work is absent", async () => {@@ -179,6 +179,6 @@ test("renders the rest of the page when recent_work is absent", async () => {render(<HomePage />);- expect(await screen.findByText("No work delivered yet")).toBeDefined();- expect(screen.getByRole("heading", { name: "Your briefing" })).toBeDefined();+ expect(await screen.findByText("Nothing to show yet")).toBeDefined();+ expect(screen.getByRole("heading", { name: "Now & next" })).toBeDefined();});diff --git a/autogpt_platform/frontend/src/app/(platform)/home/__tests__/workflow-runs.test.tsx b/autogpt_platform/frontend/src/app/(platform)/home/__tests__/workflow-runs.test.tsxnew file mode 100644index 0000000000..92a9fcf072--- /dev/null+++ b/autogpt_platform/frontend/src/app/(platform)/home/__tests__/workflow-runs.test.tsx@@ -0,0 +1,158 @@+import { http, HttpResponse } from "msw";+import { expect, test, vi } from "vitest";+import type { HomeDashboardResponse } from "@/app/api/__generated__/models/homeDashboardResponse";+import type { LibraryAgent } from "@/app/api/__generated__/models/libraryAgent";+import { getGetV1ListAllExecutionsMockHandler } from "@/app/api/__generated__/endpoints/graphs/graphs.msw";+import {+ getGetV2ListLibraryAgentsMockHandler,+ getGetV2ListLibraryAgentsResponseMock,+} from "@/app/api/__generated__/endpoints/library/library.msw";+import { server } from "@/mocks/mock-server";+import { render, screen, within } 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: "Ubbe" } },+ }),+}));++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-28T09:00:00Z");++const dashboard: HomeDashboardResponse = {+ generated_at: NOW,+ timezone: "UTC",+ attention: [],+ briefing: {+ generated_at: NOW,+ window_started_at: NOW,+ completed_count: 0,+ failed_count: 0,+ routine_count: 0,+ outcomes: [],+ },+ active_tasks: [],+ upcoming_tasks: [],+ team: { total: 1, ready: 1, 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: [],+ },+ recent_work: { groups: [], total_count: 0 },+};++function mockDashboard(response: HomeDashboardResponse) {+ server.use(+ http.get(/\/api\/proxy\/api\/home(?:\?.*)?$/, () =>+ HttpResponse.json(response),+ ),+ );+}++// The workflow rows read the library's own agent and execution feeds, not+// the home aggregate, so those are what decide whether they show.+function mockLibraryAgents(agents: Array<Partial<LibraryAgent>>) {+ const base = getGetV2ListLibraryAgentsResponseMock();+ server.use(+ getGetV2ListLibraryAgentsMockHandler({+ ...base,+ agents: agents.map((agent, index) => ({+ ...base.agents[0],+ id: `agent-${index}`,+ graph_id: `graph-${index}`,+ has_external_trigger: false,+ is_scheduled: false,+ next_scheduled_run: null,+ ...agent,+ })),+ pagination: {+ total_items: agents.length,+ total_pages: 1,+ current_page: 1,+ page_size: 100,+ },+ }),+ getGetV1ListAllExecutionsMockHandler([]),+ );+}++test("lists each workflow's latest state under Recent work", async () => {+ mockDashboard(dashboard);+ const inTwoDays = new Date(Date.now() + 2 * 24 * 60 * 60 * 1000);+ mockLibraryAgents([+ { name: "Inbox Watcher", has_external_trigger: true },+ {+ name: "Daily Blog Draft",+ is_scheduled: true,+ next_scheduled_run: inTwoDays.toISOString(),+ },+ ]);++ render(<HomePage />);++ const workflows = await screen.findByRole("region", { name: "Workflows" });+ const card = screen+ .getByRole("heading", { name: "Recent work" })+ .closest("section");+ expect(card?.contains(workflows)).toBe(true);+ expect(within(workflows).getByText("Inbox Watcher")).toBeDefined();+ expect(+ within(workflows).getByText("Waiting for trigger event"),+ ).toBeDefined();+ expect(+ within(workflows).getByRole("link", { name: /See/ }).getAttribute("href"),+ ).toBe("/library/agents/agent-0");+ // Scheduled runs belong to Now & next's Coming up, so they do not repeat.+ expect(within(workflows).queryByText("Daily Blog Draft")).toBeNull();+ // Rows are content, so the card's empty state stands down.+ expect(screen.queryByText("Nothing to show yet")).toBeNull();+});++test("keeps the empty state when only scheduled workflows exist", async () => {+ mockDashboard(dashboard);+ mockLibraryAgents([+ {+ name: "Daily Blog Draft",+ is_scheduled: true,+ next_scheduled_run: new Date(Date.now() + 60 * 60 * 1000).toISOString(),+ },+ ]);++ render(<HomePage />);++ expect(await screen.findByText("Nothing to show yet")).toBeDefined();+ expect(screen.queryByRole("region", { name: "Workflows" })).toBeNull();+});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.tsxindex 3fa054c437..f710b81ce7 100644--- a/autogpt_platform/frontend/src/app/(platform)/home/components/AgentTeam/AgentTeam.tsx+++ b/autogpt_platform/frontend/src/app/(platform)/home/components/AgentTeam/AgentTeam.tsx@@ -1,12 +1,7 @@-import {- ArrowRight01Icon,- UserAdd01Icon,- UserGroupIcon,-} from "@hugeicons/core-free-icons";+import { AiEraserIcon, ArrowRight01Icon } 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 { formatWeeklySpend } from "../../helpers";import { HomeTileEmpty } from "../HomeTileEmpty/HomeTileEmpty";import { HomeTile } from "../HomeTile/HomeTile";@@ -19,47 +14,27 @@ interface Props {export function AgentTeam({ dashboard, className }: Props) {const { team, agents } = dashboard;- const readyCount = team.ready + team.working;const teamSpend = formatWeeklySpend(team.spend_cents);const statusLine =team.working > 0? `${team.working} working now · ${team.ready} ready`: `${team.ready} ready for work`;+return (<HomeTileclassName={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" unmask={!teamSpend}>- {teamSpend ? `${statusLine} · ${teamSpend}` : statusLine}- </Text>+ icon={AiEraserIcon}+ title="Your team"+ meta={+ team.total > 0 ? (+ <span className="tabular-nums">+ {teamSpend ? `${statusLine} · ${teamSpend}` : statusLine}+ </span>+ ) : null}>{agents.length === 0 ? (<HomeTileEmpty- icon={UserAdd01Icon}title="Build your team"description="Hire an expert to start delegating work."action={{ href: "/marketplace", label: "Browse experts" }}@@ -75,10 +50,10 @@ export function AgentTeam({ dashboard, className }: Props) {{team.total > 0 ? (<Linkhref="/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"+ className="flex items-center justify-between border-t border-zinc-100 px-4 py-2 text-xs font-medium text-zinc-500 outline-none transition-colors hover:bg-zinc-50 hover:text-zinc-900 focus-visible:bg-zinc-50">- View all {team.total} agents- <Icon icon={ArrowRight01Icon} size={16} aria-hidden="true" />+ View all {team.total} experts+ <Icon icon={ArrowRight01Icon} size={14} 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.tsxindex 575ad0fbc5..82ff072ccc 100644--- 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.tsx@@ -1,7 +1,5 @@-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 { Button } from "@/components/atoms/Button/Button";import { Text } from "@/components/atoms/Text/Text";import { ExpertAvatar } from "@/components/molecules/ExpertAvatar/ExpertAvatar";import { formatWeeklySpend } from "../../../helpers";@@ -12,54 +10,66 @@ interface Props {agent: HomeAgentStatus;}+const ACTION_CLASS = "h-7 min-w-0 rounded-md px-2.5 text-xs";++/** One expert with its status and two ways in. The detail line is gone:+ * anything that needs doing is already spelled out under Needs you. */export function AgentRow({ agent }: Props) {const spend = formatWeeklySpend(agent.spend_cents);+ const nextRun = agent.next_run_time+ ? `Next run ${formatUntil(agent.next_run_time)}`+ : null;+ const secondLine = [spend, nextRun].filter(Boolean).join(" · ");+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"- >+ <div className="flex min-w-0 items-center gap-3 px-4 py-2.5"><ExpertAvatarname={agent.expert.name}avatarUrl={agent.expert.avatar_url}+ size={32}/><div className="min-w-0 flex-1"><div className="flex items-center gap-2">- <Text variant="body-medium" className="truncate text-zinc-900">+ <Text+ variant="body-medium"+ className="truncate leading-5 text-zinc-900"+ >{agent.expert.name}</Text><StatusBadge status={agent.status} /></div>- <div className="flex min-w-0 items-center gap-1 text-zinc-500">- <Text variant="small" className="min-w-0 truncate">- {agent.detail}+ {secondLine ? (+ <Text+ variant="small"+ className="truncate tabular-nums leading-4 text-zinc-500"+ unmask={false}+ >+ {secondLine}</Text>- {spend ? (- <Text- variant="small"- className="shrink-0 tabular-nums"- unmask={false}- >- {`· ${spend}`}- </Text>- ) : null}- </div>+ ) : null}</div>- {agent.next_run_time ? (- <Text- variant="small"- className="shrink-0 tabular-nums text-zinc-400 group-hover:text-zinc-600"+ <div className="flex shrink-0 items-center gap-1.5">+ <Button+ as="NextLink"+ href={`/copilot?expertId=${agent.expert.id}`}+ variant="secondary"+ size="small"+ className={ACTION_CLASS}+ aria-label={`Chat with ${agent.expert.name}`}>- {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>+ Chat+ </Button>+ <Button+ as="NextLink"+ href={`/team/${agent.expert.id}`}+ variant="secondary"+ size="small"+ className={ACTION_CLASS}+ aria-label={`Manage ${agent.expert.name}`}+ >+ Manage+ </Button>+ </div>+ </div>);}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.tsxindex 1901989890..162e6cd022 100644--- 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.tsx@@ -1,67 +1,37 @@-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 ring-primary/20",- },- ready: {- label: "Ready",- icon: CheckmarkCircle02Icon,- className: "bg-emerald-50 text-emerald-700 ring-emerald-600/20",- },- needs_setup: {- label: "Setup",- icon: Settings01Icon,- className: "bg-amber-50 text-amber-800 ring-amber-500/20",- },- paused: {- label: "Paused",- icon: PauseIcon,- className: "bg-zinc-50 text-zinc-600 ring-zinc-500/10",- },- failed: {- label: "Failed",- icon: AlertCircleIcon,- className: "bg-red-50 text-red-700 ring-red-600/10",- },+ working: { label: "Working", dot: "bg-primary", pulse: true },+ ready: { label: "Ready", dot: "bg-emerald-500", pulse: false },+ needs_setup: { label: "Finish setup", dot: "bg-amber-500", pulse: false },+ paused: { label: "Paused", dot: "bg-zinc-400", pulse: false },+ failed: { label: "Failed", dot: "bg-red-500", pulse: false },};const UNKNOWN_STATUS_CONFIG = {label: "Unknown",- icon: HelpCircleIcon,- className: "bg-zinc-50 text-zinc-600 ring-zinc-500/10",+ dot: "bg-zinc-300",+ pulse: false,};interface Props {status: HomeAgentStatus["status"];}+/** A dot and a word: the status reads at a glance without a filled pill+ * competing with the name beside it. */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-0.5 text-xs font-medium ring-1 ring-inset",- config.className,- )}- >- <Icon- icon={config.icon}- size={13}- className={cn(status === "working" && "animate-spin")}+ <span className="inline-flex shrink-0 items-center gap-1.5 text-[11px] font-medium text-zinc-500">+ <span+ className={cn(+ "size-1.5 rounded-full",+ config.dot,+ config.pulse && "animate-pulse",+ )}aria-hidden="true"/>{config.label}diff --git a/autogpt_platform/frontend/src/app/(platform)/home/components/HomeBackdrop/HomeBackdrop.tsx b/autogpt_platform/frontend/src/app/(platform)/home/components/HomeBackdrop/HomeBackdrop.tsxnew file mode 100644index 0000000000..21998808cf--- /dev/null+++ b/autogpt_platform/frontend/src/app/(platform)/home/components/HomeBackdrop/HomeBackdrop.tsx@@ -0,0 +1,22 @@+import { cn } from "@/lib/utils";++/** A faint 40px grid behind the page, fading out toward the edges so the+ * panels sit on a drafting sheet rather than a flat wash. Colours match+ * the zinc-50 shell so the fade dissolves into the page. */+export function HomeBackdrop() {+ return (+ <div+ aria-hidden="true"+ className="pointer-events-none absolute inset-0 overflow-hidden"+ >+ <div+ className={cn(+ "absolute inset-0 opacity-60",+ "[background-size:40px_40px]",+ "[background-image:linear-gradient(to_right,theme(colors.zinc.200)_1px,transparent_1px),linear-gradient(to_bottom,theme(colors.zinc.200)_1px,transparent_1px)]",+ )}+ />+ <div className="absolute inset-0 bg-zinc-50 [mask-image:radial-gradient(ellipse_at_center,transparent_20%,black)]" />+ </div>+ );+}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.tsxindex a9e3ab4b63..b4aecd1a2c 100644--- a/autogpt_platform/frontend/src/app/(platform)/home/components/HomeHeader/HomeHeader.tsx+++ b/autogpt_platform/frontend/src/app/(platform)/home/components/HomeHeader/HomeHeader.tsx@@ -1,6 +1,4 @@-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";@@ -15,26 +13,24 @@ export function HomeHeader({ greeting, name, dashboard }: Props) {const status = getHomeStatusLine(dashboard);return (- <header className="my-6 flex items-start justify-between gap-6 px-4 sm:px-5">+ <header className="flex items-end justify-between gap-6 px-1 pb-5 pt-1"><div className="min-w-0"><Text- variant="h4"- className="text-pretty tracking-[-0.025em] text-zinc-950"+ variant="large-semibold"+ as="h1"+ className="text-pretty text-[1.25rem] leading-7 tracking-[-0.01em] text-zinc-950">- {greeting},{" "}- <span className="bg-gradient-to-r from-purple-500 to-purple-300 bg-clip-text text-transparent">- {name}- </span>+ {greeting}, {name}</Text>- <Text variant="large" className="mt-3 text-pretty text-zinc-500">+ <Text variant="body" className="mt-0.5 text-pretty text-zinc-950">{status.split(/(\d+)/).map((part, index) =>/^\d+$/.test(part) ? (- <strong+ <spankey={`${part}-${index}`}- className="font-semibold tabular-nums text-zinc-700"+ className="font-medium tabular-nums">{part}- </strong>+ </span>) : (part),@@ -43,22 +39,14 @@ export function HomeHeader({ greeting, name, dashboard }: Props) {</div><timedateTime={new Date(dashboard.generated_at).toISOString()}- className="flex shrink-0 items-center gap-3 text-right"+ className="shrink-0 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>+ <Text variant="large-medium" className="text-zinc-950">+ {date.weekday}+ </Text>+ <Text variant="body" className="text-zinc-950">+ {date.calendarDate}+ </Text></time></header>);diff --git a/autogpt_platform/frontend/src/app/(platform)/home/components/HomeSectionLabel/HomeSectionLabel.tsx b/autogpt_platform/frontend/src/app/(platform)/home/components/HomeSectionLabel/HomeSectionLabel.tsxnew file mode 100644index 0000000000..9e4ae130be--- /dev/null+++ b/autogpt_platform/frontend/src/app/(platform)/home/components/HomeSectionLabel/HomeSectionLabel.tsx@@ -0,0 +1,18 @@+import { Text } from "@/components/atoms/Text/Text";++interface Props {+ children: React.ReactNode;+}++/** A quiet caption that splits a panel into sections without a second+ * header row. */+export function HomeSectionLabel({ children }: Props) {+ return (+ <Text+ variant="small-medium"+ className="px-4 pb-1 pt-3 text-[11px] uppercase tracking-[0.06em] text-zinc-400"+ >+ {children}+ </Text>+ );+}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.tsxindex 52bc036fab..93ed6172d3 100644--- a/autogpt_platform/frontend/src/app/(platform)/home/components/HomeTile/HomeTile.tsx+++ b/autogpt_platform/frontend/src/app/(platform)/home/components/HomeTile/HomeTile.tsx@@ -1,39 +1,67 @@+import type { IconSvgElement } from "@hugeicons/react";import type { ReactNode } from "react";+import { Icon } from "@/components/atoms/Icon/Icon";+import { Text } from "@/components/atoms/Text/Text";import { cn } from "@/lib/utils";interface Props {children: ReactNode;- title: ReactNode;- header?: ReactNode;+ icon: IconSvgElement;+ title: string;+ /** Sits right after the title: a count, a status. */+ badge?: ReactNode;+ /** Right-aligned header content: a filter, a summary line. */+ meta?: ReactNode;className?: string;contentClassName?: string;- surfaceClassName?: string;as?: "div" | "section";}+/** A flat panel with a one-line header row. Rows inside carry their own+ * horizontal padding so dividers can run edge to edge. */export function HomeTile({children,+ icon,title,- header,+ badge,+ meta,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}+ <Component+ className={cn(+ "flex min-w-0 flex-col overflow-hidden rounded-lg border border-zinc-200 bg-white",+ className,+ )}+ >+ <div className="flex min-h-10 items-center justify-between gap-3 border-b border-zinc-100 px-4">+ <div className="flex min-w-0 items-center gap-2">+ <Icon+ icon={icon}+ size={15}+ className="shrink-0 text-zinc-400"+ aria-hidden="true"+ />+ <Text+ variant="body-medium"+ as="h2"+ className="truncate text-sm text-zinc-900"+ >+ {title}+ </Text>+ {badge}+ </div>+ {meta ? (+ <div className="flex shrink-0 items-center gap-2 text-xs text-zinc-500">+ {meta}+ </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 className={cn("flex min-w-0 flex-1 flex-col", contentClassName)}>+ {children}</div></Component>);diff --git a/autogpt_platform/frontend/src/app/(platform)/home/components/HomeTileEmpty/HomeEmptyIllustration.tsx b/autogpt_platform/frontend/src/app/(platform)/home/components/HomeTileEmpty/HomeEmptyIllustration.tsxnew file mode 100644index 0000000000..d8f76dfb0a--- /dev/null+++ b/autogpt_platform/frontend/src/app/(platform)/home/components/HomeTileEmpty/HomeEmptyIllustration.tsx@@ -0,0 +1,124 @@+"use client";++import { motion, useReducedMotion } from "framer-motion";++const EASE_OUT_QUINT = [0.22, 1, 0.36, 1] as const;++// A compact take on the library's stacked-cards illustration, sized for a+// panel rather than a page: three ghost rows settling into place.+const CARDS = [+ { x: 40, y: 4, width: 160, opacity: 0.5 },+ { x: 22, y: 28, width: 196, opacity: 0.75 },+ { x: 4, y: 52, width: 232, opacity: 1 },+];++export function HomeEmptyIllustration() {+ const shouldReduceMotion = useReducedMotion();++ return (+ <svg+ width="240"+ height="96"+ viewBox="0 0 240 96"+ fill="none"+ xmlns="http://www.w3.org/2000/svg"+ aria-hidden="true"+ className="select-none"+ >+ {CARDS.map((card, index) => (+ <motion.g+ key={index}+ initial={+ shouldReduceMotion+ ? { opacity: 0 }+ : { opacity: 0, y: 8, scale: 0.97 }+ }+ animate={+ shouldReduceMotion+ ? { opacity: card.opacity }+ : { opacity: card.opacity, y: 0, scale: 1 }+ }+ transition={{+ duration: shouldReduceMotion ? 0.2 : 0.45,+ ease: EASE_OUT_QUINT,+ delay: shouldReduceMotion ? 0 : index * 0.08,+ }}+ className="origin-[120px_52px] [transform-box:fill-box]"+ >+ <Card x={card.x} y={card.y} width={card.width} />+ </motion.g>+ ))}+ </svg>+ );+}++interface CardProps {+ x: number;+ y: number;+ width: number;+}++function Card({ x, y, width }: CardProps) {+ const height = 40;+ const radius = 10;+ const padding = 12;+ const dotRadius = 6;+ const midY = y + height / 2;++ return (+ <g>+ <rect+ x={x}+ y={y}+ width={width}+ height={height}+ rx={radius}+ ry={radius}+ strokeWidth={1}+ className="fill-white stroke-zinc-200"+ />+ <circle+ cx={x + padding + dotRadius}+ cy={midY}+ r={dotRadius}+ className="fill-zinc-200"+ />+ <rect+ x={x + padding + dotRadius * 2 + 8}+ y={midY - 4}+ width={width * 0.36}+ height={8}+ rx={4}+ ry={4}+ className="fill-zinc-200"+ />+ <rect+ x={x + width - padding - 52}+ y={midY - 4}+ width={8}+ height={8}+ rx={2}+ ry={2}+ className="fill-zinc-200"+ />+ <rect+ x={x + width - padding - 38}+ y={midY - 4}+ width={8}+ height={8}+ rx={2}+ ry={2}+ className="fill-zinc-200"+ />+ <rect+ x={x + width - padding - 24}+ y={midY - 4}+ width={24}+ height={8}+ rx={4}+ ry={4}+ className="fill-zinc-200"+ />+ </g>+ );+}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.tsxindex a78490c05c..8c290481f7 100644--- a/autogpt_platform/frontend/src/app/(platform)/home/components/HomeTileEmpty/HomeTileEmpty.tsx+++ b/autogpt_platform/frontend/src/app/(platform)/home/components/HomeTileEmpty/HomeTileEmpty.tsx@@ -1,53 +1,80 @@-import type { IconSvgElement } from "@hugeicons/react";+"use client";++import { motion, useReducedMotion } from "framer-motion";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";+import { HomeEmptyIllustration } from "./HomeEmptyIllustration";++const EASE_OUT_QUINT = [0.22, 1, 0.36, 1] as const;interface Props {- icon: IconSvgElement;title: string;description: string;action?: { href: string; label: string };className?: string;}+/** The panels' shared empty state, in the library page's idiom: a ghost+ * illustration, then the copy and an optional action, each fading up in+ * turn. Reduced-motion users get a plain fade. */export function HomeTileEmpty({- icon,title,description,action,className,}: Props) {+ const shouldReduceMotion = useReducedMotion();++ function fadeUp(delay: number) {+ if (shouldReduceMotion) {+ return {+ initial: { opacity: 0 },+ animate: { opacity: 1 },+ transition: { duration: 0.2, delay: 0 },+ };+ }+ return {+ initial: { opacity: 0, y: 6 },+ animate: { opacity: 1, y: 0 },+ transition: { duration: 0.35, ease: EASE_OUT_QUINT, delay },+ };+ }+return (<divclassName={cn(- "flex min-h-[14rem] flex-1 flex-col items-center justify-center gap-1 px-4 py-10 text-center",+ "flex min-h-[12rem] flex-1 flex-col items-center justify-center gap-5 px-4 py-8 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>+ <motion.div {...fadeUp(0)}>+ <HomeEmptyIllustration />+ </motion.div>+ <div className="flex max-w-xs flex-col items-center gap-1">+ <motion.div {...fadeUp(0.22)}>+ <Text variant="large-medium" className="text-zinc-800">+ {title}+ </Text>+ </motion.div>+ <motion.div {...fadeUp(0.3)}>+ <Text variant="body" className="text-pretty text-zinc-500">+ {description}+ </Text>+ </motion.div>+ </div>{action ? (- <Button- as="NextLink"- href={action.href}- variant="secondary"- size="small"- className="mt-3"- >- {action.label}- </Button>+ <motion.div {...fadeUp(0.38)}>+ <Button+ as="NextLink"+ href={action.href}+ variant="secondary"+ size="small"+ className="h-8 min-w-0 rounded-md px-3 text-xs"+ >+ {action.label}+ </Button>+ </motion.div>) : 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.tsxindex d7d11175d0..ca4fe29b1d 100644--- a/autogpt_platform/frontend/src/app/(platform)/home/components/HomeTileFilter/HomeTileFilter.tsx+++ b/autogpt_platform/frontend/src/app/(platform)/home/components/HomeTileFilter/HomeTileFilter.tsx@@ -31,11 +31,11 @@ export function HomeTileFilter({<DropdownMenu><DropdownMenuTrigger asChild><Button- variant="secondary"+ variant="ghost"size="small"- className="min-w-0"+ className="h-7 min-w-0 gap-1 rounded-md px-2 text-xs text-zinc-600 hover:bg-zinc-100 hover:text-zinc-900"leftIcon={- <Icon icon={FilterHorizontalIcon} size={15} aria-hidden="true" />+ <Icon icon={FilterHorizontalIcon} size={13} aria-hidden="true" />}aria-label={`${ariaLabelPrefix}: ${activeLabel}`}unmask={false}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.tsxdeleted file mode 100644index 2d67e8e729..0000000000--- a/autogpt_platform/frontend/src/app/(platform)/home/components/MorningBriefing/MorningBriefing.tsx+++ /dev/null@@ -1,111 +0,0 @@-"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 { formatBriefingWindowStart } from "../../helpers";-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 since{" "}- {formatBriefingWindowStart(- briefing.window_started_at,- dashboard.timezone,- )}- .- </Text>- }- >- {briefing.narrative ? (- <Text variant="large" className="text-zinc-700">- {briefing.narrative}- </Text>- ) : null}-- {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/NeedsYou/NeedsYou.tsx b/autogpt_platform/frontend/src/app/(platform)/home/components/NeedsYou/NeedsYou.tsxindex e1d9a2e432..490f75184f 100644--- a/autogpt_platform/frontend/src/app/(platform)/home/components/NeedsYou/NeedsYou.tsx+++ b/autogpt_platform/frontend/src/app/(platform)/home/components/NeedsYou/NeedsYou.tsx@@ -1,12 +1,10 @@"use client";-import { CheckmarkCircle02Icon } from "@hugeicons/core-free-icons";+import { AlertCircleIcon } 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 { HomeTileFilter } from "../HomeTileFilter/HomeTileFilter";import { HomeTile } from "../HomeTile/HomeTile";import { AttentionRow } from "./components/AttentionRow";-import { NeedsYouTitle } from "./components/NeedsYouTitle";import { useNeedsYou } from "./useNeedsYou";interface Props {@@ -29,41 +27,38 @@ export function NeedsYou({ dashboard, className }: Props) {return (<HomeTileclassName={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}- />+ icon={AlertCircleIcon}+ title="Needs you"+ badge={+ <span+ role="status"+ aria-label={`${itemCount} ${itemCount === 1 ? "item needs" : "items need"} your attention`}+ className="rounded-md bg-zinc-100 px-1.5 py-0.5 text-[11px] font-medium tabular-nums text-zinc-700"+ >+ {itemCount}+ </span>}- header={- <Text variant="large" className="max-w-xl text-pretty text-zinc-600">- Decisions and blockers that require your input.- </Text>+ meta={+ hasFilters ? (+ <HomeTileFilter+ ariaLabelPrefix="Filter interventions"+ value={selectedKind}+ options={filterOptions}+ onChange={(value) => selectKind(value as typeof selectedKind)}+ />+ ) : null}>- {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>- )}+ <div className="divide-y divide-zinc-100">+ {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.tsxindex 9cb20f1ecf..b0f3ea67fe 100644--- 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.tsx@@ -27,14 +27,6 @@ const ICONS: Record<HomeAttentionItem["kind"], IconSvgElement> = {question: MessageQuestionIcon,};-const KIND_LABELS: Record<HomeAttentionItem["kind"], string> = {- approval: "Approval",- setup: "Setup",- paused: "Paused",- credits: "Credits",- question: "Question",-};-export function AttentionRow({ item, isProcessing, onDecision }: Props) {const [confirmDecline, setConfirmDecline] = useState(false);@@ -48,58 +40,48 @@ export function AttentionRow({ item, isProcessing, onDecision }: Props) {}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="body"- className="mt-1 line-clamp-2 text-pretty text-zinc-600"- >- {item.description}+ <article className="flex flex-col gap-3 px-4 py-3 sm:flex-row sm:items-center">+ <div className="flex min-w-0 flex-1 items-center gap-3">+ {item.expert ? (+ <ExpertAvatar+ name={item.expert.name}+ avatarUrl={item.expert.avatar_url}+ size={48}+ />+ ) : (+ <span className="flex size-12 shrink-0 items-center justify-center rounded-xl bg-zinc-100 text-zinc-500">+ <Icon icon={ICONS[item.kind]} size={22} 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>- <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}+ {item.priority === "high" ? (+ <span className="rounded bg-amber-50 px-1.5 py-px text-[10px] font-medium text-amber-700 ring-1 ring-inset ring-amber-600/10">+ Waiting</span>- </div>+ ) : null}</div>+ <Text+ variant="body"+ className="line-clamp-2 text-pretty text-zinc-600"+ >+ {item.description}+ </Text></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 className="flex shrink-0 items-center gap-1.5 self-end sm:self-center">+ <AttentionRowActions+ item={item}+ isProcessing={isProcessing}+ confirmDecline={confirmDecline}+ onApprove={() => onDecision(item, true)}+ onDecline={handleDecline}+ onDeclineBlur={() => setConfirmDecline(false)}+ /></div><span className="sr-only" aria-live="polite">{confirmDecline ? `Press again to decline ${item.title}` : ""}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.tsxindex 08273589fe..e3694531e1 100644--- 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.tsx@@ -13,6 +13,8 @@ interface Props {onDeclineBlur: () => void;}+const ICON_BUTTON_CLASS = "size-7 rounded-md p-0";+export function AttentionRowActions({item,isProcessing,@@ -27,6 +29,7 @@ export function AttentionRowActions({href={item.primary_action.href}variant="secondary"size="small"+ className="h-7 min-w-0 rounded-md px-2.5 text-xs">{item.primary_action.label}</Button>@@ -42,27 +45,31 @@ export function AttentionRowActions({<Buttonvariant="icon"size="icon"- className="size-10 border-zinc-800 bg-zinc-800 p-0 text-white hover:border-zinc-900 hover:bg-zinc-900"+ className={cn(+ ICON_BUTTON_CLASS,+ "border-zinc-900 bg-zinc-900 text-white hover:border-zinc-800 hover:bg-zinc-800",+ )}disabled={isProcessing}aria-label={`Approve: ${item.title}`}onClick={onApprove}>- <Icon icon={Tick02Icon} size={18} aria-hidden="true" />+ <Icon icon={Tick02Icon} size={15} aria-hidden="true" /></Button><Buttonvariant="icon"size="icon"className={cn(- "size-10 p-0",+ ICON_BUTTON_CLASS,+ "border-zinc-200 text-zinc-600 hover:border-zinc-300 hover:bg-zinc-50",confirmDecline &&- "border-red-500 bg-red-500 text-white hover:border-red-600 hover:bg-red-600",+ "border-red-500 bg-red-500 text-white hover:border-red-600 hover:bg-red-600 hover:text-white",)}disabled={isProcessing}aria-label={`${confirmDecline ? "Confirm decline" : "Decline"}: ${item.title}`}onClick={onDecline}onBlur={onDeclineBlur}>- <Icon icon={Cancel01Icon} size={18} aria-hidden="true" />+ <Icon icon={Cancel01Icon} size={15} 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.tsxdeleted file mode 100644index 389b03a314..0000000000--- a/autogpt_platform/frontend/src/app/(platform)/home/components/NeedsYou/components/NeedsYouTitle.tsx+++ /dev/null@@ -1,58 +0,0 @@-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/NowNext/NowNext.tsx b/autogpt_platform/frontend/src/app/(platform)/home/components/NowNext/NowNext.tsxindex 0e9c2fe853..f5e9f0e2e9 100644--- a/autogpt_platform/frontend/src/app/(platform)/home/components/NowNext/NowNext.tsx+++ b/autogpt_platform/frontend/src/app/(platform)/home/components/NowNext/NowNext.tsx@@ -1,7 +1,6 @@-import { Calendar03Icon, Clock01Icon } from "@hugeicons/core-free-icons";+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 { HomeSectionLabel } from "../HomeSectionLabel/HomeSectionLabel";import { HomeTileEmpty } from "../HomeTileEmpty/HomeTileEmpty";import { HomeTile } from "../HomeTile/HomeTile";import { ActiveRow } from "./components/ActiveRow";@@ -12,36 +11,18 @@ interface Props {className?: string;}+// The rail runs through the centre of each row's 36px marker, which sits+// 16px in from the tile edge.+const TIMELINE_CLASS =+ "relative before:absolute before:bottom-5 before:left-[33px] before:top-5 before:w-px before:bg-zinc-200";+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>- }- >+ <HomeTile className={className} icon={Calendar03Icon} title="Now & next">{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">+ <div className="border-b border-zinc-100 pb-2">+ <HomeSectionLabel>Working now</HomeSectionLabel>+ <div className={TIMELINE_CLASS}>{dashboard.active_tasks.map((item) => (<ActiveRow key={item.id} item={item} />))}@@ -49,18 +30,16 @@ export function NowNext({ dashboard, className }: Props) {</div>) : null}- <div>- <Text variant="small" className="font-medium text-zinc-500">- Coming up- </Text>+ <div className="pb-2">+ <HomeSectionLabel>Coming up</HomeSectionLabel>{dashboard.upcoming_tasks.length === 0 ? (<HomeTileEmpty- icon={Clock01Icon}title="Nothing is scheduled"description="Your agents are ready when you are."+ className="min-h-0 gap-4 py-6"/>) : (- <div className="relative mt-1 before:absolute before:bottom-4 before:left-4 before:top-4 before:w-px before:bg-zinc-200">+ <div className={TIMELINE_CLASS}>{dashboard.upcoming_tasks.map((item) => (<UpcomingRow key={item.id} item={item} />))}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.tsxindex 997ef5bfa7..3654e57d49 100644--- 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.tsx@@ -9,25 +9,30 @@ interface Props {item: HomeActiveTask;}+const ROW_CLASS = "relative flex items-center gap-3 py-2 pl-[3.75rem] pr-4";+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">+ <span className="absolute left-4 top-1/2 z-10 flex size-9 -translate-y-1/2 items-center justify-center rounded-full bg-white">{item.expert ? (<ExpertAvatarname={item.expert.name}avatarUrl={item.expert.avatar_url}- size={32}+ size={36}/>) : (<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">+ <Text+ variant="body-medium"+ className="truncate text-[13px] leading-5 text-zinc-900"+ >{item.title}</Text>- <Text variant="small" className="truncate text-zinc-500">+ <Text variant="small" className="truncate text-[11px] text-zinc-500">{item.status === "queued"? "Queued": (formatRunningFor(item.started_at) ?? "Running now")}@@ -35,15 +40,14 @@ export function ActiveRow({ item }: Props) {</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>;+ if (!item.link) return <div className={ROW_CLASS}>{content}</div>;return (<Linkhref={item.link}className={cn(- classes,- "transition-colors hover:bg-zinc-50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-zinc-400",+ ROW_CLASS,+ "outline-none transition-colors hover:bg-zinc-50 focus-visible:bg-zinc-50",)}>{content}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.tsxindex 02e07b7ead..701cdcee5f 100644--- 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.tsx@@ -2,6 +2,7 @@ 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 { ExpertAvatar } from "@/components/molecules/ExpertAvatar/ExpertAvatar";import { formatUntil } from "../helpers";interface Props {@@ -10,29 +11,42 @@ interface Props {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"- />+ <div className="relative flex items-center gap-3 py-2 pl-[3.75rem] pr-4">+ {/* The expert who will do the work is the marker; the glyph only+ stands in when no expert owns the task. */}+ <span className="absolute left-4 top-1/2 z-10 flex size-9 -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={36}+ />+ ) : (+ <span className="flex size-9 items-center justify-center rounded-full bg-zinc-100 text-zinc-500 ring-2 ring-white">+ <Icon+ icon={item.kind === "followup" ? Calendar03Icon : Clock01Icon}+ size={15}+ aria-hidden="true"+ />+ </span>+ )}</span><div className="min-w-0 flex-1">- <Text variant="body-medium" className="truncate text-zinc-900">+ <Text+ variant="body-medium"+ className="truncate text-[13px] leading-5 text-zinc-900"+ >{item.title}</Text>- <Text variant="small" className="truncate text-zinc-500">+ <Text variant="body" className="truncate text-zinc-500">{item.expert?.name ??(item.kind === "followup" ? "Follow-up" : "Scheduled task")}+ <span aria-hidden="true"> · </span>+ <span className="tabular-nums">+ {formatUntil(item.next_run_time)}+ </span></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/RecentWork/RecentWork.tsx b/autogpt_platform/frontend/src/app/(platform)/home/components/RecentWork/RecentWork.tsxindex aa2172b079..5ab8c89765 100644--- a/autogpt_platform/frontend/src/app/(platform)/home/components/RecentWork/RecentWork.tsx+++ b/autogpt_platform/frontend/src/app/(platform)/home/components/RecentWork/RecentWork.tsx@@ -1,60 +1,156 @@"use client";-import { WorkHistoryIcon } from "@hugeicons/core-free-icons";+import {+ CheckmarkCircle02Icon,+ WorkHistoryIcon,+} 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 { formatBriefingWindowStart } from "../../helpers";+import { HomeSectionLabel } from "../HomeSectionLabel/HomeSectionLabel";import { HomeTile } from "../HomeTile/HomeTile";import { HomeTileEmpty } from "../HomeTileEmpty/HomeTileEmpty";+import { HomeTileFilter } from "../HomeTileFilter/HomeTileFilter";+import { OutcomeRow } from "./components/OutcomeRow";+import { RunRow } from "./components/RunRow";import { WorkGroup } from "./components/WorkGroup";+import { type OutcomeFilter, useOutcomeFilter } from "./useOutcomeFilter";+import { useWorkflowRuns } from "./useWorkflowRuns";interface Props {dashboard: HomeDashboardResponse;className?: string;}+/** One card for what the agents did: the briefing's run outcomes, the+ * durable things those runs produced, and each workflow's latest state+ * from the library feed. The feeds describe the same day from different+ * angles, so they share a header and one empty state. */export function RecentWork({ dashboard, className }: Props) {+ const { briefing } = dashboard;const groups = dashboard.recent_work?.groups ?? [];+ const {+ filterOptions,+ hasFilters,+ selectedFilter,+ selectFilter,+ visibleOutcomes,+ } = useOutcomeFilter({ outcomes: briefing.outcomes });+ const runs = useWorkflowRuns();+ const hasOutcomes = briefing.outcomes.length > 0;+ const hasRoutine = briefing.routine_count > 0;+ const hasGroups = groups.length > 0;+ const hasRuns = runs.length > 0;+ const isEmpty =+ !hasOutcomes &&+ !hasRoutine &&+ !hasGroups &&+ !hasRuns &&+ !briefing.narrative;return (<HomeTileclassName={className}- contentClassName="flex flex-col"- surfaceClassName="py-4 sm:py-4"- title={- <div className="flex min-w-0 items-center gap-2">- <Icon- icon={WorkHistoryIcon}- size={18}- className="text-zinc-500"- aria-hidden="true"- />- <Text variant="h5" className="text-zinc-950">- Recent work- </Text>- </div>- }- header={- <Text variant="large" className="text-zinc-600">- What your agents produced this week.- </Text>+ icon={WorkHistoryIcon}+ title="Recent work"+ meta={+ <>+ <span className="hidden sm:inline">+ Since{" "}+ {formatBriefingWindowStart(+ briefing.window_started_at,+ dashboard.timezone,+ )}+ </span>+ <span aria-hidden="true" className="hidden text-zinc-300 sm:inline">+ ·+ </span>+ <span className="tabular-nums">+ {briefing.completed_count} completed+ </span>+ {briefing.failed_count > 0 ? (+ <span className="tabular-nums text-rose-600">+ {briefing.failed_count} failed+ </span>+ ) : null}+ {hasFilters ? (+ <HomeTileFilter+ ariaLabelPrefix="Filter briefing outcomes"+ value={selectedFilter}+ options={filterOptions}+ onChange={(value) => selectFilter(value as OutcomeFilter)}+ />+ ) : null}+ </>}>- {groups.length === 0 ? (+ {isEmpty ? (<HomeTileEmpty- icon={WorkHistoryIcon}- title="No work delivered yet"- description="Files your agents write, integrations they use and schedules they set up will appear here."+ title="Nothing to show yet"+ description="Completed runs, files, integrations and schedules will appear here."/>) : (- <div className="-mx-4 divide-y divide-zinc-100 sm:-mx-5">- {groups.map((group) => (- <WorkGroup- key={group.items[0]?.id ?? group.actor.name}- group={group}- timezone={dashboard.timezone}- />- ))}+ <div className="divide-y divide-zinc-100">+ {briefing.narrative ? (+ <Text+ variant="body"+ className="text-pretty px-4 py-3 text-[13px] leading-5 text-zinc-600"+ >+ {briefing.narrative}+ </Text>+ ) : null}++ {/* A day of only routine work still has a count to report, so the+ section stands even when no outcome earned a row. */}+ {hasOutcomes || hasRoutine ? (+ <section aria-label="Outcomes" className="pb-1">+ <HomeSectionLabel>Outcomes</HomeSectionLabel>+ <div className="divide-y divide-zinc-100">+ {visibleOutcomes.map((outcome) => (+ <OutcomeRow key={outcome.id} outcome={outcome} />+ ))}+ </div>+ {hasRoutine ? (+ <div className="flex items-center gap-1.5 px-4 py-2 text-xs text-zinc-500">+ <Icon+ icon={CheckmarkCircle02Icon}+ size={13}+ className="text-zinc-400"+ aria-hidden="true"+ />+ Plus {briefing.routine_count} routine task+ {briefing.routine_count === 1 ? "" : "s"} completed quietly.+ </div>+ ) : null}+ </section>+ ) : null}++ {hasGroups ? (+ <section aria-label="Delivered">+ <HomeSectionLabel>Delivered this week</HomeSectionLabel>+ <div className="divide-y divide-zinc-100">+ {groups.map((group) => (+ <WorkGroup+ key={group.items[0]?.id ?? group.actor.name}+ group={group}+ timezone={dashboard.timezone}+ />+ ))}+ </div>+ </section>+ ) : null}++ {hasRuns ? (+ <section aria-label="Workflows" className="pb-1">+ <HomeSectionLabel>Workflows</HomeSectionLabel>+ <div>+ {runs.map((run) => (+ <RunRow key={run.id} run={run} />+ ))}+ </div>+ </section>+ ) : null}</div>)}</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/RecentWork/components/OutcomeRow.tsxsimilarity index 63%rename from autogpt_platform/frontend/src/app/(platform)/home/components/MorningBriefing/components/OutcomeRow.tsxrename to autogpt_platform/frontend/src/app/(platform)/home/components/RecentWork/components/OutcomeRow.tsxindex 06272d6613..95aec776a3 100644--- a/autogpt_platform/frontend/src/app/(platform)/home/components/MorningBriefing/components/OutcomeRow.tsx+++ b/autogpt_platform/frontend/src/app/(platform)/home/components/RecentWork/components/OutcomeRow.tsx@@ -15,53 +15,66 @@ interface Props {outcome: HomeBriefingOutcome;}+const ROW_CLASS = "flex gap-3 px-4 py-3";+export function OutcomeRow({ outcome }: Props) {const failed = outcome.status === "failed";const content = (<><spanclassName={cn(- "mt-0.5 flex size-8 shrink-0 items-center justify-center rounded-lg",+ "mt-0.5 flex size-6 shrink-0 items-center justify-center rounded-md",failed ? "bg-rose-50 text-rose-600" : "bg-zinc-100 text-zinc-500",)}><Iconicon={failed ? AlertDiamondIcon : CheckListIcon}- size={16}+ size={13}aria-hidden="true"/></span><div className="min-w-0 flex-1">- <Text variant="body-medium" className="text-pretty text-zinc-950">+ <Text+ variant="body-medium"+ className="text-pretty text-[13px] leading-5 text-zinc-900"+ >{outcome.title}</Text><Text- variant="body"- className="mt-1 line-clamp-2 text-pretty text-zinc-600"+ variant="small"+ className="mt-0.5 line-clamp-2 text-pretty text-[13px] leading-5 text-zinc-500">{outcome.summary}</Text>- <div className="mt-1.5 flex flex-wrap items-center gap-x-2 gap-y-1 text-xs text-zinc-400">+ <div className="mt-1 flex flex-wrap items-center gap-x-1.5 gap-y-1 text-[11px] text-zinc-400">{outcome.expert ? (<ExpertAvatarname={outcome.expert.name}avatarUrl={outcome.expert.avatar_url}- size={22}+ size={16}/>) : null}- <span>{outcome.expert?.name ?? outcome.agent_name}</span>+ <span className="font-medium text-zinc-500">+ {outcome.expert?.name ?? outcome.agent_name}+ </span><span aria-hidden="true">·</span>- <span>{formatOccurredAt(outcome.occurred_at)}</span>+ <span className="tabular-nums">+ {formatOccurredAt(outcome.occurred_at)}+ </span>{outcome.duration_seconds ? (<><span aria-hidden="true">·</span>- <span>{formatDuration(outcome.duration_seconds)}</span>+ <span className="tabular-nums">+ {formatDuration(outcome.duration_seconds)}+ </span></>) : null}{outcome.cost_cents ? (<><span aria-hidden="true">·</span>- <span>{formatCurrency(outcome.cost_cents)}</span>+ <span className="tabular-nums">+ {formatCurrency(outcome.cost_cents)}+ </span></>) : null}</div>@@ -69,8 +82,8 @@ export function OutcomeRow({ outcome }: Props) {{outcome.link ? (<Iconicon={ArrowUpRight01Icon}- size={17}- className="mt-1 shrink-0 text-zinc-300 transition-colors group-hover:text-zinc-700"+ size={14}+ className="mt-1 shrink-0 text-zinc-300 transition-colors group-hover:text-zinc-600"aria-hidden="true"/>) : null}@@ -78,14 +91,15 @@ export function OutcomeRow({ outcome }: Props) {);if (!outcome.link) {- return (- <article className="flex gap-3 px-4 py-3 sm:px-5">{content}</article>- );+ return <article className={ROW_CLASS}>{content}</article>;}return (<Linkhref={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"+ className={cn(+ ROW_CLASS,+ "group outline-none transition-colors hover:bg-zinc-50 focus-visible:bg-zinc-50",+ )}>{content}</Link>diff --git a/autogpt_platform/frontend/src/app/(platform)/home/components/RecentWork/components/RunRow.tsx b/autogpt_platform/frontend/src/app/(platform)/home/components/RecentWork/components/RunRow.tsxnew file mode 100644index 0000000000..836ba38c79--- /dev/null+++ b/autogpt_platform/frontend/src/app/(platform)/home/components/RecentWork/components/RunRow.tsx@@ -0,0 +1,52 @@+import NextLink from "next/link";+import type { SitrepItemData } from "@/app/(platform)/library/types";+import { Text } from "@/components/atoms/Text/Text";+import { cn } from "@/lib/utils";+import { buildAskHref, getRunStatus } from "../runHelpers";++interface Props {+ run: SitrepItemData;+}++const ACTION_CLASS =+ "rounded px-1.5 py-0.5 text-[11px] font-medium text-zinc-500 outline-none transition-colors hover:bg-zinc-100 hover:text-zinc-900 focus-visible:bg-zinc-100";++export function RunRow({ run }: Props) {+ const status = getRunStatus(run);+ return (+ <div className="group flex items-center gap-3 px-4 py-2 transition-colors hover:bg-zinc-50">+ <span className="flex w-24 shrink-0 items-center gap-1.5 text-sm font-medium text-zinc-500">+ <span+ className={cn(+ "size-1.5 rounded-full",+ status.dot,+ status.pulse && "animate-pulse",+ )}+ aria-hidden="true"+ />+ {status.label}+ </span>+ <div className="flex min-w-0 flex-1 items-baseline gap-2">+ <Text variant="body-medium" className="shrink-0 truncate text-zinc-900">+ {run.agentName}+ </Text>+ <Text variant="body" className="min-w-0 truncate text-zinc-500">+ {run.message}+ </Text>+ </div>+ {/* The actions ride on hover and focus so the rows stay quiet; they+ remain in the accessibility tree either way. */}+ <div className="flex shrink-0 items-center gap-0.5 opacity-0 transition-opacity focus-within:opacity-100 group-hover:opacity-100">+ <NextLink+ href={`/library/agents/${run.agentID}`}+ className={ACTION_CLASS}+ >+ See+ </NextLink>+ <NextLink href={buildAskHref(run)} className={ACTION_CLASS}>+ Ask+ </NextLink>+ </div>+ </div>+ );+}diff --git a/autogpt_platform/frontend/src/app/(platform)/home/components/RecentWork/components/WorkGroup.tsx b/autogpt_platform/frontend/src/app/(platform)/home/components/RecentWork/components/WorkGroup.tsxindex 7da315db07..02add8dab9 100644--- a/autogpt_platform/frontend/src/app/(platform)/home/components/RecentWork/components/WorkGroup.tsx+++ b/autogpt_platform/frontend/src/app/(platform)/home/components/RecentWork/components/WorkGroup.tsx@@ -18,14 +18,17 @@ export function WorkGroup({ group, timezone }: Props) {<ExpertAvatarname={group.actor.expert.name}avatarUrl={group.actor.expert.avatar_url}- size={22}+ size={18}/>) : (- <span className="flex size-[22px] shrink-0 items-center justify-center rounded-full bg-zinc-100 text-zinc-500">- <Icon icon={Robot01Icon} size={13} aria-hidden="true" />+ <span className="flex size-[18px] shrink-0 items-center justify-center rounded-full bg-zinc-100 text-zinc-500">+ <Icon icon={Robot01Icon} size={11} aria-hidden="true" /></span>)}- <Text variant="body-medium" className="truncate text-zinc-950">+ <Text+ variant="body-medium"+ className="truncate text-[13px] leading-5 text-zinc-900"+ >{group.actor.name}</Text>{group.session_title ? (@@ -33,7 +36,10 @@ export function WorkGroup({ group, timezone }: Props) {<span className="text-zinc-300" aria-hidden="true">·</span>- <Text variant="body" className="truncate text-zinc-500">+ <Text+ variant="body"+ className="truncate text-[13px] leading-5 text-zinc-500"+ >{group.session_title}</Text></>@@ -41,8 +47,8 @@ export function WorkGroup({ group, timezone }: Props) {{group.link ? (<Iconicon={ArrowUpRight01Icon}- size={15}- className="ml-auto shrink-0 text-zinc-300 transition-colors group-hover:text-zinc-700"+ size={14}+ className="ml-auto shrink-0 text-zinc-300 transition-colors group-hover:text-zinc-600"aria-hidden="true"/>) : null}@@ -50,40 +56,41 @@ export function WorkGroup({ group, timezone }: Props) {);return (- <article className="px-4 py-3 sm:px-5">+ <article className="px-4 py-3">{group.link ? (<Linkhref={group.link}- className="group block outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-zinc-400"+ className="group -mx-1 block rounded px-1 outline-none focus-visible:bg-zinc-50">{header}</Link>) : (header)}- <div className="mt-2 flex flex-col gap-1.5">+ <div className="mt-1.5 flex flex-col gap-1">{group.items.map((item) => (- <div key={item.id} className="flex items-start gap-2.5">- <span className="mt-0.5 flex size-6 shrink-0 items-center justify-center rounded-md bg-zinc-100 text-zinc-500">+ <div key={item.id} className="flex items-center gap-2">+ <span className="flex size-[18px] shrink-0 items-center justify-center text-zinc-400"><Iconicon={getWorkItemIcon(item.category)}size={13}aria-hidden="true"/></span>- <div className="min-w-0 flex-1">- <Text variant="body" className="truncate text-zinc-800">- {item.title}- </Text>- </div>- <span className="shrink-0 text-xs tabular-nums text-zinc-400">+ <Text+ variant="small"+ className="min-w-0 flex-1 truncate text-[13px] leading-5 text-zinc-700"+ >+ {item.title}+ </Text>+ <span className="shrink-0 text-[11px] tabular-nums text-zinc-400">{item.provider ? `${item.provider} · ` : ""}{formatWorkTime(item.occurred_at, timezone)}</span></div>))}{group.more_count ? (- <Text variant="small" className="pl-[34px] text-zinc-400">+ <Text variant="small" className="pl-[26px] text-[11px] text-zinc-400">Plus {group.more_count} more</Text>) : null}diff --git a/autogpt_platform/frontend/src/app/(platform)/home/components/RecentWork/runHelpers.ts b/autogpt_platform/frontend/src/app/(platform)/home/components/RecentWork/runHelpers.tsnew file mode 100644index 0000000000..97a4d7c1a1--- /dev/null+++ b/autogpt_platform/frontend/src/app/(platform)/home/components/RecentWork/runHelpers.ts@@ -0,0 +1,49 @@+import type { SitrepItemData } from "@/app/(platform)/library/types";++export function buildRunPrompt(run: SitrepItemData): string {+ if (run.priority === "success") {+ return `${run.agentName} just finished a run — can you summarize what it did?`;+ }+ switch (run.status) {+ case "error":+ return `What happened with ${run.agentName}? It has an error — can you check?`;+ case "running":+ return `Give me a status update on ${run.agentName} — what has it done so far?`;+ case "idle":+ return `${run.agentName} hasn't run recently. Should I keep it or update and re-run it?`;+ default:+ return `Tell me about ${run.agentName} — what's its current status?`;+ }+}++export function buildAskHref(run: SitrepItemData): string {+ return `/copilot?autosubmit=true#prompt=${encodeURIComponent(buildRunPrompt(run))}`;+}++interface RunStatus {+ label: string;+ dot: string;+ pulse: boolean;+}++export function getRunStatus(run: SitrepItemData): RunStatus {+ if (run.priority === "success") {+ return { label: "Completed", dot: "bg-emerald-500", pulse: false };+ }+ switch (run.status) {+ case "running":+ return { label: "Running", dot: "bg-blue-500", pulse: true };+ case "error":+ return { label: "Error", dot: "bg-red-500", pulse: false };+ case "listening":+ return { label: "Listening", dot: "bg-purple-500", pulse: true };+ case "scheduled":+ return { label: "Scheduled", dot: "bg-amber-500", pulse: false };+ case "idle":+ return { label: "Idle", dot: "bg-zinc-400", pulse: false };+ default:+ // The union is exhaustive today; a status the feed adds later reads as+ // idle rather than crashing the row.+ return { label: "Idle", dot: "bg-zinc-400", pulse: false };+ }+}diff --git a/autogpt_platform/frontend/src/app/(platform)/home/components/MorningBriefing/useMorningBriefing.ts b/autogpt_platform/frontend/src/app/(platform)/home/components/RecentWork/useOutcomeFilter.tssimilarity index 69%rename from autogpt_platform/frontend/src/app/(platform)/home/components/MorningBriefing/useMorningBriefing.tsrename to autogpt_platform/frontend/src/app/(platform)/home/components/RecentWork/useOutcomeFilter.tsindex 17408baf71..bd5cdbfe42 100644--- a/autogpt_platform/frontend/src/app/(platform)/home/components/MorningBriefing/useMorningBriefing.ts+++ b/autogpt_platform/frontend/src/app/(platform)/home/components/RecentWork/useOutcomeFilter.ts@@ -3,24 +3,24 @@import { useState } from "react";import type { HomeBriefingOutcome } from "@/app/api/__generated__/models/homeBriefingOutcome";-export type BriefingFilter = "all" | HomeBriefingOutcome["status"];+export type OutcomeFilter = "all" | HomeBriefingOutcome["status"];-const FILTER_LABELS: Partial<Record<BriefingFilter, string>> = {+const FILTER_LABELS: Partial<Record<OutcomeFilter, string>> = {all: "All",completed: "Completed",failed: "Failed",};-export function useMorningBriefing({+export function useOutcomeFilter({outcomes,}: {outcomes: HomeBriefingOutcome[];}) {- const [activeFilter, setActiveFilter] = useState<BriefingFilter>("all");+ const [activeFilter, setActiveFilter] = useState<OutcomeFilter>("all");const filterStatuses = Array.from(new Set(outcomes.map((outcome) => outcome.status)),);- const selectedFilter: BriefingFilter =+ const selectedFilter: OutcomeFilter =activeFilter !== "all" && filterStatuses.includes(activeFilter)? activeFilter: "all";@@ -30,7 +30,7 @@ export function useMorningBriefing({: outcomes.filter((outcome) => outcome.status === selectedFilter);return {- filterOptions: (["all", ...filterStatuses] as BriefingFilter[]).map(+ filterOptions: (["all", ...filterStatuses] as OutcomeFilter[]).map((value) => ({ value, label: FILTER_LABELS[value] ?? value }),),hasFilters: filterStatuses.length > 1,diff --git a/autogpt_platform/frontend/src/app/(platform)/home/components/RecentWork/useWorkflowRuns.ts b/autogpt_platform/frontend/src/app/(platform)/home/components/RecentWork/useWorkflowRuns.tsnew file mode 100644index 0000000000..7ac8347573--- /dev/null+++ b/autogpt_platform/frontend/src/app/(platform)/home/components/RecentWork/useWorkflowRuns.ts@@ -0,0 +1,19 @@+"use client";++import { useSitrepItems } from "@/app/(platform)/library/components/SitrepItem/useSitrepItems";+import { useLibraryAgents } from "@/hooks/useLibraryAgents/useLibraryAgents";++const MAX_RUNS = 5;++/** Each workflow's latest state from the library feed: a recent result, a+ * live run, or a trigger it waits on. Scheduled runs are left out because+ * Now & next already lists them under Coming up. */+export function useWorkflowRuns() {+ const { agents } = useLibraryAgents();+ // The feed yields at most one item per agent, so asking for that many+ // makes its own cap a no-op: scheduled rows are dropped before the real+ // limit applies, and a run of scheduled agents cannot crowd out the rest.+ return useSitrepItems(agents, Math.max(agents.length, 1))+ .filter((run) => run.status !== "scheduled")+ .slice(0, MAX_RUNS);+}diff --git a/autogpt_platform/frontend/src/app/(platform)/home/page.tsx b/autogpt_platform/frontend/src/app/(platform)/home/page.tsxindex 047f28098a..f53f077a1f 100644--- a/autogpt_platform/frontend/src/app/(platform)/home/page.tsx+++ b/autogpt_platform/frontend/src/app/(platform)/home/page.tsx@@ -7,17 +7,18 @@ 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 { HomeBackdrop } from "./components/HomeBackdrop/HomeBackdrop";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 { RecentWork } from "./components/RecentWork/RecentWork";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";+const SHELL_CLASS =+ "relative min-h-screen bg-zinc-50 px-4 pb-16 pt-6 sm:px-6 lg:px-8";+const CONTENT_CLASS = "relative mx-auto w-full max-w-[1120px]";+const GRID_CLASS = "grid grid-cols-1 items-start gap-4 xl:grid-cols-12";export default function HomePage() {const { enabled, ready } = useFlagStatus(Flag.HIRE_EXPERTS);@@ -35,6 +36,7 @@ export default function HomePage() {if (isError || !dashboard) {return (<main className={SHELL_CLASS}>+ <HomeBackdrop /><div className={CONTENT_CLASS}><ErrorCardcontext="home"@@ -48,19 +50,24 @@ export default function HomePage() {return (<main className={SHELL_CLASS}>- <div className={`${CONTENT_CLASS} flex flex-col gap-2.5`}>+ <HomeBackdrop />+ <div className={CONTENT_CLASS}><HomeHeadergreeting={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 className="flex min-w-0 flex-col gap-4 xl:col-span-8">+ {/* An empty inbox is not news: the header already says nothing+ needs you, so the tile only appears once there is something+ to decide. */}+ {dashboard.attention.length > 0 && (+ <NeedsYou dashboard={dashboard} />+ )}<RecentWork dashboard={dashboard} /></div>- <div className="flex min-w-0 flex-col gap-7 xl:col-span-4">+ <div className="flex min-w-0 flex-col gap-4 xl:col-span-4"><AgentTeam dashboard={dashboard} /><NowNext dashboard={dashboard} /></div>@@ -73,25 +80,26 @@ export default function HomePage() {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">+ <HomeBackdrop />+ <div className={CONTENT_CLASS}>+ <div className="flex items-end justify-between gap-6 px-1 pb-5 pt-1"><div className="space-y-2">- <Skeleton className="h-9 w-72" />- <Skeleton className="h-5 w-96 max-w-full" />+ <Skeleton className="h-7 w-64" />+ <Skeleton className="h-4 w-80 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" />+ <Skeleton className="h-4 w-16" />+ <Skeleton className="h-3 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 className="flex flex-col gap-4 xl:col-span-8">+ <HomeTileSkeleton cardClassName="h-64" />+ <HomeTileSkeleton cardClassName="h-56" /></div>- <div className="flex flex-col gap-7 xl:col-span-4">+ <div className="flex flex-col gap-4 xl:col-span-4">+ <HomeTileSkeleton cardClassName="h-44" /><HomeTileSkeleton cardClassName="h-56" />- <HomeTileSkeleton cardClassName="h-72" /></div></div></div>@@ -105,12 +113,11 @@ interface Props {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 className="overflow-hidden rounded-lg border border-zinc-200 bg-white">+ <div className="flex h-10 items-center border-b border-zinc-100 px-4">+ <Skeleton className="h-3.5 w-28" /></div>- <Skeleton className={`${cardClassName} rounded-[30px]`} />+ <Skeleton className={`${cardClassName} rounded-none`} /></div>);}