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): mobile polish for chat and sidebar, team and expert page redesign (#15500)
Ubbe6cbdbbb6b284
diff --git a/autogpt_platform/frontend/package.json b/autogpt_platform/frontend/package.jsonindex 20b3f1ca14..d82d52fd8a 100644--- a/autogpt_platform/frontend/package.json+++ b/autogpt_platform/frontend/package.json@@ -158,7 +158,6 @@"@types/twemoji": "13.1.2","@vitejs/plugin-react": "5.1.2","@vitest/coverage-v8": "4.1.0",- "agentation": "3.0.2","concurrently": "9.2.1","cross-env": "10.1.0","eslint": "8.57.1",diff --git a/autogpt_platform/frontend/pnpm-lock.yaml b/autogpt_platform/frontend/pnpm-lock.yamlindex 6a8e02d2b8..e8952f1b0f 100644--- a/autogpt_platform/frontend/pnpm-lock.yaml+++ b/autogpt_platform/frontend/pnpm-lock.yaml@@ -380,9 +380,6 @@ importers:'@vitest/coverage-v8':specifier: 4.1.0version: 4.1.0([email protected](@opentelemetry/[email protected])(@types/[email protected])([email protected])([email protected](@noble/[email protected]))([email protected](@types/[email protected])([email protected]))([email protected](@types/[email protected])([email protected])([email protected])([email protected])))- agentation:- specifier: 3.0.2concurrently:specifier: 9.2.1version: 9.2.1@@ -4781,17 +4778,6 @@ packages:resolution: {integrity: sha512-MnA+YT8fwfJPgBx3m60MNqakm30XOkyIoH1y6huTQvC0PwZG7ki8NacLBcrPbNoo8vEZy7Jpuk7+jMO+CUovTQ==}engines: {node: '>= 14'}- resolution: {integrity: sha512-iGzBxFVTuZEIKzLY6AExSLAQH6i6SwxV4pAu7v7m3X6bInZ7qlZXAwrEqyc4+EfP4gM7z2RXBF6SF4DeH0f2lA==}- peerDependencies:- react: '>=18.0.0'- react-dom: '>=18.0.0'- peerDependenciesMeta:- react:- optional: true- react-dom:- optional: true-resolution: {integrity: sha512-YalNEaavld/kE444gOcsMKXdVVRGEe0SK77fAFcWYcqLg+a7xKnEet8bdfrEAJTfnMjj01rhgrIL10903w1a5Q==}engines: {node: '>=18'}@@ -14307,11 +14293,6 @@ snapshots:optional: true- optionalDependencies:- react: 18.3.1- react-dom: 18.3.1([email protected])-dependencies:'@ai-sdk/gateway': 3.0.77([email protected])diff --git a/autogpt_platform/frontend/src/app/(platform)/PlatformChrome/PlatformChrome.tsx b/autogpt_platform/frontend/src/app/(platform)/PlatformChrome/PlatformChrome.tsxindex faf54eb397..3ab0c214be 100644--- a/autogpt_platform/frontend/src/app/(platform)/PlatformChrome/PlatformChrome.tsx+++ b/autogpt_platform/frontend/src/app/(platform)/PlatformChrome/PlatformChrome.tsx@@ -4,6 +4,7 @@ import { CSSProperties, ReactNode } from "react";import { TourSidebar } from "@/app/(public)/tour/chat/components/TourSidebar/TourSidebar";import { AppSidebar } from "@/components/layout/AppSidebar/AppSidebar";+import { AppSidebarToggleProvider } from "@/components/layout/AppSidebar/components/AppSidebarTrigger/AppSidebarTrigger";import { cn } from "@/lib/utils";import { Navbar } from "@/components/layout/Navbar/Navbar";import { TopUpPromptProvider } from "@/components/layout/TopUpPrompt/TopUpPromptProvider";@@ -16,7 +17,6 @@ import {import { Flag, useGetFlag } from "@/services/feature-flags/use-get-flag";import { AdminImpersonationBanner } from "../admin/components/AdminImpersonationBanner";import { GlobalSearchOverlay } from "../components/GlobalSearchModal/GlobalSearchOverlay";-import { WorkspaceFilesTrigger } from "../copilot/components/WorkspaceFilesTrigger/WorkspaceFilesTrigger";import { PaywallGate } from "../PaywallGate/PaywallGate";import { ArtifactsPanelNavCollapse } from "./components/ArtifactsPanelNavCollapse/ArtifactsPanelNavCollapse";import { BuilderSidebarAutoClose } from "./components/BuilderSidebarAutoClose/BuilderSidebarAutoClose";@@ -39,7 +39,7 @@ export function PlatformChrome({ children }: Props) {isNewLayoutActive,showTourSidebar,overlayInsetHeader,- isCopilotRoute,+ isChatSession,hasInsetHeaderTitle,isSettingsRoute,isAdminRoute,@@ -92,14 +92,11 @@ export function PlatformChrome({ children }: Props) {)}><div className="mx-auto flex w-full max-w-7xl items-center gap-2 px-6 md:px-8">- <div className="pointer-events-auto md:hidden">- <SidebarTrigger className={mobileTriggerClassName} />- </div>- {/* Copilot treats up-to-lg as mobile (overlay context panel),- so its workspace-files toggle stays visible past md. */}- {isCopilotRoute && (- <div className="pointer-events-auto lg:hidden">- <WorkspaceFilesTrigger className={mobileTriggerClassName} />+ {/* An open chat carries both buttons in its thread chip+ (ThreadHeader), so they float here everywhere else. */}+ {!isChatSession && (+ <div className="pointer-events-auto md:hidden">+ <SidebarTrigger className={mobileTriggerClassName} /></div>)}<InsetHeaderTitle />@@ -108,7 +105,9 @@ export function PlatformChrome({ children }: Props) {</header><AdminImpersonationBanner /><GlobalSearchOverlay />- <section className="flex-1">{content}</section>+ <AppSidebarToggleProvider>+ <section className="flex-1">{content}</section>+ </AppSidebarToggleProvider></SidebarInset></SidebarProvider>);diff --git a/autogpt_platform/frontend/src/app/(platform)/PlatformChrome/__tests__/usePlatformChrome.test.ts b/autogpt_platform/frontend/src/app/(platform)/PlatformChrome/__tests__/usePlatformChrome.test.tsindex 1a3ba9e42f..c419355ccf 100644--- a/autogpt_platform/frontend/src/app/(platform)/PlatformChrome/__tests__/usePlatformChrome.test.ts+++ b/autogpt_platform/frontend/src/app/(platform)/PlatformChrome/__tests__/usePlatformChrome.test.ts@@ -4,8 +4,10 @@ import { beforeEach, describe, expect, it, vi } from "vitest";import { usePlatformChrome } from "../usePlatformChrome";const pathnameMock = vi.fn<() => string>(() => "/marketplace");+const searchParamsMock = vi.fn(() => new URLSearchParams());vi.mock("next/navigation", () => ({usePathname: () => pathnameMock(),+ useSearchParams: () => searchParamsMock(),}));const authMock = vi.fn(() => ({@@ -31,6 +33,7 @@ vi.mock("@/services/feature-flags/use-get-flag", async (importOriginal) => {describe("usePlatformChrome", () => {beforeEach(() => {pathnameMock.mockReturnValue("/marketplace");+ searchParamsMock.mockReturnValue(new URLSearchParams());flagMock.mockReturnValue(true);authMock.mockReturnValue({ isLoggedIn: true, isUserLoading: false });});@@ -152,3 +155,13 @@ it("gives home the chat controls and floating header", () => {expect(result.current.isCopilotRoute).toBe(true);expect(result.current.overlayInsetHeader).toBe(true);});++it("flags an open chat session so its chip takes over the header buttons", () => {+ pathnameMock.mockReturnValue("/home");+ const { result, rerender } = renderHook(() => usePlatformChrome());+ expect(result.current.isChatSession).toBe(false);++ searchParamsMock.mockReturnValue(new URLSearchParams("sessionId=abc"));+ rerender();+ expect(result.current.isChatSession).toBe(true);+});diff --git a/autogpt_platform/frontend/src/app/(platform)/PlatformChrome/components/InsetHeaderTitle/InsetHeaderTitle.tsx b/autogpt_platform/frontend/src/app/(platform)/PlatformChrome/components/InsetHeaderTitle/InsetHeaderTitle.tsxindex d2e7c8a51f..df7d91ce3b 100644--- a/autogpt_platform/frontend/src/app/(platform)/PlatformChrome/components/InsetHeaderTitle/InsetHeaderTitle.tsx+++ b/autogpt_platform/frontend/src/app/(platform)/PlatformChrome/components/InsetHeaderTitle/InsetHeaderTitle.tsx@@ -26,7 +26,7 @@ export function InsetHeaderTitle() {return (<div className="flex items-center gap-2">- <Icon icon={entry.icon} className="size-5 text-zinc-800" />+ <Icon icon={entry.icon} className="size-5 text-zinc-800 max-md:hidden" /><Text variant="large-medium">{entry.title}</Text></div>);diff --git a/autogpt_platform/frontend/src/app/(platform)/PlatformChrome/usePlatformChrome.ts b/autogpt_platform/frontend/src/app/(platform)/PlatformChrome/usePlatformChrome.tsindex f823441e39..94243fcd65 100644--- a/autogpt_platform/frontend/src/app/(platform)/PlatformChrome/usePlatformChrome.ts+++ b/autogpt_platform/frontend/src/app/(platform)/PlatformChrome/usePlatformChrome.ts@@ -1,4 +1,4 @@-import { usePathname } from "next/navigation";+import { usePathname, useSearchParams } from "next/navigation";import { useEffect, useState } from "react";import { useAuth } from "@/lib/auth/hooks/useAuth";@@ -23,6 +23,7 @@ const NEW_LAYOUT_EXCLUDED_PREFIXES = [export function usePlatformChrome() {const pathname = usePathname();+ const searchParams = useSearchParams();const isNewLayoutEnabled = useGetFlag(Flag.AUTOGPT_NEW_LAYOUT);// Also initializes the auth store — required here because the tour shell// replaces the Navbar, which is what normally kicks off the session check.@@ -74,6 +75,9 @@ export function usePlatformChrome() {// copilot's header controls.overlayInsetHeader: isCopilotRoute,isCopilotRoute,+ // An open chat carries the sidebar and workspace-files buttons in its+ // thread chip, so the inset header leaves them out.+ isChatSession: isCopilotRoute && Boolean(searchParams.get("sessionId")),// Titleless pages collapse the header on desktop so content doesn't sit// below an empty strip; on mobile it stays for the sidebar trigger.hasInsetHeaderTitle: Boolean(getRouteTitle(pathname)),diff --git a/autogpt_platform/frontend/src/app/(platform)/artifacts/components/ArtifactsList/ArtifactsTable/FileRow.tsx b/autogpt_platform/frontend/src/app/(platform)/artifacts/components/ArtifactsList/ArtifactsTable/FileRow.tsxindex a346b91ba1..031e186472 100644--- a/autogpt_platform/frontend/src/app/(platform)/artifacts/components/ArtifactsList/ArtifactsTable/FileRow.tsx+++ b/autogpt_platform/frontend/src/app/(platform)/artifacts/components/ArtifactsList/ArtifactsTable/FileRow.tsx@@ -133,7 +133,7 @@ export function FileRow({align="center"sideOffset={16}collisionPadding={16}- className="max-w-none rounded-2xl border border-zinc-200 bg-white p-0 text-sm shadow-xl shadow-black/10 outline-none"+ className="max-w-none rounded-2xl border border-zinc-200 bg-white p-0 text-sm text-zinc-900 shadow-xl shadow-black/10 outline-none"><FilePreviewCard file={file} /></TooltipContent>diff --git a/autogpt_platform/frontend/src/app/(platform)/artifacts/useArtifactsPage.ts b/autogpt_platform/frontend/src/app/(platform)/artifacts/useArtifactsPage.tsindex 6039e14f41..a5ff796273 100644--- a/autogpt_platform/frontend/src/app/(platform)/artifacts/useArtifactsPage.ts+++ b/autogpt_platform/frontend/src/app/(platform)/artifacts/useArtifactsPage.ts@@ -3,6 +3,7 @@ import { usePathname, useRouter, useSearchParams } from "next/navigation";import { listWorkspaceFiles } from "@/app/api/__generated__/endpoints/workspace/workspace";import type { WorkspaceFileItem } from "@/app/api/__generated__/models/workspaceFileItem";import type { WorkspaceFolder } from "@/app/api/__generated__/models/workspaceFolder";+import { isHiddenWorkspaceFile } from "@/lib/workspace-files";import { type InfiniteData, useInfiniteQuery } from "@tanstack/react-query";import { ancestorsOf } from "./components/WorkspaceFolders/folderTree";@@ -166,9 +167,11 @@ function flattenFiles(data: InfiniteData<ListPage> | undefined,): WorkspaceFileItem[] {if (!data) return [];- return data.pages.flatMap((page) =>- page.status === 200 ? (page.data.files ?? []) : [],- );+ // Hidden here rather than in the fetch: paging offsets count every file+ // the server returned (see countLoadedFiles).+ return data.pages+ .flatMap((page) => (page.status === 200 ? (page.data.files ?? []) : []))+ .filter((file) => !isHiddenWorkspaceFile(file));}function countLoadedFiles(pages: ListPage[]): number {diff --git a/autogpt_platform/frontend/src/app/(platform)/copilot/__tests__/expert-integrations.test.tsx b/autogpt_platform/frontend/src/app/(platform)/copilot/__tests__/expert-integrations.test.tsxindex 4e946201bc..364f0f5709 100644--- a/autogpt_platform/frontend/src/app/(platform)/copilot/__tests__/expert-integrations.test.tsx+++ b/autogpt_platform/frontend/src/app/(platform)/copilot/__tests__/expert-integrations.test.tsx@@ -123,8 +123,8 @@ describe("expert integrations in the chat controls", () => {renderControls();fireEvent.click(await screen.findByTestId("expert-integrations"));- expect(await screen.findByText("Maria's Integrations")).toBeDefined();- expect(await screen.findByText("github account")).toBeDefined();+ expect(await screen.findByText(/^Maria's integrations/)).toBeDefined();+ expect(await screen.findByText(/github account/)).toBeDefined();expect(screen.getByLabelText("Hide integrations")).toBeDefined();expect(useCopilotUIStore.getState().artifactPanel.activeTab).toBe("integrations",@@ -155,7 +155,7 @@ describe("expert integrations in the chat controls", () => {expect(screen.queryByTestId("expert-integrations")).toBeNull();fireEvent.click(placeholder);- expect(await screen.findByText("Maria's Integrations")).toBeDefined();+ expect(await screen.findByText("No integrations yet")).toBeDefined();expect(screen.getByLabelText("Hide integrations")).toBeDefined();});diff --git a/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatContainer/ChatContainer.tsx b/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatContainer/ChatContainer.tsxindex aa3c6925d4..385d4b0514 100644--- a/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatContainer/ChatContainer.tsx+++ b/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatContainer/ChatContainer.tsx@@ -25,6 +25,9 @@ import { ContextPanelToggle } from "../ContextPanel/ContextPanelToggle";import { useShareChatExpert } from "../ContextPanel/useShareChatExpert";import { ArchivedExpertNotice } from "./components/ArchivedExpertNotice";import { SessionNotFound } from "./components/SessionNotFound";+import { cn } from "@/lib/utils";+import { useIsMobile } from "../../useIsMobile";+import { ComposerPanelTab } from "./components/ComposerPanelTab";import { SharedChatNotice } from "./components/SharedChatNotice";import { useAutoOpenArtifacts } from "./useAutoOpenArtifacts";import { VoiceModeBar } from "../../voice/components/VoiceModeBar";@@ -242,6 +245,11 @@ export const ChatContainer = ({// insufficient-credits state, usage-bar layout) so a fixed value would// either waste space or clip.const usageCardRef = useRef<HTMLDivElement>(null);+ const isMobileLayout = useIsMobile();+ const hasComposerTab = floatingControls === "newLayout";+ // The composer tab overlaps the list's last 41px on small screens, so the+ // list keeps that much more room at the bottom.+ const composerTabInset = hasComposerTab && isMobileLayout ? 41 : 0;const [usageCardHeight, setUsageCardHeight] = useState(0);useEffect(() => {if (!isLimitReached) {@@ -356,7 +364,11 @@ export const ChatContainer = ({) : sessionId ? (<div className="relative flex h-full min-h-0 w-full flex-col bg-white"><div className="absolute right-0 top-0 z-30">- <ContextPanelToggle sessionId={sessionId} expert={chatExpert} />+ <ContextPanelToggle+ sessionId={sessionId}+ expert={chatExpert}+ hideIntegrationsOnMobile={floatingControls === "newLayout"}+ /></div><NewChatOnboardingexpertId={expertIdentity?.id ?? null}@@ -386,23 +398,33 @@ export const ChatContainer = ({turnStats={turnStats}queuedMessages={queuedMessages}pendingSend={pendingSend}- bottomContentPadding={usageCardHeight}+ bottomContentPadding={usageCardHeight + composerTabInset}expertIdentity={expertIdentity}isResolvingExpertIdentity={isResolvingExpertIdentity}floatingControls={floatingControls}/></NewChatOnboarding>{archivedExpertIdentity ? (- <ArchivedExpertNotice- expertName={archivedExpertIdentity.name}- reason={archivedExpertIdentity.readOnlyReason ?? "fired"}- />+ <>+ {hasComposerTab && (+ <div className="mx-auto w-full max-w-3xl px-3">+ <ComposerPanelTab expert={null} />+ </div>+ )}+ <ArchivedExpertNotice+ expertName={archivedExpertIdentity.name}+ reason={archivedExpertIdentity.readOnlyReason ?? "fired"}+ />+ </>) : (<motion.divinitial={{ opacity: 0 }}animate={{ opacity: 1 }}transition={{ duration: 0.3 }}- className="relative mx-auto w-full max-w-3xl px-3 pb-6 pt-2"+ className={cn(+ "relative mx-auto w-full max-w-3xl px-3 pb-6 pt-2",+ hasComposerTab && "max-lg:pt-0",+ )}>{isLimitReached && (<div@@ -423,6 +445,7 @@ export const ChatContainer = ({</div>)}<SharedChatNotice sessionId={sessionId} />+ {hasComposerTab && <ComposerPanelTab expert={chatExpert} />}{isTaskBarEnabled && (<div className="relative z-10"><TaskProgressBardiff --git a/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatContainer/__tests__/new-chat-onboarding.test.tsx b/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatContainer/__tests__/new-chat-onboarding.test.tsxindex 73c26fe6e1..5838c5d111 100644--- a/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatContainer/__tests__/new-chat-onboarding.test.tsx+++ b/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatContainer/__tests__/new-chat-onboarding.test.tsx@@ -88,7 +88,7 @@ describe("new full-page expert chats", () => {const onSend = vi.fn();render(<ChatContainer {...props} onSend={onSend} />);expect(await screen.findByText("What topic?")).toBeDefined();- fireEvent.click(screen.getByRole("button", { name: "Skip" }));+ fireEvent.click(screen.getByRole("button", { name: "Skip questions" }));await waitFor(() =>expect(onSend).toHaveBeenCalledWith("Let's skip the setup questions for now.",diff --git a/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatContainer/components/ComposerPanelTab.tsx b/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatContainer/components/ComposerPanelTab.tsxnew file mode 100644index 0000000000..0d90003a9e--- /dev/null+++ b/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatContainer/components/ComposerPanelTab.tsx@@ -0,0 +1,34 @@+"use client";++import type { ContextPanelExpert } from "../../../store";+import { IntegrationsToggle } from "../../ContextPanel/components/IntegrationsToggle/IntegrationsToggle";+import { WorkspaceFilesTrigger } from "../../WorkspaceFilesTrigger/WorkspaceFilesTrigger";++interface Props {+ expert: ContextPanelExpert | null;+}++const buttonClassName = "size-9 shrink-0 rounded-full hover:bg-zinc-200/70";++/** The small tab on the composer's top-right edge that holds the files and+ * integrations buttons on small viewports. It shares the task list's+ * surface (TaskProgressBar), so the two read as parts of the composer. */+export function ComposerPanelTab({ expert }: Props) {+ return (+ // Pulled up by its own height so it rides over the message list instead+ // of pushing it up: the thread scrolls right to the input's edge, behind+ // the tab (ChatContainer pads the list to match).+ <div className="relative z-20 -mt-[41px] flex justify-end pr-6 lg:hidden">+ <div className="flex items-center gap-0.5 rounded-t-2xl border border-b-0 border-zinc-200 bg-neutral-100 px-1.5 pt-1 shadow-[inset_0_1px_0_0_rgba(255,255,255,0.9),inset_0_5px_6px_-4px_rgba(255,255,255,0.7)]">+ <WorkspaceFilesTrigger className={buttonClassName} />+ {expert && (+ <IntegrationsToggle+ expert={expert}+ size="lg"+ className={buttonClassName}+ />+ )}+ </div>+ </div>+ );+}diff --git a/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatContainer/components/SessionNotFound.tsx b/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatContainer/components/SessionNotFound.tsxindex 9afb98b837..f37b0e88c4 100644--- a/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatContainer/components/SessionNotFound.tsx+++ b/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatContainer/components/SessionNotFound.tsx@@ -1,6 +1,7 @@import { Button } from "@/components/atoms/Button/Button";import { Icon } from "@/components/atoms/Icon/Icon";import { Text } from "@/components/atoms/Text/Text";+import { AppSidebarTrigger } from "@/components/layout/AppSidebar/components/AppSidebarTrigger/AppSidebarTrigger";import { BubbleChatBlockedIcon } from "@hugeicons/core-free-icons";import { parseAsString, useQueryState } from "nuqs";@@ -16,7 +17,10 @@ export function SessionNotFound() {}return (- <div className="flex h-full min-h-0 w-full items-center justify-center bg-white px-6">+ <div className="relative flex h-full min-h-0 w-full items-center justify-center bg-white px-6">+ {/* An open chat's thread chip owns the mobile sidebar button; this+ screen has no chip, so it brings its own. */}+ <AppSidebarTrigger className="absolute left-4 top-5 rounded-full border border-[#DADADC] bg-white shadow-md hover:bg-[#F5F5F6] md:hidden" /><divrole="status"className="flex max-w-md flex-col items-center gap-3 text-center"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 f78f76f2ce..c79966713b 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@@ -34,7 +34,10 @@ import {} from "../../helpers/workspaceAttachments";import type { PickedItem } from "./components/WorkspaceFilePicker/useWorkspaceFilePicker";import { AttachmentCapNotice } from "./components/AttachmentCapNotice";-import { ComposerPlusMenu } from "./components/ComposerPlusMenu";+import {+ ComposerPlusMenu,+ type ComposerMenuItem,+} from "./components/ComposerPlusMenu";import { DryRunToggleButton } from "./components/DryRunToggleButton";import { FileChips } from "./components/FileChips";import { MentionDropdown } from "./components/MentionDropdown";@@ -59,7 +62,11 @@ import { useChatMentions } from "./useChatMentions";import { useConnectedIntegrations } from "./useConnectedIntegrations";import { useOnboardingMicGlow } from "./useOnboardingMicGlow";import { useVoiceRecording } from "./useVoiceRecording";-import { ArrowUp02Icon } from "@hugeicons/core-free-icons";+import {+ ArrowUp02Icon,+ DashboardSpeed02Icon,+ FlashIcon,+} from "@hugeicons/core-free-icons";import { Icon } from "@/components/atoms/Icon/Icon";interface Props {@@ -331,6 +338,38 @@ export function ChatInput({}const isCompact = variant === "compact";+ // Model tier and the dev token readout sit behind the + instead of as+ // icons in the tray; their sheets anchor to the + side of the composer.+ const [plusPanel, setPlusPanel] = useState<"model" | "devtool" | null>(null);+ const showModelControl =+ !stacked && !isCompact && (!hasSession || !isStreaming);+ // Wait for the menu to close and hand focus back before the sheet opens,+ // or the returning focus dismisses it straight away.+ function openPlusPanel(panel: "model" | "devtool") {+ setTimeout(() => setPlusPanel(panel), 0);+ }+ const plusMenuItems: ComposerMenuItem[] = [+ ...(showModelControl+ ? [+ {+ key: "model",+ label: "Model and connection",+ icon: FlashIcon,+ onSelect: () => openPlusPanel("model"),+ },+ ]+ : []),+ ...(devtoolSessionId+ ? [+ {+ key: "devtool",+ label: "Token usage",+ icon: DashboardSpeed02Icon,+ onSelect: () => openPlusPanel("devtool"),+ },+ ]+ : []),+ ];const iconButtonClass = stacked? CARD_ICON_BUTTON_CLASS: isCompact@@ -363,7 +402,7 @@ export function ChatInput({keeps the controls pinned to the bottom edge as the textarea grows. */}<InputGroupclassName={cn(- "relative z-10 flex-col overflow-hidden !rounded-[2rem] border-zinc-200 shadow-[0_1px_2px_rgba(0,0,0,0.04),0_4px_20px_rgba(0,0,0,0.08)] has-[[data-slot=input-group-control]:focus-visible]:border-zinc-300 has-[[data-slot=input-group-control]:focus-visible]:ring-0",+ "relative z-10 flex-col overflow-hidden !rounded-[2rem] border-zinc-200 shadow-[0_1px_2px_rgba(0,0,0,0.04),0_4px_20px_rgba(0,0,0,0.08)] has-[[data-slot=input-group-control]:focus-visible]:border-zinc-300 has-[[data-slot=input-group-control]:focus-visible]:ring-0 max-md:!rounded-3xl",// Card composer: a hairline border and a shallow drop instead of// the pill's deep shadow, so it reads as a surface the text sits on.stacked &&@@ -410,7 +449,7 @@ export function ChatInput({<InputGroupAddonalign="inline-start"className={cn(- "order-none gap-1 py-1 pl-1.5",+ "relative order-none gap-1 py-1 pl-1.5",stacked && "gap-1.5 p-0",isCompact && "gap-0.5 py-1 pl-1",)}@@ -421,6 +460,7 @@ export function ChatInput({onClearGuidedPrompt={handleClearGuidedPrompt}disabled={isBusy}isAtCap={isAtCap}+ extraItems={plusMenuItems}className={stacked? cn(@@ -431,6 +471,22 @@ export function ChatInput({}/>{recipientPicker}+ {showModelControl && (+ <ConnectionPicker+ connectionLocked={hasSession}+ anchorOnly+ open={plusPanel === "model"}+ onOpenChange={(open) => setPlusPanel(open ? "model" : null)}+ />+ )}+ {devtoolSessionId && (+ <TokenDevtoolBadge+ sessionId={devtoolSessionId}+ anchorOnly+ open={plusPanel === "devtool"}+ onOpenChange={(open) => setPlusPanel(open ? "devtool" : null)}+ />+ )}</InputGroupAddon>{/* Must be a real flex item: `order`/`w-full` are ignored on a`display: contents` box, which is what PromptInputBody was. */}@@ -476,9 +532,6 @@ export function ChatInput({{/* Connection and tier are per-message settings, so they remainchangeable between turns in an existing session. The cardcomposer leaves this to the page's top-right control. */}- {!stacked && !isCompact && (!hasSession || !isStreaming) && (- <ConnectionPicker connectionLocked={hasSession} />- )}{modeSelector}{showAdvancedComposerControls && !hasSession && (<DryRunToggleButton@@ -486,9 +539,6 @@ export function ChatInput({onToggle={handleToggleDryRun}/>)}- {devtoolSessionId && (- <TokenDevtoolBadge sessionId={devtoolSessionId} />- )}{voiceToggle}{showMicButton && (<RecordingButtondiff --git a/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatInput/__tests__/ChatInput.test.tsx b/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatInput/__tests__/ChatInput.test.tsxindex b2453aa96c..80a9bdd0b0 100644--- a/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatInput/__tests__/ChatInput.test.tsx+++ b/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatInput/__tests__/ChatInput.test.tsx@@ -204,14 +204,28 @@ vi.mock("@/components/ai-elements/prompt-input", () => ({vi.mock("../components/ComposerPlusMenu", () => ({ComposerPlusMenu: ({onClearGuidedPrompt,+ extraItems = [],}: {onClearGuidedPrompt?: () => void;+ extraItems?: { key: string; label: string; onSelect: () => void }[];}) => (- <button- type="button"- data-testid="attachment-menu"- onClick={() => onClearGuidedPrompt?.()}- />+ <>+ <button+ type="button"+ data-testid="attachment-menu"+ onClick={() => onClearGuidedPrompt?.()}+ />+ {extraItems.map((item) => (+ <button+ key={item.key}+ type="button"+ role="menuitem"+ onClick={item.onSelect}+ >+ {item.label}+ </button>+ ))}+ </>),}));vi.mock("../components/FileChips", () => ({@@ -281,36 +295,36 @@ describe("ChatInput composer row", () => {});});-describe("ChatInput token devtool badge", () => {- it("renders the badge while the brain-dump tray is disabled", () => {- // The tray is brain-dump-only; the badge must not depend on that flag.+describe("ChatInput token devtool entry", () => {+ it("lists Token usage in the + menu while the brain-dump tray is disabled", () => {+ // The tray is brain-dump-only; the entry must not depend on that flag.mockFlagValue = false;mockTokenDevtoolEnabled = true;render(<ChatInput onSend={mockOnSend} sessionId="session-1" />);- expect(screen.getByRole("button", { name: /Token devtool/ })).toBeDefined();+ expect(screen.getByRole("menuitem", { name: "Token usage" })).toBeDefined();});- it("renders the badge inside the tray when brain dump is enabled", () => {+ it("lists Token usage in the + menu when brain dump is enabled", () => {mockFlagValue = true;mockTokenDevtoolEnabled = true;render(<ChatInput onSend={mockOnSend} sessionId="session-1" />);- expect(screen.getByRole("button", { name: /Token devtool/ })).toBeDefined();+ expect(screen.getByRole("menuitem", { name: "Token usage" })).toBeDefined();});- it("stays hidden when the devtool gate is off", () => {+ it("stays out of the menu when the devtool gate is off", () => {mockTokenDevtoolEnabled = false;render(<ChatInput onSend={mockOnSend} sessionId="session-1" />);- expect(screen.queryByRole("button", { name: /Token devtool/ })).toBeNull();+ expect(screen.queryByRole("menuitem", { name: "Token usage" })).toBeNull();});- it("stays hidden before a session exists", () => {+ it("stays out of the menu before a session exists", () => {mockTokenDevtoolEnabled = true;render(<ChatInput onSend={mockOnSend} sessionId={null} />);- expect(screen.queryByRole("button", { name: /Token devtool/ })).toBeNull();+ expect(screen.queryByRole("menuitem", { name: "Token usage" })).toBeNull();});});diff --git a/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatInput/components/ComposerPlusMenu.tsx b/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatInput/components/ComposerPlusMenu.tsxindex 618f779afd..1b762993e9 100644--- a/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatInput/components/ComposerPlusMenu.tsx+++ b/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatInput/components/ComposerPlusMenu.tsx@@ -5,8 +5,10 @@ import {DropdownMenu,DropdownMenuContent,DropdownMenuItem,+ DropdownMenuSeparator,DropdownMenuTrigger,} from "@/components/molecules/DropdownMenu/DropdownMenu";+import type { IconSvgElement } from "@hugeicons/react";import { cn } from "@/lib/utils";import { MAX_ATTACHMENTS } from "../../../helpers/workspaceAttachments";import { useComposerPlusMenu } from "./useComposerPlusMenu";@@ -29,6 +31,16 @@ interface Props {* entries read disabled rather than letting the composer take another. */isAtCap?: boolean;className?: string;+ /** Composer settings that live behind the + rather than as icons in the+ * tray (model tier, the dev token readout). */+ extraItems?: ComposerMenuItem[];+}++export interface ComposerMenuItem {+ key: string;+ label: string;+ icon: IconSvgElement;+ onSelect: () => void;}export function ComposerPlusMenu({@@ -38,6 +50,7 @@ export function ComposerPlusMenu({disabled,isAtCap = false,className,+ extraItems = [],}: Props) {const {fileInputRef,@@ -117,6 +130,13 @@ export function ComposerPlusMenu({<Icon icon={Calendar03Icon} className="mr-2 h-4 w-4" />Scheduled</DropdownMenuItem>+ {extraItems.length > 0 && <DropdownMenuSeparator />}+ {extraItems.map((item) => (+ <DropdownMenuItem key={item.key} onSelect={item.onSelect}>+ <Icon icon={item.icon} className="mr-2 h-4 w-4" />+ {item.label}+ </DropdownMenuItem>+ ))}</DropdownMenuContent></DropdownMenu></>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 5a2333f63a..5a0d3553c1 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@@ -2,6 +2,7 @@import {Popover,+ PopoverAnchor,PopoverContent,PopoverTrigger,} from "@/components/molecules/Popover/Popover";@@ -57,6 +58,11 @@ interface Props {*/connectionLocked?: boolean;className?: string;+ /** Opened from somewhere else (the composer's + menu): no chip of its+ * own, the sheet anchors to its parent box instead. */+ anchorOnly?: boolean;+ open?: boolean;+ onOpenChange?: (open: boolean) => void;}/**@@ -67,6 +73,9 @@ interface Props {export function ConnectionPicker({connectionLocked = false,className,+ anchorOnly = false,+ open,+ onOpenChange,}: Props) {const {offers,@@ -212,8 +221,12 @@ export function ConnectionPicker({);return (- <Popover>- {showsTier ? (+ <Popover open={open} onOpenChange={onOpenChange}>+ {anchorOnly ? (+ <PopoverAnchor asChild>+ <span aria-hidden className="pointer-events-none absolute inset-0" />+ </PopoverAnchor>+ ) : showsTier ? (<Tooltip><TooltipTrigger asChild>{trigger}</TooltipTrigger><TooltipContent side="top">{tierLabel(active, tier)}</TooltipContent>@@ -223,7 +236,8 @@ export function ConnectionPicker({)}<PopoverContent- align="end"+ align={anchorOnly ? "start" : "end"}+ side={anchorOnly ? "top" : undefined}className={cn("max-h-[var(--radix-popover-content-available-height)] w-[24rem] max-w-[calc(100vw-2rem)] overflow-y-auto rounded-2xl border-zinc-200 bg-[#F9F9FA] p-3 pt-4 text-zinc-900 shadow-lg",showMaxUpgrade && "bg-white",diff --git a/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatMessagesContainer/ChatMessagesContainer.tsx b/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatMessagesContainer/ChatMessagesContainer.tsxindex 884e4ce0b7..212f93675f 100644--- a/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatMessagesContainer/ChatMessagesContainer.tsx+++ b/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatMessagesContainer/ChatMessagesContainer.tsx@@ -652,7 +652,10 @@ export function ChatMessagesContainer({isCompact? "text-sm leading-6 group-[.is-user]:rounded-xl": "text-[1rem] leading-relaxed group-[.is-user]:rounded-3xl",- "group-[.is-user]:bg-zinc-100 group-[.is-user]:px-4 group-[.is-user]:py-2.5 group-[.is-user]:text-zinc-900",+ "group-[.is-user]:bg-zinc-900 group-[.is-user]:px-4 group-[.is-user]:py-2.5 group-[.is-user]:text-zinc-50",+ // Streamdown's links (buttons, `text-primary`) and light+ // code chips would sink into the dark bubble.+ "group-[.is-user]:[&_[data-streamdown=link]]:break-all group-[.is-user]:[&_[data-streamdown=link]]:text-zinc-50 group-[.is-user]:[&_[data-streamdown=link]]:underline group-[.is-user]:[&_code]:bg-white/10 group-[.is-user]:[&_code]:text-zinc-50","group-[.is-user]:[&_h1]:text-lg group-[.is-user]:[&_h1]:font-semibold group-[.is-user]:[&_h2]:text-lg group-[.is-user]:[&_h2]:font-semibold group-[.is-user]:[&_h3]:text-lg group-[.is-user]:[&_h3]:font-semibold group-[.is-user]:[&_h4]:text-lg group-[.is-user]:[&_h4]:font-semibold group-[.is-user]:[&_h5]:text-lg group-[.is-user]:[&_h5]:font-semibold group-[.is-user]:[&_h6]:text-lg group-[.is-user]:[&_h6]:font-semibold",// Chain hover pills use negative margins that the base// overflow-hidden would clip.diff --git a/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatMessagesContainer/components/ExpertAvatar/ExpertAvatar.tsx b/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatMessagesContainer/components/ExpertAvatar/ExpertAvatar.tsxindex 8d7471834b..56f721294c 100644--- a/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatMessagesContainer/components/ExpertAvatar/ExpertAvatar.tsx+++ b/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatMessagesContainer/components/ExpertAvatar/ExpertAvatar.tsx@@ -22,6 +22,7 @@ export function ExpertAvatar({}: Props) {const isSmall = size === "sm";const sizeClass = isSmall ? "h-6 w-6" : "h-9 w-9";+ const borderClass = "rounded-full border border-[#e3e3e3]";if (isLoading) {return (@@ -33,7 +34,7 @@ export function ExpertAvatar({}if (isAutopilot && !avatarUrl) {- return <AutopilotAvatar size={isSmall ? 24 : 36} />;+ return <AutopilotAvatar size={isSmall ? 24 : 36} className={borderClass} />;}return (@@ -42,6 +43,7 @@ export function ExpertAvatar({avatarUrl={avatarUrl}color={color}size={isSmall ? 24 : 36}+ className={borderClass}/>);}diff --git a/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatMessagesContainer/components/PendingUploadMessage.tsx b/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatMessagesContainer/components/PendingUploadMessage.tsxindex b15c9b5681..74d3fc1279 100644--- a/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatMessagesContainer/components/PendingUploadMessage.tsx+++ b/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatMessagesContainer/components/PendingUploadMessage.tsx@@ -98,7 +98,7 @@ export function PendingUploadMessage({ pendingSend, isCompact }: Props) {isCompact? "text-sm leading-6 group-[.is-user]:rounded-xl": "text-[1rem] leading-relaxed group-[.is-user]:rounded-3xl",- "group-[.is-user]:bg-zinc-100 group-[.is-user]:px-4 group-[.is-user]:py-2.5 group-[.is-user]:text-zinc-900",+ "group-[.is-user]:bg-zinc-900 group-[.is-user]:px-4 group-[.is-user]:py-2.5 group-[.is-user]:text-zinc-50",)}><div className="whitespace-pre-wrap break-words">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 c21e8bc277..444aa677d0 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@@ -9,6 +9,10 @@ import {TooltipProvider,TooltipTrigger,} from "@/components/atoms/Tooltip/BaseTooltip";+import {+ AppSidebarTrigger,+ useAppSidebarToggle,+} from "@/components/layout/AppSidebar/components/AppSidebarTrigger/AppSidebarTrigger";import { cn } from "@/lib/utils";import type { ExpertIdentity } from "../../../useExpertMap";import { ExpertAvatar } from "./ExpertAvatar/ExpertAvatar";@@ -18,16 +22,19 @@ const DEFAULT_EXPERT_ROLE = "Head of AI";export type FloatingControls = "classic" | "newLayout";-// Below `lg` the chip joins the floating controls' row: centred on their-// height, one button gap after the last one. Classic: MobileHeader's 46px-// buttons sit 20px down and 16px in; the chat column starts 8px in. New-// layout: the inset header's 36px buttons sit 24px down and in (32px in from-// `md`, where only the files button shows).+// Below `lg` the chip joins the floating controls' row. Classic: centred on+// MobileHeader's 46px buttons (20px down, 16px in), one button gap after the+// last one; the chat column starts 8px in. New layout: the sidebar button+// moves into the chip itself (see PlatformChrome) and the files and+// integrations buttons onto the composer (ComposerPanelTab), so the chip+// stands alone, centred near the top edge.const floatingControlsClassName: Record<FloatingControls, string> = {classic: "max-lg:top-5 max-lg:pl-[116px]",- newLayout: "max-lg:top-[19px] max-md:pl-[104px] md:max-lg:pl-[68px]",+ newLayout: "max-lg:top-2 max-lg:justify-center",};+const chipButtonClassName = "size-9 shrink-0 rounded-full hover:bg-zinc-100";+interface Props {expertIdentity?: ExpertIdentity | null;/** The roster has not settled yet for an expert-scoped session. */@@ -40,8 +47,9 @@ interface Props {/** Floats as a translucent chip pinned to the pane's top-left gutter — the* zero-height wrapper keeps it out of the flex flow so messages scroll* underneath. An expert session wears the expert's identity and every other- * session is Otto's, so the thread is never anonymous. The chip is a passive- * label; the expert's integrations live in the top-right controls. */+ * session is Otto's, so the thread is never anonymous. The identity is a+ * passive label; the expert's integrations live in the top-right controls.+ * In the new layout on phones the chip also carries the sidebar button. */export function ThreadHeader({expertIdentity,isResolvingExpertIdentity = false,@@ -54,6 +62,9 @@ export function ThreadHeader({const role = expertIdentity?.role ?? DEFAULT_EXPERT_ROLE;const jobTitle = expertIdentity?.jobTitle;const roleLabel = jobTitle || getExpertRoleLabel(role);+ // Only the new layout mounts the app sidebar.+ const hasSidebar = Boolean(useAppSidebarToggle());+ const hasSidebarButton = floatingControls === "newLayout" && hasSidebar;return (<div data-testid="expert-thread-header" className="relative z-20 h-0">@@ -63,49 +74,59 @@ export function ThreadHeader({floatingControls && floatingControlsClassName[floatingControls],)}>- <TooltipProvider>- <Tooltip>- <TooltipTrigger asChild>- <div- tabIndex={0}- aria-label={- isResolving ? "Loading expert" : `${name} — ${roleLabel}`- }- className="pointer-events-auto flex min-w-0 items-center gap-2 whitespace-nowrap rounded-full border border-zinc-200/70 bg-white/75 py-1 pl-1.5 pr-5 shadow-sm backdrop-blur-md max-lg:shadow-md"- >- <ExpertAvatar- name={name}- avatarUrl={expertIdentity?.avatarUrl ?? null}- color={expertIdentity?.color}- isAutopilot={!expertIdentity && !isResolving}- isLoading={isResolving}- size="md"- />- {isResolving ? (- <Skeleton className="h-3.5 w-16 rounded" />- ) : (- <span className="min-w-0 max-w-[10rem]">- <ExpertIdentityDetails- isOtto={!expertIdentity}- name={name}- role={role}- jobTitle={jobTitle}- size="compact"- />- </span>- )}- </div>- </TooltipTrigger>- {isResolving ? null : (- <TooltipContent- side="bottom"- className="bg-zinc-900 text-zinc-50 outline-none"- >- {roleLabel}- </TooltipContent>- )}- </Tooltip>- </TooltipProvider>+ <div+ className={cn(+ "pointer-events-auto flex min-w-0 items-center gap-1 rounded-full border border-zinc-200/70 bg-white/75 py-1 pl-1.5 pr-5 shadow-sm backdrop-blur-md max-lg:shadow-md",+ hasSidebarButton && "max-md:pl-1",+ )}+ >+ {hasSidebarButton && (+ <AppSidebarTrigger+ className={cn(chipButtonClassName, "md:hidden")}+ />+ )}+ <TooltipProvider>+ <Tooltip>+ <TooltipTrigger asChild>+ <div+ tabIndex={0}+ aria-label={+ isResolving ? "Loading expert" : `${name} — ${roleLabel}`+ }+ className={cn(+ "flex min-w-0 items-center gap-2 whitespace-nowrap rounded-full",+ hasSidebarButton && "max-md:ml-1.5",+ )}+ >+ <ExpertAvatar+ name={name}+ avatarUrl={expertIdentity?.avatarUrl ?? null}+ color={expertIdentity?.color}+ isAutopilot={!expertIdentity && !isResolving}+ isLoading={isResolving}+ size="md"+ />+ {isResolving ? (+ <Skeleton className="h-3.5 w-16 rounded" />+ ) : (+ <span className="min-w-0 max-w-[10rem]">+ <ExpertIdentityDetails+ isOtto={!expertIdentity}+ name={name}+ role={role}+ jobTitle={jobTitle}+ size="compact"+ />+ </span>+ )}+ </div>+ </TooltipTrigger>+ {isResolving ? null : (+ <TooltipContent side="bottom">{roleLabel}</TooltipContent>+ )}+ </Tooltip>+ </TooltipProvider>+ </div></div></div>);diff --git a/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatMessagesContainer/components/UserMessageClamp.tsx b/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatMessagesContainer/components/UserMessageClamp.tsxindex 2a79f5b5db..7fb9e9d138 100644--- a/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatMessagesContainer/components/UserMessageClamp.tsx+++ b/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatMessagesContainer/components/UserMessageClamp.tsx@@ -28,7 +28,7 @@ export function UserMessageClamp({ children, trailing }: Props) {{showToggle && (<buttontype="button"- className="text-xs font-medium text-purple-700 hover:underline"+ className="text-xs font-medium text-zinc-300 hover:text-zinc-50 hover:underline"onClick={() => setExpanded(!expanded)}>{expanded ? "Show less" : "Read more"}diff --git a/autogpt_platform/frontend/src/app/(platform)/copilot/components/ContextPanel/ContextPanel.tsx b/autogpt_platform/frontend/src/app/(platform)/copilot/components/ContextPanel/ContextPanel.tsxindex 868241c4a3..f5ea32ffa2 100644--- a/autogpt_platform/frontend/src/app/(platform)/copilot/components/ContextPanel/ContextPanel.tsx+++ b/autogpt_platform/frontend/src/app/(platform)/copilot/components/ContextPanel/ContextPanel.tsx@@ -48,8 +48,17 @@ export function ContextPanel({ sessionId, mobile }: Props) {const [isResizing, setIsResizing] = useState(false);const shouldReduceMotion = useReducedMotion();+ // The mobile sheet titles itself in its header; the artifacts library+ // brings its own toolbar.+ const showTitle = !mobile && activeTab !== "artifacts";+const content = (<div className="flex min-h-0 flex-1 flex-col">+ {showTitle && (+ <h2 className="shrink-0 px-6 pb-1 pt-6 text-base font-semibold text-zinc-900">+ {TAB_TITLES[activeTab]}+ </h2>+ )}{activeTab === "artifacts" ? (<ArtifactsTab sessionId={sessionId} />) : (@@ -74,8 +83,8 @@ export function ContextPanel({ sessionId, mobile }: Props) {side="right"className="flex w-full flex-col p-0 sm:max-w-full">- <SheetHeader className="mt-12 p-2 text-left">- <SheetTitle className="text-sm font-medium text-zinc-900">+ <SheetHeader className="mt-12 px-6 pb-1 pt-2 text-left">+ <SheetTitle className="text-lg font-semibold text-zinc-900">{TAB_TITLES[activeTab]}</SheetTitle></SheetHeader>@@ -87,8 +96,7 @@ export function ContextPanel({ sessionId, mobile }: Props) {// Width is the animated property because the panel pushes the chat column// rather than overlaying it. Dragging the handle bypasses the tween (a- // queued 300ms tween per pointer move would trail the cursor). The chat's- // sidebar icon toggles the panel, so it carries no header of its own.+ // queued 300ms tween per pointer move would trail the cursor).const transition =shouldReduceMotion || isResizing? { duration: 0 }diff --git a/autogpt_platform/frontend/src/app/(platform)/copilot/components/ContextPanel/ContextPanelToggle.tsx b/autogpt_platform/frontend/src/app/(platform)/copilot/components/ContextPanel/ContextPanelToggle.tsxindex 25e36d6090..824e147cee 100644--- a/autogpt_platform/frontend/src/app/(platform)/copilot/components/ContextPanel/ContextPanelToggle.tsx+++ b/autogpt_platform/frontend/src/app/(platform)/copilot/components/ContextPanel/ContextPanelToggle.tsx@@ -1,6 +1,11 @@"use client";import { Button } from "@/components/ui/button";+import {+ Tooltip,+ TooltipContent,+ TooltipTrigger,+} from "@/components/ui/tooltip";import { cn } from "@/lib/utils";import { useCopilotUIStore, type ContextPanelExpert } from "../../store";import { ComputerIcon, LicenseDraftIcon } from "@hugeicons/core-free-icons";@@ -13,19 +18,26 @@ interface Props {sessionId?: string | null;/** The chat's live expert, whose integrations lead the controls. */expert?: ContextPanelExpert | null;+ /** The composer's tab shows the integrations on mobile instead (new+ * layout, see ComposerPanelTab). */+ hideIntegrationsOnMobile?: boolean;}// Sized and stroked like the sidebar's nav icons so the chat's top-right// controls read as the same family.const toggleClass =- "shrink-0 rounded-md transition-[background-color,transform] duration-150 ease-out hover:bg-zinc-100 active:scale-[0.97] motion-reduce:transition-none";+ "shrink-0 rounded-full transition-[background-color,transform] duration-150 ease-out hover:bg-zinc-100 active:scale-[0.97] motion-reduce:transition-none";-/** The chat's top-right controls: the expert's integrations, the Computer- * toggle and the files toggle, each opening its face of the side panel. The+/** The chat's top-right controls: the expert's integrations, the files+ * toggle and the Computer toggle, each opening its face of the side panel. The* Computer toggle is always there for a chat with a session: the panel's* own "Turn on screen" button lives on that face, so it must be reachable* before any desktop exists. */-export function ContextPanelToggle({ sessionId = null, expert = null }: Props) {+export function ContextPanelToggle({+ sessionId = null,+ expert = null,+ hideIntegrationsOnMobile = false,+}: Props) {const { deliverables, documentCount: liveDocumentCount } =useSessionFiles(sessionId);const documentCount = Math.max(deliverables.length, liveDocumentCount);@@ -42,7 +54,6 @@ export function ContextPanelToggle({ sessionId = null, expert = null }: Props) {const isComputerOpen = useCopilotUIStore((s) => s.artifactPanel.isComputerOpen,);- const isPanelOpen = useCopilotUIStore((s) => s.artifactPanel.isOpen);const openComputer = useCopilotUIStore((s) => s.openComputer);const closeComputer = useCopilotUIStore((s) => s.closeComputer);const isMobile = useIsMobile();@@ -50,6 +61,7 @@ export function ContextPanelToggle({ sessionId = null, expert = null }: Props) {// a files button over the chat's top-left corner.const showComputerToggle = !!sessionId && !isMobile;const showFilesToggle = !isMobile;+ const showIntegrations = !!expert && !(isMobile && hideIntegrationsOnMobile);function handleComputerToggle() {// Back to whatever the computer was covering: the preview, the tab, or@@ -58,63 +70,78 @@ export function ContextPanelToggle({ sessionId = null, expert = null }: Props) {else openComputer();}- if (!expert && !showComputerToggle && !showFilesToggle) return null;+ if (!showIntegrations && !showComputerToggle && !showFilesToggle) return null;return (- // With the side panel open the chat column narrows under these controls,- // so they lift off the messages instead of blending into them.- <div- className={cn(- "m-1 flex shrink-0 items-center gap-1 rounded-xl border border-transparent bg-white p-1 transition-shadow duration-150",- isPanelOpen && "border-zinc-200/70 shadow-sm",- )}- >- {expert && <IntegrationsToggle expert={expert} className={toggleClass} />}- {showComputerToggle && (- <Button- type="button"- variant="ghost"- size="icon"- onClick={handleComputerToggle}- aria-label={isComputerOpen ? "Hide computer" : "Open computer"}- aria-pressed={isComputerOpen}- className={cn(toggleClass, "size-8", isComputerOpen && "bg-zinc-100")}- >- <Icon- icon={ComputerIcon}- className="!size-4 text-sidebar-foreground/90"- />- </Button>+ // The same translucent pill as the thread chip on the left (ThreadHeader),+ // level with it and as tall, so the two corners read as one header.+ <div className="mr-4 mt-3 flex shrink-0 items-center gap-1 rounded-full border border-zinc-200/70 bg-white/75 p-1.5 shadow-sm backdrop-blur-md max-lg:shadow-md">+ {showIntegrations && expert && (+ <IntegrationsToggle expert={expert} className={toggleClass} />)}{showFilesToggle && (- <Button- type="button"- variant="ghost"- size="icon"- onClick={() => toggleContextPanelTab("files")}- aria-label={`${isFilesOpen ? "Hide" : "Open"} files${- documentCount > 0- ? ` (${documentCount} ${documentCount === 1 ? "document" : "documents"})`- : ""- }`}- aria-pressed={isFilesOpen}- className={cn(- toggleClass,- "h-8",- documentCount > 0 ? "w-auto gap-1 px-2" : "w-8",- isFilesOpen && "bg-zinc-100",- )}- >- <Icon- icon={LicenseDraftIcon}- className="!size-4 text-sidebar-foreground/90"- />- {documentCount > 0 && (- <span className="text-xs font-medium tabular-nums text-sidebar-foreground/90">- {documentCount}- </span>- )}- </Button>+ <Tooltip>+ <TooltipTrigger asChild>+ <Button+ type="button"+ variant="ghost"+ size="icon"+ onClick={() => toggleContextPanelTab("files")}+ aria-label={`${isFilesOpen ? "Hide" : "Open"} files${+ documentCount > 0+ ? ` (${documentCount} ${documentCount === 1 ? "document" : "documents"})`+ : ""+ }`}+ aria-pressed={isFilesOpen}+ className={cn(+ toggleClass,+ "h-8",+ documentCount > 0 ? "w-auto gap-1 px-2" : "w-8",+ isFilesOpen && "bg-zinc-100",+ )}+ >+ <Icon+ icon={LicenseDraftIcon}+ className="!size-4 text-sidebar-foreground/90"+ />+ {documentCount > 0 && (+ <span className="text-xs font-medium tabular-nums text-sidebar-foreground/90">+ {documentCount}+ </span>+ )}+ </Button>+ </TooltipTrigger>+ <TooltipContent side="bottom">+ {isFilesOpen ? "Hide files" : "Files"}+ </TooltipContent>+ </Tooltip>+ )}+ {showComputerToggle && (+ <Tooltip>+ <TooltipTrigger asChild>+ <Button+ type="button"+ variant="ghost"+ size="icon"+ onClick={handleComputerToggle}+ aria-label={isComputerOpen ? "Hide computer" : "Open computer"}+ aria-pressed={isComputerOpen}+ className={cn(+ toggleClass,+ "size-8",+ isComputerOpen && "bg-zinc-100",+ )}+ >+ <Icon+ icon={ComputerIcon}+ className="!size-4 text-sidebar-foreground/90"+ />+ </Button>+ </TooltipTrigger>+ <TooltipContent side="bottom">+ {isComputerOpen ? "Hide computer" : "Computer"}+ </TooltipContent>+ </Tooltip>)}</div>);diff --git a/autogpt_platform/frontend/src/app/(platform)/copilot/components/ContextPanel/__tests__/ContextPanel.test.tsx b/autogpt_platform/frontend/src/app/(platform)/copilot/components/ContextPanel/__tests__/ContextPanel.test.tsxindex 856a4be8e2..b66528b1a8 100644--- a/autogpt_platform/frontend/src/app/(platform)/copilot/components/ContextPanel/__tests__/ContextPanel.test.tsx+++ b/autogpt_platform/frontend/src/app/(platform)/copilot/components/ContextPanel/__tests__/ContextPanel.test.tsx@@ -52,7 +52,8 @@ describe("ContextPanel", () => {await waitFor(() =>expect(container.querySelector("[data-context-panel]")).not.toBeNull(),);- expect(await screen.findByText("Nothing here yet.")).toBeDefined();+ expect(screen.getByRole("heading", { name: "Files" })).toBeDefined();+ expect(await screen.findByText("No files yet")).toBeDefined();});test("docks for the integrations tab with the expert's integrations", async () => {@@ -63,7 +64,11 @@ describe("ContextPanel", () => {}));render(<ContextPanel sessionId="session-1" />);- expect(await screen.findByText("Maria's Integrations")).toBeDefined();+ expect(screen.getByRole("heading", { name: "Integrations" })).toBeDefined();+ expect(await screen.findByText("No integrations yet")).toBeDefined();+ expect(+ screen.getByRole("button", { name: "Add integration" }),+ ).toBeDefined();expect(screen.getByRole("link", { name: "Open Maria's page" }),).toBeDefined();diff --git a/autogpt_platform/frontend/src/app/(platform)/copilot/components/ContextPanel/components/FilesTab/useSessionFiles.ts b/autogpt_platform/frontend/src/app/(platform)/copilot/components/ContextPanel/components/FilesTab/useSessionFiles.tsindex 45b502bdd2..a58e91081d 100644--- a/autogpt_platform/frontend/src/app/(platform)/copilot/components/ContextPanel/components/FilesTab/useSessionFiles.ts+++ b/autogpt_platform/frontend/src/app/(platform)/copilot/components/ContextPanel/components/FilesTab/useSessionFiles.ts@@ -6,6 +6,7 @@ import {} from "@/app/api/__generated__/endpoints/workspace/workspace";import type { ListFilesResponse } from "@/app/api/__generated__/models/listFilesResponse";import type { WorkspaceFileItem } from "@/app/api/__generated__/models/workspaceFileItem";+import { isHiddenWorkspaceFile } from "@/lib/workspace-files";import { useMemo } from "react";import { useCopilotStreamStore } from "../../../../copilotStreamStore";import { getMessageArtifacts } from "../../../ChatMessagesContainer/helpers";@@ -28,7 +29,12 @@ export function useSessionFiles(sessionId: string | null) {if (!fileIdToMessageId.has(artifact.id)) {fileIdToMessageId.set(artifact.id, message.id);}- if (message.role === "assistant") documentIds.add(artifact.id);+ if (+ message.role === "assistant" &&+ !isHiddenWorkspaceFile({ name: artifact.title })+ ) {+ documentIds.add(artifact.id);+ }}}return { documentCount: documentIds.size, fileIdToMessageId };@@ -49,10 +55,12 @@ export function useSessionFiles(sessionId: string | null) {// so without memoising, scanning every message part (and compiling a// RegExp per matched workspace URI) would run at token cadence.const { uploaded, generated, deliverables, files } = useMemo(() => {- const files: SessionFile[] = (query.data?.files ?? []).map((item) => ({- item,- messageID: fileIdToMessageId.get(item.id) ?? null,- }));+ const files: SessionFile[] = (query.data?.files ?? [])+ .filter((item) => !isHiddenWorkspaceFile(item))+ .map((item) => ({+ item,+ messageID: fileIdToMessageId.get(item.id) ?? null,+ }));return {files,diff --git a/autogpt_platform/frontend/src/app/(platform)/copilot/components/ContextPanel/components/IntegrationsTab/IntegrationsTab.tsx b/autogpt_platform/frontend/src/app/(platform)/copilot/components/ContextPanel/components/IntegrationsTab/IntegrationsTab.tsxindex 61282f7e15..b62b5a9f2f 100644--- a/autogpt_platform/frontend/src/app/(platform)/copilot/components/ContextPanel/components/IntegrationsTab/IntegrationsTab.tsx+++ b/autogpt_platform/frontend/src/app/(platform)/copilot/components/ContextPanel/components/IntegrationsTab/IntegrationsTab.tsx@@ -1,28 +1,279 @@"use client";import Link from "next/link";-import { ExpertIntegrationsSection } from "@/app/(platform)/team/[expertId]/components/ExpertIntegrationsSection/ExpertIntegrationsSection";-import { useCopilotUIStore } from "../../../../store";+import {+ ArrowRight01Icon,+ Delete02Icon,+ Loading03Icon,+ PlugSocketIcon,+ PlusSignIcon,+ Share01Icon,+} from "@hugeicons/core-free-icons";+import type { ExpertCredentialRef } from "@/app/api/__generated__/models/expertCredentialRef";+import { ExpertConnectServiceDialog } from "@/app/(platform)/team/[expertId]/components/ExpertIntegrationsSection/ExpertConnectServiceDialog";+import {+ groupExpertIntegrations,+ TYPE_LABELS,+} from "@/app/(platform)/team/[expertId]/components/ExpertIntegrationsSection/ExpertIntegrationGroups";+import { UseExistingCredentialsDialog } from "@/app/(platform)/team/[expertId]/components/ExpertIntegrationsSection/UseExistingCredentialsDialog";+import { useExpertIntegrationsSection } from "@/app/(platform)/team/[expertId]/components/ExpertIntegrationsSection/useExpertIntegrationsSection";+import { Button } from "@/components/atoms/Button/Button";+import { Icon } from "@/components/atoms/Icon/Icon";+import { Skeleton } from "@/components/atoms/Skeleton/Skeleton";+import { Text } from "@/components/atoms/Text/Text";+import { formatCredentialName } from "@/components/contextual/IntegrationsPanel/helpers";+import { ErrorCard } from "@/components/molecules/ErrorCard/ErrorCard";+import { IntegrationLogo } from "@/components/molecules/IntegrationLogo/IntegrationLogo";+import { cn } from "@/lib/utils";+import { useCopilotUIStore, type ContextPanelExpert } from "../../../../store";+import { StackSection } from "../../../WorkspaceFileCards/components/StackSection";+import { PanelEmptyState } from "../PanelEmptyState/PanelEmptyState";-/** The chat's expert's integrations, with the same add / use existing /- * remove actions as the Integrations tab on the expert's page. */+/** The chat's expert's integrations, laid out like the files tab: a titled+ * card of rows, or an empty state that offers the first connection. Same+ * add / use existing / remove actions as the expert's page. */export function IntegrationsTab() {const expert = useCopilotUIStore((s) => s.contextPanelExpert);if (!expert) return null;+ return <IntegrationsTabContent expert={expert} />;+}++function IntegrationsTabContent({ expert }: { expert: ContextPanelExpert }) {+ const {+ granted,+ grantable,+ isConnecting,+ isUsingExisting,+ openUseExisting,+ closeUseExisting,+ openConnect,+ closeConnect,+ connectCredential,+ grantExistingCredential,+ removeIntegration,+ isGranting,+ isRevoking,+ isLoading,+ isError,+ isGrantableError,+ refetch,+ } = useExpertIntegrationsSection(expert.id);+ const groups = groupExpertIntegrations(granted);+ const canUseExisting = grantable.length > 0 && !isError && !isGrantableError;+return (- <div className="flex flex-col gap-3">- <ExpertIntegrationsSection- expertId={expert.id}+ <div className="flex flex-col gap-6">+ {isGrantableError && !isError ? (+ <div className="flex items-center justify-between gap-3 rounded-xl bg-amber-50 px-3 py-2 ring-1 ring-inset ring-amber-200">+ <Text variant="small" className="!text-amber-800">+ Couldn't load your connected services, so “Use+ existing” is unavailable.+ </Text>+ <Button+ variant="secondary"+ size="small"+ onClick={() => void refetch()}+ >+ Retry+ </Button>+ </div>+ ) : null}+ {isLoading ? (+ <Skeleton className="h-24 w-full rounded-lg" />+ ) : isError ? (+ <ErrorCard+ context="this expert's integrations"+ hint="We could not load what this expert can reach."+ onRetry={refetch}+ />+ ) : groups.length === 0 ? (+ <PanelEmptyState+ tiles={[+ <IntegrationLogo key="slack" provider="slack" size={24} />,+ <IntegrationLogo key="notion" provider="notion" size={24} />,+ <IntegrationLogo key="google" provider="google" size={24} />,+ ]}+ title="No integrations yet"+ description={`Connect a tool and ${expert.name} can use it on your behalf.`}+ footer={<ExpertPageLink expert={expert} className="justify-center" />}+ >+ <Button+ variant="primary"+ size="small"+ leadingIcon={PlusSignIcon}+ onClick={openConnect}+ >+ Add integration+ </Button>+ {canUseExisting && (+ <Button+ variant="secondary"+ size="small"+ leadingIcon={Share01Icon}+ onClick={openUseExisting}+ >+ Use existing+ </Button>+ )}+ </PanelEmptyState>+ ) : (+ <StackSection+ title={`${expert.name}'s integrations`}+ icon={PlugSocketIcon}+ count={granted.length}+ action={+ <>+ {canUseExisting && (+ <Button+ variant="ghost"+ size="icon"+ onClick={openUseExisting}+ aria-label="Use existing"+ className="size-6 rounded-lg !p-0 text-zinc-400"+ >+ <Icon icon={Share01Icon} size={14} />+ </Button>+ )}+ <Button+ variant="ghost"+ size="icon"+ onClick={openConnect}+ aria-label="Add integration"+ className="size-6 rounded-lg !p-0 text-zinc-400"+ >+ <Icon icon={PlusSignIcon} size={14} />+ </Button>+ </>+ }+ >+ <div className="-mx-3 grid divide-y divide-zinc-200/70">+ {groups.flatMap((group) =>+ group.integrations.map((integration) => (+ <IntegrationRow+ key={integration.credential_id}+ serviceName={group.name}+ icon={group.icon}+ integration={integration}+ isRemoving={isRevoking}+ onRemove={() => removeIntegration(integration.credential_id)}+ />+ )),+ )}+ </div>+ <div className="-mx-3 border-t border-zinc-200/70 px-3">+ <ExpertPageLink expert={expert} className="justify-between py-2" />+ </div>+ </StackSection>+ )}++ <UseExistingCredentialsDialog+ open={isUsingExisting}+ expertName={expert.name}+ credentials={grantable}+ isGranting={isGranting}+ onUse={(credentialId) => {+ grantExistingCredential(credentialId);+ closeUseExisting();+ }}+ onClose={closeUseExisting}+ />+ <ExpertConnectServiceDialog+ open={isConnecting}expertName={expert.name}- compact+ onClose={closeConnect}+ onConnected={(credential) => {+ connectCredential(credential);+ closeConnect();+ }}+ />+ </div>+ );+}++interface ExpertPageLinkProps {+ expert: ContextPanelExpert;+ className?: string;+}++function ExpertPageLink({ expert, className }: ExpertPageLinkProps) {+ return (+ <Link+ href={`/team/${expert.id}`}+ className={cn(+ "flex items-center gap-1 text-[13px] font-medium text-zinc-700 transition-colors hover:text-zinc-950",+ className,+ )}+ >+ Open {expert.name}'s page+ <Icon icon={ArrowRight01Icon} size={14} aria-hidden />+ </Link>+ );+}++interface RowProps {+ serviceName: string;+ icon: string;+ integration: ExpertCredentialRef;+ isRemoving: boolean;+ onRemove: () => void;+}++/** A files-tab style row: logo tile, service and account, and a remove action+ * that fades in on hover (always shown where there is no hover). */+function IntegrationRow({+ serviceName,+ icon,+ integration,+ isRemoving,+ onRemove,+}: RowProps) {+ const name = formatCredentialName(integration.title, integration.provider);++ return (+ <div+ className="group flex items-center gap-3 px-3 py-2 transition-colors hover:bg-zinc-100/70"+ data-testid="expert-integration-row"+ >+ <span className="flex size-10 shrink-0 items-center justify-center rounded-xl border border-zinc-200 bg-white">+ <IntegrationLogo+ provider={icon}+ alt={`${serviceName} logo`}+ size={20}+ />+ </span>+ <span className="flex min-w-0 flex-1 flex-col">+ <Text+ variant="body-medium"+ as="span"+ className="truncate text-zinc-900"+ >+ {serviceName}+ </Text>+ <Text variant="small" as="span" className="truncate text-zinc-500">+ {name} · {TYPE_LABELS[integration.type] ?? integration.type}+ </Text>+ </span>+ <span+ aria-hidden+ title="Ready"+ className="size-1.5 shrink-0 rounded-full bg-emerald-500"/>- <Link- href={`/team/${expert.id}`}- className="px-1 text-xs text-zinc-500 underline hover:text-zinc-800"+ <Button+ variant="ghost"+ size="icon"+ onClick={onRemove}+ disabled={isRemoving}+ aria-busy={isRemoving}+ aria-label={`Remove ${name}`}+ className="size-7 shrink-0 rounded-lg !p-0 text-zinc-500 opacity-0 transition-opacity group-hover:opacity-100 hover:text-red-500 focus-visible:opacity-100 [@media(hover:none)]:opacity-100">- Open {expert.name}'s page- </Link>+ <Icon+ icon={isRemoving ? Loading03Icon : Delete02Icon}+ size={14}+ className={isRemoving ? "animate-spin" : undefined}+ />+ </Button></div>);}diff --git a/autogpt_platform/frontend/src/app/(platform)/copilot/components/ContextPanel/components/IntegrationsToggle/IntegrationsToggle.tsx b/autogpt_platform/frontend/src/app/(platform)/copilot/components/ContextPanel/components/IntegrationsToggle/IntegrationsToggle.tsxindex 31ffa3aa0d..7a2d90bd2b 100644--- a/autogpt_platform/frontend/src/app/(platform)/copilot/components/ContextPanel/components/IntegrationsToggle/IntegrationsToggle.tsx+++ b/autogpt_platform/frontend/src/app/(platform)/copilot/components/ContextPanel/components/IntegrationsToggle/IntegrationsToggle.tsx@@ -19,13 +19,16 @@ const VISIBLE_LOGOS = 2;interface Props {expert: ContextPanelExpert;className?: string;+ /** `lg` matches the mobile thread chip's buttons. */+ size?: "md" | "lg";}/** The services the chat's expert can reach, as a stack of logos: the first* two name themselves on hover and "+N" names the rest. With none yet, a* plug icon stands in so the panel's add actions stay one click away.* Clicking opens the integrations tab of the side panel. */-export function IntegrationsToggle({ expert, className }: Props) {+export function IntegrationsToggle({ expert, className, size = "md" }: Props) {+ const isLarge = size === "lg";const { integrations } = useExpertIntegrations(expert.id);const toggleIntegrationsPanel = useCopilotUIStore((s) => s.toggleIntegrationsPanel,@@ -42,25 +45,36 @@ export function IntegrationsToggle({ expert, className }: Props) {if (services.length === 0) {return (- <button- type="button"- onClick={() => toggleIntegrationsPanel(expert)}- aria-label={- isActive ? "Hide integrations" : `${expert.name}'s integrations`- }- aria-pressed={isActive}- data-testid="expert-integrations-empty"- className={cn(- className,- "flex size-8 items-center justify-center",- isActive && "bg-zinc-100",- )}- >- <Icon- icon={PlugSocketIcon}- className="!size-4 text-sidebar-foreground/90"- />- </button>+ <Tooltip>+ <TooltipTrigger asChild>+ <button+ type="button"+ onClick={() => toggleIntegrationsPanel(expert)}+ aria-label={+ isActive ? "Hide integrations" : `${expert.name}'s integrations`+ }+ aria-pressed={isActive}+ data-testid="expert-integrations-empty"+ className={cn(+ className,+ "flex items-center justify-center",+ isLarge ? "size-9" : "size-8",+ isActive && "bg-zinc-100",+ )}+ >+ <Icon+ icon={PlugSocketIcon}+ className={cn(+ "text-sidebar-foreground/90",+ isLarge ? "!size-5" : "!size-4",+ )}+ />+ </button>+ </TooltipTrigger>+ <TooltipContent side="bottom">+ {isActive ? "Hide integrations" : "Integrations"}+ </TooltipContent>+ </Tooltip>);}@@ -83,7 +97,8 @@ export function IntegrationsToggle({ expert, className }: Props) {data-testid="expert-integrations"className={cn(className,- "flex h-8 items-center gap-1.5 px-1.5",+ "flex items-center gap-1.5 px-1.5",+ isLarge ? "h-9 w-auto" : "h-8",isActive && "bg-zinc-100",)}>@@ -91,11 +106,16 @@ export function IntegrationsToggle({ expert, className }: Props) {{shown.map((service) => (<Tooltip key={service.id}><TooltipTrigger asChild>- <span className="flex size-6 items-center justify-center rounded-full bg-white ring-2 ring-white smooth-shadow-ring-sm">+ <span+ className={cn(+ "flex items-center justify-center rounded-full bg-white ring-2 ring-white smooth-shadow-ring-sm",+ isLarge ? "size-7" : "size-6",+ )}+ ><IntegrationLogoprovider={service.icon}alt={service.name}- size={14}+ size={isLarge ? 18 : 14}/></span></TooltipTrigger>diff --git a/autogpt_platform/frontend/src/app/(platform)/copilot/components/ContextPanel/components/PanelEmptyState/PanelEmptyState.tsx b/autogpt_platform/frontend/src/app/(platform)/copilot/components/ContextPanel/components/PanelEmptyState/PanelEmptyState.tsxnew file mode 100644index 0000000000..6ffba30700--- /dev/null+++ b/autogpt_platform/frontend/src/app/(platform)/copilot/components/ContextPanel/components/PanelEmptyState/PanelEmptyState.tsx@@ -0,0 +1,61 @@+"use client";++import type { ReactNode } from "react";+import { Text } from "@/components/atoms/Text/Text";+import { cn } from "@/lib/utils";++interface Props {+ /** Left, right and centre tile, in that order. */+ tiles: [ReactNode, ReactNode, ReactNode];+ title: string;+ description: ReactNode;+ children?: ReactNode;+ /** A quieter line under the actions, e.g. a link elsewhere. */+ footer?: ReactNode;+}++const TILE_POSITIONS = [+ "left-2 top-3 -rotate-12 group-hover:-translate-x-1.5 group-hover:-rotate-[16deg]",+ "right-2 top-3 rotate-12 group-hover:translate-x-1.5 group-hover:rotate-[16deg]",+ "left-1/2 top-0 z-10 -translate-x-1/2 group-hover:-translate-y-1",+];++/** The side panel's empty state: three white tiles, the outer two tilted out+ * (they spread further on hover), over a title and a line of copy. */+export function PanelEmptyState({+ tiles,+ title,+ description,+ children,+ footer,+}: Props) {+ return (+ <div className="group flex flex-col items-center px-6 pb-8 pt-10 text-center">+ <div aria-hidden className="relative mb-7 h-24 w-36">+ {tiles.map((tile, index) => (+ <div+ key={index}+ className={cn(+ "absolute flex h-20 w-16 items-center justify-center rounded-xl bg-white transition-transform duration-300 ease-out smooth-shadow-ring-sm motion-reduce:transition-none",+ TILE_POSITIONS[index],+ )}+ >+ {tile}+ </div>+ ))}+ </div>+ <Text variant="large-medium" className="!text-zinc-900">+ {title}+ </Text>+ <Text variant="body" className="mt-1.5 max-w-[17rem] !text-zinc-500">+ {description}+ </Text>+ {children && (+ <div className="mt-5 flex flex-wrap items-center justify-center gap-2">+ {children}+ </div>+ )}+ {footer && <div className="mt-4">{footer}</div>}+ </div>+ );+}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 2f22242a7a..25c93b9faa 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@@ -180,11 +180,10 @@ export function EmptySession({? getExpertInputPlaceholder(selectedExpert.name): inputPlaceholder}- className={- isBrainDumpEnabled- ? "w-full [&_textarea]:min-h-[4.5rem]"- : "w-full"- }+ className={cn(+ "w-full max-md:[&_[data-slot=input-group-control]]:min-h-16",+ isBrainDumpEnabled && "[&_textarea]:min-h-[4.5rem]",+ )}droppedFiles={droppedFiles}onDroppedFilesConsumed={onDroppedFilesConsumed}expertId={expertId}diff --git a/autogpt_platform/frontend/src/app/(platform)/copilot/components/EmptySession/components/EmptyHero.tsx b/autogpt_platform/frontend/src/app/(platform)/copilot/components/EmptySession/components/EmptyHero.tsxindex 7be3b97beb..c3674782c3 100644--- a/autogpt_platform/frontend/src/app/(platform)/copilot/components/EmptySession/components/EmptyHero.tsx+++ b/autogpt_platform/frontend/src/app/(platform)/copilot/components/EmptySession/components/EmptyHero.tsx@@ -28,7 +28,7 @@ export function EmptyHero({}: Props) {return (<>- <div className="mb-1 flex items-center justify-center gap-3">+ <div className="mb-1 flex items-center justify-center gap-3 pt-8 md:pt-0"><Text variant="h4" tone="primary">Hey, <span className="text-zinc-900">{name}</span><EditNameDialog currentName={name} />diff --git a/autogpt_platform/frontend/src/app/(platform)/copilot/components/ExpertOnboardingCard/ExpertOnboardingCard.tsx b/autogpt_platform/frontend/src/app/(platform)/copilot/components/ExpertOnboardingCard/ExpertOnboardingCard.tsxindex 5c4981d555..a989828bf7 100644--- a/autogpt_platform/frontend/src/app/(platform)/copilot/components/ExpertOnboardingCard/ExpertOnboardingCard.tsx+++ b/autogpt_platform/frontend/src/app/(platform)/copilot/components/ExpertOnboardingCard/ExpertOnboardingCard.tsx@@ -12,7 +12,6 @@ import type { ToolUIPart } from "ai";import { domAnimation, LazyMotion, m } from "framer-motion";import { useContext, useId } from "react";import { useExpertMap } from "../../useExpertMap";-import { ExpertAvatar } from "../ChatMessagesContainer/components/ExpertAvatar/ExpertAvatar";import { MorphingTextAnimation } from "../MorphingTextAnimation/MorphingTextAnimation";import { OnboardingChoices } from "./components/OnboardingChoices/OnboardingChoices";import { parseExpertOnboarding, type ExpertOnboardingOutput } from "./helpers";@@ -109,7 +108,7 @@ function OnboardingForm({ callId, onboarding, isLive }: FormProps) {const total = onboarding.steps.length;return (- <div className="w-full max-w-xl overflow-hidden rounded-3xl border border-zinc-100 bg-white shadow-[0_16px_40px_-24px_rgba(0,0,0,0.25)]">+ <div className="w-full max-w-xl overflow-hidden rounded-lg border border-zinc-200 bg-white shadow-[0_16px_40px_-24px_rgba(0,0,0,0.25)]"><divrole="progressbar"aria-label="Setup progress"@@ -125,33 +124,8 @@ function OnboardingForm({ callId, onboarding, isLive }: FormProps) {/></div>- <div className="flex items-start justify-between gap-3 px-5 pt-4">- <span className="flex min-w-0 items-center gap-3">- <ExpertAvatar name={name} avatarUrl={expert?.avatarUrl ?? null} />- <span className="flex min-w-0 flex-col">- <span className="truncate text-sm font-medium text-zinc-900">- {name}- </span>- {onboarding.greeting && (- <span className="line-clamp-2 text-xs text-zinc-500">- {onboarding.greeting}- </span>- )}- </span>- </span>- <button- type="button"- onClick={skip}- disabled={isSending}- className="shrink-0 rounded-full px-2 py-0.5 text-xs text-zinc-400 transition-colors enabled:hover:bg-zinc-100 enabled:hover:text-zinc-600 disabled:opacity-50"- >- Skip- </button>- </div>-{/* Wraps only the pager, not the whole card: ``strict`` rejects any- ``motion`` component below it, and the header's ExpertAvatar- animates its face with the full ``motion`` build. */}+ ``motion`` component below it. */}<LazyMotion features={domAnimation} strict><m.divkey={currentStep.keyword}@@ -189,25 +163,35 @@ function OnboardingForm({ callId, onboarding, isLive }: FormProps) {aria-label="Previous question"disabled={current === 0}onClick={goBack}- className="flex size-8 items-center justify-center rounded-full text-zinc-400 transition-colors enabled:hover:bg-zinc-100 enabled:hover:text-zinc-600 disabled:invisible"+ className="flex size-8 items-center justify-center rounded-md text-zinc-400 transition-colors enabled:hover:bg-zinc-100 enabled:hover:text-zinc-600 disabled:invisible"><Icon icon={ArrowLeft01Icon} size={16} /></button>- <button- type="button"- aria-label={isLast ? "Send answers" : "Next question"}- disabled={!isAnswered || isSending}- onClick={advance}- className={cn(- "flex h-8 items-center gap-1.5 rounded-full px-4 text-sm font-medium transition-all duration-200 enabled:active:scale-95",- isAnswered && !isSending- ? "bg-zinc-900 text-white hover:bg-zinc-800"- : "bg-zinc-100 text-zinc-400",- )}- >- {isLast ? "Send" : "Next"}- <Icon icon={isLast ? SentIcon : ArrowRight01Icon} size={14} />- </button>+ <div className="flex items-center gap-2">+ <button+ type="button"+ onClick={skip}+ disabled={isSending}+ className="flex h-8 items-center rounded-md border border-zinc-200 bg-white px-3.5 text-sm font-medium text-zinc-700 transition-colors enabled:hover:border-zinc-300 enabled:hover:bg-zinc-50 disabled:opacity-50"+ >+ Skip questions+ </button>+ <button+ type="button"+ aria-label={isLast ? "Send answers" : "Next question"}+ disabled={!isAnswered || isSending}+ onClick={advance}+ className={cn(+ "flex h-8 items-center gap-1.5 rounded-md px-4 text-sm font-medium transition-all duration-200 enabled:active:scale-95",+ isAnswered && !isSending+ ? "bg-zinc-900 text-white hover:bg-zinc-800"+ : "bg-zinc-100 text-zinc-400",+ )}+ >+ {isLast ? "Send" : "Next"}+ <Icon icon={isLast ? SentIcon : ArrowRight01Icon} size={14} />+ </button>+ </div></div></div>);diff --git a/autogpt_platform/frontend/src/app/(platform)/copilot/components/ExpertOnboardingCard/NewChatOnboarding.tsx b/autogpt_platform/frontend/src/app/(platform)/copilot/components/ExpertOnboardingCard/NewChatOnboarding.tsxindex f060d62cf9..dfc28a3135 100644--- a/autogpt_platform/frontend/src/app/(platform)/copilot/components/ExpertOnboardingCard/NewChatOnboarding.tsx+++ b/autogpt_platform/frontend/src/app/(platform)/copilot/components/ExpertOnboardingCard/NewChatOnboarding.tsx@@ -1,6 +1,7 @@"use client";import { useGetExpertOnboarding } from "@/app/api/__generated__/endpoints/experts/experts";+import { AppSidebarTrigger } from "@/components/layout/AppSidebar/components/AppSidebarTrigger/AppSidebarTrigger";import type { ReactNode } from "react";import { ExpertOnboardingCard } from "./ExpertOnboardingCard";import { PendingOnboardingContext } from "./PendingOnboardingContext";@@ -36,7 +37,10 @@ export function NewChatOnboarding({const callId = `pending-onboarding-${expertId}`;return (- <div className="mx-auto min-h-0 w-full max-w-3xl flex-1 overflow-y-auto px-3 py-6 text-left">+ <div className="mx-auto min-h-0 w-full max-w-3xl flex-1 overflow-y-auto px-3 py-6 text-left max-md:pt-20">+ {/* The card stands in for the thread, whose header carries the phone's+ sidebar button, so it brings its own. */}+ <AppSidebarTrigger className="absolute left-4 top-5 z-20 rounded-full border border-[#DADADC] bg-white shadow-md hover:bg-[#F5F5F6] md:hidden" /><PendingOnboardingContext.Provider value={callId}><ExpertOnboardingCardkey={callId}diff --git a/autogpt_platform/frontend/src/app/(platform)/copilot/components/ExpertOnboardingCard/__tests__/ExpertOnboardingCard.test.tsx b/autogpt_platform/frontend/src/app/(platform)/copilot/components/ExpertOnboardingCard/__tests__/ExpertOnboardingCard.test.tsxindex 8593f1566c..18d5585c06 100644--- a/autogpt_platform/frontend/src/app/(platform)/copilot/components/ExpertOnboardingCard/__tests__/ExpertOnboardingCard.test.tsx+++ b/autogpt_platform/frontend/src/app/(platform)/copilot/components/ExpertOnboardingCard/__tests__/ExpertOnboardingCard.test.tsx@@ -118,14 +118,13 @@ async function answerFirstStep() {}describe("ExpertOnboardingCard", () => {- it("greets the user under the expert's name, without the role line", () => {+ it("leaves the expert's name and greeting to the thread header", () => {renderCard(onboardingPart());- expect(screen.getByText("Ada")).toBeDefined();- expect(screen.queryByText("Social & Content Repurposing")).toBeNull();+ expect(screen.queryByText("Ada")).toBeNull();expect(- screen.getByText("Hi, I'm Ada — good to be working with you."),- ).toBeDefined();+ screen.queryByText("Hi, I'm Ada — good to be working with you."),+ ).toBeNull();});it("shows one question at a time with lettered options and Other", () => {@@ -228,7 +227,7 @@ describe("ExpertOnboardingCard", () => {it("skips the whole card without answering", () => {const { onSend } = renderCard(onboardingPart());- fireEvent.click(screen.getByRole("button", { name: "Skip" }));+ fireEvent.click(screen.getByRole("button", { name: "Skip questions" }));expect(onSend).toHaveBeenCalledWith("Let's skip the setup questions for now.",@@ -239,7 +238,7 @@ describe("ExpertOnboardingCard", () => {renderCard(onboardingPart(), null);expect(screen.queryByRole("radio")).toBeNull();- expect(screen.queryByRole("button", { name: "Skip" })).toBeNull();+ expect(screen.queryByRole("button", { name: "Skip questions" })).toBeNull();expect(screen.getByText(/Setup questions from/)).toBeDefined();});diff --git a/autogpt_platform/frontend/src/app/(platform)/copilot/components/ExpertOnboardingCard/components/OnboardingChoices/OnboardingChoices.tsx b/autogpt_platform/frontend/src/app/(platform)/copilot/components/ExpertOnboardingCard/components/OnboardingChoices/OnboardingChoices.tsxindex 3f76ac71a3..d1403f3890 100644--- a/autogpt_platform/frontend/src/app/(platform)/copilot/components/ExpertOnboardingCard/components/OnboardingChoices/OnboardingChoices.tsx+++ b/autogpt_platform/frontend/src/app/(platform)/copilot/components/ExpertOnboardingCard/components/OnboardingChoices/OnboardingChoices.tsx@@ -65,7 +65,7 @@ export function OnboardingChoices({onClick={() => choose(option)}onKeyDown={(event) => handleOptionKeyDown(event, index)}className={cn(- "flex w-full items-center gap-3 rounded-xl px-3 py-2.5 text-left text-[15px] leading-snug transition-colors",+ "flex w-full items-center gap-3 rounded-md px-3 py-2.5 text-left text-[15px] leading-snug transition-colors",isSelected? "bg-zinc-900 text-white": "bg-zinc-50 text-zinc-800 ring-1 ring-zinc-100 hover:bg-zinc-100",@@ -92,14 +92,14 @@ export function OnboardingChoices({onChange={(event) => onChange(event.target.value)}onKeyDown={handleTextKeyDown}placeholder="Type your answer"- className="resize-none rounded-xl bg-zinc-50 px-4 py-3 text-[15px] leading-relaxed text-zinc-800 ring-1 ring-zinc-200 transition-shadow placeholder:text-zinc-400 focus:outline-none focus:ring-zinc-400"+ className="resize-none rounded-md bg-zinc-50 px-4 py-3 text-[15px] leading-relaxed text-zinc-800 ring-1 ring-zinc-200 transition-shadow placeholder:text-zinc-400 focus:outline-none focus:ring-zinc-400"/>) : (<buttontype="button"onClick={startTyping}onKeyDown={handleLetterKey}- className="flex w-full items-center gap-3 rounded-xl border border-dashed border-zinc-200 px-3 py-2.5 text-left text-[15px] text-zinc-500 transition-colors hover:bg-zinc-50 hover:text-zinc-700"+ className="flex w-full items-center gap-3 rounded-md border border-dashed border-zinc-200 px-3 py-2.5 text-left text-[15px] text-zinc-500 transition-colors hover:bg-zinc-50 hover:text-zinc-700"><LetterBadge index={options.length} isSelected={false} />Otherdiff --git a/autogpt_platform/frontend/src/app/(platform)/copilot/components/TokenDevtoolBadge/TokenDevtoolBadge.tsx b/autogpt_platform/frontend/src/app/(platform)/copilot/components/TokenDevtoolBadge/TokenDevtoolBadge.tsxindex 9e070162a0..3dda2c3e9c 100644--- a/autogpt_platform/frontend/src/app/(platform)/copilot/components/TokenDevtoolBadge/TokenDevtoolBadge.tsx+++ b/autogpt_platform/frontend/src/app/(platform)/copilot/components/TokenDevtoolBadge/TokenDevtoolBadge.tsx@@ -3,6 +3,7 @@import { Icon } from "@/components/atoms/Icon/Icon";import {Popover,+ PopoverAnchor,PopoverContent,PopoverTrigger,} from "@/components/molecules/Popover/Popover";@@ -26,6 +27,11 @@ interface Props {/** Alignment is the tray's concern — the badge renders into two* structurally different parents. */className?: string;+ /** Opened from the composer's + menu: no button of its own, the popover+ * anchors to its parent box instead. */+ anchorOnly?: boolean;+ open?: boolean;+ onOpenChange?: (open: boolean) => void;}/** Dev-only context readout in the composer tray. The bar tracks the@@ -34,7 +40,13 @@ interface Props {* to summarize. The popover splits the estimate by source and lists* per-turn usage; ⟲ marks a turn where the stream carried a* `context_compaction` tool call. */-export function TokenDevtoolBadge({ sessionId, className }: Props) {+export function TokenDevtoolBadge({+ sessionId,+ className,+ anchorOnly = false,+ open: controlledOpen,+ onOpenChange,+}: Props) {const turns = useTokenDevtoolStore((s) => s.turnsBySession[sessionId]);const breakdown = useTokenDevtoolStore((s) => s.breakdownBySession[sessionId],@@ -45,7 +57,9 @@ export function TokenDevtoolBadge({ sessionId, className }: Props) {const compacted = useTokenDevtoolStore((s) => s.compactedBySession[sessionId] ?? false,);- const [open, setOpen] = useState(false);+ const [uncontrolledOpen, setUncontrolledOpen] = useState(false);+ const open = controlledOpen ?? uncontrolledOpen;+ const setOpen = onOpenChange ?? setUncontrolledOpen;const seed = breakdown ? breakdownTotal(breakdown) : undefined;const context = displayContext(liveContext ?? null, compacted, seed);// The rows describe the loaded-history seed, so showing them next to a@@ -55,27 +69,33 @@ export function TokenDevtoolBadge({ sessionId, className }: Props) {return (<Popover open={open} onOpenChange={setOpen}>- <PopoverTrigger asChild>- <button- type="button"- aria-label={`Token devtool, context ${- context === null ? "unknown" : formatTokenCount(context)- }`}- className={cn(- "flex h-8 w-8 items-center justify-center rounded-full text-zinc-500 transition-colors hover:bg-zinc-100 hover:text-zinc-700",- className,- )}- >- <Icon icon={DashboardSpeed02Icon} size={16} />- <span className="sr-only">- {context === null ? "ctx —" : `ctx ~${formatTokenCount(context)}`}- </span>- </button>- </PopoverTrigger>+ {anchorOnly ? (+ <PopoverAnchor asChild>+ <span aria-hidden className="pointer-events-none absolute inset-0" />+ </PopoverAnchor>+ ) : (+ <PopoverTrigger asChild>+ <button+ type="button"+ aria-label={`Token devtool, context ${+ context === null ? "unknown" : formatTokenCount(context)+ }`}+ className={cn(+ "flex h-8 w-8 items-center justify-center rounded-full text-zinc-500 transition-colors hover:bg-zinc-100 hover:text-zinc-700",+ className,+ )}+ >+ <Icon icon={DashboardSpeed02Icon} size={16} />+ <span className="sr-only">+ {context === null ? "ctx —" : `ctx ~${formatTokenCount(context)}`}+ </span>+ </button>+ </PopoverTrigger>+ )}<PopoverContentside="top"- align="end"+ align={anchorOnly ? "start" : "end"}sideOffset={8}className="w-80 rounded-2xl border-zinc-200/70 p-3 shadow-[0_16px_40px_-24px_rgba(0,0,0,0.25)]">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 4b99a7e8b2..c1a8874481 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@@ -5,6 +5,7 @@ import { Button } from "@/components/atoms/Button/Button";import { Icon } from "@/components/atoms/Icon/Icon";import type { ContextPanelExpert } from "../../store";import { DeleteFileDialog } from "../ContextPanel/components/FilesTab/components/DeleteFileDialog";+import { FilesEmptyState } from "./components/FilesEmptyState";import { SessionActivityCard } from "./components/SessionActivityCard";import { StackSection } from "./components/StackSection";import { WorkspaceFilesContent } from "./components/WorkspaceFilesContent";@@ -48,18 +49,15 @@ export function WorkspaceFileCards({ sessionId, expert = null }: Props) {const hasExpertSection = Boolean(expert);return (- <div className="flex flex-col gap-3">+ <div className="flex flex-col gap-6">{!showFilesCard && !hasActivity && !hasExpertSection && (- <div className="rounded-3xl bg-white/90 px-4 py-3 backdrop-blur smooth-shadow-ring-sm">- <p className="py-2 text-center text-sm text-zinc-400">- Nothing here yet.- </p>- </div>+ <FilesEmptyState />)}{showFilesCard && (<StackSectiontitle="Files in this chat"icon={File02Icon}+ plaincount={files.length || undefined}action={files.length > 0 && (@@ -86,6 +84,7 @@ export function WorkspaceFileCards({ sessionId, expert = null }: Props) {onRequestDelete={setPendingDelete}onDownloadAll={handleDownloadAll}showHeader={false}+ rowStyle="detailed"/></StackSection>)}diff --git a/autogpt_platform/frontend/src/app/(platform)/copilot/components/WorkspaceFileCards/__tests__/WorkspaceFileCards.test.tsx b/autogpt_platform/frontend/src/app/(platform)/copilot/components/WorkspaceFileCards/__tests__/WorkspaceFileCards.test.tsxindex 5a93ce9c98..4942dad058 100644--- a/autogpt_platform/frontend/src/app/(platform)/copilot/components/WorkspaceFileCards/__tests__/WorkspaceFileCards.test.tsx+++ b/autogpt_platform/frontend/src/app/(platform)/copilot/components/WorkspaceFileCards/__tests__/WorkspaceFileCards.test.tsx@@ -148,6 +148,33 @@ describe("WorkspaceFileCards", () => {expect(screen.getByLabelText("Download all")).toBeDefined();});+ it("leaves agent.json graph files out of the list", async () => {+ const response = listResponse();+ server.use(+ getListWorkspaceFilesMockHandler200({+ ...response,+ files: [+ ...response.files,+ {+ id: "cccccccc-0000-0000-0000-000000000003",+ name: "agent.json",+ path: "/sessions/session-1/agent.json",+ mime_type: "application/json",+ size_bytes: 4500,+ metadata: { origin: "agent" },+ origin: "generated",+ created_at: "2026-05-20T12:00:00Z",+ },+ ],+ }),+ );+ render(<WorkspaceFileCards sessionId={SESSION} />);++ expect(await screen.findByText("result.csv")).toBeDefined();+ expect(screen.queryByText("agent.json")).toBeNull();+ expect(screen.getByText(/^Files in this chat \(2\)/)).toBeDefined();+ });+it("lists generated documents from all of the expert's chats", async () => {const expertRequests: URLSearchParams[] = [];server.use(diff --git a/autogpt_platform/frontend/src/app/(platform)/copilot/components/WorkspaceFileCards/components/FilesEmptyState.tsx b/autogpt_platform/frontend/src/app/(platform)/copilot/components/WorkspaceFileCards/components/FilesEmptyState.tsxnew file mode 100644index 0000000000..d0b22d18f0--- /dev/null+++ b/autogpt_platform/frontend/src/app/(platform)/copilot/components/WorkspaceFileCards/components/FilesEmptyState.tsx@@ -0,0 +1,40 @@+"use client";++import {+ File02Icon,+ Image01Icon,+ Table01Icon,+} from "@hugeicons/core-free-icons";+import { Icon } from "@/components/atoms/Icon/Icon";+import { PanelEmptyState } from "../../ContextPanel/components/PanelEmptyState/PanelEmptyState";++// Only Otto's chats reach this: an expert's chat always lists that expert's+// documents instead.+export function FilesEmptyState() {+ return (+ <PanelEmptyState+ tiles={[+ <Icon+ key="image"+ icon={Image01Icon}+ size={22}+ className="text-sky-500"+ />,+ <Icon+ key="table"+ icon={Table01Icon}+ size={22}+ className="text-emerald-500"+ />,+ <Icon+ key="doc"+ icon={File02Icon}+ size={22}+ className="text-violet-500"+ />,+ ]}+ title="No files yet"+ description="Files you attach and documents Otto creates in this chat will show up here."+ />+ );+}diff --git a/autogpt_platform/frontend/src/app/(platform)/copilot/components/WorkspaceFileCards/useExpertDocuments.ts b/autogpt_platform/frontend/src/app/(platform)/copilot/components/WorkspaceFileCards/useExpertDocuments.tsindex 31c1cc1270..d744144b31 100644--- a/autogpt_platform/frontend/src/app/(platform)/copilot/components/WorkspaceFileCards/useExpertDocuments.ts+++ b/autogpt_platform/frontend/src/app/(platform)/copilot/components/WorkspaceFileCards/useExpertDocuments.ts@@ -5,6 +5,7 @@ import {useListWorkspaceFiles,} from "@/app/api/__generated__/endpoints/workspace/workspace";import type { ListFilesResponse } from "@/app/api/__generated__/models/listFilesResponse";+import { isHiddenWorkspaceFile } from "@/lib/workspace-files";import { useMemo } from "react";import { isInternalToolOutput } from "../ContextPanel/components/FilesTab/helpers";import type { SessionFile } from "../ContextPanel/components/FilesTab/useSessionFiles";@@ -33,7 +34,9 @@ export function useExpertDocuments(const documents = useMemo(() =>(query.data?.files ?? [])- .filter((item) => !isInternalToolOutput(item))+ .filter(+ (item) => !isInternalToolOutput(item) && !isHiddenWorkspaceFile(item),+ ).map<SessionFile>((item) => ({ item, messageID: null })),[query.data],);diff --git a/autogpt_platform/frontend/src/app/(platform)/library/components/LibraryAgentCard/LibraryAgentCard.tsx b/autogpt_platform/frontend/src/app/(platform)/library/components/LibraryAgentCard/LibraryAgentCard.tsxindex 85383f7a52..8d88f12340 100644--- a/autogpt_platform/frontend/src/app/(platform)/library/components/LibraryAgentCard/LibraryAgentCard.tsx+++ b/autogpt_platform/frontend/src/app/(platform)/library/components/LibraryAgentCard/LibraryAgentCard.tsx@@ -169,7 +169,7 @@ export function LibraryAgentCard({return (<Tooltip><TooltipTrigger asChild>{card}</TooltipTrigger>- <TooltipContent className="max-w-xs text-red-600">+ <TooltipContent className="max-w-xs text-red-300">{statusInfo.lastError}</TooltipContent></Tooltip>diff --git a/autogpt_platform/frontend/src/app/(platform)/marketplace/components/CategoryChip/CategoryChip.tsx b/autogpt_platform/frontend/src/app/(platform)/marketplace/components/CategoryChip/CategoryChip.tsxindex b54a6a60e0..5ad4612753 100644--- a/autogpt_platform/frontend/src/app/(platform)/marketplace/components/CategoryChip/CategoryChip.tsx+++ b/autogpt_platform/frontend/src/app/(platform)/marketplace/components/CategoryChip/CategoryChip.tsx@@ -1,6 +1,6 @@"use client";-import { expertPastel } from "@/components/molecules/ExpertAvatar/colors";+import type { CSSProperties } from "react";import { Button } from "@/components/atoms/Button/Button";import { Icon } from "@/components/atoms/Icon/Icon";import { cn } from "@/lib/utils";@@ -34,6 +34,31 @@ const CHIP_ICON_SIZE: Record<ChipSize, number> = {const NEUTRAL_ACCENT = getCategoryAccent(undefined).accent;const NEUTRAL_SELECTED = "border-transparent bg-zinc-100 text-zinc-900";+// The same glossy pill for chips with no category colour (the hero's search+// terms, "All"): a white-to-zinc fill, a top highlight and a small drop.+const NEUTRAL_GLOSS =+ "bg-gradient-to-b shadow-[inset_0_1px_0_rgba(255,255,255,0.9),0_1px_2px_rgba(16,24,40,0.05)]";+const NEUTRAL_GLOSS_IDLE =+ "border-zinc-200 from-white to-zinc-50 text-zinc-700 hover:border-zinc-300 hover:from-white hover:to-zinc-100";+const NEUTRAL_GLOSS_SELECTED =+ "border-zinc-300 from-zinc-100 to-zinc-200/80 text-zinc-900";++/** A category chip in its own colour, with a soft top highlight so it reads+ * as a glossy pill: darker text for contrast, a light tint and a tinted+ * edge, all stronger once selected. */+function glossyChipStyle(color: string, isSelected: boolean): CSSProperties {+ return {+ color: `color-mix(in srgb, ${color} ${isSelected ? 45 : 55}%, #18181b)`,+ backgroundColor: `color-mix(in srgb, ${color} ${isSelected ? 30 : 12}%, white)`,+ borderColor: `color-mix(in srgb, ${color} ${isSelected ? 60 : 38}%, white)`,+ backgroundImage:+ "linear-gradient(to bottom, rgba(255,255,255,0.8), rgba(255,255,255,0) 65%)",+ boxShadow: isSelected+ ? `inset 0 1px 0 rgba(255,255,255,0.9), 0 1px 2px rgba(16,24,40,0.08), 0 0 0 1px color-mix(in srgb, ${color} 25%, transparent)`+ : "inset 0 1px 0 rgba(255,255,255,0.9), 0 1px 2px rgba(16,24,40,0.05)",+ };+}+interface Props {label: string;title?: string;@@ -70,15 +95,7 @@ export function CategoryChip({aria-pressed={isSelected}onClick={onClick}unmask={false}- // Selected takes the category's wash; unselected hands the category's- // colour to the glyph and the label together, as the cards' tags do.- style={- color- ? isSelected- ? { backgroundColor: expertPastel(color) }- : { color }- : undefined- }+ style={color ? glossyChipStyle(color, isSelected) : undefined}leftIcon={icon ? (<Icon@@ -103,6 +120,12 @@ export function CategoryChip({: accent === NEUTRAL_ACCENT? NEUTRAL_SELECTED: cn(accent.chip, "border-transparent")),+ !color &&+ accent === NEUTRAL_ACCENT &&+ cn(+ NEUTRAL_GLOSS,+ isSelected ? NEUTRAL_GLOSS_SELECTED : NEUTRAL_GLOSS_IDLE,+ ),)}>{label}diff --git a/autogpt_platform/frontend/src/app/(platform)/marketplace/components/CategoryChip/CategoryTag.tsx b/autogpt_platform/frontend/src/app/(platform)/marketplace/components/CategoryChip/CategoryTag.tsxindex c7bb4e7792..043305adef 100644--- a/autogpt_platform/frontend/src/app/(platform)/marketplace/components/CategoryChip/CategoryTag.tsx+++ b/autogpt_platform/frontend/src/app/(platform)/marketplace/components/CategoryChip/CategoryTag.tsx@@ -1,3 +1,4 @@+import type { CSSProperties } from "react";import { getCategoryHex } from "@/components/molecules/ExpertAvatar/colors";import { Icon } from "@/components/atoms/Icon/Icon";import { cn } from "@/lib/utils";@@ -11,15 +12,24 @@ const TAG_ICON_SIZE: Record<ChipSize, number> = {default: 15,};+/** The category colour, pulled darker for the text and icon and washed out+ * for the fill and edge, so the tag reads clearly on white. */+export function categoryTagStyle(color: string): CSSProperties {+ return {+ color: `color-mix(in srgb, ${color} 55%, #18181b)`,+ backgroundColor: `color-mix(in srgb, ${color} 12%, white)`,+ borderColor: `color-mix(in srgb, ${color} 35%, white)`,+ };+}+interface Props {category: string;size?: ChipSize;className?: string;}-/** A category worn as a label rather than a filter: same chip, no click.- * The glyph carries the category's colour and the label takes it from- * `currentColor`, so the tag needs no separate swatch. */+/** A category worn as a label rather than a filter: same chip, no click,+ * tinted with the category's colour (see categoryTagStyle). */export function CategoryTag({ category, size = "small", className }: Props) {const color = getCategoryHex(category);const { accent, icon } = getCategoryAccent(category);@@ -29,11 +39,13 @@ export function CategoryTag({ category, size = "small", className }: Props) {className={cn(CHIP_SHAPE,CHIP_SIZE[size],+ // A label, not a button: shorter than the clickable chip.+ size === "small" && "h-[22px]","max-w-full",accent.icon,className,)}- style={color ? { color } : undefined}+ style={color ? categoryTagStyle(color) : undefined}>{icon ? (<Icondiff --git a/autogpt_platform/frontend/src/app/(platform)/marketplace/components/ExpertsSection/components/ExpertCard.tsx b/autogpt_platform/frontend/src/app/(platform)/marketplace/components/ExpertsSection/components/ExpertCard.tsxindex b99240f820..87536c6628 100644--- a/autogpt_platform/frontend/src/app/(platform)/marketplace/components/ExpertsSection/components/ExpertCard.tsx+++ b/autogpt_platform/frontend/src/app/(platform)/marketplace/components/ExpertsSection/components/ExpertCard.tsx@@ -1,5 +1,6 @@import {expertPastel,+ getCategoryHex,getExpertTopicHex,} from "@/components/molecules/ExpertAvatar/colors";import { ExpertTemplate } from "@/app/api/__generated__/models/expertTemplate";@@ -67,7 +68,7 @@ export function ExpertCard({ expert, isHired, category }: Props) {avatarUrl={expert.avatar_url}size={88}backgroundColor={topicColor}- className="rounded-full ring-4 ring-white"+ className="rounded-full border border-[#e3e3e3] ring-4 ring-white"/><div>@@ -76,6 +77,7 @@ export function ExpertCard({ expert, isHired, category }: Props) {role={expert.role}jobTitle={expert.job_title}nameAlign="baseline"+ areaColor={getCategoryHex(area)}/>{area ? <CategoryTag category={area} className="mt-2" /> : null}<ExpertTagline tagline={expert.tagline} compact />diff --git a/autogpt_platform/frontend/src/app/(platform)/marketplace/components/ExpertsSection/components/ExpertHireControl.tsx b/autogpt_platform/frontend/src/app/(platform)/marketplace/components/ExpertsSection/components/ExpertHireControl.tsxindex be06dbd879..383a03a6c6 100644--- a/autogpt_platform/frontend/src/app/(platform)/marketplace/components/ExpertsSection/components/ExpertHireControl.tsx+++ b/autogpt_platform/frontend/src/app/(platform)/marketplace/components/ExpertsSection/components/ExpertHireControl.tsx@@ -12,12 +12,8 @@ import { useHireFlow } from "@/services/experts/useHireFlow";import { Flag, useGetFlag } from "@/services/feature-flags/use-get-flag";import { AddTeamIcon, CheckmarkCircle02Icon } from "@hugeicons/core-free-icons";-// The atom sizes a lone action; on a card it is a label with a glyph. Ghost's-// hover fill is the resting state here, so the button reads as a button-// against the card's pastel band; hover takes it one step darker.-const TEXT_BUTTON =- "min-w-0 gap-1.5 px-2 text-base bg-zinc-50 border-zinc-50 hover:bg-zinc-100 hover:border-zinc-100";-const HIRE_ICON = <Icon icon={AddTeamIcon} size={20} aria-hidden />;+// A small secondary pill, like the team cards' corner buttons.+const HIRE_ICON = <Icon icon={AddTeamIcon} size={16} aria-hidden />;interface Props {expert: ExpertTemplate;@@ -80,10 +76,9 @@ function EnabledExpertHireControl({ expert, isHired }: Props) {<Buttonas="NextLink"href={`/signup?next=${next}`}- variant="ghost"+ variant="secondary"size="small"leftIcon={HIRE_ICON}- className={TEXT_BUTTON}>Hire</Button>@@ -91,12 +86,11 @@ function EnabledExpertHireControl({ expert, isHired }: Props) {} else {control = (<Button- variant="ghost"+ variant="secondary"size="small"loading={isHiring}leftIcon={HIRE_ICON}onClick={handleHire}- className={TEXT_BUTTON}>Hire</Button>diff --git a/autogpt_platform/frontend/src/app/(platform)/marketplace/experts/[expertId]/components/ExpertAccess.tsx b/autogpt_platform/frontend/src/app/(platform)/marketplace/experts/[expertId]/components/ExpertAccess.tsxindex f245c39ce6..8a32f03c6d 100644--- a/autogpt_platform/frontend/src/app/(platform)/marketplace/experts/[expertId]/components/ExpertAccess.tsx+++ b/autogpt_platform/frontend/src/app/(platform)/marketplace/experts/[expertId]/components/ExpertAccess.tsx@@ -1,6 +1,5 @@import { formatProviderName } from "@/components/contextual/IntegrationsPanel/helpers";import { IntegrationLogo } from "@/components/molecules/IntegrationLogo/IntegrationLogo";-import { ExpertPill } from "./ExpertPill";import { ExpertSection } from "./ExpertSection";interface Props {@@ -16,13 +15,22 @@ export function ExpertAccess({ name, providers }: Props) {title={`Services ${name} can work with`}description={`${name} will ask you to connect these the first time they are needed — nothing is shared until you do.`}>- <ul className="flex flex-wrap gap-2">+ <ul className="grid grid-cols-2 gap-3 sm:grid-cols-3">{providers.map((provider) => (- <ExpertPill+ <likey={provider}- icon={<IntegrationLogo provider={provider} />}- label={formatProviderName(provider)}- />+ className="flex min-w-0 items-center gap-3 rounded-2xl bg-white p-3 smooth-shadow-ring-sm"+ >+ <span+ aria-hidden="true"+ className="flex size-10 shrink-0 items-center justify-center rounded-xl border border-zinc-200 bg-gradient-to-b from-white to-zinc-50"+ >+ <IntegrationLogo provider={provider} size={22} />+ </span>+ <span className="min-w-0 break-words text-sm font-medium leading-5 text-zinc-800">+ {formatProviderName(provider)}+ </span>+ </li>))}</ul></ExpertSection>diff --git a/autogpt_platform/frontend/src/app/(platform)/marketplace/experts/[expertId]/components/ExpertDayOne.tsx b/autogpt_platform/frontend/src/app/(platform)/marketplace/experts/[expertId]/components/ExpertDayOne.tsxindex 359043d99c..8730db3bdf 100644--- a/autogpt_platform/frontend/src/app/(platform)/marketplace/experts/[expertId]/components/ExpertDayOne.tsx+++ b/autogpt_platform/frontend/src/app/(platform)/marketplace/experts/[expertId]/components/ExpertDayOne.tsx@@ -9,39 +9,47 @@ interface Props {accent: ExpertAccent;}+/** Day one as a timeline: numbered steps joined by a line, each with its+ * timing on the right. */export function ExpertDayOne({ name, items, accent }: Props) {if (items.length === 0) return null;return (<ExpertSection title={`What ${name} sets up on day one`}>- <ol className="flex flex-col divide-y divide-zinc-100 rounded-xl border border-zinc-200 bg-white">+ <ol className="rounded-2xl bg-white p-5 smooth-shadow-ring-sm">{items.map((item, index) => (<likey={`${index}-${item.title}`}- className="flex items-start gap-3 px-4 py-3.5"+ className="relative flex items-start gap-4 pb-6 last:pb-0">+ {index < items.length - 1 ? (+ <span+ aria-hidden+ className="absolute left-[15px] top-9 h-[calc(100%-2.25rem)] w-px bg-zinc-200"+ />+ ) : null}<spanaria-hidden="true"className={cn(- "flex size-6 shrink-0 items-center justify-center rounded-full text-xs font-semibold tabular-nums",+ "relative flex size-8 shrink-0 items-center justify-center rounded-full text-sm font-semibold tabular-nums ring-4 ring-white",accent.pill,)}>{index + 1}</span>- <div className="flex min-w-0 flex-1 flex-col gap-1.5 sm:flex-row sm:items-start sm:gap-3">+ <div className="flex min-w-0 flex-1 flex-col gap-1.5 pt-1 sm:flex-row sm:items-start sm:gap-3"><div className="min-w-0 flex-1"><div className="break-words text-base font-semibold leading-6 text-zinc-900">{item.title}</div>{item.description ? (- <p className="break-words text-sm leading-6 text-zinc-500">+ <p className="mt-0.5 break-words text-[15px] leading-6 text-zinc-500">{item.description}</p>) : null}</div>{item.timing ? (- <span className="shrink-0 self-start whitespace-nowrap rounded-full bg-zinc-100 px-2.5 py-0.5 text-xs font-medium leading-5 text-zinc-600">+ <span className="shrink-0 self-start whitespace-nowrap rounded-full border border-zinc-200 bg-gradient-to-b from-white to-zinc-50 px-2.5 py-0.5 text-xs font-medium leading-5 text-zinc-600">{item.timing}</span>) : null}diff --git a/autogpt_platform/frontend/src/app/(platform)/marketplace/experts/[expertId]/components/ExpertHireActions.tsx b/autogpt_platform/frontend/src/app/(platform)/marketplace/experts/[expertId]/components/ExpertHireActions.tsxindex 5cb2c72cb4..6e36682e3e 100644--- a/autogpt_platform/frontend/src/app/(platform)/marketplace/experts/[expertId]/components/ExpertHireActions.tsx+++ b/autogpt_platform/frontend/src/app/(platform)/marketplace/experts/[expertId]/components/ExpertHireActions.tsx@@ -47,8 +47,11 @@ export function ExpertHireActions({if (hiredExpert) {return (- <div className="flex flex-wrap items-center gap-3">- <Badge variant="success" className={STATUS_CLASS}>+ <div className="flex flex-col gap-2">+ <Badge+ variant="success"+ className={`${STATUS_CLASS} w-full justify-center`}+ ><Icon icon={CheckmarkCircle02Icon} size={16} />On your team</Badge>diff --git a/autogpt_platform/frontend/src/app/(platform)/marketplace/experts/[expertId]/components/ExpertHireCard.tsx b/autogpt_platform/frontend/src/app/(platform)/marketplace/experts/[expertId]/components/ExpertHireCard.tsxnew file mode 100644index 0000000000..86b7bd35fe--- /dev/null+++ b/autogpt_platform/frontend/src/app/(platform)/marketplace/experts/[expertId]/components/ExpertHireCard.tsx@@ -0,0 +1,81 @@+import { Expert } from "@/app/api/__generated__/models/expert";+import { Icon } from "@/components/atoms/Icon/Icon";+import { creditsToUsdLabel } from "@/lib/credits";+import { CheckmarkCircle02Icon, Coins01Icon } from "@hugeicons/core-free-icons";+import type { ReactNode } from "react";++interface Props {+ expert: Expert;+ firstName: string;+ actions: ReactNode;+ /** Hiring is open to this viewer; when it is not, the card makes no+ * promise about joining. */+ isHiringOpen: boolean;+}++/** The page's call to action, kept in view: sticky beside the content on+ * wide screens, straight under the hero on phones. It carries the price+ * terms so the decision and its cost sit together. */+export function ExpertHireCard({+ expert,+ firstName,+ actions,+ isHiringOpen,+}: Props) {+ const weeklyBudget = expert.weekly_budget ?? null;+ const workflowCount = expert.workflows.length;++ return (+ <aside className="rounded-2xl bg-white p-5 smooth-shadow-ring-sm">+ <div className="[&_a]:w-full [&_button]:w-full">{actions}</div>++ <ul className="mt-5 flex flex-col gap-2.5">+ <Perk icon={CheckmarkCircle02Icon}>No extra cost</Perk>+ {isHiringOpen ? (+ <Perk icon={CheckmarkCircle02Icon}>Joins your team instantly</Perk>+ ) : null}+ {workflowCount > 0 ? (+ <Perk icon={CheckmarkCircle02Icon}>+ {`${workflowCount} ${workflowCount === 1 ? "workflow" : "workflows"} installed and ready to run`}+ </Perk>+ ) : null}+ <Perk icon={CheckmarkCircle02Icon}>+ Asks before acting on your behalf+ </Perk>+ </ul>++ <div className="mt-5 border-t border-zinc-100 pt-4">+ <h2 className="flex items-center gap-2 text-sm font-semibold text-zinc-900">+ <Icon icon={Coins01Icon} size={16} className="text-zinc-500" />+ Included with your plan+ </h2>+ <p className="mt-1.5 text-sm leading-6 text-zinc-600">+ {`Hiring ${firstName} costs nothing extra. Their work draws on your existing balance`}+ {weeklyBudget+ ? `, capped at ${creditsToUsdLabel(weeklyBudget)} a week — a limit you can change once they are on your team.`+ : "."}+ </p>+ </div>+ </aside>+ );+}++function Perk({+ icon,+ children,+}: {+ icon: typeof CheckmarkCircle02Icon;+ children: ReactNode;+}) {+ return (+ <li className="flex items-start gap-2 text-sm text-zinc-700">+ <Icon+ icon={icon}+ size={16}+ className="mt-0.5 shrink-0 text-emerald-600"+ aria-hidden+ />+ <span>{children}</span>+ </li>+ );+}diff --git a/autogpt_platform/frontend/src/app/(platform)/marketplace/experts/[expertId]/components/ExpertNoteCard.tsx b/autogpt_platform/frontend/src/app/(platform)/marketplace/experts/[expertId]/components/ExpertNoteCard.tsxdeleted file mode 100644index 62e4b729f1..0000000000--- a/autogpt_platform/frontend/src/app/(platform)/marketplace/experts/[expertId]/components/ExpertNoteCard.tsx+++ /dev/null@@ -1,24 +0,0 @@-import { Icon } from "@/components/atoms/Icon/Icon";-import type { IconSvgElement } from "@hugeicons/react";-import type { ReactNode } from "react";--interface Props {- icon: IconSvgElement;- children: ReactNode;-}--/** A soft card for the page's facts about a hire — plan, rules — so they- * read as terms rather than as more of the essay above them. */-export function ExpertNoteCard({ icon, children }: Props) {- return (- <div className="flex gap-4 rounded-2xl bg-zinc-50 p-5 ring-1 ring-inset ring-zinc-200/60">- <span- aria-hidden="true"- className="flex h-10 w-10 shrink-0 items-center justify-center rounded-lg bg-white ring-1 ring-inset ring-zinc-200/70"- >- <Icon icon={icon} size={20} className="text-zinc-600" />- </span>- <div className="min-w-0 flex-1">{children}</div>- </div>- );-}diff --git a/autogpt_platform/frontend/src/app/(platform)/marketplace/experts/[expertId]/components/ExpertPage.tsx b/autogpt_platform/frontend/src/app/(platform)/marketplace/experts/[expertId]/components/ExpertPage.tsxindex cb108157ae..ba0b425614 100644--- a/autogpt_platform/frontend/src/app/(platform)/marketplace/experts/[expertId]/components/ExpertPage.tsx+++ b/autogpt_platform/frontend/src/app/(platform)/marketplace/experts/[expertId]/components/ExpertPage.tsx@@ -5,7 +5,6 @@ import {getExpertAccessProviders,getExpertFirstName,} from "@/app/(platform)/marketplace/components/ExpertsSection/helpers";-import { Text } from "@/components/atoms/Text/Text";import { Icon } from "@/components/atoms/Icon/Icon";import { Skeleton } from "@/components/atoms/Skeleton/Skeleton";import { Dialog } from "@/components/molecules/Dialog/Dialog";@@ -20,8 +19,8 @@ import { ExpertAccess } from "./ExpertAccess";import { ExpertComingSoonLabel } from "./ExpertComingSoonLabel";import { ExpertDayOne } from "./ExpertDayOne";import { ExpertHireActions } from "./ExpertHireActions";-import { ExpertPageHeader } from "./ExpertPageHeader";-import { ExpertPlanNote } from "./ExpertPlanNote";+import { ExpertHeroBand, ExpertHeroIdentity } from "./ExpertPageHeader";+import { ExpertHireCard } from "./ExpertHireCard";import { ExpertProtectedRules } from "./ExpertProtectedRules";import { ExpertSkills } from "./ExpertSkills";import { ExpertWorkflowList } from "./ExpertWorkflowList";@@ -30,7 +29,7 @@ import { useHireFlow } from "@/services/experts/useHireFlow";import { useTrackExpertProfileOpened } from "@/services/experts/use-track-funnel-view-once";const MAIN_CLASS =- "mx-auto flex w-full max-w-[760px] flex-col px-6 pb-24 pt-8 md:px-8";+ "mx-auto flex w-full max-w-[1120px] flex-col px-4 pb-24 pt-8 sm:px-6 md:px-8";function BackToMarketplaceLink() {return (@@ -110,8 +109,13 @@ export function ExpertPage() {const accent = getExpertAccent(expert.role);const firstName = getExpertFirstName(expert.name);+ const accessProviders = getExpertAccessProviders(+ expert.workflows,+ systemProviders,+ );+ const stats = getExpertStats(expert, accessProviders.length);- let actions: ReactNode = <Skeleton className="h-9 w-28 rounded-full" />;+ let actions: ReactNode = <Skeleton className="h-9 w-full rounded-full" />;if (isActionReady) {actions = isHiringOpen ? (<ExpertHireActions@@ -129,39 +133,40 @@ export function ExpertPage() {return (<main className={MAIN_CLASS}><BackToMarketplaceLink />- <ExpertPageHeader expert={expert} actions={actions} />- <Text variant="body" tone="secondary" className="mt-4">- Hire an AI Expert for supported tasks you might otherwise contract out.- Review outputs before using them.- </Text>- <div className="mt-8 flex flex-col gap-10 border-t border-zinc-200 pt-8">- <ExpertDayOne- name={firstName}- items={expert.day_one ?? []}- accent={accent}- />- <ExpertAbout key={expert.id} text={expert.bio || expert.identity} />- <ExpertSkills- skills={expert.bundled_skills ?? []}- category={expert.categories?.[0]}- />- <ExpertWorkflowList- name={expert.name}- workflows={expert.workflows}- accent={accent}- />- <ExpertAccess- name={firstName}- providers={getExpertAccessProviders(- expert.workflows,- systemProviders,- )}- />- <ExpertPlanNote- name={firstName}- weeklyBudget={expert.weekly_budget ?? null}- />- <ExpertProtectedRules rules={expert.protected_soul_rules ?? []} />+ <ExpertHeroBand expert={expert} />+ {/* One grid for the hero's text, the hire card and the story. On wide+ screens the card spans the right column, pulled up over the band's+ end and sticky while the story scrolls; on phones it sits between+ the hero text and the story. */}+ <div className="grid gap-x-10 lg:grid-cols-[minmax(0,1fr)_340px]">+ <div className="order-1 min-w-0 lg:col-start-1 lg:row-start-1">+ <ExpertHeroIdentity expert={expert} stats={stats} />+ </div>+ <div className="relative z-10 order-2 mt-8 lg:col-start-2 lg:row-span-2 lg:row-start-1 lg:-mt-24">+ <div className="lg:sticky lg:top-6">+ <ExpertHireCard+ expert={expert}+ firstName={firstName}+ actions={actions}+ isHiringOpen={isHiringOpen}+ />+ </div>+ </div>+ <div className="order-3 mt-12 flex min-w-0 flex-col gap-12 lg:col-start-1 lg:row-start-2">+ <ExpertDayOne+ name={firstName}+ items={expert.day_one ?? []}+ accent={accent}+ />+ <ExpertAbout key={expert.id} text={expert.bio || expert.identity} />+ <ExpertSkills+ skills={expert.bundled_skills ?? []}+ category={expert.categories?.[0]}+ />+ <ExpertAccess name={firstName} providers={accessProviders} />+ <ExpertProtectedRules rules={expert.protected_soul_rules ?? []} />+ <ExpertWorkflowList name={expert.name} workflows={expert.workflows} />+ </div></div>{/* The voice pick follows a successful hire when the persona ships@@ -190,3 +195,22 @@ export function ExpertPage() {</main>);}++function plural(count: number, word: string) {+ return `${count} ${word}${count === 1 ? "" : "s"}`;+}++/** The hero's at-a-glance chips: only the counts that are not zero. */+function getExpertStats(+ expert: { bundled_skills?: unknown[] | null; workflows: unknown[] },+ serviceCount: number,+) {+ const skillCount = expert.bundled_skills?.length ?? 0;+ return [+ skillCount > 0 ? plural(skillCount, "skill") : null,+ expert.workflows.length > 0+ ? plural(expert.workflows.length, "workflow")+ : null,+ serviceCount > 0 ? plural(serviceCount, "service") : null,+ ].filter((stat): stat is string => stat !== null);+}diff --git a/autogpt_platform/frontend/src/app/(platform)/marketplace/experts/[expertId]/components/ExpertPageHeader.tsx b/autogpt_platform/frontend/src/app/(platform)/marketplace/experts/[expertId]/components/ExpertPageHeader.tsxindex 02b925dfd0..0cffa82ce5 100644--- a/autogpt_platform/frontend/src/app/(platform)/marketplace/experts/[expertId]/components/ExpertPageHeader.tsx+++ b/autogpt_platform/frontend/src/app/(platform)/marketplace/experts/[expertId]/components/ExpertPageHeader.tsx@@ -1,51 +1,111 @@-import { getExpertTopicHex } from "@/components/molecules/ExpertAvatar/colors";import { Expert } from "@/app/api/__generated__/models/expert";+import {+ expertPastel,+ getCategoryHex,+ getExpertTopicHex,+} from "@/components/molecules/ExpertAvatar/colors";import { ExpertAvatar } from "@/components/molecules/ExpertAvatar/ExpertAvatar";import { ExpertIdentityDetails } from "@/components/molecules/ExpertIdentityDetails/ExpertIdentityDetails";-import { ExpertTagline } from "@/components/molecules/ExpertIdentityDetails/components/ExpertTagline";-import { ReactNode } from "react";import { CategoryTag } from "../../../components/CategoryChip/CategoryTag";-interface Props {+interface BandProps {expert: Expert;- actions: ReactNode;}-export function ExpertPageHeader({ expert, actions }: Props) {+interface IdentityProps {+ expert: Expert;+ stats: string[];+}++function getTopic(expert: Expert) {+ return getExpertTopicHex({+ avatarUrl: expert.avatar_url,+ categories: expert.categories,+ role: expert.role,+ });+}++const GLOSSY_STAT =+ "inline-flex h-8 items-center rounded-full border border-zinc-200 bg-gradient-to-b from-white to-zinc-50 px-3.5 text-sm font-medium text-zinc-700 shadow-[inset_0_1px_0_rgba(255,255,255,0.9),0_1px_2px_rgba(16,24,40,0.05)]";++/** The hero band: the expert's colour with two soft glows and the category+ * on it. The portrait (ExpertHeroIdentity) breaks out of its bottom edge,+ * and the hire card overlaps its right end on wide screens. */+export function ExpertHeroBand({ expert }: BandProps) {+ const area = expert.categories?.[0];+ const topic = getTopic(expert);++ return (+ <div+ className="relative h-44 overflow-hidden rounded-3xl sm:h-56"+ style={{+ backgroundColor: expertPastel(topic),+ backgroundImage: [+ `radial-gradient(circle at 15% 0%, color-mix(in srgb, ${topic} 45%, white), transparent 55%)`,+ `radial-gradient(circle at 90% 110%, color-mix(in srgb, ${topic} 35%, white), transparent 50%)`,+ ].join(", "),+ }}+ >+ <div+ aria-hidden+ className="absolute inset-0 bg-[linear-gradient(to_bottom,rgba(255,255,255,0.35),transparent_45%)]"+ />+ {area ? (+ <CategoryTag+ category={area}+ size="medium"+ className="absolute left-5 top-5 h-7 px-2.5 text-[13px]"+ />+ ) : null}+ </div>+ );+}++/** The portrait breaking out of the band, the name with its glowing title,+ * the tagline and what comes with the hire, on the page's left edge. */+export function ExpertHeroIdentity({ expert, stats }: IdentityProps) {const area = expert.categories?.[0];+ const topic = getTopic(expert);return (<header>- <div className="grid grid-cols-[96px_minmax(0,1fr)] items-center gap-4 sm:gap-x-5">+ <div className="relative -mt-16 sm:-mt-20"><ExpertAvatarname={expert.name}avatarUrl={expert.avatar_url}color={expert.color}- backgroundColor={getExpertTopicHex({- avatarUrl: expert.avatar_url,- categories: expert.categories,- role: expert.role,- })}- size={96}- className="border border-black/5"+ backgroundColor={topic}+ size={128}+ className="ml-6 rounded-full border border-[#e3e3e3] shadow-[0_12px_32px_-12px_rgba(16,24,40,0.35)] ring-[6px] ring-[#f9f9f9]"/>- <div className="min-w-0 flex-1">+ <div className="mt-4 min-w-0"><ExpertIdentityDetailsname={expert.name}role={expert.role}jobTitle={expert.job_title}size="page"nameAlign="baseline"+ areaColor={getCategoryHex(area)}/>- {area ? (- <CategoryTag category={area} size="default" className="mt-2" />- ) : null}- </div>- <div className="col-span-2 min-w-0 sm:col-span-1 sm:col-start-2">- {actions}</div>+ {expert.tagline?.trim() ? (+ <p className="mt-3 max-w-2xl text-lg leading-8 text-zinc-600">+ {expert.tagline}+ </p>+ ) : null}+ {stats.length > 0 ? (+ <ul+ className="mt-5 flex flex-wrap gap-2"+ aria-label="What comes with this expert"+ >+ {stats.map((stat) => (+ <li key={stat} className={GLOSSY_STAT}>+ {stat}+ </li>+ ))}+ </ul>+ ) : null}</div>- <ExpertTagline tagline={expert.tagline} /></header>);}diff --git a/autogpt_platform/frontend/src/app/(platform)/marketplace/experts/[expertId]/components/ExpertPill.tsx b/autogpt_platform/frontend/src/app/(platform)/marketplace/experts/[expertId]/components/ExpertPill.tsxdeleted file mode 100644index ed6495e2a2..0000000000--- a/autogpt_platform/frontend/src/app/(platform)/marketplace/experts/[expertId]/components/ExpertPill.tsx+++ /dev/null@@ -1,54 +0,0 @@-import { Icon } from "@/components/atoms/Icon/Icon";-import { cn } from "@/lib/utils";-import { ArrowUpRight01Icon } from "@hugeicons/core-free-icons";-import Link from "next/link";-import {- CHIP_SHAPE,- CHIP_SIZE,-} from "../../../components/CategoryChip/CategoryChip";-import type { ReactNode } from "react";--interface Props {- icon: ReactNode;- label: string;- href?: string;-}--// The marketplace's chip, so a skill here and a skill on a card are the-// same object.-const PILL_CLASS = cn(CHIP_SHAPE, CHIP_SIZE.default, "min-w-0 text-zinc-700");--/** The flat item the expert page lists services and skills with. */-export function ExpertPill({ icon, label, href }: Props) {- // The label names the item, so a screen reader must not hear the icon too.- const content = (- <>- <span aria-hidden="true" className="flex shrink-0">- {icon}- </span>- <span className="truncate">{label}</span>- </>- );-- if (!href) return <li className={PILL_CLASS}>{content}</li>;-- return (- <li className="min-w-0">- <Link- href={href}- className={cn(- PILL_CLASS,- "outline-none transition-colors hover:border-zinc-300 hover:text-zinc-900 focus-visible:ring-2 focus-visible:ring-violet-600",- )}- >- {content}- <Icon- icon={ArrowUpRight01Icon}- size={14}- aria-hidden- className="shrink-0 text-zinc-400"- />- </Link>- </li>- );-}diff --git a/autogpt_platform/frontend/src/app/(platform)/marketplace/experts/[expertId]/components/ExpertPlanNote.tsx b/autogpt_platform/frontend/src/app/(platform)/marketplace/experts/[expertId]/components/ExpertPlanNote.tsxdeleted file mode 100644index 6e3e476e25..0000000000--- a/autogpt_platform/frontend/src/app/(platform)/marketplace/experts/[expertId]/components/ExpertPlanNote.tsx+++ /dev/null@@ -1,24 +0,0 @@-import { creditsToUsdLabel } from "@/lib/credits";-import { Coins01Icon } from "@hugeicons/core-free-icons";-import { ExpertNoteCard } from "./ExpertNoteCard";-import { ExpertSection } from "./ExpertSection";--interface Props {- name: string;- weeklyBudget: number | null;-}--export function ExpertPlanNote({ name, weeklyBudget }: Props) {- return (- <ExpertSection title="Included with your plan">- <ExpertNoteCard icon={Coins01Icon}>- <p className="text-base leading-7 text-zinc-600">- {`Hiring ${name} costs nothing extra. Their work draws on your existing balance`}- {weeklyBudget- ? `, capped at ${creditsToUsdLabel(weeklyBudget)} a week — a limit you can change once they are on your team.`- : "."}- </p>- </ExpertNoteCard>- </ExpertSection>- );-}diff --git a/autogpt_platform/frontend/src/app/(platform)/marketplace/experts/[expertId]/components/ExpertProtectedRules.tsx b/autogpt_platform/frontend/src/app/(platform)/marketplace/experts/[expertId]/components/ExpertProtectedRules.tsxindex 142849deef..7d291a0fea 100644--- a/autogpt_platform/frontend/src/app/(platform)/marketplace/experts/[expertId]/components/ExpertProtectedRules.tsx+++ b/autogpt_platform/frontend/src/app/(platform)/marketplace/experts/[expertId]/components/ExpertProtectedRules.tsx@@ -1,6 +1,5 @@import { Icon } from "@/components/atoms/Icon/Icon";-import { CheckmarkCircle02Icon, LockIcon } from "@hugeicons/core-free-icons";-import { ExpertNoteCard } from "./ExpertNoteCard";+import { LockIcon, SecurityCheckIcon } from "@hugeicons/core-free-icons";import { ExpertSection } from "./ExpertSection";interface Props {@@ -9,7 +8,8 @@ interface Props {/** The rules baked into every expert's soul, quoted verbatim — the same* strings the backend injects, so the promise on the profile and the- * instruction the model receives can never drift apart. */+ * instruction the model receives can never drift apart. Each one gets its+ * own tile: a shield, the rule, and a quiet "Locked" note. */export function ExpertProtectedRules({ rules }: Props) {if (rules.length === 0) return null;@@ -18,24 +18,28 @@ export function ExpertProtectedRules({ rules }: Props) {title="Rules this expert cannot break"description="Part of every expert's soul, and not editable by anyone.">- <ExpertNoteCard icon={LockIcon}>- <ul className="flex flex-col gap-2">- {rules.map((rule) => (- <li- key={rule}- className="flex gap-2.5 text-base leading-7 text-zinc-600"+ <ul className="grid gap-3 sm:grid-cols-2">+ {rules.map((rule) => (+ <li+ key={rule}+ className="flex gap-3.5 rounded-2xl bg-white p-4 smooth-shadow-ring-sm"+ >+ <span+ aria-hidden="true"+ className="flex size-9 shrink-0 items-center justify-center rounded-xl bg-gradient-to-b from-emerald-50 to-emerald-100/70 text-emerald-600 ring-1 ring-inset ring-emerald-200/70">- <Icon- icon={CheckmarkCircle02Icon}- size={18}- aria-hidden="true"- className="mt-1 shrink-0 text-emerald-600"- />- <span>{rule}</span>- </li>- ))}- </ul>- </ExpertNoteCard>+ <Icon icon={SecurityCheckIcon} size={18} />+ </span>+ <div className="min-w-0">+ <p className="text-[15px] leading-6 text-zinc-800">{rule}</p>+ <span className="mt-1 inline-flex items-center gap-1 text-xs text-zinc-500">+ <Icon icon={LockIcon} size={12} aria-hidden="true" />+ Locked+ </span>+ </div>+ </li>+ ))}+ </ul></ExpertSection>);}diff --git a/autogpt_platform/frontend/src/app/(platform)/marketplace/experts/[expertId]/components/ExpertSection.tsx b/autogpt_platform/frontend/src/app/(platform)/marketplace/experts/[expertId]/components/ExpertSection.tsxindex 2cf141c693..098f962946 100644--- a/autogpt_platform/frontend/src/app/(platform)/marketplace/experts/[expertId]/components/ExpertSection.tsx+++ b/autogpt_platform/frontend/src/app/(platform)/marketplace/experts/[expertId]/components/ExpertSection.tsx@@ -4,17 +4,29 @@ interface Props {title: string;count?: number;description?: string;+ /** A smaller heading for detail sections that sit below the story. */+ quiet?: boolean;children: ReactNode;}-export function ExpertSection({ title, count, description, children }: Props) {+export function ExpertSection({+ title,+ count,+ description,+ quiet = false,+ children,+}: Props) {const headingId = useId();return (<section aria-labelledby={headingId}><h2id={headingId}- className="flex items-baseline gap-2 text-xl font-semibold tracking-[-0.02em] text-zinc-900"+ className={+ quiet+ ? "flex items-baseline gap-2 text-lg font-semibold tracking-[-0.01em] text-zinc-800"+ : "flex items-baseline gap-2 text-2xl font-semibold tracking-[-0.02em] text-zinc-900"+ }>{title}{count !== undefined ? (@@ -24,7 +36,13 @@ export function ExpertSection({ title, count, description, children }: Props) {) : null}</h2>{description ? (- <p className="mt-1.5 text-base leading-6 text-zinc-500">+ <p+ className={+ quiet+ ? "mt-1 text-sm leading-5 text-zinc-500"+ : "mt-1.5 text-base leading-6 text-zinc-500"+ }+ >{description}</p>) : null}diff --git a/autogpt_platform/frontend/src/app/(platform)/marketplace/experts/[expertId]/components/ExpertWorkflowCard/ExpertWorkflowCard.tsx b/autogpt_platform/frontend/src/app/(platform)/marketplace/experts/[expertId]/components/ExpertWorkflowCard/ExpertWorkflowCard.tsxdeleted file mode 100644index 9c33ac96bc..0000000000--- a/autogpt_platform/frontend/src/app/(platform)/marketplace/experts/[expertId]/components/ExpertWorkflowCard/ExpertWorkflowCard.tsx+++ /dev/null@@ -1,70 +0,0 @@-"use client";--import type { ExpertAccent } from "@/app/(platform)/marketplace/components/ExpertsSection/helpers";-import { ExpertWorkflowRef } from "@/app/api/__generated__/models/expertWorkflowRef";-import { Icon } from "@/components/atoms/Icon/Icon";-import { Skeleton } from "@/components/atoms/Skeleton/Skeleton";-import { Calendar03Icon, FlashIcon } from "@hugeicons/core-free-icons";-import Image from "next/image";-import { useImageFallback } from "@/hooks/useImageFallback";-import { isLocalStoreMediaUrl } from "@/lib/store-media";-import { getCadenceLabel } from "./helpers";-import { useExpertWorkflowCard } from "./useExpertWorkflowCard";--interface Props {- workflow: ExpertWorkflowRef;- accent: ExpertAccent;-}--export function ExpertWorkflowCard({ workflow, accent }: Props) {- const { imageUrl, isLoadingImage } = useExpertWorkflowCard(- workflow.store_listing_version_id,- );- const { showImage, handleImageError } = useImageFallback(imageUrl);- const name = workflow.name ?? "Unnamed workflow";-- return (- <li className="flex flex-col overflow-hidden rounded-xl border border-zinc-200 bg-white">- <div className="relative aspect-[2.17/1] w-full bg-zinc-50">- {showImage && imageUrl ? (- <Image- src={imageUrl}- unoptimized={isLocalStoreMediaUrl(imageUrl)}- alt={`${name} preview image`}- fill- sizes="(min-width: 640px) 360px, 100vw"- className="object-cover"- onError={handleImageError}- />- ) : isLoadingImage ? (- <Skeleton className="absolute inset-0 rounded-none" />- ) : (- <div className="absolute inset-0 flex items-center justify-center">- <span className="flex h-10 w-10 items-center justify-center rounded-lg bg-white ring-1 ring-inset ring-zinc-200/70">- <Icon icon={FlashIcon} size={18} className={accent.icon} />- </span>- </div>- )}- </div>- <div className="flex flex-1 flex-col border-t border-zinc-100 p-4">- <div className="text-sm font-medium text-zinc-900">{name}</div>- {workflow.description ? (- <p className="mt-1 line-clamp-2 text-[13px] leading-5 text-zinc-500">- {workflow.description}- </p>- ) : null}- {workflow.schedule_cron ? (- <p className="mt-2 flex items-center gap-1.5 text-[13px] leading-5 text-zinc-600">- <Icon- icon={Calendar03Icon}- size={14}- className="shrink-0"- aria-hidden="true"- />- {getCadenceLabel(workflow.schedule_cron)}- </p>- ) : null}- </div>- </li>- );-}diff --git a/autogpt_platform/frontend/src/app/(platform)/marketplace/experts/[expertId]/components/ExpertWorkflowCard/__tests__/ExpertWorkflowCard.test.tsx b/autogpt_platform/frontend/src/app/(platform)/marketplace/experts/[expertId]/components/ExpertWorkflowCard/__tests__/ExpertWorkflowCard.test.tsxdeleted file mode 100644index 448dc07bca..0000000000--- a/autogpt_platform/frontend/src/app/(platform)/marketplace/experts/[expertId]/components/ExpertWorkflowCard/__tests__/ExpertWorkflowCard.test.tsx+++ /dev/null@@ -1,37 +0,0 @@-import { describe, expect, test, vi } from "vitest";-import { fireEvent, render, screen } from "@/tests/integrations/test-utils";--import { ExpertWorkflowCard } from "../ExpertWorkflowCard";-import type { ExpertWorkflowRef } from "@/app/api/__generated__/models/expertWorkflowRef";-import { getExpertAccent } from "@/app/(platform)/marketplace/components/ExpertsSection/helpers";--vi.mock("../useExpertWorkflowCard", () => ({- useExpertWorkflowCard: () => ({- imageUrl: "https://cdn.test/workflow.png",- isLoadingImage: false,- }),-}));--const WORKFLOW = {- name: "Daily digest",- description: "Sends a summary each morning",- store_listing_version_id: "lv1",-} as ExpertWorkflowRef;--describe("ExpertWorkflowCard", () => {- test("falls back to the accent icon when the image URL is dead", () => {- const { container } = render(- <ExpertWorkflowCard- workflow={WORKFLOW}- accent={getExpertAccent("Ops")}- />,- );-- expect(screen.getByAltText("Daily digest preview image")).toBeDefined();- fireEvent.error(screen.getByAltText("Daily digest preview image"));-- expect(screen.queryByAltText("Daily digest preview image")).toBeNull();- expect(container.querySelector("svg")).not.toBeNull();- expect(screen.getByText("Daily digest")).toBeDefined();- });-});diff --git a/autogpt_platform/frontend/src/app/(platform)/marketplace/experts/[expertId]/components/ExpertWorkflowCard/useExpertWorkflowCard.ts b/autogpt_platform/frontend/src/app/(platform)/marketplace/experts/[expertId]/components/ExpertWorkflowCard/useExpertWorkflowCard.tsdeleted file mode 100644index 380d6599d3..0000000000--- a/autogpt_platform/frontend/src/app/(platform)/marketplace/experts/[expertId]/components/ExpertWorkflowCard/useExpertWorkflowCard.ts+++ /dev/null@@ -1,18 +0,0 @@-import { useGetV2GetAgentByVersion } from "@/app/api/__generated__/endpoints/store/store";-import { okData } from "@/app/api/helpers";--/** The marketplace listing behind a preloaded workflow, for its preview- * image. Workflows installed from a library agent have no listing. */-export function useExpertWorkflowCard(storeListingVersionId: string | null) {- const listingQuery = useGetV2GetAgentByVersion(storeListingVersionId ?? "", {- query: {- enabled: Boolean(storeListingVersionId),- select: (response) => okData(response)?.agent_image?.[0] ?? null,- },- });-- return {- imageUrl: listingQuery.data ?? null,- isLoadingImage: listingQuery.isLoading,- };-}diff --git a/autogpt_platform/frontend/src/app/(platform)/marketplace/experts/[expertId]/components/ExpertWorkflowList.tsx b/autogpt_platform/frontend/src/app/(platform)/marketplace/experts/[expertId]/components/ExpertWorkflowList.tsxindex d53ece64d4..eb806b83ad 100644--- a/autogpt_platform/frontend/src/app/(platform)/marketplace/experts/[expertId]/components/ExpertWorkflowList.tsx+++ b/autogpt_platform/frontend/src/app/(platform)/marketplace/experts/[expertId]/components/ExpertWorkflowList.tsx@@ -1,15 +1,17 @@import { Expert } from "@/app/api/__generated__/models/expert";-import type { ExpertAccent } from "../../../components/ExpertsSection/helpers";+import { Icon } from "@/components/atoms/Icon/Icon";+import { Calendar03Icon, FlashIcon } from "@hugeicons/core-free-icons";+import { getCadenceLabel } from "./ExpertWorkflowCard/helpers";import { ExpertSection } from "./ExpertSection";-import { ExpertWorkflowCard } from "./ExpertWorkflowCard/ExpertWorkflowCard";interface Props {name: string;workflows: Expert["workflows"];- accent: ExpertAccent;}-export function ExpertWorkflowList({ name, workflows, accent }: Props) {+/** A quiet list at the foot of the page: the name, one line on what it does+ * and its cadence. The story above sells the expert; this is the detail. */+export function ExpertWorkflowList({ name, workflows }: Props) {if (workflows.length === 0) return null;return (@@ -17,14 +19,36 @@ export function ExpertWorkflowList({ name, workflows, accent }: Props) {title="Workflows"count={workflows.length}description={`Installed and ready to run the moment ${name} joins your team.`}+ quiet>- <ul className="grid gap-4 sm:grid-cols-2">+ <ul className="divide-y divide-zinc-200/70 rounded-2xl bg-white px-4 smooth-shadow-ring-sm">{workflows.map((workflow) => (- <ExpertWorkflowCard- key={workflow.id}- workflow={workflow}- accent={accent}- />+ <li key={workflow.id} className="flex items-start gap-3 py-3">+ <Icon+ icon={FlashIcon}+ size={16}+ aria-hidden+ className="mt-0.5 shrink-0 text-zinc-400"+ />+ <div className="flex min-w-0 flex-1 flex-col gap-0.5 sm:flex-row sm:items-start sm:gap-3">+ <div className="min-w-0 flex-1">+ <p className="truncate text-sm font-medium text-zinc-800">+ {workflow.name ?? "Unnamed workflow"}+ </p>+ {workflow.description ? (+ <p className="truncate text-[13px] text-zinc-500">+ {workflow.description}+ </p>+ ) : null}+ </div>+ {workflow.schedule_cron ? (+ <span className="flex shrink-0 items-center gap-1 text-xs text-zinc-500 sm:mt-0.5">+ <Icon icon={Calendar03Icon} size={13} aria-hidden="true" />+ {getCadenceLabel(workflow.schedule_cron)}+ </span>+ ) : null}+ </div>+ </li>))}</ul></ExpertSection>diff --git a/autogpt_platform/frontend/src/app/(platform)/marketplace/experts/__tests__/expert-page-ssr.test.tsx b/autogpt_platform/frontend/src/app/(platform)/marketplace/experts/__tests__/expert-page-ssr.test.tsxindex 7cea79c728..d2ade4ba70 100644--- a/autogpt_platform/frontend/src/app/(platform)/marketplace/experts/__tests__/expert-page-ssr.test.tsx+++ b/autogpt_platform/frontend/src/app/(platform)/marketplace/experts/__tests__/expert-page-ssr.test.tsx@@ -153,12 +153,12 @@ describe("Marketplace expert page on the server", () => {const html = renderServerHTML(await renderPage("template-maria"));- // Only the header's hire action waits for the session and the flag; the- // profile that follows the header must be text, not placeholders.+ // Only the hire card's action waits for the session and the flag; the+ // rest of the profile must be text, not placeholders.const [header, body] = html.split("</header>");expect(header).toContain("<h1");expect(body).toContain("Maria is a senior marketing strategist");- expect(body).not.toContain("animate-pulse");+ expect(body.match(/animate-pulse/g) ?? []).toHaveLength(1);});test("404s on the server for an id that matches no template", async () => {diff --git a/autogpt_platform/frontend/src/app/(platform)/settings/billing/components/AutomationCreditsTab/UsageCard/UsageCard.tsx b/autogpt_platform/frontend/src/app/(platform)/settings/billing/components/AutomationCreditsTab/UsageCard/UsageCard.tsxindex ee4680a671..32cb90bee6 100644--- a/autogpt_platform/frontend/src/app/(platform)/settings/billing/components/AutomationCreditsTab/UsageCard/UsageCard.tsx+++ b/autogpt_platform/frontend/src/app/(platform)/settings/billing/components/AutomationCreditsTab/UsageCard/UsageCard.tsx@@ -176,13 +176,13 @@ function UsageBar({</TooltipTrigger><TooltipContent side="top"><div className="flex flex-col gap-0.5">- <span className="text-[0.6785rem] font-medium uppercase tracking-[0.06em] text-zinc-500">+ <span className="text-[0.6785rem] font-medium uppercase tracking-[0.06em] text-zinc-400">{day.date}</span>- <span className="text-sm font-medium tabular-nums text-textBlack">+ <span className="text-sm font-medium tabular-nums text-zinc-50">${day.amount.toFixed(2)}</span>- <span className="text-xs tabular-nums text-zinc-500">+ <span className="text-xs tabular-nums text-zinc-400">{day.runs} runs</span></div>diff --git a/autogpt_platform/frontend/src/app/(platform)/team/[expertId]/__tests__/integrations.test.tsx b/autogpt_platform/frontend/src/app/(platform)/team/[expertId]/__tests__/integrations.test.tsxindex 62b74afad5..069e57366d 100644--- a/autogpt_platform/frontend/src/app/(platform)/team/[expertId]/__tests__/integrations.test.tsx+++ b/autogpt_platform/frontend/src/app/(platform)/team/[expertId]/__tests__/integrations.test.tsx@@ -166,13 +166,13 @@ describe("managing an expert's integrations", () => {await within(section).findByText("Work LinkedIn");await userEvent.type(- within(section).getByRole("searchbox", { name: "Search integrations" }),+ within(section).getByRole("textbox", { name: "Search integrations" }),"notion",);expect(within(section).getByText("No integrations match.")).toBeDefined();await userEvent.clear(- within(section).getByRole("searchbox", { name: "Search integrations" }),+ within(section).getByRole("textbox", { name: "Search integrations" }),);expect(within(section).getByText("Work LinkedIn")).toBeDefined();});@@ -186,9 +186,7 @@ describe("managing an expert's integrations", () => {const section = await screen.findByTestId("expert-integrations-section");expect(- await within(section).findByText(- /Nothing connected yet\. Add a tool and Maria can use it/,- ),+ await within(section).findByText(/Connect a tool and Maria can use it/),).toBeDefined();});@@ -281,7 +279,7 @@ describe("managing an expert's integrations", () => {await openIntegrationsTab();await userEvent.click(- await screen.findByRole("button", { name: /Add integration/ }),+ (await screen.findAllByRole("button", { name: /Add integration/ }))[0],);expect(await screen.findByLabelText("Search services")).toBeDefined();@@ -411,7 +409,7 @@ describe("managing an expert's integrations", () => {await waitFor(() => expect(screen.queryByRole("dialog")).toBeNull());await userEvent.click(- screen.getByRole("button", { name: /Add integration/ }),+ screen.getAllByRole("button", { name: /Add integration/ })[0],);dialog = await screen.findByRole("dialog");expect(@@ -454,7 +452,7 @@ describe("managing an expert's integrations", () => {await openIntegrationsTab();await userEvent.click(- await screen.findByRole("button", { name: /Add integration/ }),+ (await screen.findAllByRole("button", { name: /Add integration/ }))[0],);const dialog = await screen.findByRole("dialog");const list = await within(dialog).findByRole("list", { name: "Services" });@@ -527,7 +525,7 @@ describe("managing an expert's integrations", () => {render(<ExpertDetailPage />);await openIntegrationsTab();await userEvent.click(- await screen.findByRole("button", { name: /Add integration/ }),+ (await screen.findAllByRole("button", { name: /Add integration/ }))[0],);const dialog = await screen.findByRole("dialog");const list = await within(dialog).findByRole("list", { name: "Services" });@@ -621,7 +619,7 @@ describe("managing an expert's integrations", () => {render(<ExpertDetailPage />);await openIntegrationsTab();await userEvent.click(- await screen.findByRole("button", { name: /Add integration/ }),+ (await screen.findAllByRole("button", { name: /Add integration/ }))[0],);const dialog = await screen.findByRole("dialog");await userEvent.click(@@ -696,7 +694,7 @@ describe("managing an expert's integrations", () => {await openIntegrationsTab();await userEvent.click(- await screen.findByRole("button", { name: /Add integration/ }),+ (await screen.findAllByRole("button", { name: /Add integration/ }))[0],);await userEvent.click(await screen.findByText("Notion"));@@ -776,7 +774,7 @@ describe("managing an expert's integrations", () => {await within(section).findByText("Work LinkedIn");await userEvent.click(- screen.getByRole("button", { name: /Add integration/ }),+ screen.getAllByRole("button", { name: /Add integration/ })[0],);await userEvent.click(await screen.findByText("Notion"));expect(await screen.findByText("Connect AutoGPT to Notion")).toBeDefined();@@ -819,8 +817,9 @@ describe("managing an expert's integrations", () => {);render(<ExpertDetailPage />);await openIntegrationsTab();+ // The empty state offers its own "Add integration" beside the header's.await userEvent.click(- await screen.findByRole("button", { name: /Add integration/ }),+ (await screen.findAllByRole("button", { name: /Add integration/ }))[0],);await userEvent.click(await screen.findByText("OpenAI"));await userEvent.click(@@ -849,7 +848,7 @@ describe("managing an expert's integrations", () => {await openIntegrationsTab();await userEvent.click(- await screen.findByRole("button", { name: /Add integration/ }),+ (await screen.findAllByRole("button", { name: /Add integration/ }))[0],);const dialog = await screen.findByRole("dialog");diff --git a/autogpt_platform/frontend/src/app/(platform)/team/[expertId]/__tests__/main.test.tsx b/autogpt_platform/frontend/src/app/(platform)/team/[expertId]/__tests__/main.test.tsxindex 74f758e6f8..0324d9d133 100644--- a/autogpt_platform/frontend/src/app/(platform)/team/[expertId]/__tests__/main.test.tsx+++ b/autogpt_platform/frontend/src/app/(platform)/team/[expertId]/__tests__/main.test.tsx@@ -21,7 +21,6 @@ import {import { LibraryAgent } from "@/app/api/__generated__/models/libraryAgent";import { LibraryAgentResponse } from "@/app/api/__generated__/models/libraryAgentResponse";import { ExpertActivityDay } from "@/app/api/__generated__/models/expertActivityDay";-import { ExpertRun } from "@/app/api/__generated__/models/expertRun";import {getDeleteV1DeleteExecutionScheduleMockHandler,getGetV1ListExecutionSchedulesForAUserMockHandler,@@ -64,6 +63,7 @@ import { format, subDays } from "date-fns";import { afterEach, beforeEach, describe, expect, test, vi } from "vitest";import { heldRead } from "@/app/(platform)/copilot/components/ApprovalQueue/__tests__/fixtures";import ExpertDetailPage from "../page";+import { RECENT_CONVERSATIONS_LIMIT } from "../components/ExpertOverview/useExpertOverview";vi.mock("@/services/environment", async (importActual) => {const actual = await importActual<typeof import("@/services/environment")>();@@ -194,36 +194,6 @@ const mariaSchedule: GraphExecutionJobInfo = {expert_id: "expert-maria",};-const mariaRuns: ExpertRun[] = [- {- execution_id: "run-1",- graph_id: "graph-1",- agent_name: "Weekly Report",- library_agent_id: "lib-1",- status: "completed",- output_type: "table",- output_key: "result",- needs_review: false,- source: "scheduled",- started_at: "2026-09-06T10:00:00Z" as unknown as Date,- ended_at: "2026-09-06T10:01:12Z" as unknown as Date,- link: "/library/agents/lib-1?activeTab=runs&activeItem=run-1",- },- {- execution_id: "run-2",- graph_id: "graph-2",- agent_name: "SEO Audit",- library_agent_id: "lib-2",- status: "review",- output_type: "doc",- output_key: "report",- needs_review: true,- started_at: null,- ended_at: null,- link: "/library/agents/lib-2?activeTab=runs&activeItem=run-2",- },-];-const ACTIVITY_WINDOW_DAYS = 365;/** The backend sends `day` as a bare `YYYY-MM-DD`, which the client keeps as@@ -323,10 +293,13 @@ describe("ExpertDetailPage", () => {expect(await screen.findByRole("heading", { name: "Maria" })).toBeDefined();expect(screen.getByText(/Marketing Manager/)).toBeDefined();expect(screen.queryByText("Marketing Strategist")).toBeNull();- expect(screen.getAllByText(maria.tagline!)).toHaveLength(1);+ expect(screen.queryByText(maria.tagline!)).toBeNull();expect(screen.getByText("Maria is a senior marketing strategist."),).toBeDefined();+ expect(screen.queryByText("Identity")).toBeNull();++ await openTab("Soul");expect(screen.getByText("Identity")).toBeDefined();expect(screen.getByText("You are Maria, a senior marketing strategist."),@@ -372,11 +345,11 @@ describe("ExpertDetailPage", () => {.getAllByRole("img").map((logo) => logo.getAttribute("alt")),).toEqual(["GitHub", "OpenAI"]);- const chip = within(header).getByText("Marketing");- expect(integrations.parentElement?.contains(chip)).toBe(true);+ // The category pill now sits on the cover, still inside the header.+ expect(within(header).getByText("Marketing")).toBeDefined();});- test("keeps the budget above the tabs and the summary in Basics", async () => {+ test("keeps the budget above the tabs and the summary in Overview", async () => {render(<ExpertDetailPage />);const budget = await screen.findByRole("region", {@@ -400,7 +373,7 @@ describe("ExpertDetailPage", () => {expect(within(summary).queryByText("Skills")).toBeNull();expect(within(summary).queryByText("Workflows")).toBeNull();- await openTab("Work");+ await openTab("Soul");expect(screen.getByRole("region", { name: "Maria budget" })).toBe(budget);expect(screen.queryByRole("complementary", { name: "Maria at a glance" }),@@ -547,7 +520,7 @@ describe("ExpertDetailPage", () => {expect(await screen.findByTestId("schedule-row")).toBeDefined();await user.type(- screen.getByRole("searchbox", { name: "Search schedules" }),+ screen.getByRole("textbox", { name: "Search schedules" }),"nothing-like-this",);expect(screen.getByText("No schedules match.")).toBeDefined();@@ -725,7 +698,8 @@ describe("ExpertDetailPage", () => {).toBeDefined();expect(within(list).getByText("plan content")).toBeDefined();- await user.click(screen.getByRole("button", { name: "Add skill" }));+ // The header and an empty list both offer "Add skill"; the header comes first.+ await user.click(screen.getAllByRole("button", { name: "Add skill" })[0]);const dialog = await screen.findByRole("dialog", { name: "Add a skill" });expect(within(dialog).queryByText("Content strategy")).toBeNull();await user.click(within(dialog).getByRole("button", { name: "Add" }));@@ -784,7 +758,8 @@ describe("ExpertDetailPage", () => {render(<ExpertDetailPage />);await openTab("Skills");- await user.click(screen.getByRole("button", { name: "Add skill" }));+ // The header and an empty list both offer "Add skill"; the header comes first.+ await user.click(screen.getAllByRole("button", { name: "Add skill" })[0]);const dialog = await screen.findByRole("dialog", { name: "Add a skill" });await user.click(within(dialog).getByRole("tab", { name: "Marketplace" }));@@ -808,7 +783,8 @@ describe("ExpertDetailPage", () => {render(<ExpertDetailPage />);await openTab("Skills");- await user.click(screen.getByRole("button", { name: "Add skill" }));+ // The header and an empty list both offer "Add skill"; the header comes first.+ await user.click(screen.getAllByRole("button", { name: "Add skill" })[0]);const dialog = await screen.findByRole("dialog", { name: "Add a skill" });expect(@@ -857,23 +833,21 @@ describe("ExpertDetailPage", () => {expect(screen.getAllByTestId("expert-workflow-row")).toHaveLength(2);await user.type(- screen.getByRole("searchbox", { name: "Search workflows" }),+ screen.getByRole("textbox", { name: "Search workflows" }),"seo",);expect(screen.getAllByTestId("expert-workflow-row")).toHaveLength(1);expect(screen.getByText("SEO Audit")).toBeDefined();- await user.clear(- screen.getByRole("searchbox", { name: "Search workflows" }),- );- await user.click(screen.getByRole("button", { name: "Filter workflows" }));+ await user.clear(screen.getByRole("textbox", { name: "Search workflows" }));+ await user.click(screen.getByRole("button", { name: /^Filter workflows/ }));await user.click(await screen.findByRole("menuitemradio", { name: "Scheduled" }),);expect(screen.getAllByTestId("expert-workflow-row")).toHaveLength(1);expect(screen.getByText("Content Calendar")).toBeDefined();- await user.click(screen.getByRole("button", { name: "Filter workflows" }));+ await user.click(screen.getByRole("button", { name: /^Filter workflows/ }));await user.click(await screen.findByRole("menuitemradio", { name: "Manual" }),);@@ -998,70 +972,6 @@ describe("ExpertDetailPage", () => {expect(await screen.findByText(/No schedules yet/)).toBeDefined();});- test("shows the expert's recent work with honest status chips", async () => {- server.use(getListExpertRunsMockHandler(mariaRuns));-- render(<ExpertDetailPage />);-- await openTab("Work");- const workList = await screen.findByRole("list", { name: "Expert work" });- expect(within(workList).getByText("Weekly Report")).toBeDefined();- expect(within(workList).getByText("Completed")).toBeDefined();- // A run paused for review reads "Waiting for review" — never "Completed"- // with a contradictory badge next to it.- expect(within(workList).getByText("Waiting for review")).toBeDefined();- expect(within(workList).queryByText("Needs review")).toBeNull();- });-- test("filters work to runs that need review", async () => {- const user = userEvent.setup();- server.use(getListExpertRunsMockHandler(mariaRuns));-- render(<ExpertDetailPage />);-- await openTab("Work");- await screen.findByRole("list", { name: "Expert work" });-- await user.click(screen.getByRole("button", { name: "Filter work" }));- await user.click(- await screen.findByRole("menuitemradio", { name: "Needs review" }),- );-- const workList = screen.getByRole("list", { name: "Expert work" });- expect(within(workList).queryByText("Weekly Report")).toBeNull();- expect(within(workList).getByText("SEO Audit")).toBeDefined();- });-- test("shows an empty work message when there is no completed work", async () => {- render(<ExpertDetailPage />);-- await openTab("Work");- expect(await screen.findByText(/No completed work yet/)).toBeDefined();- });-- test("shows a retryable error when recent work fails to load", async () => {- let attempts = 0;- server.use(- http.get("/api/proxy/api/experts/:expertId/runs", () => {- attempts += 1;- return attempts === 1- ? HttpResponse.json({ detail: "boom" }, { status: 500 })- : HttpResponse.json(mariaRuns);- }),- );-- render(<ExpertDetailPage />);-- await openTab("Work");- expect(- await screen.findByText("We could not load this expert's recent work."),- ).toBeDefined();- await userEvent.click(screen.getByRole("button", { name: /try again/i }));-- expect(await screen.findByText("Weekly Report")).toBeDefined();- expect(attempts).toBe(2);- });-test("previews an uploaded avatar and saves it after confirmation", async () => {const updateSpy = vi.fn((info: { request: Request }) => info.request);server.use(@@ -1312,9 +1222,12 @@ describe("ExpertDetailPage", () => {test("opens a fresh inline chat from the header Chat button", async () => {let listedSessions = 0;server.use(- getGetV2ListSessionsMockHandler200(() => {- listedSessions += 1;- return { sessions: [], total: 0 };+ http.get("*/api/chat/sessions", ({ request }) => {+ // The Overview's recent-conversations card lists a short preview;+ // only a listing for the chat itself would mean it resumed one.+ const limit = new URL(request.url).searchParams.get("limit");+ if (limit !== String(RECENT_CONVERSATIONS_LIMIT)) listedSessions += 1;+ return HttpResponse.json({ sessions: [], total: 0 });}),);const user = userEvent.setup();@@ -1478,18 +1391,6 @@ describe("ExpertDetailPage", () => {);});- test("shows how and when a run happened on the Work tab", async () => {- server.use(getListExpertRunsMockHandler(mariaRuns));- render(<ExpertDetailPage />);-- await openTab("Work");- const [scheduledMeta] = await screen.findAllByTestId("expert-run-meta");- expect(scheduledMeta.textContent).toContain("Scheduled");- expect(scheduledMeta.textContent).toContain("ago");- expect(scheduledMeta.textContent).toContain("1m 12s");- expect(screen.getAllByTestId("expert-run-meta")).toHaveLength(1);- });-test("opening the chat closes the Soul panel and vice versa", async () => {server.use(getGetV2ListSessionsMockHandler200({ sessions: [], total: 0 }));const user = userEvent.setup();diff --git a/autogpt_platform/frontend/src/app/(platform)/team/[expertId]/components/ExpertAboutSection.tsx b/autogpt_platform/frontend/src/app/(platform)/team/[expertId]/components/ExpertAboutSection.tsxdeleted file mode 100644index 3b0a350988..0000000000--- a/autogpt_platform/frontend/src/app/(platform)/team/[expertId]/components/ExpertAboutSection.tsx+++ /dev/null@@ -1,28 +0,0 @@-"use client";--import { ProfileEntry } from "./ProfileEntry";--interface Props {- bio: string | null;- identity: string;- voicePreferences: string | null;- boundaries: string | null;-}--export function ExpertAboutSection({- bio,- identity,- voicePreferences,- boundaries,-}: Props) {- return (- <section className="space-y-5">- <dl className="space-y-4">- <ProfileEntry label="Bio" value={bio} />- <ProfileEntry label="Identity" value={identity} />- <ProfileEntry label="Voice" value={voicePreferences} />- <ProfileEntry label="Boundaries" value={boundaries} />- </dl>- </section>- );-}diff --git a/autogpt_platform/frontend/src/app/(platform)/team/[expertId]/components/ExpertAvatarButton/ExpertAvatarButton.tsx b/autogpt_platform/frontend/src/app/(platform)/team/[expertId]/components/ExpertAvatarButton/ExpertAvatarButton.tsxindex d3de56aba0..26342dc545 100644--- a/autogpt_platform/frontend/src/app/(platform)/team/[expertId]/components/ExpertAvatarButton/ExpertAvatarButton.tsx+++ b/autogpt_platform/frontend/src/app/(platform)/team/[expertId]/components/ExpertAvatarButton/ExpertAvatarButton.tsx@@ -30,7 +30,7 @@ export function ExpertAvatarButton({ expert }: Props) {name={expert.name}avatarUrl={expert.avatar_url}size={96}- className="rounded-full ring-4 ring-background"+ className="rounded-full border border-[#e3e3e3] ring-4 ring-background"backgroundColor={getExpertTopicHex({avatarUrl: expert.avatar_url,categories: expert.categories,diff --git a/autogpt_platform/frontend/src/app/(platform)/team/[expertId]/components/ExpertBudgetSection.tsx b/autogpt_platform/frontend/src/app/(platform)/team/[expertId]/components/ExpertBudgetSection.tsxindex 6d360ec8b3..ea41899dc2 100644--- a/autogpt_platform/frontend/src/app/(platform)/team/[expertId]/components/ExpertBudgetSection.tsx+++ b/autogpt_platform/frontend/src/app/(platform)/team/[expertId]/components/ExpertBudgetSection.tsx@@ -4,6 +4,7 @@ import { Expert } from "@/app/api/__generated__/models/expert";import { Button } from "@/components/atoms/Button/Button";import { Text } from "@/components/atoms/Text/Text";import { creditsToUsdLabel } from "@/lib/credits";+import { cn } from "@/lib/utils";import { PencilEdit02Icon } from "@hugeicons/core-free-icons";import { useState } from "react";import { SpendMeter } from "../../components/ExpertTeamCard/components/SpendMeter";@@ -12,20 +13,32 @@ import { EditBudgetDialog } from "./EditBudgetDialog/EditBudgetDialog";interface Props {expert: Expert;+ /** The cover colour it sits on: text and meter take darker shades of it. */+ color?: string;+ className?: string;}-export function ExpertBudgetSection({ expert }: Props) {+export function ExpertBudgetSection({ expert, color, className }: Props) {const weeklySpend = getWeeklySpend(expert);const [isEditOpen, setIsEditOpen] = useState(false);return (<sectionaria-label={`${expert.name} budget`}- className="flex w-full shrink-0 flex-col gap-1.5 md:ml-auto md:w-64"+ style={+ color+ ? { color: `color-mix(in srgb, ${color} 55%, #18181b)` }+ : undefined+ }+ className={cn("flex w-full shrink-0 flex-col gap-1.5", className)}><div className="flex items-center justify-between gap-2"><div className="flex items-center gap-1">- <Text variant="body-medium" tone="secondary">+ <Text+ variant="body-medium"+ tone="secondary"+ className={cn(color && "!text-inherit")}+ >Budget</Text><Button@@ -34,6 +47,7 @@ export function ExpertBudgetSection({ expert }: Props) {size="icon-xs"leadingIcon={PencilEdit02Icon}aria-label="Edit budget"+ className={cn(color && "text-inherit hover:bg-white/50")}onClick={() => setIsEditOpen(true)}/></div>@@ -41,7 +55,7 @@ export function ExpertBudgetSection({ expert }: Props) {variant="body-medium"tone="secondary"unmask={false}- className="tabular-nums"+ className={cn("tabular-nums", color && "!text-inherit")}>{weeklySpend? `${creditsToUsdLabel(weeklySpend.spent)} / ${creditsToUsdLabel(weeklySpend.budget)}`@@ -52,6 +66,7 @@ export function ExpertBudgetSection({ expert }: Props) {spent={weeklySpend?.spent ?? 0}budget={weeklySpend?.budget ?? 1}muted={!weeklySpend}+ color={color}/><EditBudgetDialogexpert={expert}diff --git a/autogpt_platform/frontend/src/app/(platform)/team/[expertId]/components/ExpertComputerSection/ExpertComputerSection.tsx b/autogpt_platform/frontend/src/app/(platform)/team/[expertId]/components/ExpertComputerSection/ExpertComputerSection.tsxindex 59c75b4c9b..cdc6f94060 100644--- a/autogpt_platform/frontend/src/app/(platform)/team/[expertId]/components/ExpertComputerSection/ExpertComputerSection.tsx+++ b/autogpt_platform/frontend/src/app/(platform)/team/[expertId]/components/ExpertComputerSection/ExpertComputerSection.tsx@@ -8,7 +8,14 @@ import { Text } from "@/components/atoms/Text/Text";import { desktopStreamRenderer } from "@/components/contextual/OutputRenderers/renderers/DesktopStreamRenderer";import { ErrorCard } from "@/components/molecules/ErrorCard/ErrorCard";import { cn } from "@/lib/utils";-import { ComputerIcon, ComputerTerminalIcon } from "@hugeicons/core-free-icons";+import {+ ComputerTerminalIcon,+ CpuIcon,+ Folder01Icon,+ SecurityIcon,+} from "@hugeicons/core-free-icons";+import type { IconSvgElement } from "@hugeicons/react";+import type { ReactNode } from "react";import {describeMount,desktopActionLabel,@@ -58,106 +65,170 @@ export function ExpertComputerSection({const resources = formatResources(box);const mounts = Object.entries(computer.mounts ?? {});+ const status = running ? "Running" : box ? "Suspended" : "None";+return (<section className="space-y-4"><div className="flex flex-wrap items-start justify-between gap-3">- <div>+ <div className="min-w-0"><Text variant="large-medium">{`${expertName}'s computer`}</Text>- <Text variant="small" className="mt-1 max-w-prose text-zinc-500">+ <Text variant="small" className="mt-1 max-w-prose !text-zinc-500">One persistent cloud machine only {expertName} uses: the shell itruns commands in and, when needed, its screen. It is suspendedbetween turns and costs nothing while suspended; installed tools and- files stay put. {expertName} has full access to it, so anything- signed in on its desktop is visible to the AI. Do not sign into- personal accounts there.+ files stay put.</Text></div>- <Button- variant="primary"- size="small"- className={ACTION_BUTTON_CLASS}- loading={isOpening}- disabled={!computer.e2b_active}- onClick={openDesktop}- >- {desktopActionLabel(computer)}- </Button></div>{!computer.e2b_active ? (- <div className="rounded-lg bg-amber-50 px-4 py-2.5 ring-1 ring-inset ring-amber-200">+ <div className="rounded-xl bg-amber-50 px-4 py-2.5 ring-1 ring-inset ring-amber-200"><Text variant="small" className="text-amber-700">Cloud sandboxes are not configured on this deployment.</Text></div>) : null}- <div className="rounded-lg border border-zinc-200 bg-white p-4">- <div className="flex items-center justify-between gap-2">- <div className="flex items-center gap-2">- <Icon- icon={ComputerTerminalIcon}- size={16}- className="text-zinc-500"+ {/* The screen itself: the live desktop when there is one, otherwise a+ dark monitor showing the machine's state and the way in. */}+ <div className="overflow-hidden rounded-2xl bg-white p-2 smooth-shadow-ring-sm">+ {stream ? (+ <div className="flex flex-col gap-2">+ <div+ data-testid="expert-desktop-stream"+ className="overflow-hidden rounded-xl"+ >+ {desktopStreamRenderer.render(stream)}+ </div>+ {/* A finished turn suspends the machine and ends this stream, so+ the way back in stays next to it. */}+ <div className="flex justify-end px-1 pb-1">+ <Button+ variant="secondary"+ size="small"+ loading={isOpening}+ disabled={!computer.e2b_active}+ onClick={openDesktop}+ >+ Reconnect desktop+ </Button>+ </div>+ </div>+ ) : (+ <div className="relative flex min-h-[240px] flex-col items-center justify-center gap-4 overflow-hidden rounded-xl bg-gradient-to-br from-zinc-800 via-zinc-900 to-black px-6 py-8 text-center sm:aspect-[16/7] sm:min-h-0 sm:py-0">+ <div+ aria-hidden+ className="pointer-events-none absolute inset-0 bg-[radial-gradient(ellipse_at_top,rgba(255,255,255,0.08),transparent_60%)]"/>- <Text variant="small-medium">Machine</Text>+ <span+ className={cn(+ "relative flex items-center gap-1.5 rounded-full px-2.5 py-1 text-xs font-medium",+ running+ ? "bg-emerald-500/15 text-emerald-300"+ : "bg-white/10 text-zinc-300",+ )}+ >+ <span+ aria-hidden+ className={cn(+ "size-1.5 rounded-full",+ running ? "bg-emerald-400" : "bg-zinc-400",+ )}+ />+ {status}+ </span>+ <Text variant="body" className="relative max-w-md !text-zinc-300">+ {formatScreen(computer)}+ </Text>+ <Button+ variant="secondary"+ size="small"+ className={cn("relative", ACTION_BUTTON_CLASS)}+ loading={isOpening}+ disabled={!computer.e2b_active}+ onClick={openDesktop}+ >+ {desktopActionLabel(computer)}+ </Button></div>- <span- className={cn(- "rounded-full px-2 py-0.5 text-xs font-medium",- running- ? "bg-emerald-50 text-emerald-700"- : box- ? "bg-zinc-100 text-zinc-600"- : "bg-zinc-50 text-zinc-500",- )}- >- {running ? "Running" : box ? "Suspended" : "None"}- </span>- </div>- <Text variant="small" className="mt-2 text-zinc-600">+ )}+ </div>++ <div className="grid grid-cols-1 gap-3 sm:grid-cols-2">+ <DetailTile icon={ComputerTerminalIcon} label="Machine">{box? formatSandboxState(box): "Created on the first message that runs a command."}- </Text>- {resources ? (- <Text variant="small" className="mt-1 text-zinc-500">- {resources}- {box?.mounts_attached === false ? " · no volumes attached" : ""}- </Text>- ) : null}- <div className="mt-3 flex items-center gap-2 border-t border-zinc-100 pt-3">- <Icon icon={ComputerIcon} size={16} className="text-zinc-500" />- <Text variant="small" className="text-zinc-600">- {formatScreen(computer)}- </Text>- </div>+ </DetailTile>+ <DetailTile icon={CpuIcon} label="Resources">+ {resources+ ? `${resources}${box?.mounts_attached === false ? " · no volumes attached" : ""}`+ : "Assigned when the machine is created."}+ </DetailTile></div>{mounts.length > 0 ? (- <div className="rounded-lg border border-zinc-200 bg-white p-4">- <Text variant="small-medium">Volumes</Text>- <ul className="mt-2 space-y-2">+ <div className="rounded-2xl bg-white p-4 smooth-shadow-ring-sm">+ <Text variant="small-medium" className="!text-zinc-700">+ Volumes+ </Text>+ <ul className="mt-2 divide-y divide-zinc-100">{mounts.map(([path, name]) => (- <li key={path} className="flex flex-col gap-0.5">- <code className="text-xs text-zinc-800">{path}</code>- <Text variant="small" className="text-zinc-500">- {describeMount(path, computer)}{" "}- <span className="font-mono text-xs text-zinc-400">- {name}- </span>- </Text>+ <li key={path} className="flex items-start gap-3 py-2.5">+ <span className="flex size-8 shrink-0 items-center justify-center rounded-lg border border-zinc-200 bg-zinc-50 text-zinc-500">+ <Icon icon={Folder01Icon} size={15} aria-hidden />+ </span>+ <span className="flex min-w-0 flex-col gap-0.5">+ <code className="text-xs text-zinc-800">{path}</code>+ <Text variant="small" className="!text-zinc-500">+ {describeMount(path, computer)}{" "}+ <span className="font-mono text-xs text-zinc-400">+ {name}+ </span>+ </Text>+ </span></li>))}</ul></div>) : null}- {stream ? (- <div data-testid="expert-desktop-stream">- {desktopStreamRenderer.render(stream)}- </div>- ) : null}+ <div className="flex items-start gap-2.5 rounded-xl bg-zinc-100/80 px-4 py-3">+ <Icon+ icon={SecurityIcon}+ size={16}+ className="mt-0.5 shrink-0 text-zinc-500"+ />+ <Text variant="small" className="!text-zinc-600">+ {expertName} has full access to this machine, so anything signed in on+ its desktop is visible to the AI. Do not sign into personal accounts+ there.+ </Text>+ </div></section>);}++interface DetailTileProps {+ icon: IconSvgElement;+ label: string;+ children: ReactNode;+}++function DetailTile({ icon, label, children }: DetailTileProps) {+ return (+ <div className="flex items-start gap-3 rounded-2xl bg-white p-4 smooth-shadow-ring-sm">+ <span className="flex size-8 shrink-0 items-center justify-center rounded-lg border border-zinc-200 bg-zinc-50 text-zinc-500">+ <Icon icon={icon} size={15} aria-hidden />+ </span>+ <span className="flex min-w-0 flex-col gap-0.5">+ <Text variant="small-medium" className="!text-zinc-700">+ {label}+ </Text>+ <Text variant="small" className="!text-zinc-500">+ {children}+ </Text>+ </span>+ </div>+ );+}diff --git a/autogpt_platform/frontend/src/app/(platform)/team/[expertId]/components/ExpertDetailHeader.tsx b/autogpt_platform/frontend/src/app/(platform)/team/[expertId]/components/ExpertDetailHeader.tsxindex 328bda47f0..7f5e81e98c 100644--- a/autogpt_platform/frontend/src/app/(platform)/team/[expertId]/components/ExpertDetailHeader.tsx+++ b/autogpt_platform/frontend/src/app/(platform)/team/[expertId]/components/ExpertDetailHeader.tsx@@ -2,6 +2,7 @@import { Expert } from "@/app/api/__generated__/models/expert";import { Button } from "@/components/atoms/Button/Button";+import { getCategoryHex } from "@/components/molecules/ExpertAvatar/colors";import { ExpertIdentityDetails } from "@/components/molecules/ExpertIdentityDetails/ExpertIdentityDetails";import { CategoryTag } from "@/app/(platform)/marketplace/components/CategoryChip/CategoryTag";import { BubbleChatIcon, PencilEdit02Icon } from "@hugeicons/core-free-icons";@@ -9,6 +10,7 @@ import { getExpertCover } from "../../helpers";import { ExpertCover } from "../../components/ExpertTeamCard/components/ExpertCover";import { IntegrationIcons } from "../../components/ExpertTeamCard/components/IntegrationIcons";import { ExpertAvatarButton } from "./ExpertAvatarButton/ExpertAvatarButton";+import { ExpertBudgetSection } from "./ExpertBudgetSection";interface Props {expert: Expert;@@ -21,11 +23,20 @@ export function ExpertDetailHeader({ expert, onEditSoul, onChat }: Props) {const topic = expert.categories?.[0];return (- <header>- <ExpertCover className="h-36" color={cover.color} art={cover.art} />+ <header className="relative flex flex-col">+ <div className="relative">+ <ExpertCover className="h-36" color={cover.color} art={cover.art} />+ {topic ? (+ <CategoryTag+ category={topic}+ size="medium"+ className="absolute left-4 top-4 h-7 px-2.5 text-[13px]"+ />+ ) : null}+ </div><div className="flex flex-col gap-4 sm:flex-row sm:items-center">- <span className="relative z-10 -mt-12 ml-14 block shrink-0">+ <span className="relative z-10 -mt-12 ml-4 block shrink-0"><ExpertAvatarButton expert={expert} /></span><div className="min-w-0 flex-1">@@ -35,9 +46,9 @@ export function ExpertDetailHeader({ expert, onEditSoul, onChat }: Props) {jobTitle={expert.job_title}size="page"nameAlign="baseline"+ areaColor={getCategoryHex(topic)}/><div className="mt-2 flex items-center gap-2 empty:hidden">- {topic ? <CategoryTag category={topic} /> : null}<IntegrationIconsexpertName={expert.name}providers={expert.credential_providers ?? []}@@ -63,6 +74,11 @@ export function ExpertDetailHeader({ expert, onEditSoul, onChat }: Props) {</Button></div></div>+ <ExpertBudgetSection+ expert={expert}+ color={cover.color}+ className="order-last mt-4 gap-2 rounded-xl bg-white/75 px-3.5 py-2.5 shadow-sm ring-1 ring-black/5 backdrop-blur-md sm:absolute sm:right-4 sm:top-4 sm:order-none sm:mt-0 sm:w-64"+ /></header>);}diff --git a/autogpt_platform/frontend/src/app/(platform)/team/[expertId]/components/ExpertFilesSection/ExpertFileRow.tsx b/autogpt_platform/frontend/src/app/(platform)/team/[expertId]/components/ExpertFilesSection/ExpertFileRow.tsxnew file mode 100644index 0000000000..ccfa6a4125--- /dev/null+++ b/autogpt_platform/frontend/src/app/(platform)/team/[expertId]/components/ExpertFilesSection/ExpertFileRow.tsx@@ -0,0 +1,51 @@+"use client";++import { Download01Icon } from "@hugeicons/core-free-icons";+import { FileThumbnail } from "@/app/(platform)/artifacts/components/ArtifactsList/ArtifactsTable/FileThumbnail";+import {+ formatFileSize,+ formatRelativeDate,+ getFileDownloadUrl,+} from "@/app/(platform)/artifacts/components/ArtifactsList/helpers";+import type { WorkspaceFileItem } from "@/app/api/__generated__/models/workspaceFileItem";+import { Icon } from "@/components/atoms/Icon/Icon";+import { Text } from "@/components/atoms/Text/Text";++interface Props {+ file: WorkspaceFileItem;+}++/** A Files-page style row: thumbnail, name, when and how big. The whole+ * row opens the file in a new tab. */+export function ExpertFileRow({ file }: Props) {+ return (+ <a+ href={getFileDownloadUrl(file.id)}+ target="_blank"+ rel="noreferrer"+ title={file.name}+ className="group flex items-center gap-3 rounded-xl px-2 py-2 transition-colors hover:bg-zinc-50"+ >+ <FileThumbnail file={file} />+ <span className="flex min-w-0 flex-1 flex-col">+ <Text+ variant="body-medium"+ as="span"+ className="truncate !text-zinc-900"+ >+ {file.name}+ </Text>+ <Text variant="small" as="span" className="!text-zinc-500">+ {formatRelativeDate(file.created_at)} ·{" "}+ {formatFileSize(file.size_bytes)}+ </Text>+ </span>+ <Icon+ icon={Download01Icon}+ size={16}+ aria-hidden+ className="shrink-0 text-zinc-400 opacity-0 transition-opacity group-hover:opacity-100 [@media(hover:none)]:opacity-100"+ />+ </a>+ );+}diff --git a/autogpt_platform/frontend/src/app/(platform)/team/[expertId]/components/ExpertFilesSection/ExpertFilesSection.tsx b/autogpt_platform/frontend/src/app/(platform)/team/[expertId]/components/ExpertFilesSection/ExpertFilesSection.tsxnew file mode 100644index 0000000000..e408ad1e13--- /dev/null+++ b/autogpt_platform/frontend/src/app/(platform)/team/[expertId]/components/ExpertFilesSection/ExpertFilesSection.tsx@@ -0,0 +1,118 @@+"use client";++import {+ File02Icon,+ Folder01Icon,+ Image01Icon,+ SparklesIcon,+ Table01Icon,+ Upload04Icon,+} from "@hugeicons/core-free-icons";+import { Icon } from "@/components/atoms/Icon/Icon";+import { Skeleton } from "@/components/atoms/Skeleton/Skeleton";+import { Text } from "@/components/atoms/Text/Text";+import { ErrorCard } from "@/components/molecules/ErrorCard/ErrorCard";+import { PillFilterMenu } from "../../../components/PillFilterMenu";+import { SectionEmptyState } from "../../../components/SectionEmptyState";+import { ToolbarSearch } from "../../../components/ToolbarSearch";+import { ExpertFileRow } from "./ExpertFileRow";+import { useExpertFilesSection } from "./useExpertFilesSection";++const FILTERS = [+ { value: "all", label: "All files", icon: Folder01Icon },+ { value: "generated", label: "Created", icon: SparklesIcon },+ { value: "uploaded", label: "Uploaded", icon: Upload04Icon },+] as const;++interface Props {+ expertId: string;+ expertName: string;+}++/** Everything in the expert's chats: what it made and what you gave it. */+export function ExpertFilesSection({ expertId, expertName }: Props) {+ const files = useExpertFilesSection(expertId);++ return (+ <section>+ <div className="mb-2.5 flex flex-wrap items-center justify-between gap-3">+ <Text variant="large-medium" tone="primary">+ {expertName}'s Files+ </Text>+ <div className="flex w-full flex-wrap items-center gap-2 sm:w-auto">+ <ToolbarSearch+ id="expert-files-search"+ label="Search files"+ value={files.query}+ onChange={files.setQuery}+ />+ <PillFilterMenu+ label="Filter files"+ value={files.filter}+ defaultValue="all"+ options={FILTERS}+ onChange={files.setFilter}+ />+ </div>+ </div>++ {files.isLoading ? (+ <div className="mt-4 flex flex-col gap-2">+ <Skeleton className="h-14 w-full rounded-xl" />+ <Skeleton className="h-14 w-full rounded-xl" />+ <Skeleton className="h-14 w-full rounded-xl" />+ </div>+ ) : files.isError ? (+ <ErrorCard+ context={`${expertName}'s files`}+ hint="We could not load the files."+ onRetry={() => files.refetch()}+ />+ ) : files.files.length === 0 ? (+ <SectionEmptyState+ tiles={[+ <Icon+ key="image"+ icon={Image01Icon}+ size={22}+ className="text-sky-500"+ />,+ <Icon+ key="table"+ icon={Table01Icon}+ size={22}+ className="text-emerald-500"+ />,+ <Icon+ key="doc"+ icon={File02Icon}+ size={22}+ className="text-violet-500"+ />,+ ]}+ title="No files yet"+ description={`Files you share with ${expertName} and documents it creates show up here.`}+ />+ ) : files.visible.length === 0 ? (+ <Text variant="body" tone="muted" className="pt-4">+ No files match.+ </Text>+ ) : (+ <div className="mt-4 rounded-2xl bg-white p-2 smooth-shadow-ring-sm">+ <ul aria-label={`${expertName}'s files`} className="flex flex-col">+ {files.visible.map((file) => (+ <li key={file.id}>+ <ExpertFileRow file={file} />+ </li>+ ))}+ </ul>+ {files.hasMore ? (+ <Text variant="small" className="px-2 pb-1 pt-2 !text-zinc-500">+ Showing the latest 200 files.+ </Text>+ ) : null}+ </div>+ )}+ </section>+ );+}diff --git a/autogpt_platform/frontend/src/app/(platform)/team/[expertId]/components/ExpertFilesSection/useExpertFilesSection.ts b/autogpt_platform/frontend/src/app/(platform)/team/[expertId]/components/ExpertFilesSection/useExpertFilesSection.tsnew file mode 100644index 0000000000..8b24e305bc--- /dev/null+++ b/autogpt_platform/frontend/src/app/(platform)/team/[expertId]/components/ExpertFilesSection/useExpertFilesSection.ts@@ -0,0 +1,43 @@+"use client";++import { useState } from "react";+import { useListWorkspaceFiles } from "@/app/api/__generated__/endpoints/workspace/workspace";+import { okData } from "@/app/api/helpers";+import { isInternalToolOutput } from "@/app/(platform)/copilot/components/ContextPanel/components/FilesTab/helpers";+import { isHiddenWorkspaceFile } from "@/lib/workspace-files";++export type ExpertFileFilter = "all" | "generated" | "uploaded";++const FILES_LIMIT = 200;++export function useExpertFilesSection(expertId: string) {+ const [query, setQuery] = useState("");+ const [filter, setFilter] = useState<ExpertFileFilter>("all");+ const filesQuery = useListWorkspaceFiles(+ { expert_id: expertId, limit: FILES_LIMIT },+ { query: { select: okData } },+ );++ const files = (filesQuery.data?.files ?? []).filter(+ (file) => !isInternalToolOutput(file) && !isHiddenWorkspaceFile(file),+ );+ const needle = query.trim().toLowerCase();+ const visible = files.filter(+ (file) =>+ (filter === "all" || file.origin === filter) &&+ (!needle || file.name.toLowerCase().includes(needle)),+ );++ return {+ query,+ setQuery,+ filter,+ setFilter,+ files,+ visible,+ hasMore: Boolean(filesQuery.data?.has_more),+ isLoading: filesQuery.isLoading,+ isError: filesQuery.isError,+ refetch: filesQuery.refetch,+ };+}diff --git a/autogpt_platform/frontend/src/app/(platform)/team/[expertId]/components/ExpertIntegrationsSection/ExpertIntegrationGroups.tsx b/autogpt_platform/frontend/src/app/(platform)/team/[expertId]/components/ExpertIntegrationsSection/ExpertIntegrationGroups.tsxindex 488778e85d..ca11f60354 100644--- a/autogpt_platform/frontend/src/app/(platform)/team/[expertId]/components/ExpertIntegrationsSection/ExpertIntegrationGroups.tsx+++ b/autogpt_platform/frontend/src/app/(platform)/team/[expertId]/components/ExpertIntegrationsSection/ExpertIntegrationGroups.tsx@@ -18,7 +18,7 @@ import { IntegrationLogo } from "@/components/molecules/IntegrationLogo/Integratimport { Delete02Icon, Loading03Icon } from "@hugeicons/core-free-icons";import { motion, useReducedMotion, type Variants } from "framer-motion";-const TYPE_LABELS: Record<string, string> = {+export const TYPE_LABELS: Record<string, string> = {api_key: "API Key",oauth2: "OAuth",user_password: "Username & password",diff --git a/autogpt_platform/frontend/src/app/(platform)/team/[expertId]/components/ExpertIntegrationsSection/ExpertIntegrationsSection.tsx b/autogpt_platform/frontend/src/app/(platform)/team/[expertId]/components/ExpertIntegrationsSection/ExpertIntegrationsSection.tsxindex 9e3d63246d..18f413c5c3 100644--- a/autogpt_platform/frontend/src/app/(platform)/team/[expertId]/components/ExpertIntegrationsSection/ExpertIntegrationsSection.tsx+++ b/autogpt_platform/frontend/src/app/(platform)/team/[expertId]/components/ExpertIntegrationsSection/ExpertIntegrationsSection.tsx@@ -4,7 +4,6 @@ import { Button } from "@/components/atoms/Button/Button";import { Skeleton } from "@/components/atoms/Skeleton/Skeleton";import { ErrorCard } from "@/components/molecules/ErrorCard/ErrorCard";import { Text } from "@/components/atoms/Text/Text";-import { SearchInput } from "@/components/molecules/SearchInput/SearchInput";import { useState } from "react";import { ExpertConnectServiceDialog } from "./ExpertConnectServiceDialog";import { ExpertIntegrationGroups } from "./ExpertIntegrationGroups";@@ -16,19 +15,16 @@ import {TooltipTrigger,} from "@/components/atoms/Tooltip/BaseTooltip";import { useExpertIntegrationsSection } from "./useExpertIntegrationsSection";+import { IntegrationLogo } from "@/components/molecules/IntegrationLogo/IntegrationLogo";+import { SectionEmptyState } from "../../../components/SectionEmptyState";+import { ToolbarSearch } from "../../../components/ToolbarSearch";interface Props {expertId: string;expertName: string;- /** The chat's side panel: a smaller title and no search. */- compact?: boolean;}-export function ExpertIntegrationsSection({- expertId,- expertName,- compact = false,-}: Props) {+export function ExpertIntegrationsSection({ expertId, expertName }: Props) {const {granted,grantable,@@ -62,10 +58,10 @@ export function ExpertIntegrationsSection({return (<section data-testid="expert-integrations-section"><div className="mb-2.5 flex flex-wrap items-center justify-between gap-3">- <Text variant={compact ? "body-medium" : "large-medium"} tone="primary">+ <Text variant="large-medium" tone="primary">{expertName}'s Integrations</Text>- <div className="flex items-center gap-2">+ <div className="flex w-full flex-wrap items-center gap-2 sm:w-auto"><Tooltip><TooltipTrigger asChild><span>@@ -104,15 +100,12 @@ export function ExpertIntegrationsSection({>Add integration</Button>- {compact ? null : (- <SearchInput- size="small"- value={query}- onChange={setQuery}- placeholder="Search integrations"- className="w-48"- />- )}+ <ToolbarSearch+ id="expert-integrations-search"+ label="Search integrations"+ value={query}+ onChange={setQuery}+ /></div></div>@@ -125,10 +118,34 @@ export function ExpertIntegrationsSection({onRetry={refetch}/>) : granted.length === 0 ? (- <Text variant="body" tone="muted">- Nothing connected yet. Add a tool and {expertName} can use it on your- behalf.- </Text>+ <SectionEmptyState+ tiles={[+ <IntegrationLogo key="slack" provider="slack" size={24} />,+ <IntegrationLogo key="notion" provider="notion" size={24} />,+ <IntegrationLogo key="google" provider="google" size={24} />,+ ]}+ title="No integrations yet"+ description={`Connect a tool and ${expertName} can use it on your behalf.`}+ >+ <Button+ variant="primary"+ size="small"+ leadingIcon={PlusSignIcon}+ onClick={openConnect}+ >+ Add integration+ </Button>+ {grantable.length > 0 && !isGrantableError ? (+ <Button+ variant="secondary"+ size="small"+ leadingIcon={Share01Icon}+ onClick={openUseExisting}+ >+ Use existing+ </Button>+ ) : null}+ </SectionEmptyState>) : visible.length === 0 ? (<Text variant="body" tone="muted" className="pt-4">No integrations match.diff --git a/autogpt_platform/frontend/src/app/(platform)/team/[expertId]/components/ExpertNeedsYouSection/ExpertAttentionCard.tsx b/autogpt_platform/frontend/src/app/(platform)/team/[expertId]/components/ExpertNeedsYouSection/ExpertAttentionCard.tsxindex b853a2d034..df10d15b7b 100644--- a/autogpt_platform/frontend/src/app/(platform)/team/[expertId]/components/ExpertNeedsYouSection/ExpertAttentionCard.tsx+++ b/autogpt_platform/frontend/src/app/(platform)/team/[expertId]/components/ExpertNeedsYouSection/ExpertAttentionCard.tsx@@ -54,6 +54,7 @@ export function ExpertAttentionCard({ item, isProcessing, onDecision }: Props) {name={item.expert.name}avatarUrl={item.expert.avatar_url}size={32}+ className="rounded-full border border-[#e3e3e3]"/>) : (<Icondiff --git a/autogpt_platform/frontend/src/app/(platform)/team/[expertId]/components/ExpertOverview/ExpertOverview.tsx b/autogpt_platform/frontend/src/app/(platform)/team/[expertId]/components/ExpertOverview/ExpertOverview.tsxnew file mode 100644index 0000000000..aa52ae7e20--- /dev/null+++ b/autogpt_platform/frontend/src/app/(platform)/team/[expertId]/components/ExpertOverview/ExpertOverview.tsx@@ -0,0 +1,151 @@+"use client";++import {+ BubbleChatIcon,+ File02Icon,+ PlayIcon,+} from "@hugeicons/core-free-icons";+import type { Expert } from "@/app/api/__generated__/models/expert";+import type { ExpertActivity } from "@/app/api/__generated__/models/expertActivity";+import { Skeleton } from "@/components/atoms/Skeleton/Skeleton";+import { Text } from "@/components/atoms/Text/Text";+import { PanelEmptyState } from "@/app/(platform)/copilot/components/ContextPanel/components/PanelEmptyState/PanelEmptyState";+import { Icon } from "@/components/atoms/Icon/Icon";+import { ExpertSummaryCard } from "../ExpertSummaryCard";+import { ActivityChart } from "./components/ActivityChart";+import { LatestOutputs } from "./components/LatestOutputs";+import { OverviewCard } from "./components/OverviewCard";+import { RecentConversations } from "./components/RecentConversations";+import { StatTile } from "./components/StatTile";+import { formatDelta, getBioLead } from "./helpers";+import { useExpertOverview } from "./useExpertOverview";++interface Props {+ expert: Expert;+ activity: ExpertActivity | null;+ isActivityLoading: boolean;+ isActivityError: boolean;+ onChat: () => void;+}++/** How the expert has been doing: headline numbers, the last 30 days of+ * conversations and runs, and what it most recently said and made. */+export function ExpertOverview({+ expert,+ activity,+ isActivityLoading,+ isActivityError,+ onChat,+}: Props) {+ const overview = useExpertOverview(expert.id, activity);++ return (+ <div className="flex flex-col gap-4">+ {expert.bio ? (+ <Text+ variant="body"+ className="!text-[15px] !leading-relaxed !text-zinc-600"+ >+ {getBioLead(expert.bio)}+ </Text>+ ) : null}++ <div className="grid grid-cols-1 gap-3 sm:grid-cols-3">+ <StatTile+ label="Conversations"+ icon={BubbleChatIcon}+ value={activity ? overview.conversations.current : null}+ detail={+ activity+ ? formatDelta(overview.conversations.delta)+ : "Last 30 days"+ }+ isLoading={isActivityLoading}+ />+ <StatTile+ label="Workflow runs"+ icon={PlayIcon}+ value={activity ? overview.runs.current : null}+ detail={activity ? formatDelta(overview.runs.delta) : "Last 30 days"}+ isLoading={isActivityLoading}+ />+ <StatTile+ label="Outputs"+ icon={File02Icon}+ value={overview.isOutputsError ? null : overview.outputCount}+ detail={+ overview.isOutputsError+ ? "Unavailable"+ : overview.hasMoreOutputs+ ? "Showing the latest 200"+ : "All time"+ }+ isLoading={overview.isOutputsLoading}+ />+ </div>++ <div className="grid gap-4 lg:grid-cols-[minmax(0,2fr)_minmax(280px,1fr)]">+ <OverviewCard title="Last 30 days">+ {isActivityLoading ? (+ <Skeleton className="h-56 w-full rounded-lg" />+ ) : isActivityError ? (+ <Text variant="small" tone="muted">+ Couldn't load the last 30 days.+ </Text>+ ) : overview.hasActivity ? (+ <ActivityChart days={overview.chartDays} />+ ) : (+ <PanelEmptyState+ tiles={[+ <Icon+ key="a"+ icon={BubbleChatIcon}+ size={22}+ className="text-sky-500"+ />,+ <Icon+ key="b"+ icon={PlayIcon}+ size={22}+ className="text-orange-500"+ />,+ <Icon+ key="c"+ icon={File02Icon}+ size={22}+ className="text-violet-500"+ />,+ ]}+ title="Nothing to chart yet"+ description={`Once ${expert.name} starts chatting and running workflows, each day shows up here.`}+ />+ )}+ </OverviewCard>+ <ExpertSummaryCard+ expert={expert}+ activity={activity}+ isActivityLoading={isActivityLoading}+ isActivityError={isActivityError}+ />+ </div>++ <div className="grid gap-4 lg:grid-cols-2">+ <RecentConversations+ expertName={expert.name}+ sessions={overview.sessions}+ isLoading={overview.isSessionsLoading}+ isError={overview.isSessionsError}+ onRetry={overview.retrySessions}+ onChat={onChat}+ />+ <LatestOutputs+ expertName={expert.name}+ outputs={overview.outputs}+ isLoading={overview.isOutputsLoading}+ isError={overview.isOutputsError}+ onRetry={overview.retryOutputs}+ />+ </div>+ </div>+ );+}diff --git a/autogpt_platform/frontend/src/app/(platform)/team/[expertId]/components/ExpertOverview/components/ActivityChart.tsx b/autogpt_platform/frontend/src/app/(platform)/team/[expertId]/components/ExpertOverview/components/ActivityChart.tsxnew file mode 100644index 0000000000..0c72eb4dbe--- /dev/null+++ b/autogpt_platform/frontend/src/app/(platform)/team/[expertId]/components/ExpertOverview/components/ActivityChart.tsx@@ -0,0 +1,115 @@+"use client";++import {+ Bar,+ BarChart,+ CartesianGrid,+ ResponsiveContainer,+ Tooltip,+ XAxis,+ YAxis,+} from "recharts";+import { Text } from "@/components/atoms/Text/Text";+import { SERIES_COLORS, type ChartDay } from "../helpers";++interface Props {+ days: ChartDay[];+}++const SERIES = [+ { key: "sessions", label: "Conversations" },+ { key: "runs", label: "Workflow runs" },+] as const;++/** Conversations and workflow runs per day, stacked: both are counts on one+ * scale, so one axis carries them. */+export function ActivityChart({ days }: Props) {+ return (+ <div className="flex flex-col gap-3">+ <ul className="flex items-center gap-4" aria-label="Legend">+ {SERIES.map((series) => (+ <li key={series.key} className="flex items-center gap-1.5">+ <span+ aria-hidden+ className="size-2.5 rounded-sm"+ style={{ backgroundColor: SERIES_COLORS[series.key] }}+ />+ <Text variant="small" className="!text-zinc-600">+ {series.label}+ </Text>+ </li>+ ))}+ </ul>+ <div className="h-48 w-full">+ <ResponsiveContainer width="100%" height="100%">+ <BarChart+ data={days}+ margin={{ top: 4, right: 4, bottom: 0, left: -24 }}+ >+ <CartesianGrid vertical={false} stroke="#f0f0ef" />+ <XAxis+ dataKey="label"+ tickLine={false}+ axisLine={false}+ interval={6}+ tick={{ fontSize: 11, fill: "#71717a" }}+ />+ <YAxis+ allowDecimals={false}+ tickLine={false}+ axisLine={false}+ width={48}+ tick={{ fontSize: 11, fill: "#71717a" }}+ />+ <Tooltip cursor={{ fill: "#f4f4f5" }} content={<ChartTooltip />} />+ <Bar+ dataKey="sessions"+ name="Conversations"+ stackId="activity"+ fill={SERIES_COLORS.sessions}+ stroke="#ffffff"+ strokeWidth={2}+ maxBarSize={16}+ />+ <Bar+ dataKey="runs"+ name="Workflow runs"+ stackId="activity"+ fill={SERIES_COLORS.runs}+ stroke="#ffffff"+ strokeWidth={2}+ radius={[4, 4, 0, 0]}+ maxBarSize={16}+ />+ </BarChart>+ </ResponsiveContainer>+ </div>+ </div>+ );+}++interface TooltipProps {+ active?: boolean;+ payload?: { payload: ChartDay }[];+}++function ChartTooltip({ active, payload }: TooltipProps) {+ const day = active ? payload?.[0]?.payload : null;+ if (!day) return null;++ return (+ <div className="rounded-md bg-zinc-900 px-3 py-2 text-xs text-zinc-50 shadow-sm">+ <p className="mb-1 font-medium">{day.label}</p>+ {SERIES.map((series) => (+ <p key={series.key} className="flex items-center gap-1.5 tabular-nums">+ <span+ aria-hidden+ className="size-2 rounded-sm"+ style={{ backgroundColor: SERIES_COLORS[series.key] }}+ />+ {series.label}: {day[series.key]}+ </p>+ ))}+ </div>+ );+}diff --git a/autogpt_platform/frontend/src/app/(platform)/team/[expertId]/components/ExpertOverview/components/CardError.tsx b/autogpt_platform/frontend/src/app/(platform)/team/[expertId]/components/ExpertOverview/components/CardError.tsxnew file mode 100644index 0000000000..18c13bfdc5--- /dev/null+++ b/autogpt_platform/frontend/src/app/(platform)/team/[expertId]/components/ExpertOverview/components/CardError.tsx@@ -0,0 +1,22 @@+import { Button } from "@/components/atoms/Button/Button";+import { Text } from "@/components/atoms/Text/Text";++interface Props {+ message: string;+ onRetry: () => unknown;+}++/** A card's failed load, said plainly with a way to try again, so it never+ * reads as an empty history. */+export function CardError({ message, onRetry }: Props) {+ return (+ <div className="flex items-center justify-between gap-3 py-2">+ <Text variant="body" tone="muted">+ {message}+ </Text>+ <Button variant="secondary" size="small" onClick={() => void onRetry()}>+ Retry+ </Button>+ </div>+ );+}diff --git a/autogpt_platform/frontend/src/app/(platform)/team/[expertId]/components/ExpertOverview/components/LatestOutputs.tsx b/autogpt_platform/frontend/src/app/(platform)/team/[expertId]/components/ExpertOverview/components/LatestOutputs.tsxnew file mode 100644index 0000000000..10ad2bfbe8--- /dev/null+++ b/autogpt_platform/frontend/src/app/(platform)/team/[expertId]/components/ExpertOverview/components/LatestOutputs.tsx@@ -0,0 +1,78 @@+"use client";++import {+ File02Icon,+ Image01Icon,+ Table01Icon,+} from "@hugeicons/core-free-icons";+import { PanelEmptyState } from "@/app/(platform)/copilot/components/ContextPanel/components/PanelEmptyState/PanelEmptyState";+import type { WorkspaceFileItem } from "@/app/api/__generated__/models/workspaceFileItem";+import { Icon } from "@/components/atoms/Icon/Icon";+import { Skeleton } from "@/components/atoms/Skeleton/Skeleton";+import { ExpertFileRow } from "../../ExpertFilesSection/ExpertFileRow";+import { CardError } from "./CardError";+import { OverviewCard } from "./OverviewCard";++const VISIBLE_OUTPUTS = 5;++interface Props {+ expertName: string;+ outputs: WorkspaceFileItem[];+ isLoading: boolean;+ isError: boolean;+ onRetry: () => unknown;+}++export function LatestOutputs({+ expertName,+ outputs,+ isLoading,+ isError,+ onRetry,+}: Props) {+ return (+ <OverviewCard title="Latest outputs">+ {isLoading ? (+ <div className="flex flex-col gap-2">+ <Skeleton className="h-10 w-full rounded-lg" />+ <Skeleton className="h-10 w-full rounded-lg" />+ </div>+ ) : isError ? (+ <CardError message="Couldn't load outputs." onRetry={onRetry} />+ ) : outputs.length === 0 ? (+ <PanelEmptyState+ tiles={[+ <Icon+ key="image"+ icon={Image01Icon}+ size={22}+ className="text-sky-500"+ />,+ <Icon+ key="table"+ icon={Table01Icon}+ size={22}+ className="text-emerald-500"+ />,+ <Icon+ key="doc"+ icon={File02Icon}+ size={22}+ className="text-violet-500"+ />,+ ]}+ title="No outputs yet"+ description={`Documents and files ${expertName} creates show up here.`}+ />+ ) : (+ <ul className="-mx-2 flex flex-col">+ {outputs.slice(0, VISIBLE_OUTPUTS).map((file) => (+ <li key={file.id}>+ <ExpertFileRow file={file} />+ </li>+ ))}+ </ul>+ )}+ </OverviewCard>+ );+}diff --git a/autogpt_platform/frontend/src/app/(platform)/team/[expertId]/components/ExpertOverview/components/OverviewCard.tsx b/autogpt_platform/frontend/src/app/(platform)/team/[expertId]/components/ExpertOverview/components/OverviewCard.tsxnew file mode 100644index 0000000000..72624e514e--- /dev/null+++ b/autogpt_platform/frontend/src/app/(platform)/team/[expertId]/components/ExpertOverview/components/OverviewCard.tsx@@ -0,0 +1,30 @@+import type { ReactNode } from "react";+import { Text } from "@/components/atoms/Text/Text";+import { cn } from "@/lib/utils";++interface Props {+ title: string;+ action?: ReactNode;+ className?: string;+ children: ReactNode;+}++export function OverviewCard({ title, action, className, children }: Props) {+ return (+ <section+ aria-label={title}+ className={cn(+ "flex min-w-0 flex-col gap-3 rounded-2xl bg-white p-4 smooth-shadow-ring-sm",+ className,+ )}+ >+ <div className="flex items-center justify-between gap-2">+ <Text variant="body-medium" tone="primary">+ {title}+ </Text>+ {action}+ </div>+ {children}+ </section>+ );+}diff --git a/autogpt_platform/frontend/src/app/(platform)/team/[expertId]/components/ExpertOverview/components/RecentConversations.tsx b/autogpt_platform/frontend/src/app/(platform)/team/[expertId]/components/ExpertOverview/components/RecentConversations.tsxnew file mode 100644index 0000000000..e4a3a576e2--- /dev/null+++ b/autogpt_platform/frontend/src/app/(platform)/team/[expertId]/components/ExpertOverview/components/RecentConversations.tsx@@ -0,0 +1,111 @@+"use client";++import Link from "next/link";+import {+ BubbleChatIcon,+ Comment01Icon,+ Message01Icon,+} from "@hugeicons/core-free-icons";+import { formatRelativeDate } from "@/app/(platform)/artifacts/components/ArtifactsList/helpers";+import { PanelEmptyState } from "@/app/(platform)/copilot/components/ContextPanel/components/PanelEmptyState/PanelEmptyState";+import type { SessionSummaryResponse } from "@/app/api/__generated__/models/sessionSummaryResponse";+import { Button } from "@/components/atoms/Button/Button";+import { Icon } from "@/components/atoms/Icon/Icon";+import { Skeleton } from "@/components/atoms/Skeleton/Skeleton";+import { Text } from "@/components/atoms/Text/Text";+import { CardError } from "./CardError";+import { OverviewCard } from "./OverviewCard";++interface Props {+ expertName: string;+ sessions: SessionSummaryResponse[];+ isLoading: boolean;+ isError: boolean;+ onRetry: () => unknown;+ onChat: () => void;+}++export function RecentConversations({+ expertName,+ sessions,+ isLoading,+ isError,+ onRetry,+ onChat,+}: Props) {+ return (+ <OverviewCard title="Recent conversations">+ {isLoading ? (+ <div className="flex flex-col gap-2">+ <Skeleton className="h-10 w-full rounded-lg" />+ <Skeleton className="h-10 w-full rounded-lg" />+ </div>+ ) : isError ? (+ <CardError message="Couldn't load conversations." onRetry={onRetry} />+ ) : sessions.length === 0 ? (+ <PanelEmptyState+ tiles={[+ <Icon+ key="a"+ icon={Comment01Icon}+ size={22}+ className="text-sky-500"+ />,+ <Icon+ key="b"+ icon={Message01Icon}+ size={22}+ className="text-amber-500"+ />,+ <Icon+ key="c"+ icon={BubbleChatIcon}+ size={22}+ className="text-violet-500"+ />,+ ]}+ title="No conversations yet"+ description={`Ask ${expertName} for something and the chat shows up here.`}+ >+ <Button+ variant="primary"+ size="small"+ leadingIcon={BubbleChatIcon}+ onClick={onChat}+ >+ Start a chat+ </Button>+ </PanelEmptyState>+ ) : (+ <ul className="-mx-2 flex flex-col">+ {sessions.map((session) => (+ <li key={session.id}>+ <Link+ href={`/home?sessionId=${session.id}`}+ className="flex items-center gap-3 rounded-xl px-2 py-2 transition-colors hover:bg-zinc-50"+ >+ <span className="flex size-9 shrink-0 items-center justify-center rounded-xl border border-zinc-200 bg-white text-zinc-500">+ <Icon icon={BubbleChatIcon} size={16} aria-hidden />+ </span>+ <span className="flex min-w-0 flex-1 flex-col">+ <Text+ variant="body-medium"+ as="span"+ className="truncate !text-zinc-900"+ >+ {session.title || "Untitled chat"}+ </Text>+ <Text variant="small" as="span" className="!text-zinc-500">+ {session.is_processing+ ? "Working now"+ : formatRelativeDate(session.updated_at)}+ </Text>+ </span>+ </Link>+ </li>+ ))}+ </ul>+ )}+ </OverviewCard>+ );+}diff --git a/autogpt_platform/frontend/src/app/(platform)/team/[expertId]/components/ExpertOverview/components/StatTile.tsx b/autogpt_platform/frontend/src/app/(platform)/team/[expertId]/components/ExpertOverview/components/StatTile.tsxnew file mode 100644index 0000000000..0bc29f8571--- /dev/null+++ b/autogpt_platform/frontend/src/app/(platform)/team/[expertId]/components/ExpertOverview/components/StatTile.tsx@@ -0,0 +1,42 @@+import type { IconSvgElement } from "@hugeicons/react";+import { Icon } from "@/components/atoms/Icon/Icon";+import { Skeleton } from "@/components/atoms/Skeleton/Skeleton";+import { Text } from "@/components/atoms/Text/Text";++interface Props {+ label: string;+ icon: IconSvgElement;+ value: number | null;+ detail?: string;+ isLoading?: boolean;+}++/** A headline number: the figure carries the tile, so no chart. */+export function StatTile({ label, icon, value, detail, isLoading }: Props) {+ return (+ <div className="flex flex-col gap-1 rounded-2xl bg-white p-4 smooth-shadow-ring-sm">+ <div className="flex items-center gap-1.5 text-zinc-500">+ <Icon icon={icon} size={14} aria-hidden />+ <Text variant="small-medium" className="!text-zinc-500">+ {label}+ </Text>+ </div>+ {isLoading ? (+ <Skeleton className="mt-1 h-8 w-16 rounded-md" />+ ) : (+ <Text+ variant="h3"+ as="p"+ className="!font-sans !text-[1.75rem] !font-semibold tabular-nums !leading-9 !text-zinc-900"+ >+ {value ?? "—"}+ </Text>+ )}+ {detail ? (+ <Text variant="small" className="!text-zinc-500">+ {detail}+ </Text>+ ) : null}+ </div>+ );+}diff --git a/autogpt_platform/frontend/src/app/(platform)/team/[expertId]/components/ExpertOverview/helpers.ts b/autogpt_platform/frontend/src/app/(platform)/team/[expertId]/components/ExpertOverview/helpers.tsnew file mode 100644index 0000000000..41889786a9--- /dev/null+++ b/autogpt_platform/frontend/src/app/(platform)/team/[expertId]/components/ExpertOverview/helpers.ts@@ -0,0 +1,71 @@+import type { ExpertActivityDay } from "@/app/api/__generated__/models/expertActivityDay";+import { format, parseISO } from "date-fns";++export const OVERVIEW_WINDOW_DAYS = 30;++// Categorical slots 1 and 2 of the dataviz reference palette, validated as a+// pair on the light surface (normal-vision ΔE 33.6, CVD ΔE 24.7).+export const SERIES_COLORS = {+ sessions: "#2a78d6",+ runs: "#eb6834",+} as const;++function dayKey(day: ExpertActivityDay["day"]): string {+ return typeof day === "string"+ ? (day as string).slice(0, 10)+ : format(day, "yyyy-MM-dd");+}++export interface ChartDay {+ key: string;+ label: string;+ sessions: number;+ runs: number;+}++/** The last 30 days, oldest first, shaped for the activity chart. */+export function getChartDays(days: ExpertActivityDay[]): ChartDay[] {+ return days.slice(-OVERVIEW_WINDOW_DAYS).map((day) => {+ const key = dayKey(day.day);+ return {+ key,+ label: format(parseISO(key), "MMM d"),+ sessions: day.sessions,+ runs: day.runs,+ };+ });+}++function sumWindow(+ days: ExpertActivityDay[],+ field: "sessions" | "runs",+ windowsBack: number,+) {+ const end = days.length - OVERVIEW_WINDOW_DAYS * windowsBack;+ const start = Math.max(0, end - OVERVIEW_WINDOW_DAYS);+ return days+ .slice(start, Math.max(0, end))+ .reduce((total, day) => total + day[field], 0);+}++/** This window's total and how it compares with the window before it. */+export function getWindowStat(+ days: ExpertActivityDay[],+ field: "sessions" | "runs",+) {+ const current = sumWindow(days, field, 0);+ const previous = sumWindow(days, field, 1);+ return { current, delta: current - previous };+}++export function formatDelta(delta: number): string {+ if (delta === 0) return "Same as the 30 days before";+ return `${delta > 0 ? "+" : "−"}${Math.abs(delta)} vs the 30 days before`;+}++/** The bio's opening sentences, whole: the overview leads with these instead+ * of clipping the paragraph mid-sentence. */+export function getBioLead(bio: string, sentences = 2): string {+ const parts = bio.trim().split(/(?<=[.!?])\s+/);+ return parts.slice(0, sentences).join(" ");+}diff --git a/autogpt_platform/frontend/src/app/(platform)/team/[expertId]/components/ExpertOverview/useExpertOverview.ts b/autogpt_platform/frontend/src/app/(platform)/team/[expertId]/components/ExpertOverview/useExpertOverview.tsnew file mode 100644index 0000000000..a8836cc570--- /dev/null+++ b/autogpt_platform/frontend/src/app/(platform)/team/[expertId]/components/ExpertOverview/useExpertOverview.ts@@ -0,0 +1,48 @@+"use client";++import { useGetV2ListSessions } from "@/app/api/__generated__/endpoints/chat/chat";+import { useListWorkspaceFiles } from "@/app/api/__generated__/endpoints/workspace/workspace";+import type { ExpertActivity } from "@/app/api/__generated__/models/expertActivity";+import { okData } from "@/app/api/helpers";+import { isInternalToolOutput } from "@/app/(platform)/copilot/components/ContextPanel/components/FilesTab/helpers";+import { isHiddenWorkspaceFile } from "@/lib/workspace-files";+import { getChartDays, getWindowStat } from "./helpers";++export const RECENT_CONVERSATIONS_LIMIT = 5;+const OUTPUTS_LIMIT = 200;++export function useExpertOverview(+ expertId: string,+ activity: ExpertActivity | null,+) {+ const sessionsQuery = useGetV2ListSessions(+ { expert_id: expertId, limit: RECENT_CONVERSATIONS_LIMIT },+ { query: { select: okData } },+ );+ const filesQuery = useListWorkspaceFiles(+ { expert_id: expertId, origin: "generated", limit: OUTPUTS_LIMIT },+ { query: { select: okData } },+ );++ const days = activity?.days ?? [];+ const outputs = (filesQuery.data?.files ?? []).filter(+ (file) => !isInternalToolOutput(file) && !isHiddenWorkspaceFile(file),+ );++ return {+ chartDays: getChartDays(days),+ hasActivity: days.some((day) => day.sessions > 0 || day.runs > 0),+ conversations: getWindowStat(days, "sessions"),+ runs: getWindowStat(days, "runs"),+ sessions: sessionsQuery.data?.sessions ?? [],+ isSessionsLoading: sessionsQuery.isLoading,+ isSessionsError: sessionsQuery.isError,+ retrySessions: () => sessionsQuery.refetch(),+ outputs,+ outputCount: outputs.length,+ hasMoreOutputs: Boolean(filesQuery.data?.has_more),+ isOutputsLoading: filesQuery.isLoading,+ isOutputsError: filesQuery.isError,+ retryOutputs: () => filesQuery.refetch(),+ };+}diff --git a/autogpt_platform/frontend/src/app/(platform)/team/[expertId]/components/ExpertSchedulesSection.tsx b/autogpt_platform/frontend/src/app/(platform)/team/[expertId]/components/ExpertSchedulesSection.tsxindex c380397470..2b8fd39b12 100644--- a/autogpt_platform/frontend/src/app/(platform)/team/[expertId]/components/ExpertSchedulesSection.tsx+++ b/autogpt_platform/frontend/src/app/(platform)/team/[expertId]/components/ExpertSchedulesSection.tsx@@ -6,8 +6,14 @@ import { EditScheduleModal } from "@/app/(platform)/library/agents/[id]/componenimport { Button } from "@/components/atoms/Button/Button";import { Text } from "@/components/atoms/Text/Text";import { GraphScheduleListItem } from "@/components/contextual/SchedulesPanel/components/GraphScheduleListItem/GraphScheduleListItem";-import { SearchInput } from "@/components/molecules/SearchInput/SearchInput";-import { PlusSignIcon } from "@hugeicons/core-free-icons";+import {+ Calendar03Icon,+ Clock01Icon,+ PlusSignIcon,+ RepeatIcon,+} from "@hugeicons/core-free-icons";+import { Icon } from "@/components/atoms/Icon/Icon";+import { SectionEmptyState } from "../../components/SectionEmptyState";import { useState } from "react";import {filterExpertSchedules,@@ -16,7 +22,8 @@ import {ACTION_BUTTON_CLASS,} from "../../helpers";import { CreateScheduleDialog } from "./CreateScheduleDialog";-import { FilterIconMenu } from "./FilterIconMenu";+import { ToolbarSearch } from "../../components/ToolbarSearch";+import { PillFilterMenu } from "../../components/PillFilterMenu";interface Props {title: string;@@ -45,7 +52,7 @@ export function ExpertSchedulesSection({return (<section><div className="mb-2.5 flex flex-wrap items-center justify-between gap-3">- <div className="flex items-baseline gap-3">+ <div className="flex min-w-0 flex-col gap-0.5 sm:flex-row sm:items-baseline sm:gap-3"><Text variant="large-medium" tone="primary">{title}</Text>@@ -55,7 +62,7 @@ export function ExpertSchedulesSection({</Text>) : null}</div>- <div className="flex items-center gap-2">+ <div className="flex w-full flex-wrap items-center gap-2 sm:w-auto">{expertId && workflows ? (<Buttonvariant="secondary"@@ -66,14 +73,13 @@ export function ExpertSchedulesSection({Create schedule</Button>) : null}- <SearchInput- size="small"+ <ToolbarSearch+ id="expert-schedules-search"+ label="Search schedules"value={query}onChange={setQuery}- placeholder="Search schedules"- className="w-48"/>- <FilterIconMenu+ <PillFilterMenulabel="Filter schedules"value={filter}defaultValue="all"@@ -83,10 +89,41 @@ export function ExpertSchedulesSection({</div></div>{schedules.length === 0 ? (- <Text variant="body" tone="muted" className="pt-4">- No schedules yet. Workflows with a schedule will run {expertName}{" "}- automatically and show up here.- </Text>+ <SectionEmptyState+ tiles={[+ <Icon+ key="clock"+ icon={Clock01Icon}+ size={22}+ className="text-sky-500"+ />,+ <Icon+ key="repeat"+ icon={RepeatIcon}+ size={22}+ className="text-emerald-500"+ />,+ <Icon+ key="calendar"+ icon={Calendar03Icon}+ size={22}+ className="text-violet-500"+ />,+ ]}+ title="No schedules yet"+ description={`Put a workflow on a schedule and ${expertName} runs it for you, on time, every time.`}+ >+ {expertId && workflows ? (+ <Button+ variant="primary"+ size="small"+ leadingIcon={PlusSignIcon}+ onClick={() => setIsCreateOpen(true)}+ >+ Create schedule+ </Button>+ ) : null}+ </SectionEmptyState>) : visible.length === 0 ? (<Text variant="body" tone="muted" className="pt-4">No schedules match.diff --git a/autogpt_platform/frontend/src/app/(platform)/team/[expertId]/components/ExpertSettingsSection.tsx b/autogpt_platform/frontend/src/app/(platform)/team/[expertId]/components/ExpertSettingsSection.tsxindex 16e31c598e..c53a9f1ea9 100644--- a/autogpt_platform/frontend/src/app/(platform)/team/[expertId]/components/ExpertSettingsSection.tsx+++ b/autogpt_platform/frontend/src/app/(platform)/team/[expertId]/components/ExpertSettingsSection.tsx@@ -1,33 +1,201 @@"use client";+import type { IconSvgElement } from "@hugeicons/react";+import {+ BubbleChatIcon,+ Calendar03Icon,+ Folder01Icon,+ Store01Icon,+ UserRemove01Icon,+ WorkflowSquare01Icon,+} from "@hugeicons/core-free-icons";+import type { ReactNode } from "react";import { Expert } from "@/app/api/__generated__/models/expert";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 { useExpertSettingsSection } from "./useExpertSettingsSection";++const VISIBLE_PAUSE_NAMES = 4;interface Props {expert: Expert;onFire: () => void;}+function plural(count: number, word: string) {+ return `${count} ${word}${count === 1 ? "" : "s"}`;+}++/** Firing, spelled out before anyone reaches for the button: what pauses,+ * what stays, and that the expert can come back. */export function ExpertSettingsSection({ expert, onFire }: Props) {+ const {+ pauseItems,+ isPreviewLoading,+ isPreviewError,+ retryPreview,+ fileCount,+ hasMoreFiles,+ } = useExpertSettingsSection(expert.id);+ const workflowCount = expert.workflows.length;+ const pauseNames = pauseItems.slice(0, VISIBLE_PAUSE_NAMES);+ const hiddenPauseCount = pauseItems.length - pauseNames.length;+return (- <section className="rounded-xl border border-red-200 bg-red-50/50 p-4">- <Text variant="large-medium" tone="danger">- Danger zone- </Text>- <Text variant="small" tone="danger" className="mt-1">- Firing {expert.name} pauses every schedule and removes them from your- team.- </Text>- <Button- variant="destructive"- size="small"- className="mt-4"- onClick={onFire}- data-testid="expert-fire-button"- >- Fire {expert.name}- </Button>+ <section+ aria-label={`Fire ${expert.name}`}+ className="overflow-hidden rounded-2xl bg-white smooth-shadow-ring-sm"+ >+ <div className="flex items-start gap-3 border-b border-red-100 bg-red-50/60 px-5 py-4">+ <span className="flex size-10 shrink-0 items-center justify-center rounded-xl bg-red-100 text-red-600">+ <Icon icon={UserRemove01Icon} size={20} aria-hidden />+ </span>+ <div className="min-w-0">+ <Text variant="large-medium" className="!text-zinc-900">+ Fire {expert.name}+ </Text>+ <Text variant="body" className="mt-0.5 !text-zinc-600">+ {expert.name} leaves your team and stops working for you. Here is+ what that means for what you have set up.+ </Text>+ </div>+ </div>++ <ul className="divide-y divide-zinc-100 px-5">+ <Consequence+ icon={Calendar03Icon}+ tone={pauseItems.length > 0 || isPreviewError ? "warn" : "neutral"}+ tag={pauseItems.length > 0 ? "Pauses" : undefined}+ title={+ isPreviewLoading+ ? "Checking schedules and triggers…"+ : isPreviewError+ ? "Couldn't check which schedules and triggers would pause"+ : pauseItems.length > 0+ ? `${plural(pauseItems.length, "automation")} will pause`+ : "No schedules or triggers to pause"+ }+ >+ {isPreviewError ? (+ <button+ type="button"+ onClick={() => void retryPreview()}+ className="mt-1 text-sm font-medium text-zinc-700 underline underline-offset-2 hover:text-zinc-950"+ >+ Retry+ </button>+ ) : null}+ {pauseNames.length > 0 ? (+ <div className="mt-1.5 flex flex-wrap gap-1.5">+ {pauseNames.map((item) => (+ <span+ key={item.id}+ className="max-w-full truncate rounded-full border border-amber-200 bg-amber-50 px-2.5 py-0.5 text-xs text-amber-800"+ >+ {item.name}+ </span>+ ))}+ {hiddenPauseCount > 0 ? (+ <span className="px-1 py-0.5 text-xs text-zinc-500">+ +{hiddenPauseCount} more+ </span>+ ) : null}+ </div>+ ) : null}+ </Consequence>+ <Consequence+ icon={WorkflowSquare01Icon}+ tag="Kept"+ title={+ workflowCount > 0+ ? `${plural(workflowCount, "workflow")} stay in your library`+ : "Installed workflows stay in your library"+ }+ />+ <Consequence+ icon={Folder01Icon}+ tag="Kept"+ title={+ fileCount > 0+ ? `${hasMoreFiles ? `${fileCount}+ files` : plural(fileCount, "file")} from its chats ${fileCount === 1 && !hasMoreFiles ? "stays" : "stay"} in your workspace`+ : "Files from its chats stay in your workspace"+ }+ />+ <Consequence+ icon={BubbleChatIcon}+ tag="Kept"+ title="Chat history stays, read-only"+ />+ <Consequence+ icon={Store01Icon}+ title={`You can hire ${expert.name} again anytime from the marketplace`}+ />+ </ul>++ <div className="flex justify-end border-t border-zinc-100 bg-zinc-50/60 px-5 py-3">+ <Button+ variant="destructive"+ size="small"+ onClick={onFire}+ data-testid="expert-fire-button"+ >+ Fire {expert.name}+ </Button>+ </div></section>);}++interface ConsequenceProps {+ icon: IconSvgElement;+ title: string;+ tag?: string;+ tone?: "neutral" | "warn";+ children?: ReactNode;+}++function Consequence({+ icon,+ title,+ tag,+ tone = "neutral",+ children,+}: ConsequenceProps) {+ const isWarn = tone === "warn";+ return (+ <li className="flex items-start gap-3 py-3">+ <span+ className={cn(+ "flex size-8 shrink-0 items-center justify-center rounded-lg border",+ isWarn+ ? "border-amber-200 bg-amber-50 text-amber-600"+ : "border-zinc-200 bg-zinc-50 text-zinc-500",+ )}+ >+ <Icon icon={icon} size={15} aria-hidden />+ </span>+ <div className="min-w-0 flex-1 pt-1">+ <div className="flex items-center justify-between gap-3">+ <Text variant="body" className="!text-zinc-800">+ {title}+ </Text>+ {tag ? (+ <span+ className={cn(+ "shrink-0 rounded-full px-2 py-0.5 text-xs font-medium",+ isWarn+ ? "bg-amber-50 text-amber-700"+ : "bg-emerald-50 text-emerald-700",+ )}+ >+ {tag}+ </span>+ ) : null}+ </div>+ {children}+ </div>+ </li>+ );+}diff --git a/autogpt_platform/frontend/src/app/(platform)/team/[expertId]/components/ExpertSkillListItem.tsx b/autogpt_platform/frontend/src/app/(platform)/team/[expertId]/components/ExpertSkillListItem.tsxindex 165a8e2a55..71a459216e 100644--- a/autogpt_platform/frontend/src/app/(platform)/team/[expertId]/components/ExpertSkillListItem.tsx+++ b/autogpt_platform/frontend/src/app/(platform)/team/[expertId]/components/ExpertSkillListItem.tsx@@ -4,9 +4,15 @@ 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 { BookOpen01Icon, Delete02Icon } from "@hugeicons/core-free-icons";+import {+ BookOpen01Icon,+ Delete02Icon,+ LinkSquare02Icon,+} from "@hugeicons/core-free-icons";import { ExpertSkillEntry } from "./useExpertSkills";+const VISIBLE_TRIGGERS = 3;+interface Props {entry: ExpertSkillEntry;accentClassName?: string;@@ -14,6 +20,9 @@ interface Props {onRemove?: (name: string) => void;}+/** A skill as a card: accent tile, name, two lines of description and the+ * phrases that set it off. Actions sit top-right and fade in on hover+ * (always shown where there is no hover). */export function ExpertSkillListItem({entry,accentClassName,@@ -22,67 +31,74 @@ export function ExpertSkillListItem({}: Props) {const details = entry.skill ?? entry.library;const triggers = details?.triggers ?? [];+ const shown = triggers.slice(0, VISIBLE_TRIGGERS);+ const hiddenCount = triggers.length - shown.length;+return (<div- className="flex w-full flex-col gap-3 rounded-2xl bg-white p-3.5 smooth-shadow-ring-sm sm:flex-row sm:items-center sm:justify-between"+ className="group relative flex h-full flex-col gap-3 rounded-2xl bg-white p-4 transition-shadow smooth-shadow-ring-sm hover:shadow-md"data-testid="expert-skill-row">- <div className="flex min-w-0 flex-1 items-center gap-3">+ <div className="flex items-start gap-3"><divclassName={cn(- "flex h-9 w-9 flex-shrink-0 items-center justify-center rounded-md bg-violet-50 text-violet-700",+ "flex size-10 shrink-0 items-center justify-center rounded-xl bg-violet-50 text-violet-700",accentClassName,"border-0",)}><Icon icon={BookOpen01Icon} size={18} className="text-inherit" /></div>- <div className="flex min-w-0 flex-col gap-1">- <Text variant="body-medium" className="break-words">+ <div className="flex min-w-0 flex-1 flex-col gap-1 pr-16">+ <Text variant="body-medium" className="break-words !text-zinc-900">{entry.name}</Text>- <Text variant="small" tone="muted">+ <Text variant="small" className="line-clamp-2 !text-zinc-500">{details?.description ?? "Skill details unavailable."}</Text>- {triggers.length > 0 ? (- <div className="mt-1 flex flex-wrap gap-1">- {triggers.map((trigger) => (- <Text- key={trigger}- variant="small"- as="span"- tone="secondary"- className="rounded-md bg-zinc-100 px-2 py-0.5"- >- {trigger}- </Text>- ))}- </div>- ) : null}</div></div>- <div className="flex flex-shrink-0 items-center gap-2">++ {shown.length > 0 ? (+ <div className="mt-auto flex flex-wrap gap-1.5">+ {shown.map((trigger) => (+ <span+ key={trigger}+ className="max-w-full truncate rounded-full border border-zinc-200 bg-zinc-50 px-2.5 py-0.5 text-xs text-zinc-600"+ >+ {trigger}+ </span>+ ))}+ {hiddenCount > 0 ? (+ <span className="rounded-full px-1.5 py-0.5 text-xs text-zinc-500">+ +{hiddenCount}+ </span>+ ) : null}+ </div>+ ) : null}++ <div className="absolute right-3 top-3 flex items-center gap-1 opacity-0 transition-opacity focus-within:opacity-100 group-hover:opacity-100 [@media(hover:none)]:opacity-100">{entry.library ? (<Buttonas="NextLink"href="/library/skills"variant="ghost"- size="small"- >- Open in library- </Button>+ size="icon-sm"+ aria-label="Open in library"+ leadingIcon={LinkSquare02Icon}+ className="text-zinc-500"+ />) : null}{onRemove ? (<Button- variant="secondary"- size="small"+ variant="ghost"+ size="icon-sm"leadingIcon={Delete02Icon}disabled={isSaving}onClick={() => onRemove(entry.name)}aria-label={`Remove ${entry.name}`}- >- Remove- </Button>+ className="text-zinc-500 hover:text-red-600"+ />) : null}</div></div>diff --git a/autogpt_platform/frontend/src/app/(platform)/team/[expertId]/components/ExpertSkillsSection.tsx b/autogpt_platform/frontend/src/app/(platform)/team/[expertId]/components/ExpertSkillsSection.tsxindex 108b11b486..fce9805c50 100644--- a/autogpt_platform/frontend/src/app/(platform)/team/[expertId]/components/ExpertSkillsSection.tsx+++ b/autogpt_platform/frontend/src/app/(platform)/team/[expertId]/components/ExpertSkillsSection.tsx@@ -3,11 +3,18 @@import { Expert } from "@/app/api/__generated__/models/expert";import { Button } from "@/components/atoms/Button/Button";import { Text } from "@/components/atoms/Text/Text";-import { SearchInput } from "@/components/molecules/SearchInput/SearchInput";-import { PlusSignIcon } from "@hugeicons/core-free-icons";+import {+ BookOpen01Icon,+ BulbIcon,+ PlusSignIcon,+ SparklesIcon,+} from "@hugeicons/core-free-icons";+import { Icon } from "@/components/atoms/Icon/Icon";+import { SectionEmptyState } from "../../components/SectionEmptyState";import { AddSkillDialog } from "./AddSkillDialog";import { ExpertSkillListItem } from "./ExpertSkillListItem";import { useExpertSkills } from "./useExpertSkills";+import { ToolbarSearch } from "../../components/ToolbarSearch";interface Props {expert: Expert;@@ -44,7 +51,7 @@ export function ExpertSkillsSection({ expert, accentClassName }: Props) {<Text variant="large-medium" tone="primary">{expert.name}'s Skills</Text>- <div className="flex items-center gap-2">+ <div className="flex w-full flex-wrap items-center gap-2 sm:w-auto"><Buttonvariant="secondary"size="small"@@ -53,26 +60,57 @@ export function ExpertSkillsSection({ expert, accentClassName }: Props) {>Add skill</Button>- <SearchInput- size="small"+ <ToolbarSearch+ id="expert-skills-search"+ label="Search skills"value={query}onChange={setQuery}- placeholder="Search skills"- className="w-48"/></div></div>{!hasAny ? (- <Text variant="body" tone="muted" className="pt-4">- No skills yet. Add skills from your library so {expert.name} knows how- you like things done.- </Text>+ <SectionEmptyState+ tiles={[+ <Icon+ key="book"+ icon={BookOpen01Icon}+ size={22}+ className="text-sky-500"+ />,+ <Icon+ key="bulb"+ icon={BulbIcon}+ size={22}+ className="text-amber-500"+ />,+ <Icon+ key="sparkles"+ icon={SparklesIcon}+ size={22}+ className="text-violet-500"+ />,+ ]}+ title="No skills yet"+ description={`Add skills from your library so ${expert.name} knows how you like things done.`}+ >+ <Button+ variant="primary"+ size="small"+ leadingIcon={PlusSignIcon}+ onClick={openAdd}+ >+ Add skill+ </Button>+ </SectionEmptyState>) : visible.length === 0 ? (<Text variant="body" tone="muted" className="pt-4">No skills match.</Text>) : (- <ul className="flex flex-col gap-3 pt-4" aria-label="Expert skills">+ <ul+ className="grid grid-cols-1 gap-3 pt-4 md:grid-cols-2"+ aria-label="Expert skills"+ >{visible.map((entry) => (<li key={entry.name}><ExpertSkillListItemdiff --git a/autogpt_platform/frontend/src/app/(platform)/team/[expertId]/components/ExpertSoulSection.tsx b/autogpt_platform/frontend/src/app/(platform)/team/[expertId]/components/ExpertSoulSection.tsxnew file mode 100644index 0000000000..16226b8e94--- /dev/null+++ b/autogpt_platform/frontend/src/app/(platform)/team/[expertId]/components/ExpertSoulSection.tsx@@ -0,0 +1,25 @@+"use client";++import { ProfileEntry } from "./ProfileEntry";++interface Props {+ identity: string;+ voicePreferences: string | null;+ boundaries: string | null;+}++/** The expert's Soul: who it is, how it speaks and what it won't do. The+ * header's "Edit Soul" button edits it. */+export function ExpertSoulSection({+ identity,+ voicePreferences,+ boundaries,+}: Props) {+ return (+ <dl className="space-y-4">+ <ProfileEntry label="Identity" value={identity} />+ <ProfileEntry label="Voice" value={voicePreferences} />+ <ProfileEntry label="Boundaries" value={boundaries} />+ </dl>+ );+}diff --git a/autogpt_platform/frontend/src/app/(platform)/team/[expertId]/components/ExpertWorkSection/ExpertWorkSection.tsx b/autogpt_platform/frontend/src/app/(platform)/team/[expertId]/components/ExpertWorkSection/ExpertWorkSection.tsxdeleted file mode 100644index 83a4ea4363..0000000000--- a/autogpt_platform/frontend/src/app/(platform)/team/[expertId]/components/ExpertWorkSection/ExpertWorkSection.tsx+++ /dev/null@@ -1,139 +0,0 @@-"use client";--import { useListExpertRuns } from "@/app/api/__generated__/endpoints/experts/experts";-import { type ExpertRun } from "@/app/api/__generated__/models/expertRun";-import { okData } from "@/app/api/helpers";-import { isOutputType } from "@/components/organisms/WorkOutputSheet/helpers";-import { WorkOutputSheet } from "@/components/organisms/WorkOutputSheet/WorkOutputSheet";-import { Button } from "@/components/atoms/Button/Button";-import { Text } from "@/components/atoms/Text/Text";-import { Badge } from "@/components/atoms/Badge/Badge";-import { Skeleton } from "@/components/atoms/Skeleton/Skeleton";-import { ErrorCard } from "@/components/molecules/ErrorCard/ErrorCard";-import { RunStatusBadge } from "@/components/molecules/RunStatusBadge/RunStatusBadge";-import { getRunStatusGuidance } from "@/components/molecules/RunStatusBadge/helpers";-import { useState } from "react";-import { FilterIconMenu } from "../FilterIconMenu";-import {- filterExpertRuns,- getWorkEmptyMessage,- WORK_FILTERS,- WorkFilter,- getRunMeta,-} from "./helpers";--interface Props {- expertId: string;- expertName: string;- enabled: boolean;-}--export function ExpertWorkSection({ expertId, expertName, enabled }: Props) {- const [filter, setFilter] = useState<WorkFilter>("all");- const [activeRun, setActiveRun] = useState<ExpertRun | null>(null);-- const runsQuery = useListExpertRuns(expertId, {- query: { select: (res) => okData(res) ?? null, enabled },- });- const runs = runsQuery.data ?? [];- const visibleRuns = filterExpertRuns(runs, filter);-- return (- <section>- <div className="mb-2.5 flex flex-wrap items-center justify-between gap-3">- <Text variant="large-medium" tone="primary">- {expertName}'s Work- </Text>- <FilterIconMenu- label="Filter work"- value={filter}- defaultValue="all"- options={WORK_FILTERS}- onChange={setFilter}- />- </div>-- {runsQuery.isLoading ? (- <div className="space-y-3">- <Skeleton className="h-16 w-full rounded-lg" />- <Skeleton className="h-16 w-full rounded-lg" />- </div>- ) : runsQuery.isError && runsQuery.data == null ? (- <ErrorCard- context="this expert's work"- hint="We could not load this expert's recent work."- onRetry={() => runsQuery.refetch()}- />- ) : visibleRuns.length === 0 ? (- <Text variant="body" tone="muted">- {getWorkEmptyMessage(filter)}- </Text>- ) : (- <ul className="flex flex-col gap-3" aria-label="Expert work">- {visibleRuns.map((run) => (- <li key={run.execution_id}>- <ExpertRunRow run={run} onOpen={() => setActiveRun(run)} />- </li>- ))}- </ul>- )}-- {activeRun ? (- <WorkOutputSheet- open={activeRun !== null}- onOpenChange={(open) => {- if (!open) setActiveRun(null);- }}- title={activeRun.agent_name}- outputType={- isOutputType(activeRun.output_type)- ? activeRun.output_type- : "unknown"- }- outputKey={activeRun.output_key}- graphId={activeRun.graph_id}- executionId={activeRun.execution_id}- runLink={activeRun.link}- />- ) : null}- </section>- );-}--function ExpertRunRow({ run, onOpen }: { run: ExpertRun; onOpen: () => void }) {- const meta = getRunMeta(run);- return (- <div className="flex items-center justify-between gap-3 rounded-lg bg-white p-3 ring-1 ring-inset ring-zinc-200">- <div className="min-w-0">- <Text variant="body-medium" tone="primary" className="truncate">- {run.agent_name}- </Text>- <div className="mt-1 flex flex-wrap items-center gap-2">- <RunStatusBadge status={run.status} />- <Text variant="small" tone="secondary">- {getRunStatusGuidance(run.status)}- </Text>- {run.needs_review && run.status.toUpperCase() !== "REVIEW" ? (- <Badge variant="warning" size="small">- Needs review- </Badge>- ) : null}- {meta.parts.length > 0 ? (- <Text- variant="small"- as="span"- tone="muted"- title={meta.startedAt?.toLocaleString()}- data-testid="expert-run-meta"- >- {meta.parts.join(" · ")}- </Text>- ) : null}- </div>- </div>- <Button variant="secondary" size="small" onClick={onOpen}>- Open- </Button>- </div>- );-}diff --git a/autogpt_platform/frontend/src/app/(platform)/team/[expertId]/components/ExpertWorkSection/helpers.ts b/autogpt_platform/frontend/src/app/(platform)/team/[expertId]/components/ExpertWorkSection/helpers.tsdeleted file mode 100644index 9c9e306b2f..0000000000--- a/autogpt_platform/frontend/src/app/(platform)/team/[expertId]/components/ExpertWorkSection/helpers.ts+++ /dev/null@@ -1,73 +0,0 @@-import { ExpertRun } from "@/app/api/__generated__/models/expertRun";-import { formatDistanceToNow } from "date-fns";--export const WORK_FILTERS = [- { value: "all", label: "All work" },- { value: "needs-review", label: "Needs review" },- { value: "completed", label: "Completed" },- { value: "failed", label: "Failed" },- { value: "running", label: "In progress" },-] as const;--export type WorkFilter = (typeof WORK_FILTERS)[number]["value"];--export function filterExpertRuns(runs: ExpertRun[], filter: WorkFilter) {- if (filter === "all") return runs;- if (filter === "needs-review") return runs.filter((run) => run.needs_review);- return runs.filter((run) => {- const status = run.status.toLowerCase();- if (filter === "completed") return status === "completed";- if (filter === "failed")- return status === "failed" || status === "terminated";- return status === "running" || status === "queued";- });-}--export function getWorkEmptyMessage(filter: WorkFilter) {- if (filter === "all")- return "No completed work yet. Finished runs will show up here.";- if (filter === "needs-review") return "Nothing is waiting on your review.";- return "No work matches.";-}--const SOURCE_LABELS: Record<string, string> = {- scheduled: "Scheduled",- trigger: "Triggered",- manual: "Run manually",-};--function toDate(value: unknown): Date | null {- if (!value) return null;- const date = value instanceof Date ? value : new Date(String(value));- return Number.isNaN(date.getTime()) ? null : date;-}--export function formatRunDuration(startedAt: unknown, endedAt: unknown) {- const start = toDate(startedAt);- const end = toDate(endedAt);- if (!start || !end) return null;- const totalSeconds = Math.max(- 0,- Math.round((end.getTime() - start.getTime()) / 1000),- );- if (totalSeconds < 60) return `${totalSeconds}s`;- const hours = Math.floor(totalSeconds / 3600);- const minutes = Math.floor((totalSeconds % 3600) / 60);- const seconds = totalSeconds % 60;- if (hours > 0) return `${hours}h ${minutes}m`;- return seconds > 0 ? `${minutes}m ${seconds}s` : `${minutes}m`;-}--/** Older backends send no `source`; the row simply omits that part. */-export function getRunMeta(run: ExpertRun) {- const parts: string[] = [];- const source = run.source ? SOURCE_LABELS[run.source] : null;- if (source) parts.push(source);- const started = toDate(run.started_at);- if (started) {- parts.push(`${formatDistanceToNow(started, { addSuffix: true })}`);- }- const duration = formatRunDuration(run.started_at, run.ended_at);- if (duration) parts.push(duration);- return { parts, startedAt: started };-}diff --git a/autogpt_platform/frontend/src/app/(platform)/team/[expertId]/components/ExpertWorkflowListItem.tsx b/autogpt_platform/frontend/src/app/(platform)/team/[expertId]/components/ExpertWorkflowListItem.tsxindex 1b9bf95aa0..074b8eb647 100644--- a/autogpt_platform/frontend/src/app/(platform)/team/[expertId]/components/ExpertWorkflowListItem.tsx+++ b/autogpt_platform/frontend/src/app/(platform)/team/[expertId]/components/ExpertWorkflowListItem.tsx@@ -6,15 +6,8 @@ import { Icon } from "@/components/atoms/Icon/Icon";import { Text } from "@/components/atoms/Text/Text";import { safeHumanizeCronExpression } from "@/lib/cron-expression-utils";import { cn } from "@/lib/utils";-import {- Activity01Icon,- WorkflowSquare01Icon,-} from "@hugeicons/core-free-icons";-import { isRenderableImageUrl } from "@/lib/next-image";-import Image from "next/image";-import { isLocalStoreMediaUrl } from "@/lib/store-media";+import { Activity01Icon } from "@hugeicons/core-free-icons";import NextLink from "next/link";-import { useState } from "react";import { ExpertWorkflowActions } from "./ExpertWorkflowActions";import { ExpertWorkflowRunButton } from "./ExpertWorkflowRunButton";import { useExpertWorkflowCard } from "./useExpertWorkflowCard";@@ -24,7 +17,6 @@ interface Props {workflow: ExpertWorkflowRef;libraryAgent: LibraryAgent | undefined;expertId?: string;- accentClassName: string;onAsk?: (prompt: string) => void;}@@ -32,7 +24,6 @@ export function ExpertWorkflowListItem({workflow,libraryAgent,expertId,- accentClassName,onAsk,}: Props) {const {@@ -52,7 +43,6 @@ export function ExpertWorkflowListItem({libraryAgent,expertId,});- const [hasImageError, setHasImageError] = useState(false);const meta = [workflow.schedule_cron? safeHumanizeCronExpression(workflow.schedule_cron)@@ -65,7 +55,7 @@ export function ExpertWorkflowListItem({return (<divdata-testid="expert-workflow-row"- className="group relative flex items-center gap-4 rounded-2xl bg-white px-3.5 py-2.5 transition-colors smooth-shadow-ring-sm hover:bg-zinc-50"+ className="group relative flex flex-col items-stretch gap-3 rounded-2xl bg-white px-3.5 py-2.5 transition-colors smooth-shadow-ring-sm hover:bg-zinc-50 sm:flex-row sm:items-center sm:gap-4">{libraryHref ? (<NextLink@@ -75,30 +65,6 @@ export function ExpertWorkflowListItem({/>) : null}- {/* A square as tall as the text column, title through meta line. */}- {isRenderableImageUrl(libraryAgent?.image_url) && !hasImageError ? (- <div className="pointer-events-none relative aspect-square shrink-0 self-stretch overflow-hidden rounded-lg bg-zinc-100">- <Image- src={libraryAgent.image_url}- unoptimized={isLocalStoreMediaUrl(libraryAgent.image_url)}- alt=""- fill- sizes="96px"- onError={() => setHasImageError(true)}- className="object-cover"- />- </div>- ) : (- <div- className={cn(- accentClassName,- "pointer-events-none flex aspect-square shrink-0 items-center justify-center self-stretch rounded-lg border-0",- )}- >- <Icon icon={WorkflowSquare01Icon} size={20} aria-hidden="true" />- </div>- )}-<div className="pointer-events-none min-w-0 flex-1"><div className="flex items-center gap-2"><Text variant="body-medium" tone="primary" className="truncate">@@ -140,7 +106,7 @@ export function ExpertWorkflowListItem({) : null}</div>- <div className="pointer-events-auto relative z-10 flex shrink-0 items-center gap-1">+ <div className="pointer-events-auto relative z-10 flex shrink-0 items-center justify-end gap-1"><ExpertWorkflowActionsworkflow={workflow}expertId={expertId}diff --git a/autogpt_platform/frontend/src/app/(platform)/team/[expertId]/components/ExpertWorkflowsSection.tsx b/autogpt_platform/frontend/src/app/(platform)/team/[expertId]/components/ExpertWorkflowsSection.tsxindex 152ab70dfe..504bef17e0 100644--- a/autogpt_platform/frontend/src/app/(platform)/team/[expertId]/components/ExpertWorkflowsSection.tsx+++ b/autogpt_platform/frontend/src/app/(platform)/team/[expertId]/components/ExpertWorkflowsSection.tsx@@ -3,12 +3,15 @@import { ExpertWorkflowRef } from "@/app/api/__generated__/models/expertWorkflowRef";import { Button } from "@/components/atoms/Button/Button";import { Text } from "@/components/atoms/Text/Text";-import { SearchInput } from "@/components/molecules/SearchInput/SearchInput";import {+ Calendar03Icon,GridViewIcon,ListViewIcon,+ PlayIcon,PlusSignIcon,+ WorkflowSquare01Icon,} from "@hugeicons/core-free-icons";+import { Icon } from "@/components/atoms/Icon/Icon";import { useState } from "react";import {filterExpertWorkflows,@@ -17,10 +20,12 @@ import {} from "../../helpers";import { ExpertWorkflowCard } from "./ExpertWorkflowCard";import { ExpertWorkflowListItem } from "./ExpertWorkflowListItem";-import { FilterIconMenu } from "./FilterIconMenu";import { useExpertWorkflowAgents } from "./useExpertWorkflowAgents";import { useExpertWorkflowsView } from "./useExpertWorkflowsView";import { ViewToggle } from "./ViewToggle";+import { SectionEmptyState } from "../../components/SectionEmptyState";+import { ToolbarSearch } from "../../components/ToolbarSearch";+import { PillFilterMenu } from "../../components/PillFilterMenu";const VIEW_OPTIONS = [{ value: "list", label: "List view", icon: ListViewIcon },@@ -30,7 +35,6 @@ const VIEW_OPTIONS = [interface Props {expertName: string;workflows: ExpertWorkflowRef[];- accentClassName: string;expertId?: string;coverColor?: string;emptyMessage?: string;@@ -41,7 +45,6 @@ interface Props {export function ExpertWorkflowsSection({expertName,workflows,- accentClassName,expertId,coverColor,emptyMessage,@@ -60,7 +63,7 @@ export function ExpertWorkflowsSection({<Text variant="large-medium" tone="primary">{expertName}'s Workflows</Text>- <div className="flex items-center gap-2">+ <div className="flex w-full flex-wrap items-center gap-2 sm:w-auto">{onInstallWorkflow ? (<Buttonvariant="secondary"@@ -71,14 +74,13 @@ export function ExpertWorkflowsSection({Install workflow</Button>) : null}- <SearchInput- size="small"+ <ToolbarSearch+ id="expert-workflows-search"+ label="Search workflows"value={query}onChange={setQuery}- placeholder="Search workflows"- className="w-48"/>- <FilterIconMenu+ <PillFilterMenulabel="Filter workflows"value={filter}defaultValue="all"@@ -89,10 +91,44 @@ export function ExpertWorkflowsSection({</div></div>{workflows.length === 0 ? (- <Text variant="body" tone="muted">- {emptyMessage ??- `No workflows yet. Install one to give ${expertName} something to run.`}- </Text>+ <SectionEmptyState+ tiles={[+ <Icon+ key="flow"+ icon={WorkflowSquare01Icon}+ size={22}+ className="text-sky-500"+ />,+ <Icon+ key="play"+ icon={PlayIcon}+ size={22}+ className="text-orange-500"+ />,+ <Icon+ key="calendar"+ icon={Calendar03Icon}+ size={22}+ className="text-violet-500"+ />,+ ]}+ title="No workflows yet"+ description={+ emptyMessage ??+ `Install a workflow to give ${expertName} something to run.`+ }+ >+ {onInstallWorkflow ? (+ <Button+ variant="primary"+ size="small"+ leadingIcon={PlusSignIcon}+ onClick={onInstallWorkflow}+ >+ Install workflow+ </Button>+ ) : null}+ </SectionEmptyState>) : visible.length === 0 ? (<Text variant="body" tone="muted">No workflows match.@@ -105,7 +141,6 @@ export function ExpertWorkflowsSection({workflow={workflow}libraryAgent={agentsByID.get(workflow.library_agent_id ?? "")}expertId={expertId}- accentClassName={accentClassName}onAsk={onAskWorkflow}/>))}diff --git a/autogpt_platform/frontend/src/app/(platform)/team/[expertId]/components/FilterIconMenu.tsx b/autogpt_platform/frontend/src/app/(platform)/team/[expertId]/components/FilterIconMenu.tsxdeleted file mode 100644index af6b09938e..0000000000--- a/autogpt_platform/frontend/src/app/(platform)/team/[expertId]/components/FilterIconMenu.tsx+++ /dev/null@@ -1,62 +0,0 @@-"use client";--import { Button } from "@/components/atoms/Button/Button";-import {- DropdownMenu,- DropdownMenuContent,- DropdownMenuRadioGroup,- DropdownMenuRadioItem,- DropdownMenuTrigger,-} from "@/components/molecules/DropdownMenu/DropdownMenu";-import { cn } from "@/lib/utils";-import { FilterHorizontalIcon } from "@hugeicons/core-free-icons";--interface Props<T extends string> {- label: string;- value: T;- options: readonly { value: T; label: string }[];- defaultValue: T;- onChange: (next: T) => void;-}--export function FilterIconMenu<T extends string>({- label,- value,- options,- defaultValue,- onChange,-}: Props<T>) {- const isActive = value !== defaultValue;- return (- <DropdownMenu>- <DropdownMenuTrigger asChild>- {/* Sized and bordered like the small SearchInput it sits beside,- with no fill until a filter is active. */}- <Button- type="button"- variant="outline"- size="icon-sm"- aria-label={label}- leadingIcon={FilterHorizontalIcon}- className={cn(- "size-9 rounded-xl border-input bg-transparent text-zinc-600 shadow-none hover:border-input hover:bg-zinc-50",- isActive &&- "border-zinc-900 bg-zinc-900 text-white hover:border-zinc-800 hover:bg-zinc-800 hover:text-white",- )}- />- </DropdownMenuTrigger>- <DropdownMenuContent align="end" className="min-w-[11rem]">- <DropdownMenuRadioGroup- value={value}- onValueChange={(next) => onChange(next as T)}- >- {options.map((option) => (- <DropdownMenuRadioItem key={option.value} value={option.value}>- {option.label}- </DropdownMenuRadioItem>- ))}- </DropdownMenuRadioGroup>- </DropdownMenuContent>- </DropdownMenu>- );-}diff --git a/autogpt_platform/frontend/src/app/(platform)/team/[expertId]/components/useExpertSettingsSection.ts b/autogpt_platform/frontend/src/app/(platform)/team/[expertId]/components/useExpertSettingsSection.tsnew file mode 100644index 0000000000..8283ae14cc--- /dev/null+++ b/autogpt_platform/frontend/src/app/(platform)/team/[expertId]/components/useExpertSettingsSection.ts@@ -0,0 +1,34 @@+"use client";++import { useGetExpertDetachPreview } from "@/app/api/__generated__/endpoints/experts/experts";+import { useListWorkspaceFiles } from "@/app/api/__generated__/endpoints/workspace/workspace";+import { okData } from "@/app/api/helpers";+import { isInternalToolOutput } from "@/app/(platform)/copilot/components/ContextPanel/components/FilesTab/helpers";+import { isHiddenWorkspaceFile } from "@/lib/workspace-files";+import { getPauseItems } from "../../components/FireExpertDialog/helpers";++const FILES_LIMIT = 200;++/** What firing would touch, read ahead of time so the card can say so. */+export function useExpertSettingsSection(expertId: string) {+ const previewQuery = useGetExpertDetachPreview(expertId, {+ query: { select: (res) => okData(res) ?? null },+ });+ const filesQuery = useListWorkspaceFiles(+ { expert_id: expertId, limit: FILES_LIMIT },+ { query: { select: okData } },+ );++ const files = (filesQuery.data?.files ?? []).filter(+ (file) => !isInternalToolOutput(file) && !isHiddenWorkspaceFile(file),+ );++ return {+ pauseItems: getPauseItems(previewQuery.data ?? null),+ isPreviewLoading: previewQuery.isLoading,+ isPreviewError: previewQuery.isError,+ retryPreview: () => previewQuery.refetch(),+ fileCount: files.length,+ hasMoreFiles: Boolean(filesQuery.data?.has_more),+ };+}diff --git a/autogpt_platform/frontend/src/app/(platform)/team/[expertId]/page.tsx b/autogpt_platform/frontend/src/app/(platform)/team/[expertId]/page.tsxindex 83fd9c8095..26766a0a94 100644--- a/autogpt_platform/frontend/src/app/(platform)/team/[expertId]/page.tsx+++ b/autogpt_platform/frontend/src/app/(platform)/team/[expertId]/page.tsx@@ -15,13 +15,14 @@ import {import { cn } from "@/lib/utils";import { Flag, useFlagStatus } from "@/services/feature-flags/use-get-flag";import {- Briefcase01Icon,Calendar03Icon,ComputerIcon,PlugSocketIcon,Settings01Icon,SparklesIcon,- UserIcon,+ AiBrain01Icon,+ DashboardSquare01Icon,+ Folder01Icon,WorkflowSquare01Icon,} from "@hugeicons/core-free-icons";import { notFound, useParams, useRouter } from "next/navigation";@@ -30,9 +31,16 @@ import { ExpertChatDrawer } from "../components/ExpertChatDrawer/ExpertChatDraweimport { expertToChatTarget } from "../components/ExpertChatDrawer/helpers";import { FireExpertDialog } from "../components/FireExpertDialog/FireExpertDialog";import { SoulDrawer } from "../components/SoulDrawer/SoulDrawer";-import { getLastRunLabel } from "../helpers";-import { ExpertAboutSection } from "./components/ExpertAboutSection";-import { ExpertBudgetSection } from "./components/ExpertBudgetSection";+import {+ getExpertCover,+ getLastRunLabel,+ PROFILE_TABS_INDICATOR_CLASS,+ PROFILE_TABS_LIST_CLASS,+ PROFILE_TABS_TRIGGER_CLASS,+} from "../helpers";+import { ExpertFilesSection } from "./components/ExpertFilesSection/ExpertFilesSection";+import { ExpertOverview } from "./components/ExpertOverview/ExpertOverview";+import { ExpertSoulSection } from "./components/ExpertSoulSection";import { ExpertComputerSection } from "./components/ExpertComputerSection/ExpertComputerSection";import { ExpertDetailHeader } from "./components/ExpertDetailHeader";import { ExpertIntegrationsSection } from "./components/ExpertIntegrationsSection/ExpertIntegrationsSection";@@ -40,19 +48,18 @@ import { ExpertNeedsYouSection } from "./components/ExpertNeedsYouSection/Expertimport { ExpertSchedulesSection } from "./components/ExpertSchedulesSection";import { ExpertSettingsSection } from "./components/ExpertSettingsSection";import { ExpertSkillsSection } from "./components/ExpertSkillsSection";-import { ExpertSummaryCard } from "./components/ExpertSummaryCard";-import { ExpertWorkSection } from "./components/ExpertWorkSection/ExpertWorkSection";import { ExpertWorkflowsSection } from "./components/ExpertWorkflowsSection";import { useExpertDetailPage } from "./useExpertDetailPage";const MAIN_CLASS =- "container min-h-screen max-w-[1180px] space-y-5 pb-16 pt-6 sm:px-8 md:px-12";+ "container min-h-screen max-w-[1180px] space-y-5 px-4 pb-16 pt-6 sm:px-8 md:px-12";const TABS = [- { value: "basics", label: "Basics", icon: UserIcon },- { value: "work", label: "Work", icon: Briefcase01Icon },+ { value: "basics", label: "Overview", icon: DashboardSquare01Icon },+ { value: "soul", label: "Soul", icon: AiBrain01Icon },{ value: "schedules", label: "Schedules", icon: Calendar03Icon },{ value: "workflows", label: "Workflows", icon: WorkflowSquare01Icon },+ { value: "files", label: "Files", icon: Folder01Icon },{ value: "computer", label: "Computer", icon: ComputerIcon },{ value: "integrations", label: "Integrations", icon: PlugSocketIcon },{ value: "skills", label: "Skills", icon: SparklesIcon },@@ -150,57 +157,44 @@ export default function ExpertDetailPage() {</div>) : null}- {/* items-start keeps the tagline level with the Budget label rather- than floating between the label and the bar. */}- <div className="flex flex-col gap-4 md:flex-row md:items-start md:justify-between md:gap-8">- {expert.tagline ? (- <Text variant="body" tone="secondary" className="min-w-0 flex-1">- {expert.tagline}- </Text>- ) : null}- <ExpertBudgetSection expert={expert} />- </div>-<ExpertNeedsYouSectionexpert={expert}enabled={Boolean(enabled) && ready}/>- <TabsLine variant="compact" defaultValue="basics">- <TabsLineList className="overflow-x-auto">+ <TabsLine data-profile-tabs variant="compact" defaultValue="basics">+ <TabsLineList+ flush={false}+ className={PROFILE_TABS_LIST_CLASS}+ indicatorClassName={PROFILE_TABS_INDICATOR_CLASS}+ >{TABS.map((tab) => (<TabsLineTrigger+ className={PROFILE_TABS_TRIGGER_CLASS}key={tab.value}value={tab.value}icon={tab.icon}>- {tab.label}+ <span className="max-sm:sr-only">{tab.label}</span></TabsLineTrigger>))}</TabsLineList><TabsLineContent value="basics">- <div className="grid gap-4 lg:grid-cols-[minmax(0,3fr)_minmax(300px,1fr)]">- <ExpertAboutSection- bio={expert.bio}- identity={expert.identity}- voicePreferences={expert.voice_preferences}- boundaries={expert.boundaries}- />- <ExpertSummaryCard- expert={expert}- activity={activity}- isActivityLoading={isActivityLoading}- isActivityError={isActivityError}- />- </div>+ <ExpertOverview+ expert={expert}+ activity={activity}+ isActivityLoading={isActivityLoading}+ isActivityError={isActivityError}+ onChat={toggleChat}+ /></TabsLineContent>- <TabsLineContent value="work">- <ExpertWorkSection- expertId={expert.id}- expertName={expert.name}- enabled={Boolean(enabled) && ready}+ <TabsLineContent value="soul">+ <ExpertSoulSection+ identity={expert.identity}+ voicePreferences={expert.voice_preferences}+ boundaries={expert.boundaries}/></TabsLineContent>@@ -223,15 +217,16 @@ export default function ExpertDetailPage() {expertName={expert.name}expertId={expert.id}workflows={expert.workflows}- accentClassName={- getRaisedExpertAccent(expert.role, expert.color).pill- }- coverColor={expert.color}+ coverColor={getExpertCover(expert).color}onInstallWorkflow={openPicker}onAskWorkflow={openChatWithPrompt}/></TabsLineContent>+ <TabsLineContent value="files">+ <ExpertFilesSection expertId={expert.id} expertName={expert.name} />+ </TabsLineContent>+<TabsLineContent value="computer"><ExpertComputerSectionexpertId={expert.id}diff --git a/autogpt_platform/frontend/src/app/(platform)/team/__tests__/main.test.tsx b/autogpt_platform/frontend/src/app/(platform)/team/__tests__/main.test.tsxindex c03ed82778..cb2481a2a7 100644--- a/autogpt_platform/frontend/src/app/(platform)/team/__tests__/main.test.tsx+++ b/autogpt_platform/frontend/src/app/(platform)/team/__tests__/main.test.tsx@@ -583,7 +583,12 @@ describe("TeamPage", () => {"These rules are part of every expert's soul and cannot be edited.",),).toBeDefined();- expect(screen.getAllByRole("textbox")).toHaveLength(4);+ // The roster's search field is a textbox too; count only the Soul's.+ expect(+ screen+ .getAllByRole("textbox")+ .filter((box) => box.id !== "team-roster-search"),+ ).toHaveLength(4);expect(screen.queryByRole("button", { name: /remove/i })).toBeNull();});diff --git a/autogpt_platform/frontend/src/app/(platform)/team/__tests__/tabs.test.tsx b/autogpt_platform/frontend/src/app/(platform)/team/__tests__/tabs.test.tsxindex 8abf7482ab..a2376b5085 100644--- a/autogpt_platform/frontend/src/app/(platform)/team/__tests__/tabs.test.tsx+++ b/autogpt_platform/frontend/src/app/(platform)/team/__tests__/tabs.test.tsx@@ -81,19 +81,18 @@ beforeEach(() => {);});-describe("TeamPage tabs", () => {- test("opens on Overview without Pod board", async () => {+describe("TeamPage layout", () => {+ test("shows the roster under a plain header, with no tabs", async () => {server.use(getListExpertsMockHandler([maria]));render(<TeamPage />);- const overview = await screen.findByRole("tab", { name: "Overview" });- expect(overview.getAttribute("aria-selected")).toBe("true");- expect(screen.queryByRole("tab", { name: "Pod board" })).toBeNull();- expect(screen.queryByRole("tab", { name: "All tasks" })).toBeNull();+ expect(await screen.findByText("Maria")).toBeDefined();+ expect(screen.getByRole("heading", { name: "Team" })).toBeDefined();+ expect(screen.queryByRole("tab")).toBeNull();});- test("Overview lists every expert without pod sections", async () => {+ test("lists every expert without pod sections", async () => {const growth: ExpertPod = {id: "pod-growth",name: "Growth",@@ -121,7 +120,7 @@ describe("TeamRoster toolbar", () => {expect(await screen.findByText("Maria")).toBeDefined();await user.type(- screen.getByRole("searchbox", { name: "Search experts" }),+ screen.getByRole("textbox", { name: "Search experts" }),"resear",);@@ -140,7 +139,7 @@ describe("TeamRoster toolbar", () => {expect(await screen.findByText("Maria")).toBeDefined();await user.type(- screen.getByRole("searchbox", { name: "Search experts" }),+ screen.getByRole("textbox", { name: "Search experts" }),"nobody",);@@ -150,7 +149,6 @@ describe("TeamRoster toolbar", () => {});test("the paused filter keeps only experts with paused schedules", async () => {- const user = userEvent.setup();const pausedLee = makeExpert({id: "expert-lee",name: "Lee",@@ -158,10 +156,11 @@ describe("TeamRoster toolbar", () => {});server.use(getListExpertsMockHandler([maria, pausedLee]));+ const user = userEvent.setup();render(<TeamPage />);expect(await screen.findByText("Maria")).toBeDefined();- await user.click(screen.getByRole("button", { name: "Filter experts" }));+ await user.click(screen.getByRole("button", { name: /^Filter experts/ }));await user.click(await screen.findByRole("menuitemradio", { name: "Paused" }),);diff --git a/autogpt_platform/frontend/src/app/(platform)/team/autopilot/components/AutopilotHeader.tsx b/autogpt_platform/frontend/src/app/(platform)/team/autopilot/components/AutopilotHeader.tsxindex 46e1969ffe..3a2db6f2bb 100644--- a/autogpt_platform/frontend/src/app/(platform)/team/autopilot/components/AutopilotHeader.tsx+++ b/autogpt_platform/frontend/src/app/(platform)/team/autopilot/components/AutopilotHeader.tsx@@ -7,17 +7,17 @@ import { ExpertCover } from "../../components/ExpertTeamCard/components/ExpertCoimport { cn } from "@/lib/utils";import { AUTOPILOT_PILL_CLASS, AUTOPILOT_ROLE } from "../../helpers";import {- AUTOPILOT_COVER_COLOR,AUTOPILOT_COVER_URL,AUTOPILOT_NAME,} from "@/components/molecules/AutopilotAvatar/helpers";+import { AUTOPILOT_HEX } from "@/components/molecules/ExpertAvatar/colors";export function AutopilotHeader() {return (<header><ExpertCoverclassName="h-36"- color={AUTOPILOT_COVER_COLOR}+ color={AUTOPILOT_HEX}art={AUTOPILOT_COVER_URL}/>@@ -25,7 +25,7 @@ export function AutopilotHeader() {<AutopilotAvatarsize={96}transparent={false}- className="relative z-10 -mt-12 ml-14 rounded-full"+ className="relative z-10 -mt-12 ml-4 rounded-full border border-[#e3e3e3]"/><div className="min-w-0 flex-1"><div className="flex flex-wrap items-center gap-3">diff --git a/autogpt_platform/frontend/src/app/(platform)/team/autopilot/components/AutopilotSkillsSection.tsx b/autogpt_platform/frontend/src/app/(platform)/team/autopilot/components/AutopilotSkillsSection.tsxindex 31930b694b..5e5ae17a0d 100644--- a/autogpt_platform/frontend/src/app/(platform)/team/autopilot/components/AutopilotSkillsSection.tsx+++ b/autogpt_platform/frontend/src/app/(platform)/team/autopilot/components/AutopilotSkillsSection.tsx@@ -2,10 +2,10 @@import { CopilotSkillInfo } from "@/app/api/__generated__/models/copilotSkillInfo";import { Text } from "@/components/atoms/Text/Text";-import { SearchInput } from "@/components/molecules/SearchInput/SearchInput";import { useState } from "react";import { ExpertSkillListItem } from "../../[expertId]/components/ExpertSkillListItem";import { AUTOPILOT_PILL_CLASS } from "../../helpers";+import { ToolbarSearch } from "../../components/ToolbarSearch";interface Props {skills: CopilotSkillInfo[];@@ -28,12 +28,11 @@ export function AutopilotSkillsSection({ skills }: Props) {<Text variant="large-medium" tone="primary">Otto's Skills</Text>- <SearchInput- size="small"+ <ToolbarSearch+ id="otto-skills-search"+ label="Search skills"value={query}onChange={setQuery}- placeholder="Search skills"- className="w-48"/></div>{skills.length === 0 ? (diff --git a/autogpt_platform/frontend/src/app/(platform)/team/autopilot/page.tsx b/autogpt_platform/frontend/src/app/(platform)/team/autopilot/page.tsxindex 086223b4a4..b9bcde0405 100644--- a/autogpt_platform/frontend/src/app/(platform)/team/autopilot/page.tsx+++ b/autogpt_platform/frontend/src/app/(platform)/team/autopilot/page.tsx@@ -20,8 +20,13 @@ import { notFound } from "next/navigation";import { ExpertSchedulesSection } from "../[expertId]/components/ExpertSchedulesSection";import { ExpertWorkflowsSection } from "../[expertId]/components/ExpertWorkflowsSection";import { BackToTeamLink } from "../components/BackToTeamLink";-import { AUTOPILOT_PILL_CLASS } from "../helpers";+import {+ PROFILE_TABS_INDICATOR_CLASS,+ PROFILE_TABS_LIST_CLASS,+ PROFILE_TABS_TRIGGER_CLASS,+} from "../helpers";import { AUTOPILOT_NAME } from "@/components/molecules/AutopilotAvatar/helpers";+import { AUTOPILOT_HEX } from "@/components/molecules/ExpertAvatar/colors";import { AutopilotAboutSection } from "./components/AutopilotAboutSection";import { AutopilotHeader } from "./components/AutopilotHeader";import { AutopilotSkillsSection } from "./components/AutopilotSkillsSection";@@ -29,7 +34,7 @@ import { useAutopilotPage } from "./useAutopilotPage";import { useAutopilotTab } from "./useAutopilotTab";const MAIN_CLASS =- "container min-h-screen max-w-[1180px] space-y-5 pb-16 pt-6 sm:px-8 md:px-12";+ "container min-h-screen max-w-[1180px] space-y-5 px-4 pb-16 pt-6 sm:px-8 md:px-12";const TABS = [{ value: "basics", label: "Basics", icon: UserIcon },@@ -80,11 +85,25 @@ export default function AutopilotPage() {Built in, always on your team.</Text>- <TabsLine variant="compact" value={activeTab} onValueChange={onTabChange}>- <TabsLineList className="overflow-x-auto">+ <TabsLine+ data-profile-tabs+ variant="compact"+ value={activeTab}+ onValueChange={onTabChange}+ >+ <TabsLineList+ flush={false}+ className={PROFILE_TABS_LIST_CLASS}+ indicatorClassName={PROFILE_TABS_INDICATOR_CLASS}+ >{TABS.map((tab) => (- <TabsLineTrigger key={tab.value} value={tab.value} icon={tab.icon}>- {tab.label}+ <TabsLineTrigger+ className={PROFILE_TABS_TRIGGER_CLASS}+ key={tab.value}+ value={tab.value}+ icon={tab.icon}+ >+ <span className="max-sm:sr-only">{tab.label}</span></TabsLineTrigger>))}</TabsLineList>@@ -106,8 +125,8 @@ export default function AutopilotPage() {<ExpertWorkflowsSectionexpertName={AUTOPILOT_NAME}workflows={workflows}- accentClassName={AUTOPILOT_PILL_CLASS}- emptyMessage="No workflows yet. Workflows in your library that no expert owns show up here."+ coverColor={AUTOPILOT_HEX}+ emptyMessage="Workflows in your library that no expert owns show up here."/></TabsLineContent>diff --git a/autogpt_platform/frontend/src/app/(platform)/team/components/AutopilotCard.tsx b/autogpt_platform/frontend/src/app/(platform)/team/components/AutopilotCard.tsxindex 8430cfc9d1..e19e66f4af 100644--- a/autogpt_platform/frontend/src/app/(platform)/team/components/AutopilotCard.tsx+++ b/autogpt_platform/frontend/src/app/(platform)/team/components/AutopilotCard.tsx@@ -15,6 +15,7 @@ import {CHIP_SHAPE,CHIP_SIZE,} from "@/app/(platform)/marketplace/components/CategoryChip/CategoryChip";+import { categoryTagStyle } from "@/app/(platform)/marketplace/components/CategoryChip/CategoryTag";import { AUTOPILOT_NAME } from "@/components/molecules/AutopilotAvatar/helpers";import { AUTOPILOT_HEX } from "@/components/molecules/ExpertAvatar/colors";import { CardStat, CardStats } from "./CardStats";@@ -51,7 +52,7 @@ export function AutopilotCard({<AutopilotAvatarsize={88}backgroundColor={AUTOPILOT_COVER_COLOR}- className="relative z-10 -mt-12 ml-1 rounded-full ring-4 ring-background"+ className="relative z-10 -mt-12 ml-1 rounded-full border border-[#e3e3e3] ring-4 ring-background"/></div>@@ -66,8 +67,8 @@ export function AutopilotCard({{/* Not a category, but it sits in the same row as the experts'topic tags and should not read as a different kind of thing. */}<span- className={cn(CHIP_SHAPE, CHIP_SIZE.small, "max-w-full")}- style={{ color: AUTOPILOT_COVER_COLOR }}+ className={cn(CHIP_SHAPE, CHIP_SIZE.small, "h-[22px] max-w-full")}+ style={categoryTagStyle(AUTOPILOT_COVER_COLOR)}><Icon icon={SparklesIcon} size={12} className="shrink-0" /><span className="truncate">{AUTOPILOT_ROLE}</span>diff --git a/autogpt_platform/frontend/src/app/(platform)/team/components/ExpertChatDrawer/__tests__/ExpertChatDrawer.test.tsx b/autogpt_platform/frontend/src/app/(platform)/team/components/ExpertChatDrawer/__tests__/ExpertChatDrawer.test.tsxindex 3d71a81ed8..772058084b 100644--- a/autogpt_platform/frontend/src/app/(platform)/team/components/ExpertChatDrawer/__tests__/ExpertChatDrawer.test.tsx+++ b/autogpt_platform/frontend/src/app/(platform)/team/components/ExpertChatDrawer/__tests__/ExpertChatDrawer.test.tsx@@ -524,7 +524,7 @@ describe("ExpertChatDrawer", () => {);await waitFor(() => expect(request).toHaveBeenCalled());expect(screen.getByText("What can I do for you?")).toBeDefined();- expect(screen.queryByRole("button", { name: "Skip" })).toBeNull();+ expect(screen.queryByRole("button", { name: "Skip questions" })).toBeNull();});test("does not request setup when the new chat has a prompt", async () => {@@ -562,7 +562,9 @@ describe("ExpertChatDrawer", () => {expect(await screen.findByText("Which outcome should I start with?"),).toBeDefined();- expect(screen.getByRole("button", { name: "Skip" })).toBeDefined();+ expect(+ screen.getByRole("button", { name: "Skip questions" }),+ ).toBeDefined();});test("a hire's onboarding card is a live form, not a settled row", async () => {@@ -594,7 +596,9 @@ describe("ExpertChatDrawer", () => {expect(await screen.findByText("Which outcome should I start with?"),).toBeDefined();- expect(screen.getByRole("button", { name: "Skip" })).toBeDefined();+ expect(+ screen.getByRole("button", { name: "Skip questions" }),+ ).toBeDefined();expect(screen.queryByText(/Setup questions from/)).toBeNull();});});diff --git a/autogpt_platform/frontend/src/app/(platform)/team/components/ExpertChatDrawer/__tests__/onboarding-thread-reset.test.tsx b/autogpt_platform/frontend/src/app/(platform)/team/components/ExpertChatDrawer/__tests__/onboarding-thread-reset.test.tsxindex dd3812ea9e..0c5a25011f 100644--- a/autogpt_platform/frontend/src/app/(platform)/team/components/ExpertChatDrawer/__tests__/onboarding-thread-reset.test.tsx+++ b/autogpt_platform/frontend/src/app/(platform)/team/components/ExpertChatDrawer/__tests__/onboarding-thread-reset.test.tsx@@ -57,8 +57,11 @@ test("an old chat creation cannot settle setup in a new thread", async () => {finishCreate();await waitFor(() => {expect(- (screen.getByRole("button", { name: "Skip" }) as HTMLButtonElement)- .disabled,+ (+ screen.getByRole("button", {+ name: "Skip questions",+ }) as HTMLButtonElement+ ).disabled,).toBe(false);});expect(screen.getByText("Which outcome should I start with?")).toBeDefined();diff --git a/autogpt_platform/frontend/src/app/(platform)/team/components/ExpertSidePanel/IdentityAvatar.tsx b/autogpt_platform/frontend/src/app/(platform)/team/components/ExpertSidePanel/IdentityAvatar.tsxindex f5f8d8e727..c5508c7510 100644--- a/autogpt_platform/frontend/src/app/(platform)/team/components/ExpertSidePanel/IdentityAvatar.tsx+++ b/autogpt_platform/frontend/src/app/(platform)/team/components/ExpertSidePanel/IdentityAvatar.tsx@@ -1,5 +1,6 @@import { AutopilotAvatar } from "@/components/molecules/AutopilotAvatar/AutopilotAvatar";import { ExpertAvatar } from "@/components/molecules/ExpertAvatar/ExpertAvatar";+import { cn } from "@/lib/utils";export interface PanelIdentity {name: string;@@ -15,14 +16,15 @@ interface Props {}export function IdentityAvatar({ identity, className, imageSize }: Props) {+ const avatarClassName = cn("rounded-full border border-[#e3e3e3]", className);if (identity.isAutopilot)- return <AutopilotAvatar size={imageSize} className={className} />;+ return <AutopilotAvatar size={imageSize} className={avatarClassName} />;return (<ExpertAvatarname={identity.name}avatarUrl={identity.avatarUrl}size={imageSize}- className={className}+ className={avatarClassName}/>);}diff --git a/autogpt_platform/frontend/src/app/(platform)/team/components/ExpertTeamCard/ExpertTeamCard.tsx b/autogpt_platform/frontend/src/app/(platform)/team/components/ExpertTeamCard/ExpertTeamCard.tsxindex dbf7f1d1cc..cb8bca8e66 100644--- a/autogpt_platform/frontend/src/app/(platform)/team/components/ExpertTeamCard/ExpertTeamCard.tsx+++ b/autogpt_platform/frontend/src/app/(platform)/team/components/ExpertTeamCard/ExpertTeamCard.tsx@@ -1,6 +1,7 @@import { Expert } from "@/app/api/__generated__/models/expert";import { GraphExecutionJobInfo } from "@/app/api/__generated__/models/graphExecutionJobInfo";import { ExpertAvatar } from "@/components/molecules/ExpertAvatar/ExpertAvatar";+import { getCategoryHex } from "@/components/molecules/ExpertAvatar/colors";import { ExpertIdentityDetails } from "@/components/molecules/ExpertIdentityDetails/ExpertIdentityDetails";import { CategoryTag } from "@/app/(platform)/marketplace/components/CategoryChip/CategoryTag";import { ExpertTagline } from "@/components/molecules/ExpertIdentityDetails/components/ExpertTagline";@@ -78,7 +79,7 @@ export function ExpertTeamCard({{/* Floated over the cover so the whole body stays one link target. */}<div className="absolute right-4 top-4 z-10 flex items-center gap-1.5"><Button- variant="floating"+ variant="secondary"size="icon-sm"aria-label="Edit Soul"leadingIcon={PencilEdit02Icon}@@ -110,7 +111,7 @@ export function ExpertTeamCard({color={expert.color}backgroundColor={cover.color}size={88}- className="rounded-full ring-4 ring-background"+ className="rounded-full border border-[#e3e3e3] ring-4 ring-background"/></span>@@ -144,6 +145,7 @@ export function ExpertTeamCard({role={expert.role}jobTitle={expert.job_title}nameAlign="baseline"+ areaColor={getCategoryHex(topic)}/><div className="flex items-center gap-2 empty:hidden">{topic ? <CategoryTag category={topic} /> : null}diff --git a/autogpt_platform/frontend/src/app/(platform)/team/components/ExpertTeamCard/components/SpendMeter.tsx b/autogpt_platform/frontend/src/app/(platform)/team/components/ExpertTeamCard/components/SpendMeter.tsxindex f7810cdce0..3318bae7d6 100644--- a/autogpt_platform/frontend/src/app/(platform)/team/components/ExpertTeamCard/components/SpendMeter.tsx+++ b/autogpt_platform/frontend/src/app/(platform)/team/components/ExpertTeamCard/components/SpendMeter.tsx@@ -1,14 +1,18 @@import { Progress } from "@/components/atoms/Progress/Progress";import { creditsToUsdLabel } from "@/lib/credits";import { cn } from "@/lib/utils";+import type { CSSProperties } from "react";interface Props {spent: number;budget: number;muted?: boolean;+ /** Tints the track and fill with darker shades of this colour (e.g. the+ * expert's cover) instead of grey. */+ color?: string;}-export function SpendMeter({ spent, budget, muted }: Props) {+export function SpendMeter({ spent, budget, muted, color }: Props) {const ratio = budget > 0 ? Math.min(Math.max(spent / budget, 0), 1) : 0;const isOverBudget = spent > budget;const clampedSpent = Math.min(Math.max(spent, 0), Math.max(budget, 0));@@ -25,9 +29,22 @@ export function SpendMeter({ spent, budget, muted }: Props) {aria-valuemin={0}aria-valuemax={budget}aria-valuetext={valueText}+ style={+ color+ ? ({+ "--meter-track": `color-mix(in srgb, ${color} 45%, white)`,+ "--meter-fill": `color-mix(in srgb, ${color} 60%, #18181b)`,+ } as CSSProperties)+ : undefined+ }className={cn("h-1.5 w-full bg-zinc-100",- isOverBudget ? "[&>div]:bg-red-400" : "[&>div]:bg-zinc-400",+ color && "h-2 ![background-color:var(--meter-track)]",+ isOverBudget+ ? "[&>div]:bg-red-400"+ : color+ ? "[&>div]:![background-color:var(--meter-fill)]"+ : "[&>div]:bg-zinc-400",muted && "opacity-50",)}/>diff --git a/autogpt_platform/frontend/src/app/(platform)/team/components/FireExpertMenu/FireExpertMenu.tsx b/autogpt_platform/frontend/src/app/(platform)/team/components/FireExpertMenu/FireExpertMenu.tsxindex 33ac4538b5..79add983de 100644--- a/autogpt_platform/frontend/src/app/(platform)/team/components/FireExpertMenu/FireExpertMenu.tsx+++ b/autogpt_platform/frontend/src/app/(platform)/team/components/FireExpertMenu/FireExpertMenu.tsx@@ -20,7 +20,7 @@ export function FireExpertMenu({ expertName, onFire, testId }: Props) {<DropdownMenuTrigger asChild><Buttontype="button"- variant="floating"+ variant="secondary"size="icon-sm"leadingIcon={MoreVerticalIcon}aria-label={`${expertName} actions`}diff --git a/autogpt_platform/frontend/src/app/(platform)/team/components/PillFilterMenu.tsx b/autogpt_platform/frontend/src/app/(platform)/team/components/PillFilterMenu.tsxnew file mode 100644index 0000000000..b9713070eb--- /dev/null+++ b/autogpt_platform/frontend/src/app/(platform)/team/components/PillFilterMenu.tsx@@ -0,0 +1,87 @@+"use client";++import type { IconSvgElement } from "@hugeicons/react";+import { ArrowDown01Icon } from "@hugeicons/core-free-icons";+import { Button } from "@/components/atoms/Button/Button";+import { Icon } from "@/components/atoms/Icon/Icon";+import {+ DropdownMenu,+ DropdownMenuContent,+ DropdownMenuRadioGroup,+ DropdownMenuRadioItem,+ DropdownMenuTrigger,+} from "@/components/molecules/DropdownMenu/DropdownMenu";+import { cn } from "@/lib/utils";++export interface PillFilterOption<T extends string> {+ value: T;+ label: string;+ icon: IconSvgElement;+}++interface Props<T extends string> {+ label: string;+ value: T;+ defaultValue: T;+ options: readonly PillFilterOption<T>[];+ onChange: (next: T) => void;+}++/** A pill like the header's buttons, naming the current filter. Any choice+ * other than the default fills it in so a narrowed list is obvious. */+export function PillFilterMenu<T extends string>({+ label,+ value,+ defaultValue,+ options,+ onChange,+}: Props<T>) {+ const current =+ options.find((option) => option.value === value) ?? options[0];+ const isActive = value !== defaultValue;++ return (+ <DropdownMenu>+ <DropdownMenuTrigger asChild>+ <Button+ type="button"+ variant="secondary"+ size="small"+ aria-label={`${label}: ${current.label}`}+ leadingIcon={current.icon}+ rightIcon={+ <Icon+ icon={ArrowDown01Icon}+ size={14}+ className="ml-0.5 text-zinc-400 transition-transform duration-200 group-data-[state=open]:rotate-180"+ />+ }+ className={cn(+ "group shrink-0 gap-1.5 font-medium",+ isActive &&+ "border-zinc-900 bg-zinc-900 text-white hover:border-zinc-800 hover:bg-zinc-800 [&_svg]:text-white",+ )}+ >+ {current.label}+ </Button>+ </DropdownMenuTrigger>+ <DropdownMenuContent align="end" className="min-w-[12rem]">+ <DropdownMenuRadioGroup+ value={value}+ onValueChange={(next) => onChange(next as T)}+ >+ {options.map((option) => (+ <DropdownMenuRadioItem+ key={option.value}+ value={option.value}+ className="gap-2"+ >+ <Icon icon={option.icon} size={15} className="text-zinc-500" />+ {option.label}+ </DropdownMenuRadioItem>+ ))}+ </DropdownMenuRadioGroup>+ </DropdownMenuContent>+ </DropdownMenu>+ );+}diff --git a/autogpt_platform/frontend/src/app/(platform)/team/components/SectionEmptyState.tsx b/autogpt_platform/frontend/src/app/(platform)/team/components/SectionEmptyState.tsxnew file mode 100644index 0000000000..274618a917--- /dev/null+++ b/autogpt_platform/frontend/src/app/(platform)/team/components/SectionEmptyState.tsx@@ -0,0 +1,14 @@+import type { ComponentProps } from "react";+import { PanelEmptyState } from "@/app/(platform)/copilot/components/ContextPanel/components/PanelEmptyState/PanelEmptyState";++/** The chat side panel's tilted-tiles empty state, set on a card so it sits+ * under a profile tab's toolbar the way a populated list would. */+export function SectionEmptyState(+ props: ComponentProps<typeof PanelEmptyState>,+) {+ return (+ <div className="mt-4 rounded-2xl bg-white smooth-shadow-ring-sm">+ <PanelEmptyState {...props} />+ </div>+ );+}diff --git a/autogpt_platform/frontend/src/app/(platform)/team/components/TeamPageHeader/TeamPageHeader.tsx b/autogpt_platform/frontend/src/app/(platform)/team/components/TeamPageHeader/TeamPageHeader.tsxnew file mode 100644index 0000000000..1454856849--- /dev/null+++ b/autogpt_platform/frontend/src/app/(platform)/team/components/TeamPageHeader/TeamPageHeader.tsx@@ -0,0 +1,66 @@+"use client";++import type { Expert } from "@/app/api/__generated__/models/expert";+import { Text } from "@/components/atoms/Text/Text";+import { AutopilotAvatar } from "@/components/molecules/AutopilotAvatar/AutopilotAvatar";+import { ExpertAvatar } from "@/components/molecules/ExpertAvatar/ExpertAvatar";+import { cn } from "@/lib/utils";+import { TeamHeaderActions } from "../TeamHeaderActions";++interface Props {+ experts: Expert[];+}++const AVATAR_CLASS =+ "rounded-full border border-[#e3e3e3] ring-2 ring-[#f9f9f9]";++// Same motion as the side panel's empty-state tiles: the outer two lean out+// and spread a little further on hover.+const POSITIONS = [+ "left-0 top-1 z-0 -rotate-6 group-hover:-translate-x-1 group-hover:-rotate-12",+ "right-0 top-1 z-0 rotate-6 group-hover:translate-x-1 group-hover:rotate-12",+];++/** Otto flanked by the first two hires, over the page title and a line on+ * what the team is for. */+export function TeamPageHeader({ experts }: Props) {+ const flank = experts.slice(0, 2);++ return (+ <div className="flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between">+ <div className="group flex items-center gap-4">+ <div aria-hidden className="relative h-14 w-24 shrink-0">+ {flank.map((expert, index) => (+ <span+ key={expert.id}+ className={cn(+ "absolute transition-transform duration-300 ease-out motion-reduce:transition-none",+ POSITIONS[index],+ )}+ >+ <ExpertAvatar+ name={expert.name}+ avatarUrl={expert.avatar_url}+ color={expert.color}+ size={44}+ className={AVATAR_CLASS}+ />+ </span>+ ))}+ <span className="absolute left-1/2 top-0 z-10 -translate-x-1/2 transition-transform duration-300 ease-out group-hover:-translate-y-0.5 motion-reduce:transition-none">+ <AutopilotAvatar size={52} className={AVATAR_CLASS} />+ </span>+ </div>+ <div className="flex min-w-0 flex-col gap-0.5">+ <Text variant="h4" as="h1" className="!text-zinc-900">+ Team+ </Text>+ <Text variant="body" className="!text-zinc-500">+ Otto and your hired experts, ready to work.+ </Text>+ </div>+ </div>+ <TeamHeaderActions />+ </div>+ );+}diff --git a/autogpt_platform/frontend/src/app/(platform)/team/components/TeamRoster/TeamFilterMenu.tsx b/autogpt_platform/frontend/src/app/(platform)/team/components/TeamRoster/TeamFilterMenu.tsxnew file mode 100644index 0000000000..3a3bb01418--- /dev/null+++ b/autogpt_platform/frontend/src/app/(platform)/team/components/TeamRoster/TeamFilterMenu.tsx@@ -0,0 +1,34 @@+"use client";++import {+ Alert01Icon,+ Calendar03Icon,+ ConferenceIcon,+ PauseIcon,+} from "@hugeicons/core-free-icons";+import type { TeamFilter } from "../../helpers";+import { PillFilterMenu } from "../PillFilterMenu";++const OPTIONS = [+ { value: "all", label: "All experts", icon: ConferenceIcon },+ { value: "scheduled", label: "Scheduled", icon: Calendar03Icon },+ { value: "needs-setup", label: "Needs setup", icon: Alert01Icon },+ { value: "paused", label: "Paused", icon: PauseIcon },+] as const;++interface Props {+ value: TeamFilter;+ onChange: (next: TeamFilter) => void;+}++export function TeamFilterMenu({ value, onChange }: Props) {+ return (+ <PillFilterMenu+ label="Filter experts"+ value={value}+ defaultValue="all"+ options={OPTIONS}+ onChange={onChange}+ />+ );+}diff --git a/autogpt_platform/frontend/src/app/(platform)/team/components/TeamRoster/TeamRosterToolbar.tsx b/autogpt_platform/frontend/src/app/(platform)/team/components/TeamRoster/TeamRosterToolbar.tsxindex b584812768..1aa8f531aa 100644--- a/autogpt_platform/frontend/src/app/(platform)/team/components/TeamRoster/TeamRosterToolbar.tsx+++ b/autogpt_platform/frontend/src/app/(platform)/team/components/TeamRoster/TeamRosterToolbar.tsx@@ -1,6 +1,6 @@-import { SearchInput } from "@/components/molecules/SearchInput/SearchInput";-import { FilterIconMenu } from "../../[expertId]/components/FilterIconMenu";import { TeamFilter } from "../../helpers";+import { ToolbarSearch } from "../ToolbarSearch";+import { TeamFilterMenu } from "./TeamFilterMenu";interface Props {query: string;@@ -9,14 +9,8 @@ interface Props {onFilterChange: (next: TeamFilter) => void;}-const FILTER_OPTIONS: readonly { value: TeamFilter; label: string }[] = [- { value: "all", label: "All experts" },- { value: "scheduled", label: "Scheduled" },- { value: "needs-setup", label: "Needs setup" },- { value: "paused", label: "Paused" },-];--/** Search plus the same filter icon menu the expert page tabs use. */+/** Search and filter for the roster: the Files page's rounded Input and a+ * pill filter menu. */export function TeamRosterToolbar({query,onQueryChange,@@ -24,22 +18,15 @@ export function TeamRosterToolbar({onFilterChange,}: Props) {return (- <div className="flex flex-wrap items-center gap-2 sm:justify-end">- <SearchInput+ <div className="flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-end">+ <ToolbarSearch+ id="team-roster-search"+ label="Search experts"value={query}onChange={onQueryChange}- size="small"- placeholder="Search experts"- aria-label="Search experts"- className="w-full sm:w-48"- />- <FilterIconMenu- label="Filter experts"- value={filter}- options={FILTER_OPTIONS}- defaultValue="all"- onChange={onFilterChange}+ className="sm:w-72"/>+ <TeamFilterMenu value={filter} onChange={onFilterChange} /></div>);}diff --git a/autogpt_platform/frontend/src/app/(platform)/team/components/ToolbarSearch.tsx b/autogpt_platform/frontend/src/app/(platform)/team/components/ToolbarSearch.tsxnew file mode 100644index 0000000000..c14ccf063e--- /dev/null+++ b/autogpt_platform/frontend/src/app/(platform)/team/components/ToolbarSearch.tsx@@ -0,0 +1,56 @@+"use client";++import { Search01Icon } from "@hugeicons/core-free-icons";+import type { ChangeEvent } from "react";+import { Icon } from "@/components/atoms/Icon/Icon";+import { Input } from "@/components/atoms/Input/Input";+import { cn } from "@/lib/utils";++interface Props {+ id: string;+ label: string;+ value: string;+ onChange: (next: string) => void;+ className?: string;+}++/** The team pages' search: the Files page's rounded Input with a leading+ * search icon. */+export function ToolbarSearch({+ id,+ label,+ value,+ onChange,+ className,+}: Props) {+ function handleChange(event: ChangeEvent<HTMLInputElement>) {+ onChange(event.target.value);+ }++ return (+ <div+ className={cn(+ "relative flex w-full items-center max-sm:order-first sm:w-64",+ className,+ )}+ >+ <Icon+ icon={Search01Icon}+ size={16}+ className="pointer-events-none absolute left-4 top-1/2 z-20 -translate-y-1/2 text-zinc-500"+ />+ <Input+ id={id}+ label={label}+ hideLabel+ type="text"+ size="small"+ value={value}+ onChange={handleChange}+ placeholder={label}+ className="rounded-full pl-10"+ wrapperClassName="!mb-0 w-full"+ />+ </div>+ );+}diff --git a/autogpt_platform/frontend/src/app/(platform)/team/helpers.ts b/autogpt_platform/frontend/src/app/(platform)/team/helpers.tsindex df5766fed0..60d905df2a 100644--- a/autogpt_platform/frontend/src/app/(platform)/team/helpers.ts+++ b/autogpt_platform/frontend/src/app/(platform)/team/helpers.ts@@ -1,3 +1,12 @@+import {+ Alert01Icon,+ Calendar03Icon,+ Calendar04Icon,+ Clock01Icon,+ PlayIcon,+ Time04Icon,+ WorkflowSquare01Icon,+} from "@hugeicons/core-free-icons";import { Expert } from "@/app/api/__generated__/models/expert";import { getExpertTopicHex } from "@/components/molecules/ExpertAvatar/colors";import { ExpertPod } from "@/app/api/__generated__/models/expertPod";@@ -327,10 +336,10 @@ export function getAutopilotSummary({}export const WORKFLOW_FILTERS = [- { value: "all", label: "All workflows" },- { value: "scheduled", label: "Scheduled" },- { value: "manual", label: "Manual" },- { value: "needs-setup", label: "Needs setup" },+ { value: "all", label: "All workflows", icon: WorkflowSquare01Icon },+ { value: "scheduled", label: "Scheduled", icon: Calendar03Icon },+ { value: "manual", label: "Manual", icon: PlayIcon },+ { value: "needs-setup", label: "Needs setup", icon: Alert01Icon },] as const;export type WorkflowFilter = (typeof WORKFLOW_FILTERS)[number]["value"];@@ -356,10 +365,10 @@ export function filterExpertWorkflows(}export const SCHEDULE_FILTERS = [- { value: "all", label: "All schedules" },- { value: "today", label: "Next 24 hours" },- { value: "week", label: "Next 7 days" },- { value: "later", label: "Later" },+ { value: "all", label: "All schedules", icon: Calendar03Icon },+ { value: "today", label: "Next 24 hours", icon: Clock01Icon },+ { value: "week", label: "Next 7 days", icon: Calendar04Icon },+ { value: "later", label: "Later", icon: Time04Icon },] as const;export type ScheduleFilter = (typeof SCHEDULE_FILTERS)[number]["value"];@@ -412,3 +421,14 @@ export function chunkLibraryAgentIDs(workflows: ExpertWorkflowRef[]) {}return chunks;}++// The expert and Otto pages' tabs: a segmented control with a white pill+// that slides to the active tab (TabsLine's indicator, restyled). The list+// sets no z-index, so its grey track paints first, the pill (z-10) over it+// and the labels (z-20) on top.+export const PROFILE_TABS_LIST_CLASS =+ "relative w-full gap-0.5 overflow-x-auto rounded-full border-b-0 bg-zinc-100/80 p-1 [&>button]:flex-1";+export const PROFILE_TABS_INDICATOR_CLASS =+ "pointer-events-none z-10 bottom-1 top-1 h-auto rounded-full bg-white shadow-sm ring-1 ring-zinc-200/70";+export const PROFILE_TABS_TRIGGER_CLASS =+ "z-20 rounded-full px-3.5 py-1.5 text-[15px] max-sm:px-2 text-zinc-500 transition-colors hover:text-zinc-900 data-[state=active]:text-zinc-900 [&_svg]:!size-4";diff --git a/autogpt_platform/frontend/src/app/(platform)/team/page.tsx b/autogpt_platform/frontend/src/app/(platform)/team/page.tsxindex 9204328c7f..bf45366d8c 100644--- a/autogpt_platform/frontend/src/app/(platform)/team/page.tsx+++ b/autogpt_platform/frontend/src/app/(platform)/team/page.tsx@@ -1,27 +1,18 @@"use client";import { Expert } from "@/app/api/__generated__/models/expert";-import { Text } from "@/components/atoms/Text/Text";import { ErrorCard } from "@/components/molecules/ErrorCard/ErrorCard";import { InstallWorkflowPicker } from "@/components/molecules/InstallWorkflowPicker/InstallWorkflowPicker";-import {- TabsLine,- TabsLineContent,- TabsLineList,- TabsLineTrigger,-} from "@/components/molecules/TabsLine/TabsLine";import { cn } from "@/lib/utils";import { Flag, useFlagStatus } from "@/services/feature-flags/use-get-flag";-import { UserGroupIcon } from "@hugeicons/core-free-icons";import { notFound } from "next/navigation";-import { useState } from "react";import { EmptyTeamState } from "./components/EmptyTeamState";import { ExpertChatDrawer } from "./components/ExpertChatDrawer/ExpertChatDrawer";import { ExpertTeamCard } from "./components/ExpertTeamCard/ExpertTeamCard";import { ExpertTeamCardSkeleton } from "./components/ExpertTeamCardSkeleton";import { SetupNeeded } from "./components/SetupNeeded/SetupNeeded";import { SoulDrawer } from "./components/SoulDrawer/SoulDrawer";-import { TeamHeaderActions } from "./components/TeamHeaderActions";+import { TeamPageHeader } from "./components/TeamPageHeader/TeamPageHeader";import { TeamRoster } from "./components/TeamRoster/TeamRoster";import { TeamRosterToolbar } from "./components/TeamRoster/TeamRosterToolbar";import { useTeamRosterView } from "./components/TeamRoster/useTeamRosterView";@@ -31,12 +22,6 @@ import { useTeamPage } from "./useTeamPage";const MAIN_CLASS ="mx-auto min-h-screen w-full max-w-[1180px] space-y-5 px-4 pb-16 pt-6 duration-500 sm:px-8 md:px-12 animate-in fade-in slide-in-from-bottom-2 fill-mode-both motion-reduce:animate-none";-const TABS = [- { value: "overview", label: "Overview", icon: UserGroupIcon },-] as const;--type TeamTab = (typeof TABS)[number]["value"];-export default function TeamPage() {const { enabled, ready } = useFlagStatus(Flag.HIRE_EXPERTS);const {@@ -57,7 +42,6 @@ export default function TeamPage() {openChat,closeChat,} = useTeamPage({ enabled: Boolean(enabled) && ready });- const [tab, setTab] = useState<TeamTab>("overview");const roster = useTeamRosterView({experts: hiredExperts,schedulesForExpert,@@ -95,17 +79,7 @@ export default function TeamPage() {return (<div className="flex w-full"><main className={cn(MAIN_CLASS, "min-w-0 flex-1")}>- <div className="flex flex-col gap-4 sm:flex-row sm:items-start sm:justify-between">- <div className="flex flex-col gap-1">- <Text variant="lead-medium" as="h1" tone="primary">- Team- </Text>- <Text variant="body" tone="secondary" className="max-w-prose">- Otto and your hired experts, ready to work.- </Text>- </div>- <TeamHeaderActions />- </div>+ <TeamPageHeader experts={hiredExperts} />{isError ? (<ErrorCard@@ -115,52 +89,29 @@ export default function TeamPage() {/>) : null}- <TabsLine- variant="compact"- value={tab}- onValueChange={(next) => setTab(next as TeamTab)}- >- {/* The roster's search and filter share the tabs row, right-aligned,- and only while the roster is the tab being shown. */}- <div className="flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between">- <TabsLineList className="w-auto overflow-x-auto border-b-transparent">- {TABS.map((item) => (- <TabsLineTrigger- key={item.value}- value={item.value}- icon={item.icon}- >- {item.label}- </TabsLineTrigger>- ))}- </TabsLineList>- {tab === "overview" ? (- <TeamRosterToolbar- query={roster.query}- onQueryChange={roster.setQuery}- filter={roster.filter}- onFilterChange={roster.setFilter}- />- ) : null}- </div>+ <TeamRosterToolbar+ query={roster.query}+ onQueryChange={roster.setQuery}+ filter={roster.filter}+ onFilterChange={roster.setFilter}+ />- <TabsLineContent value="overview" className="space-y-6">- <SetupNeeded enabled={Boolean(enabled) && ready} />- <TeamRoster- isLoading={isLoading}- experts={hiredExperts}- visibleExperts={roster.visibleExperts}- isNarrowed={roster.isNarrowed}- schedulesForExpert={schedulesForExpert}- renderCard={renderCard}- onAutopilotChat={() => openChat(null)}- />+ <div className="space-y-6">+ <SetupNeeded enabled={Boolean(enabled) && ready} />+ <TeamRoster+ isLoading={isLoading}+ experts={hiredExperts}+ visibleExperts={roster.visibleExperts}+ isNarrowed={roster.isNarrowed}+ schedulesForExpert={schedulesForExpert}+ renderCard={renderCard}+ onAutopilotChat={() => openChat(null)}+ />- {!isLoading && !isError && hiredExperts.length === 0 ? (- <EmptyTeamState />- ) : null}- </TabsLineContent>- </TabsLine>+ {!isLoading && !isError && hiredExperts.length === 0 ? (+ <EmptyTeamState />+ ) : null}+ </div><InstallWorkflowPickermode="pick-workflow"diff --git a/autogpt_platform/frontend/src/app/__tests__/layout.test.tsx b/autogpt_platform/frontend/src/app/__tests__/layout.test.tsxindex 3b8d6cb42f..2183cb445b 100644--- a/autogpt_platform/frontend/src/app/__tests__/layout.test.tsx+++ b/autogpt_platform/frontend/src/app/__tests__/layout.test.tsx@@ -29,7 +29,6 @@ vi.mock("@/services/analytics", () => ({ SetupAnalytics: () => null }));vi.mock("@/services/analytics/VercelAnalyticsWrapper", () => ({VercelAnalyticsWrapper: () => null,}));-vi.mock("@/components/AgentationDevtool", () => ({ default: () => null }));vi.mock("@tanstack/react-query-devtools", () => ({ReactQueryDevtools: () => null,}));diff --git a/autogpt_platform/frontend/src/app/globals.css b/autogpt_platform/frontend/src/app/globals.cssindex ec04cefa04..dc7d8736cd 100644--- a/autogpt_platform/frontend/src/app/globals.css+++ b/autogpt_platform/frontend/src/app/globals.css@@ -173,3 +173,13 @@ body[data-google-picker-open="true"] [data-dialog-content] {:not(.katex-display) > .katex {font-size: 1.1em;}++/* Expert and Otto profile tabs: body copy inside a tab panel reads at the+ Overview intro's 15px instead of the default 14px. Scoped to the panels so+ the tab labels, cards' small captions and the rest of the app keep their+ sizes. */+[data-profile-tabs] [role="tabpanel"] .text-sm,+[data-profile-tabs] [role="tabpanel"] [class*="text-[0.875rem]"] {+ font-size: 15px;+ line-height: 1.5rem;+}diff --git a/autogpt_platform/frontend/src/app/layout.tsx b/autogpt_platform/frontend/src/app/layout.tsxindex 4319b5da90..cafcb31135 100644--- a/autogpt_platform/frontend/src/app/layout.tsx+++ b/autogpt_platform/frontend/src/app/layout.tsx@@ -17,7 +17,6 @@ import {COOKIEBOT_SCRIPT_URL,} from "@/services/consent/cookiebot";import { environment } from "@/services/environment";-import AgentationDevtool from "@/components/AgentationDevtool";import { ReactQueryDevtools } from "@tanstack/react-query-devtools";import { headers } from "next/headers";import Script from "next/script";@@ -26,9 +25,6 @@ import { getSiteUrl } from "@/lib/metadata";const isDev = environment.isDev();const isLocal = environment.isLocal();const isCloud = environment.isCloud();-// Agentation annotates the UI for whoever is building AutoGPT itself, so it-// stays out of production builds; self-hosted installs are production builds.-const showAgentation = environment.isDevelopmentBuild() || isDev;const faviconPath = isDev? "/favicon-dev.ico"@@ -134,7 +130,6 @@ export default async function RootLayout({</div><Toaster /><ConsentWithdrawalReload />- {showAgentation && <AgentationDevtool />}</Providers></ErrorBoundary></body>diff --git a/autogpt_platform/frontend/src/components/AgentationDevtool.tsx b/autogpt_platform/frontend/src/components/AgentationDevtool.tsxdeleted file mode 100644index 82b59c78e8..0000000000--- a/autogpt_platform/frontend/src/components/AgentationDevtool.tsx+++ /dev/null@@ -1,12 +0,0 @@-"use client";--import dynamic from "next/dynamic";--const Agentation = dynamic(- () => import("agentation").then((mod) => mod.Agentation),- { ssr: false },-);--export default function AgentationDevtool() {- return <Agentation />;-}diff --git a/autogpt_platform/frontend/src/components/atoms/Tooltip/BaseTooltip.tsx b/autogpt_platform/frontend/src/components/atoms/Tooltip/BaseTooltip.tsxindex 2b22a279dc..98dc7f67ab 100644--- a/autogpt_platform/frontend/src/components/atoms/Tooltip/BaseTooltip.tsx+++ b/autogpt_platform/frontend/src/components/atoms/Tooltip/BaseTooltip.tsx@@ -32,6 +32,11 @@ const TooltipTrigger = TooltipPrimitive.Trigger;// `overflow-hidden` ancestor clips its own tooltip. Wrap in this to escape.const TooltipPortal = TooltipPrimitive.Portal;+// Shared with `components/ui/tooltip` so every tooltip in the app looks the+// same: dark chip, light text.+export const tooltipContentClassName =+ "z-50 max-w-xs origin-[--radix-tooltip-content-transform-origin] overflow-hidden rounded-md bg-zinc-900 px-3 py-1.5 text-xs font-normal leading-normal text-zinc-50 animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2";+const TooltipContent = React.forwardRef<React.ElementRef<typeof TooltipPrimitive.Content>,React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Content>@@ -39,10 +44,7 @@ const TooltipContent = React.forwardRef<<TooltipPrimitive.Contentref={ref}sideOffset={sideOffset}- className={cn(- "z-50 max-w-xs overflow-hidden rounded-md bg-white px-3 py-1.5 text-xs font-normal leading-normal text-zinc-900 outline outline-1 outline-offset-[-1px] outline-gray-100 animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",- className,- )}+ className={cn(tooltipContentClassName, className)}{...props}/>));diff --git a/autogpt_platform/frontend/src/components/layout/AppSidebar/components/AppSidebarHeader/AppSidebarHeader.tsx b/autogpt_platform/frontend/src/components/layout/AppSidebar/components/AppSidebarHeader/AppSidebarHeader.tsxindex f0c6a9e042..c28f2fa836 100644--- a/autogpt_platform/frontend/src/components/layout/AppSidebar/components/AppSidebarHeader/AppSidebarHeader.tsx+++ b/autogpt_platform/frontend/src/components/layout/AppSidebar/components/AppSidebarHeader/AppSidebarHeader.tsx@@ -25,7 +25,7 @@ export function AppSidebarHeader() {aria-label={isCollapsed ? "Expand sidebar" : "Collapse sidebar"}onClick={toggleSidebar}className={cn(- "size-8 shrink-0 items-center justify-center rounded-md transition-colors hover:bg-zinc-200",+ "size-8 shrink-0 items-center justify-center rounded-md transition-colors hover:bg-zinc-200 max-md:size-10",isCollapsed? "absolute inset-0 hidden group-focus-within:flex group-hover:flex": "flex",@@ -33,7 +33,7 @@ export function AppSidebarHeader() {><Iconicon={SidebarLeftIcon}- className="size-4 text-sidebar-foreground/90 group-data-[collapsible=icon]:size-4.5"+ className="size-4 text-sidebar-foreground/90 group-data-[collapsible=icon]:size-4.5 max-md:size-5"/></button></TooltipTrigger>@@ -63,7 +63,7 @@ export function AppSidebarHeader() {{isCollapsed ? (<AutoGPTLogo hideText viewBox="47 -1 42 42" className="size-7" />) : (- <AutoGPTLogo className="-mt-1 ml-2.5 h-7 w-auto" />+ <AutoGPTLogo className="-mt-1 ml-2.5 h-7 w-auto max-md:mt-2 max-md:h-9" />)}</Link>{isCollapsed ? toggleButton : null}diff --git a/autogpt_platform/frontend/src/components/layout/AppSidebar/components/AppSidebarTrigger/AppSidebarTrigger.tsx b/autogpt_platform/frontend/src/components/layout/AppSidebar/components/AppSidebarTrigger/AppSidebarTrigger.tsxnew file mode 100644index 0000000000..cf60c21c55--- /dev/null+++ b/autogpt_platform/frontend/src/components/layout/AppSidebar/components/AppSidebarTrigger/AppSidebarTrigger.tsx@@ -0,0 +1,53 @@+"use client";++import { Icon } from "@/components/atoms/Icon/Icon";+import { Button } from "@/components/ui/button";+import { useSidebar } from "@/components/ui/sidebar";+import { SidebarLeftIcon } from "@hugeicons/core-free-icons";+import { createContext, useContext, type ReactNode } from "react";++// The copilot page mounts a SidebarProvider of its own, so a plain+// SidebarTrigger inside the chat toggles that one instead of the app sidebar.+// PlatformChrome hands the app sidebar's toggle down through this context.+const AppSidebarToggleContext = createContext<(() => void) | null>(null);++export function AppSidebarToggleProvider({+ children,+}: {+ children: ReactNode;+}) {+ const { toggleSidebar } = useSidebar();++ return (+ <AppSidebarToggleContext.Provider value={toggleSidebar}>+ {children}+ </AppSidebarToggleContext.Provider>+ );+}++export function useAppSidebarToggle() {+ return useContext(AppSidebarToggleContext);+}++interface Props {+ className?: string;+}++export function AppSidebarTrigger({ className }: Props) {+ const toggleSidebar = useAppSidebarToggle();++ if (!toggleSidebar) return null;++ return (+ <Button+ variant="ghost"+ size="icon"+ data-sidebar="trigger"+ className={className}+ onClick={toggleSidebar}+ >+ <Icon icon={SidebarLeftIcon} className="!size-5" />+ <span className="sr-only">Toggle Sidebar</span>+ </Button>+ );+}diff --git a/autogpt_platform/frontend/src/components/layout/AppSidebar/components/CollapsibleNavGroup/CollapsibleNavGroup.tsx b/autogpt_platform/frontend/src/components/layout/AppSidebar/components/CollapsibleNavGroup/CollapsibleNavGroup.tsxindex f63f654981..ec2ed65a43 100644--- a/autogpt_platform/frontend/src/components/layout/AppSidebar/components/CollapsibleNavGroup/CollapsibleNavGroup.tsx+++ b/autogpt_platform/frontend/src/components/layout/AppSidebar/components/CollapsibleNavGroup/CollapsibleNavGroup.tsx@@ -37,13 +37,13 @@ export function CollapsibleNavGroup({<SidebarGroup className="py-1"><SidebarGroupLabelasChild- className="text-[13px] font-medium text-zinc-500 group-data-[collapsible=icon]:hidden"+ className="text-[13px] font-medium text-zinc-500 group-data-[collapsible=icon]:hidden max-md:h-11 max-md:text-sm"><CollapsibleTrigger>{label}<Iconicon={ArrowDown01Icon}- className="ease-[cubic-bezier(0.33,1,0.68,1)] ml-auto size-4 text-sidebar-foreground/90 transition-transform duration-200 group-data-[collapsible=icon]:size-4.5 group-data-[state=open]/collapsible:rotate-180 motion-reduce:transition-none"+ className="ease-[cubic-bezier(0.33,1,0.68,1)] ml-auto size-4 text-sidebar-foreground/90 transition-transform duration-200 group-data-[collapsible=icon]:size-4.5 group-data-[state=open]/collapsible:rotate-180 motion-reduce:transition-none max-md:size-5"/></CollapsibleTrigger></SidebarGroupLabel>diff --git a/autogpt_platform/frontend/src/components/layout/AppSidebar/components/RecentChats/RecentChats.tsx b/autogpt_platform/frontend/src/components/layout/AppSidebar/components/RecentChats/RecentChats.tsxindex 8d2b6127a8..64e0886b10 100644--- a/autogpt_platform/frontend/src/components/layout/AppSidebar/components/RecentChats/RecentChats.tsx+++ b/autogpt_platform/frontend/src/components/layout/AppSidebar/components/RecentChats/RecentChats.tsx@@ -140,7 +140,7 @@ export function RecentChats() {type="button"onClick={() => loadMore()}disabled={isLoadingMore}- className="mt-1 flex w-full items-center justify-center gap-2 rounded-md bg-zinc-200 px-2 py-1.5 text-sm text-zinc-800 hover:bg-zinc-300 disabled:opacity-60"+ className="mt-1 flex w-full items-center justify-center gap-2 rounded-md bg-zinc-200 px-2 py-1.5 text-sm text-zinc-800 hover:bg-zinc-300 disabled:opacity-60 max-md:py-3 max-md:text-base">{isLoadingMore && (<LoadingSpinner size="small" className="size-4 text-zinc-500" />diff --git a/autogpt_platform/frontend/src/components/layout/AppSidebar/components/RecentChats/__tests__/expert-groups.test.tsx b/autogpt_platform/frontend/src/components/layout/AppSidebar/components/RecentChats/__tests__/expert-groups.test.tsxindex 13044699f7..ec2988a9df 100644--- a/autogpt_platform/frontend/src/components/layout/AppSidebar/components/RecentChats/__tests__/expert-groups.test.tsx+++ b/autogpt_platform/frontend/src/components/layout/AppSidebar/components/RecentChats/__tests__/expert-groups.test.tsx@@ -9,6 +9,7 @@ import {render,screen,waitFor,+ within,} from "@/tests/integrations/test-utils";import { http, HttpResponse } from "msw";import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";@@ -87,8 +88,9 @@ function groupHeader(label: string) {return screen.getByRole("button", { name: `${label} chats` });}-/** Groups render open, so this is how a test gets to the collapsed state. */-async function collapseGroup(label: string) {+/** Otto renders open and every other group collapsed, so one click flips+ * either to its other state. */+async function toggleGroup(label: string) {fireEvent.click(await screen.findByRole("button", { name: `${label} chats` }),);@@ -104,15 +106,20 @@ afterEach(() => {});describe("RecentChats — expert groups", () => {- it("starts open and collapses when its header is clicked", async () => {- const sessions = makeSessions(2);+ it("opens Otto, keeps other experts collapsed, and toggles on click", async () => {+ const sessions = [...makeSessions(2), ...makeSessions(2, mariaExpert.id)];server.use(getGetV2ListSessionsMockHandler200({ sessions, total: sessions.length }),- getListExpertIdentitiesMockHandler([]),+ getListExpertIdentitiesMockHandler([mariaExpert]),);renderRecentChats();expect(await screen.findByText("autopilot chat 1")).toBeDefined();+ await screen.findByRole("button", { name: "Maria chats" });+ expect(screen.queryByText("expert-maria chat 1")).toBeNull();++ fireEvent.click(groupHeader("Maria"));+ expect(await screen.findByText("expert-maria chat 1")).toBeDefined();fireEvent.click(groupHeader("Otto"));expect(screen.queryByText("autopilot chat 1")).toBeNull();@@ -131,13 +138,13 @@ describe("RecentChats — expert groups", () => {getListExpertIdentitiesMockHandler([]),);renderRecentChats();- await collapseGroup("Otto");+ await toggleGroup("Otto");expect(await screen.findByText("running chat")).toBeDefined();expect(screen.queryByText("autopilot chat 1")).toBeNull();});- it("shows four chats and reveals four more at a time", async () => {+ it("previews one Otto chat and reveals the rest with Load all", async () => {const sessions = makeSessions(10);server.use(getGetV2ListSessionsMockHandler200({ sessions, total: sessions.length }),@@ -145,23 +152,33 @@ describe("RecentChats — expert groups", () => {);renderRecentChats();- expect(await screen.findByText("autopilot chat 4")).toBeDefined();- expect(screen.queryByText("autopilot chat 5")).toBeNull();-- const loadMore = () =>- screen.getByRole("button", { name: "Load more Otto chats" });-- fireEvent.click(loadMore());- expect(await screen.findByText("autopilot chat 8")).toBeDefined();- expect(screen.queryByText("autopilot chat 9")).toBeNull();+ expect(await screen.findByText("autopilot chat 1")).toBeDefined();+ expect(screen.queryByText("autopilot chat 2")).toBeNull();- fireEvent.click(loadMore());+ fireEvent.click(+ screen.getByRole("button", { name: "Load all Otto chats" }),+ );expect(await screen.findByText("autopilot chat 10")).toBeDefined();expect(- screen.queryByRole("button", { name: "Load more Otto chats" }),+ screen.queryByRole("button", { name: "Load all Otto chats" }),).toBeNull();});+ it("shows how many chats each group holds", async () => {+ const sessions = [...makeSessions(3), ...makeSessions(11, mariaExpert.id)];+ server.use(+ getGetV2ListSessionsMockHandler200({ sessions, total: sessions.length }),+ getListExpertIdentitiesMockHandler([mariaExpert]),+ );+ renderRecentChats();++ const mariaHeader = await screen.findByRole("button", {+ name: "Maria chats",+ });+ expect(within(mariaHeader).getByText("11")).toBeDefined();+ expect(within(groupHeader("Otto")).getByText("3")).toBeDefined();+ });+it("groups expert chats under the expert's name with independent previews", async () => {const sessions = [...makeSessions(12), ...makeSessions(11, mariaExpert.id)];server.use(@@ -170,21 +187,24 @@ describe("RecentChats — expert groups", () => {);renderRecentChats();- expect(await screen.findByText("expert-maria chat 4")).toBeDefined();expect(await screen.findByText("Marketing Manager")).toBeDefined();+ expect(screen.queryByText("expert-maria chat 1")).toBeNull();++ await toggleGroup("Maria");+ expect(await screen.findByText("expert-maria chat 4")).toBeDefined();expect(screen.getByText("Marketing Manager").classList.contains("opacity-70"),).toBe(true);expect(screen.queryByText(mariaExpert.role)).toBeNull();expect(screen.queryByText("expert-maria chat 5")).toBeNull();- expect(screen.queryByText("autopilot chat 5")).toBeNull();+ expect(screen.queryByText("autopilot chat 2")).toBeNull();fireEvent.click(screen.getByRole("button", { name: "Load more Maria chats" }),);expect(await screen.findByText("expert-maria chat 8")).toBeDefined();expect(screen.queryByText("expert-maria chat 9")).toBeNull();- expect(screen.queryByText("autopilot chat 5")).toBeNull();+ expect(screen.queryByText("autopilot chat 2")).toBeNull();});it("falls back to a generic Expert label when the expert is unknown", async () => {@@ -199,6 +219,7 @@ describe("RecentChats — expert groups", () => {name: "Expert chats",});expect(expertGroup.querySelector("img")).not.toBe(null);+ fireEvent.click(expertGroup);expect(await screen.findByText("expert-ghost chat 1")).toBeDefined();});@@ -240,7 +261,7 @@ describe("RecentChats — expert groups", () => {renderRecentChats();expect(- await screen.findByRole("button", { name: "Load more Otto chats" }),+ await screen.findByRole("button", { name: "Load all Otto chats" }),).toBeDefined();expect(screen.getByRole("button", { name: "Load more" })).toBeDefined();});@@ -257,18 +278,19 @@ describe("RecentChats — expert groups", () => {);renderRecentChats();- await collapseGroup("Maria");+ await toggleGroup("Maria");fireEvent.click(- await screen.findByRole("button", { name: "Load more Otto chats" }),+ await screen.findByRole("button", { name: "Load all Otto chats" }),);- expect(await screen.findByText("autopilot chat 8")).toBeDefined();+ expect(await screen.findByText("autopilot chat 12")).toBeDefined();+ expect(await screen.findByText("expert-maria chat 1")).toBeDefined();const callsBefore = listCalls;vi.advanceTimersByTime(SESSION_LIST_REFETCH_INTERVAL_MS);await waitFor(() => expect(listCalls).toBeGreaterThan(callsBefore));- expect(screen.getByText("autopilot chat 8")).toBeDefined();- expect(screen.queryByText("expert-maria chat 1")).toBeNull();+ expect(screen.getByText("autopilot chat 12")).toBeDefined();+ expect(screen.getByText("expert-maria chat 1")).toBeDefined();});it("links each group header to a new chat, except for fired experts", async () => {diff --git a/autogpt_platform/frontend/src/components/layout/AppSidebar/components/RecentChats/components/ExpertChatGroup/ExpertChatGroup.tsx b/autogpt_platform/frontend/src/components/layout/AppSidebar/components/RecentChats/components/ExpertChatGroup/ExpertChatGroup.tsxindex 90aa8d88a0..6614ea8ca9 100644--- a/autogpt_platform/frontend/src/components/layout/AppSidebar/components/RecentChats/components/ExpertChatGroup/ExpertChatGroup.tsx+++ b/autogpt_platform/frontend/src/components/layout/AppSidebar/components/RecentChats/components/ExpertChatGroup/ExpertChatGroup.tsx@@ -25,12 +25,17 @@ import { ReactNode, useState } from "react";import { EXPERT_CHAT_PAGE_SIZE } from "@/services/experts/expert-chat-pagination";// The chevron, the slot the header reserves next to it, and the new-chat link-// that floats over that slot are all one size.+// that floats over that slot are all one size. On touch widths the slot and+// the link grow to a finger-sized target; the chevron keeps its size.const CHEVRON_SIZE_CLASS = "size-5";+const NEW_CHAT_SLOT_SIZE_CLASS = "size-5 max-md:size-9";// Where that slot starts, measured in from the header's right edge: the// trigger's `px-2` (0.5rem) + the chevron's `size-5` (1.25rem) + the `gap-2`// between them (0.5rem) = 2.25rem. Change any of the three and this moves.const NEW_CHAT_LINK_OFFSET_CLASS = "right-9";+// Otto opens with a short preview and a single "Load all"; every other+// expert starts collapsed and pages in when opened.+const OTTO_PREVIEW_COUNT = 1;interface Props {label: string;@@ -53,8 +58,10 @@ export function ExpertChatGroup({sessions,renderItem,}: Props) {- const [isOpen, setIsOpen] = useState(true);- const [visibleCount, setVisibleCount] = useState(EXPERT_CHAT_PAGE_SIZE);+ const [isOpen, setIsOpen] = useState(!!isAutopilot);+ const [visibleCount, setVisibleCount] = useState(+ isAutopilot ? OTTO_PREVIEW_COUNT : EXPERT_CHAT_PAGE_SIZE,+ );const visibleSessions = sessions.slice(0, visibleCount);const hasHiddenSessions = sessions.length > visibleSessions.length;const runningSessions = sessions.filter((session) => session.is_processing);@@ -71,7 +78,7 @@ export function ExpertChatGroup({<div className="group/expert-header relative mb-1 flex items-center rounded-md hover:bg-zinc-100"><CollapsibleTriggeraria-label={`${label} chats`}- className="flex min-w-0 flex-1 items-center gap-2 rounded-md px-2 py-1 text-left text-sm font-medium text-zinc-900"+ className="flex min-w-0 flex-1 items-center gap-2 rounded-md px-2 py-1 text-left text-sm font-medium text-zinc-900 max-md:py-2 max-md:text-base">{isAutopilot ? (<AutopilotAvatar@@ -94,11 +101,12 @@ export function ExpertChatGroup({role={role}size="compact"areaClassName="opacity-70"+ nameAccessory={<SessionCount count={sessions.length} />}/>{newChatHref && (<spanaria-hidden- className={cn("ml-auto shrink-0", CHEVRON_SIZE_CLASS)}+ className={cn("ml-auto shrink-0", NEW_CHAT_SLOT_SIZE_CLASS)}/>)}{/* Hidden at rest on desktop like the new-chat link, and revealed@@ -129,13 +137,15 @@ export function ExpertChatGroup({{hasHiddenSessions && (<buttontype="button"- aria-label={`Load more ${label} chats`}+ aria-label={`${isAutopilot ? "Load all" : "Load more"} ${label} chats`}onClick={() =>- setVisibleCount((count) => count + EXPERT_CHAT_PAGE_SIZE)+ setVisibleCount((count) =>+ isAutopilot ? Infinity : count + EXPERT_CHAT_PAGE_SIZE,+ )}- className="mt-0.5 w-full rounded-md px-2 py-1 text-left text-xs font-medium text-zinc-500 hover:bg-zinc-100 hover:text-zinc-800"+ className="mt-0.5 w-full rounded-md px-2 py-1 text-left text-xs font-medium text-zinc-500 hover:bg-zinc-100 hover:text-zinc-800 max-md:py-2.5 max-md:text-sm">- Load more+ {isAutopilot ? "Load all" : "Load more"}</button>)}</GroupBody>@@ -144,6 +154,17 @@ export function ExpertChatGroup({);}+function SessionCount({ count }: { count: number }) {+ return (+ <span+ aria-hidden+ className="shrink-0 rounded-full bg-zinc-200/70 px-1.5 text-[11px] font-medium tabular-nums leading-[1.125rem] text-zinc-600"+ >+ {count}+ </span>+ );+}+function NewChatLink({ href, label }: { href: string; label: string }) {const name = `New chat with ${label}`;@@ -155,7 +176,7 @@ function NewChatLink({ href, label }: { href: string; label: string }) {aria-label={name}className={cn("absolute top-1/2 flex -translate-y-1/2 items-center justify-center rounded-md text-zinc-500 transition-opacity group-focus-within/expert-header:opacity-100 group-hover/expert-header:opacity-100 hover:bg-zinc-200 hover:text-zinc-900 focus-visible:opacity-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-zinc-400 md:opacity-0",- CHEVRON_SIZE_CLASS,+ NEW_CHAT_SLOT_SIZE_CLASS,NEW_CHAT_LINK_OFFSET_CLASS,)}>@@ -176,7 +197,7 @@ function NewChatIcon() {return <LoadingSpinner size="small" className="!size-4 text-zinc-500" />;}- return <Icon icon={PlusSignIcon} className="size-4" />;+ return <Icon icon={PlusSignIcon} className="size-4 max-md:size-5" />;}function GroupBody({ children }: { children: ReactNode }) {diff --git a/autogpt_platform/frontend/src/components/layout/AppSidebar/components/RecentChats/components/RecentChatItem/RecentChatItem.tsx b/autogpt_platform/frontend/src/components/layout/AppSidebar/components/RecentChats/components/RecentChatItem/RecentChatItem.tsxindex de3c992045..cbf06a3bfc 100644--- a/autogpt_platform/frontend/src/components/layout/AppSidebar/components/RecentChats/components/RecentChatItem/RecentChatItem.tsx+++ b/autogpt_platform/frontend/src/components/layout/AppSidebar/components/RecentChats/components/RecentChatItem/RecentChatItem.tsx@@ -124,7 +124,7 @@ export function RecentChatItem({}onSubmitRename(session.id);}}- className="w-full rounded-md border border-zinc-300 bg-white px-2 py-1 text-sm text-zinc-800 outline-none focus:border-purple-500 focus:ring-1 focus:ring-purple-500"+ className="w-full rounded-md border border-zinc-300 bg-white px-2 py-1 text-sm text-zinc-800 outline-none focus:border-purple-500 focus:ring-1 focus:ring-purple-500 max-md:py-2 max-md:text-base"/></SidebarMenuItem>);@@ -136,7 +136,7 @@ export function RecentChatItem({asChildisActive={isActive}tooltip={title}- className="font-normal data-[active=true]:!bg-zinc-100 data-[active=true]:font-normal hover:!bg-zinc-100"+ className="font-normal data-[active=true]:!bg-zinc-100 data-[active=true]:font-normal hover:!bg-zinc-100 max-md:h-11 max-md:!pr-11 max-md:text-[15px]"><Link href={`/home?sessionId=${session.id}`}>{session.is_processing ? (@@ -154,7 +154,11 @@ export function RecentChatItem({<DropdownMenu><DropdownMenuTrigger asChild>- <SidebarMenuAction showOnHover aria-label="Chat actions">+ <SidebarMenuAction+ showOnHover+ aria-label="Chat actions"+ className="max-md:!top-1.5 max-md:w-8 max-md:[&>svg]:size-5"+ ><Iconicon={MoreHorizontalIcon}className="text-sidebar-foreground/90"diff --git a/autogpt_platform/frontend/src/components/layout/AppSidebar/components/SidebarSearch/SidebarSearch.tsx b/autogpt_platform/frontend/src/components/layout/AppSidebar/components/SidebarSearch/SidebarSearch.tsxindex f1e2080567..c1a9aaf4d6 100644--- a/autogpt_platform/frontend/src/components/layout/AppSidebar/components/SidebarSearch/SidebarSearch.tsx+++ b/autogpt_platform/frontend/src/components/layout/AppSidebar/components/SidebarSearch/SidebarSearch.tsx@@ -19,11 +19,11 @@ export function SidebarSearch() {type="button"aria-label="Search"onClick={openSearch}- className="flex size-8 shrink-0 items-center justify-center rounded-md transition-colors hover:bg-zinc-200"+ className="flex size-8 shrink-0 items-center justify-center rounded-md transition-colors hover:bg-zinc-200 max-md:size-10"><Iconicon={Search01Icon}- className="size-4 text-sidebar-foreground/90 group-data-[collapsible=icon]:size-4.5"+ className="size-4 text-sidebar-foreground/90 group-data-[collapsible=icon]:size-4.5 max-md:size-5"/></button></TooltipTrigger>diff --git a/autogpt_platform/frontend/src/components/layout/AppSidebar/useNavItemClassName.ts b/autogpt_platform/frontend/src/components/layout/AppSidebar/useNavItemClassName.tsindex 2ddebc5721..62a49f513f 100644--- a/autogpt_platform/frontend/src/components/layout/AppSidebar/useNavItemClassName.ts+++ b/autogpt_platform/frontend/src/components/layout/AppSidebar/useNavItemClassName.ts@@ -5,7 +5,7 @@ import { Flag, useGetFlag } from "@/services/feature-flags/use-get-flag";export function useNavItemClassName() {const isBrainDumpEnabled = useGetFlag(Flag.ONBOARDING_BRAIN_DUMP);return cn(- "h-auto rounded-xl p-2 pl-3 font-normal data-[active=true]:font-normal group-data-[collapsible=icon]:!p-1.5 hover:!bg-zinc-100 [&>svg]:size-4 group-data-[collapsible=icon]:[&>svg]:size-4.5",+ "h-auto rounded-xl p-2 pl-3 font-normal data-[active=true]:font-normal group-data-[collapsible=icon]:!p-1.5 hover:!bg-zinc-100 [&>svg]:size-4 group-data-[collapsible=icon]:[&>svg]:size-4.5 max-md:gap-3 max-md:py-2.5 max-md:text-base max-md:[&>svg]:size-5",isBrainDumpEnabled? "data-[active=true]:!bg-zinc-200 data-[active=true]:hover:!bg-zinc-200": "data-[active=true]:!bg-zinc-100",diff --git a/autogpt_platform/frontend/src/components/molecules/AutopilotAvatar/helpers.ts b/autogpt_platform/frontend/src/components/molecules/AutopilotAvatar/helpers.tsindex 2e6fbc5625..ec3aaa3ba2 100644--- a/autogpt_platform/frontend/src/components/molecules/AutopilotAvatar/helpers.ts+++ b/autogpt_platform/frontend/src/components/molecules/AutopilotAvatar/helpers.ts@@ -10,8 +10,6 @@ export const AUTOPILOT_AVATAR_BG_CLASS = "bg-violet-50";export const AUTOPILOT_COVER_URL = "/experts/covers/otto-cover-3.png";-export const AUTOPILOT_COVER_COLOR = "cyan-300";-/** Light and mid lavender, for effects drawn around Otto — the voice aura's* comets and the dots that collapse into him. */export const AUTOPILOT_AURA_COLORS: [string, string] = ["#ddd6fe", "#a78bfa"];diff --git a/autogpt_platform/frontend/src/components/molecules/ExpertIdentityDetails/ExpertIdentityDetails.tsx b/autogpt_platform/frontend/src/components/molecules/ExpertIdentityDetails/ExpertIdentityDetails.tsxindex da2e7d24f6..6ffc0f25b0 100644--- a/autogpt_platform/frontend/src/components/molecules/ExpertIdentityDetails/ExpertIdentityDetails.tsx+++ b/autogpt_platform/frontend/src/components/molecules/ExpertIdentityDetails/ExpertIdentityDetails.tsx@@ -14,6 +14,9 @@ interface Props {* sits on its baseline. */nameAlign?: "center" | "baseline";areaClassName?: string;+ /** Category colour for the title on the name line: a gradient fill with+ * a soft glow in that colour (card and page sizes only). */+ areaColor?: string;}export function ExpertIdentityDetails({@@ -25,6 +28,7 @@ export function ExpertIdentityDetails({nameAccessory,nameAlign = "center",areaClassName,+ areaColor,}: Props) {const compact = size === "compact";const Container = compact ? "span" : "div";@@ -77,7 +81,28 @@ export function ExpertIdentityDetails({)}title={titleOnNameLine}>- {"•"} {titleOnNameLine}+ {areaColor ? (+ <>+ {"• "}+ <span+ className={cn(+ "bg-clip-text font-medium text-transparent",+ size === "card" && "text-[15px]",+ size === "page" && "text-lg",+ )}+ style={{+ backgroundImage: `linear-gradient(90deg, color-mix(in srgb, ${areaColor} 60%, #18181b), color-mix(in srgb, ${areaColor} 85%, #18181b))`,+ filter: `drop-shadow(0 0 6px color-mix(in srgb, ${areaColor} 45%, transparent))`,+ }}+ >+ {titleOnNameLine}+ </span>+ </>+ ) : (+ <>+ {"•"} {titleOnNameLine}+ </>+ )}</Text>) : null}{nameAccessory}diff --git a/autogpt_platform/frontend/src/components/ui/sidebar.tsx b/autogpt_platform/frontend/src/components/ui/sidebar.tsxindex e61b4835e4..d6b69a4355 100644--- a/autogpt_platform/frontend/src/components/ui/sidebar.tsx+++ b/autogpt_platform/frontend/src/components/ui/sidebar.tsx@@ -217,13 +217,21 @@ const Sidebar = React.forwardRef<<SheetContentdata-sidebar="sidebar"data-mobile="true"- className="w-[--sidebar-width] bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden"+ tabIndex={-1}+ className="w-[--sidebar-width] bg-sidebar p-0 text-sidebar-foreground outline-none [&>button]:hidden"style={{"--sidebar-width": SIDEBAR_WIDTH_MOBILE,} as React.CSSProperties}side={side}+ // Radix focuses the first control on open, which is the search+ // button: it shows its focus ring and tooltip. Focus the panel+ // itself so the focus trap still holds.+ onOpenAutoFocus={(event) => {+ event.preventDefault();+ (event.currentTarget as HTMLElement).focus();+ }}><SheetHeader className="sr-only"><SheetTitle>Sidebar</SheetTitle>diff --git a/autogpt_platform/frontend/src/components/ui/tooltip.tsx b/autogpt_platform/frontend/src/components/ui/tooltip.tsxindex 93d498e1e4..837912603a 100644--- a/autogpt_platform/frontend/src/components/ui/tooltip.tsx+++ b/autogpt_platform/frontend/src/components/ui/tooltip.tsx@@ -3,6 +3,7 @@import * as React from "react";import * as TooltipPrimitive from "@radix-ui/react-tooltip";+import { tooltipContentClassName } from "@/components/atoms/Tooltip/BaseTooltip";import { cn } from "@/lib/utils";const TooltipProvider = TooltipPrimitive.Provider;@@ -19,10 +20,7 @@ const TooltipContent = React.forwardRef<<TooltipPrimitive.Contentref={ref}sideOffset={sideOffset}- className={cn(- "z-50 origin-[--radix-tooltip-content-transform-origin] overflow-hidden rounded-md bg-neutral-900 px-3 py-1.5 text-xs text-neutral-50 animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 dark:bg-neutral-50 dark:text-neutral-900",- className,- )}+ className={cn(tooltipContentClassName, className)}{...props}/></TooltipPrimitive.Portal>diff --git a/autogpt_platform/frontend/src/lib/workspace-files.ts b/autogpt_platform/frontend/src/lib/workspace-files.tsnew file mode 100644index 0000000000..ebd91d7371--- /dev/null+++ b/autogpt_platform/frontend/src/lib/workspace-files.ts@@ -0,0 +1,7 @@+// Agent graphs the builder tools save as `agent.json` are plumbing, not+// something the user made or asked for, so file lists leave them out.+const HIDDEN_FILE_NAMES = new Set(["agent.json"]);++export function isHiddenWorkspaceFile(file: { name: string }): boolean {+ return HIDDEN_FILE_NAMES.has(file.name.toLowerCase());+}diff --git a/autogpt_platform/frontend/src/playwright/journeys/selfhost-journey.spec.ts b/autogpt_platform/frontend/src/playwright/journeys/selfhost-journey.spec.tsindex 5297a9d234..af3a05e2dc 100644--- a/autogpt_platform/frontend/src/playwright/journeys/selfhost-journey.spec.ts+++ b/autogpt_platform/frontend/src/playwright/journeys/selfhost-journey.spec.ts@@ -128,7 +128,6 @@ test("selfhost journey: a self-hoster's first hour has nothing hosted-only in itawait connectHandles(page, "output", "value");await expect.poll(() => buildPage.getEdgeCount()).toBe(1);await buildPage.fillLastNodeTextInput("Agent Output", outputName);- await expect.soft(page.locator(AGENTATION)).toHaveCount(0);await buildPage.saveAgent(agentName, "Self-hosted first-hour journey");await buildPage.waitForSaveComplete();await buildPage.waitForSaveButton();@@ -181,8 +180,6 @@ test("selfhost journey: a self-hoster's first hour has nothing hosted-only in it).toEqual([]);});-const AGENTATION = "[data-agentation-root], [data-agentation-toolbar]";-// Drags from the first node's named output to the second node's named input.// BuildPage.connectNodes takes each node's first handle, which for Store Value// is ``error``.@@ -269,7 +266,6 @@ async function expectNoHostedOnlyChrome(page: Page) {const accountMenu = page.getByTestId("profile-popout-menu-trigger");await expect(accountMenu).toBeVisible();await expect.soft(page.getByText(/earn credits/i)).toHaveCount(0);- await expect.soft(page.locator(AGENTATION)).toHaveCount(0);await accountMenu.click();const menu = page.getByTestId("account-menu-popover");