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): port tour chat visual polish to copilot chat (#13562)
Ubbe000dd1fffab8
diff --git a/autogpt_platform/frontend/src/app/(platform)/PlatformChrome/PlatformChrome.tsx b/autogpt_platform/frontend/src/app/(platform)/PlatformChrome/PlatformChrome.tsxindex 1b873a111c..2c49169018 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 { cn } from "@/lib/utils";import { Navbar } from "@/components/layout/Navbar/Navbar";import { TopUpPromptProvider } from "@/components/layout/TopUpPrompt/TopUpPromptProvider";import {@@ -15,7 +16,6 @@ import {import { AdminImpersonationBanner } from "../admin/components/AdminImpersonationBanner";import { GlobalSearchOverlay } from "../components/GlobalSearchModal/GlobalSearchOverlay";import { PaywallGate } from "../PaywallGate/PaywallGate";-import { InsetHeaderActions } from "./components/InsetHeaderActions/InsetHeaderActions";import { InsetHeaderTitle } from "./components/InsetHeaderTitle/InsetHeaderTitle";import { usePlatformChrome } from "./usePlatformChrome";@@ -24,7 +24,12 @@ interface Props {}export function PlatformChrome({ children }: Props) {- const { showNewLayout, showTourSidebar } = usePlatformChrome();+ const {+ showNewLayout,+ showTourSidebar,+ overlayInsetHeader,+ hasInsetHeaderTitle,+ } = usePlatformChrome();const content = (<TopUpPromptProvider>@@ -53,16 +58,24 @@ export function PlatformChrome({ children }: Props) {<SidebarProvider style={{ "--sidebar-width": "19rem" } as CSSProperties}><AppSidebar /><SidebarInset className="bg-[#f9f9f9]">- <header className="relative flex shrink-0 items-center pb-4 pt-6">+ <header+ className={cn(+ "flex shrink-0 items-center pb-4 pt-6",+ // Overlay mode (copilot): the header floats above the content+ // instead of reserving vertical space, so the chat scrolls to+ // the viewport top underneath it.+ overlayInsetHeader+ ? "pointer-events-none absolute inset-x-0 top-0 z-40"+ : "relative z-10",+ !overlayInsetHeader && !hasInsetHeaderTitle && "md:hidden",+ )}+ ><div className="mx-auto flex w-full max-w-7xl items-center gap-2 px-6 md:px-8">- <div className="md:hidden">+ <div className="pointer-events-auto md:hidden"><SidebarTrigger /></div><InsetHeaderTitle /></div>- <div className="absolute inset-y-0 right-4 flex items-center">- <InsetHeaderActions />- </div></header><AdminImpersonationBanner /><GlobalSearchOverlay />diff --git a/autogpt_platform/frontend/src/app/(platform)/PlatformChrome/__tests__/PlatformChrome.test.tsx b/autogpt_platform/frontend/src/app/(platform)/PlatformChrome/__tests__/PlatformChrome.test.tsxindex db7ca846ac..88a4c4107e 100644--- a/autogpt_platform/frontend/src/app/(platform)/PlatformChrome/__tests__/PlatformChrome.test.tsx+++ b/autogpt_platform/frontend/src/app/(platform)/PlatformChrome/__tests__/PlatformChrome.test.tsx@@ -56,9 +56,6 @@ vi.mock("../../admin/components/AdminImpersonationBanner", () => ({vi.mock("../../components/GlobalSearchModal/GlobalSearchOverlay", () => ({GlobalSearchOverlay: () => <div data-testid="global-search" />,}));-vi.mock("../components/InsetHeaderActions/InsetHeaderActions", () => ({- InsetHeaderActions: () => <div data-testid="inset-actions" />,-}));afterEach(() => {vi.clearAllMocks();@@ -82,7 +79,7 @@ describe("PlatformChrome", () => {expect(screen.getByTestId("child")).toBeDefined();});- it("renders the new sidebar shell with inset actions when enabled", async () => {+ it("renders the new sidebar shell when enabled", async () => {showNewLayoutMock.mockReturnValue(true);render(<PlatformChrome>@@ -93,7 +90,6 @@ describe("PlatformChrome", () => {await waitFor(() => {expect(screen.getByTestId("app-sidebar")).toBeDefined();});- expect(screen.getByTestId("inset-actions")).toBeDefined();expect(screen.queryByTestId("navbar")).toBeNull();expect(screen.getByTestId("child")).toBeDefined();});diff --git a/autogpt_platform/frontend/src/app/(platform)/PlatformChrome/components/InsetHeaderActions/InsetHeaderActions.tsx b/autogpt_platform/frontend/src/app/(platform)/PlatformChrome/components/InsetHeaderActions/InsetHeaderActions.tsxdeleted file mode 100644index 42ee1118bb..0000000000--- a/autogpt_platform/frontend/src/app/(platform)/PlatformChrome/components/InsetHeaderActions/InsetHeaderActions.tsx+++ /dev/null@@ -1,48 +0,0 @@-"use client";--import { useGetV2GetUserProfile } from "@/app/api/__generated__/endpoints/store/store";-import { okData } from "@/app/api/helpers";-import { AccountMenu } from "@/components/layout/Navbar/components/AccountMenu/AccountMenu";-import { AgentActivityDropdown } from "@/components/layout/Navbar/components/AgentActivityDropdown/AgentActivityDropdown";-import { Wallet } from "@/components/layout/Navbar/components/Wallet/Wallet";-import { getAccountMenuItems } from "@/components/layout/Navbar/helpers";-import { isLogoutInProgress } from "@/lib/autogpt-server-api/helpers";-import { useSupabase } from "@/lib/supabase/hooks/useSupabase";-import { UsageIndicator } from "@/app/(platform)/PlatformChrome/components/UsageIndicator/UsageIndicator";--export function InsetHeaderActions() {- const { user, isLoggedIn, isUserLoading } = useSupabase();- const logoutInProgress = isLogoutInProgress();- const dynamicMenuItems = getAccountMenuItems(user?.role);-- const { data: profile, isLoading: isProfileLoading } = useGetV2GetUserProfile(- {- query: {- select: okData,- enabled: isLoggedIn && !!user && !logoutInProgress,- queryKey: ["/api/store/profile", user?.id],- },- },- );-- if (!isLoggedIn) return null;-- const isLoadingProfile = isProfileLoading || isUserLoading;-- return (- <div className="flex items-center gap-4">- <div className="[&_button:hover]:bg-zinc-200 [&_button]:flex [&_button]:h-8 [&_button]:w-8 [&_button]:items-center [&_button]:justify-center [&_button]:rounded-xl [&_button]:border [&_button]:border-zinc-200 [&_button]:bg-zinc-100 [&_button]:p-0 [&_svg]:!size-5">- <AgentActivityDropdown />- </div>- <UsageIndicator />- {profile && <Wallet key={profile.username} compact />}- <AccountMenu- userName={profile?.name || profile?.username}- userEmail={user?.email}- avatarSrc={profile?.avatar_url ?? ""}- menuItemGroups={dynamicMenuItems}- isLoading={isLoadingProfile}- />- </div>- );-}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 14f8c8ca15..c281166348 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@@ -8,7 +8,7 @@ const ROUTE_TITLES: Record<string, { title: string; icon: Icon }> = {"/artifacts": { title: "Files", icon: FolderIcon },};-function getRouteTitle(pathname: string | null) {+export function getRouteTitle(pathname: string | null) {if (!pathname) return null;const match = Object.entries(ROUTE_TITLES).find(([href]) => pathname === href || pathname.startsWith(`${href}/`),diff --git a/autogpt_platform/frontend/src/app/(platform)/PlatformChrome/components/UsageIndicator/UsageIndicator.tsx b/autogpt_platform/frontend/src/app/(platform)/PlatformChrome/components/UsageIndicator/UsageIndicator.tsxindex 4bce8ca00d..e7e68e61a9 100644--- a/autogpt_platform/frontend/src/app/(platform)/PlatformChrome/components/UsageIndicator/UsageIndicator.tsx+++ b/autogpt_platform/frontend/src/app/(platform)/PlatformChrome/components/UsageIndicator/UsageIndicator.tsx@@ -16,8 +16,7 @@ export function UsageIndicator() {<buttontype="button"aria-label={label}- title={label}- className="relative flex size-8 items-center justify-center rounded-xl border border-zinc-200 bg-zinc-100 p-0 transition-colors hover:bg-zinc-200"+ className="relative flex size-8 items-center justify-center rounded-lg p-0 transition-colors hover:bg-zinc-100"><GaugeIcon className="size-5 text-black" />@@ -33,7 +32,7 @@ export function UsageIndicator() {y="1"width="30"height="30"- rx="11"+ rx="8"pathLength={100}strokeDasharray={`${percent} 100`}strokeLinecap="round"diff --git a/autogpt_platform/frontend/src/app/(platform)/PlatformChrome/usePlatformChrome.ts b/autogpt_platform/frontend/src/app/(platform)/PlatformChrome/usePlatformChrome.tsindex c544025b7c..54e73f8bee 100644--- a/autogpt_platform/frontend/src/app/(platform)/PlatformChrome/usePlatformChrome.ts+++ b/autogpt_platform/frontend/src/app/(platform)/PlatformChrome/usePlatformChrome.ts@@ -4,6 +4,8 @@ import { useEffect, useState } from "react";import { useSupabase } from "@/lib/supabase/hooks/useSupabase";import { Flag, useGetFlag } from "@/services/feature-flags/use-get-flag";+import { getRouteTitle } from "./components/InsetHeaderTitle/InsetHeaderTitle";+// Routes that must stay outside the new top-level sidebar layout. Login,// signup and onboarding already live in the (no-navbar) group. These// (platform) routes should not show the app sidebar — reset-password and the@@ -40,6 +42,9 @@ export function usePlatformChrome() {pathname === "/marketplace" ||Boolean(pathname?.startsWith("/marketplace/"));+ const isCopilotRoute =+ pathname === "/copilot" || Boolean(pathname?.startsWith("/copilot/"));+// Logged-out marketplace visitors get the tour demo sidebar as an upsell.// Waits for the session check so it never flashes at logged-in users.const showTourSidebar =@@ -48,6 +53,12 @@ export function usePlatformChrome() {return {showNewLayout:isMounted && isNewLayoutEnabled && !isExcludedRoute && !showTourSidebar,+ // On copilot the inset header floats over the chat instead of stacking+ // above it, so messages scroll to the viewport top.+ overlayInsetHeader: isCopilotRoute,+ // 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)),showTourSidebar,};}diff --git a/autogpt_platform/frontend/src/app/(platform)/copilot/CopilotPage.tsx b/autogpt_platform/frontend/src/app/(platform)/copilot/CopilotPage.tsxindex 2623a0bd23..07fe5c53af 100644--- a/autogpt_platform/frontend/src/app/(platform)/copilot/CopilotPage.tsx+++ b/autogpt_platform/frontend/src/app/(platform)/copilot/CopilotPage.tsx@@ -3,7 +3,7 @@import { LowCreditBanner } from "@/components/layout/TopUpPrompt/LowCreditBanner/LowCreditBanner";import { DotDistortionShader } from "@/components/ui/dot-distortion-shader";import { SidebarProvider } from "@/components/ui/sidebar";-import { INSET_HEADER_HEIGHT_PX, NAVBAR_HEIGHT_PX } from "@/lib/constants";+import { NAVBAR_HEIGHT_PX } from "@/lib/constants";import { useSupabase } from "@/lib/supabase/hooks/useSupabase";import { Flag, useGetFlag } from "@/services/feature-flags/use-get-flag";import { usePlatformChrome } from "../PlatformChrome/usePlatformChrome";@@ -72,12 +72,13 @@ export function CopilotPage() {// (SidebarProvider `min-h-svh` → SidebarInset `flex-1` → `section flex-1`)// only set a *minimum* height, so `height: 100%` there resolves to// content height and the accordion pushes the input below the fold.- // Subtract the inset header in the new layout; the navbar + preview- // banner in the classic one. `svh` keeps the input visible when mobile- // browser chrome is shown.+ // The new layout gets the full viewport — its inset header overlays the+ // chat (see PlatformChrome) instead of stacking above it. The classic+ // layout subtracts the navbar + preview banner. `svh` keeps the input+ // visible when mobile browser chrome is shown.style={showNewLayout- ? { height: `calc(100svh - ${INSET_HEADER_HEIGHT_PX}px)` }+ ? { height: "100svh" }: {height: `calc(100vh - ${NAVBAR_HEIGHT_PX}px - var(--preview-banner-height, 0px))`,}diff --git a/autogpt_platform/frontend/src/app/(platform)/copilot/__tests__/copilotStreamSmoothing.test.ts b/autogpt_platform/frontend/src/app/(platform)/copilot/__tests__/copilotStreamSmoothing.test.tsnew file mode 100644index 0000000000..c00fbc39c4--- /dev/null+++ b/autogpt_platform/frontend/src/app/(platform)/copilot/__tests__/copilotStreamSmoothing.test.ts@@ -0,0 +1,159 @@+import type { UIMessageChunk } from "ai";+import { describe, expect, it } from "vitest";++import { createSmoothingTransform } from "../copilotStreamSmoothing";++const instantWait = () => Promise.resolve();++async function pipe(chunks: UIMessageChunk[]): Promise<UIMessageChunk[]> {+ const source = new ReadableStream<UIMessageChunk>({+ start(controller) {+ for (const chunk of chunks) controller.enqueue(chunk);+ controller.close();+ },+ });++ const out: UIMessageChunk[] = [];+ const reader = source+ .pipeThrough(createSmoothingTransform(instantWait))+ .getReader();+ while (true) {+ const { done, value } = await reader.read();+ if (done) break;+ out.push(value);+ }+ return out;+}++function textDelta(delta: string, id = "t1"): UIMessageChunk {+ return { type: "text-delta", id, delta };+}++function joinedText(chunks: UIMessageChunk[]) {+ return chunks+ .filter((c) => c.type === "text-delta")+ .map((c) => c.delta)+ .join("");+}++describe("createSmoothingTransform", () => {+ it("splits a bursty delta into word-sized deltas without losing text", async () => {+ const burst = "The quick brown fox jumps over the lazy dog ";+ const out = await pipe([textDelta(burst)]);++ const deltas = out.filter((c) => c.type === "text-delta");+ expect(deltas.length).toBeGreaterThan(1);+ expect(joinedText(out)).toBe(burst);+ for (const chunk of deltas) {+ expect(chunk.id).toBe("t1");+ }+ });++ it("holds back a trailing partial word until more text arrives", async () => {+ const out = await pipe([textDelta("Hello wor"), textDelta("ld! Bye ")]);+ const deltas = out.filter((c) => c.type === "text-delta");++ expect(joinedText(out)).toBe("Hello world! Bye ");+ // No emitted delta may end mid-word ("Hello wor" must never render):+ // every chunk ends on a whitespace boundary.+ for (const chunk of deltas) {+ expect(chunk.delta).toMatch(/\s$/);+ }+ expect(deltas.some((c) => c.delta.includes("world!"))).toBe(true);+ });++ it("flushes the remaining partial word when the stream closes", async () => {+ const out = await pipe([textDelta("no trailing space")]);+ expect(joinedText(out)).toBe("no trailing space");+ });++ it("flushes buffered text before passing a non-delta chunk through", async () => {+ const out = await pipe([+ { type: "text-start", id: "t1" },+ textDelta("almost done"),+ { type: "text-end", id: "t1" },+ ]);++ const types = out.map((c) => c.type);+ expect(types[0]).toBe("text-start");+ expect(types[types.length - 1]).toBe("text-end");+ expect(joinedText(out)).toBe("almost done");+ const endIndex = types.indexOf("text-end");+ const lastDeltaIndex = types.lastIndexOf("text-delta");+ expect(lastDeltaIndex).toBeLessThan(endIndex);+ });++ it("smooths reasoning deltas and flushes on part switch", async () => {+ const out = await pipe([+ { type: "reasoning-delta", id: "r1", delta: "thinking hard " },+ textDelta("answer here "),+ ]);++ const reasoning = out.filter((c) => c.type === "reasoning-delta");+ const text = out.filter((c) => c.type === "text-delta");+ expect(reasoning.map((c) => c.delta).join("")).toBe("thinking hard ");+ expect(text.map((c) => c.delta).join("")).toBe("answer here ");+ const lastReasoningIndex = out+ .map((c) => c.type)+ .lastIndexOf("reasoning-delta");+ const firstTextIndex = out.findIndex((c) => c.type === "text-delta");+ expect(lastReasoningIndex).toBeLessThan(firstTextIndex);+ });++ it("passes deltas with providerMetadata through unsplit", async () => {+ const chunk: UIMessageChunk = {+ type: "text-delta",+ id: "t1",+ delta: "one two three ",+ providerMetadata: { test: { keep: true } },+ };+ const out = await pipe([chunk]);+ expect(out).toEqual([chunk]);+ });++ it("keeps markdown whitespace intact across newlines", async () => {+ const burst = "# Title\n\nParagraph one.\n\n- item a\n- item b\n";+ const out = await pipe([textDelta(burst)]);+ expect(joinedText(out)).toBe(burst);+ });++ it("tears down cleanly when the reader cancels mid-drain", async () => {+ let release = () => {};+ const gatedWait = () =>+ new Promise<void>((resolve) => {+ release = resolve;+ });+ const source = new ReadableStream<UIMessageChunk>({+ start(controller) {+ controller.enqueue(textDelta("one two three four five "));+ },+ });++ const reader = source+ .pipeThrough(createSmoothingTransform(gatedWait))+ .getReader();+ const first = await reader.read();+ expect(first.done).toBe(false);++ // Cancel while the drain loop is parked on the gated wait, then let it+ // resume — it must exit without enqueueing into the cancelled stream.+ await reader.cancel();+ release();+ await new Promise((resolve) => setTimeout(resolve, 0));+ });++ it("drains large backlogs in bounded ticks via adaptive catch-up", async () => {+ const words = Array.from({ length: 300 }, (_, i) => `w${i}`).join(" ");+ const out = await pipe([textDelta(`${words} `)]);+ const deltas = out.filter((c) => c.type === "text-delta");++ expect(joinedText(out)).toBe(`${words} `);+ // 300 words at 1 word/tick would be 300 chunks; adaptive pacing emits+ // ~1/BACKLOG_DRAIN_TICKS of the backlog per tick (~76 ticks for 300).+ expect(deltas.length).toBeLessThanOrEqual(90);+ // The first tick after a burst carries multiple words (catch-up mode).+ expect(deltas[0].type === "text-delta" && deltas[0].delta).toMatch(+ /^(\S+\s+){2,}/,+ );+ });+});diff --git a/autogpt_platform/frontend/src/app/(platform)/copilot/components/ArtifactCard/ArtifactCard.tsx b/autogpt_platform/frontend/src/app/(platform)/copilot/components/ArtifactCard/ArtifactCard.tsxindex 9e1978312b..45286e590a 100644--- a/autogpt_platform/frontend/src/app/(platform)/copilot/components/ArtifactCard/ArtifactCard.tsx+++ b/autogpt_platform/frontend/src/app/(platform)/copilot/components/ArtifactCard/ArtifactCard.tsx@@ -73,7 +73,7 @@ export function ArtifactCard({ artifact, readOnly }: Props) {<buttontype="button"onClick={handleDownloadOnly}- className="my-1 flex w-full items-center gap-3 rounded-lg border border-zinc-200 bg-white px-3 py-2.5 text-left transition-colors hover:bg-zinc-50"+ className="my-1 flex w-full items-center gap-3 rounded-lg border border-zinc-200 bg-white px-3 py-2.5 text-left transition-colors animate-in fade-in slide-in-from-bottom-2 fill-mode-both [animation-duration:500ms] hover:bg-zinc-50"><Icon size={20} className="shrink-0 text-zinc-400" /><div className="min-w-0 flex-1">@@ -97,7 +97,7 @@ export function ArtifactCard({ artifact, readOnly }: Props) {type="button"onClick={() => openArtifact(artifact)}className={cn(- "my-1 flex w-full items-center gap-3 rounded-lg border bg-white px-3 py-2.5 text-left transition-colors hover:bg-zinc-50",+ "my-1 flex w-full items-center gap-3 rounded-lg border bg-white px-3 py-2.5 text-left transition-colors animate-in fade-in slide-in-from-bottom-2 fill-mode-both [animation-duration:500ms] hover:bg-zinc-50",isActive ? "border-violet-300 bg-violet-50/50" : "border-zinc-200",)}>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 df7f382c65..54a6b99263 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@@ -182,9 +182,8 @@ export const ChatContainer = ({initial={{ opacity: 0 }}animate={{ opacity: 1 }}transition={{ duration: 0.3 }}- className="relative px-3 pb-2 pt-2"+ className="relative px-3 pb-6 pt-2">- <div className="pointer-events-none absolute left-0 right-0 top-[-18px] z-10 h-6 bg-gradient-to-b from-transparent to-[#fafafa]" />{isLimitReached && (<divref={usageCardRef}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 3e09c9a544..3dce192ae1 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@@ -26,7 +26,6 @@ import {workspaceItemToAttachment,} from "../../helpers/workspaceAttachments";import { ComposerPlusMenu } from "./components/ComposerPlusMenu";-import { BlockCaret } from "./components/BlockCaret";import { DryRunToggleButton } from "./components/DryRunToggleButton";import { FileChips } from "./components/FileChips";import { MentionDropdown } from "./components/MentionDropdown";@@ -268,8 +267,9 @@ export function ChatInput({<InputGroupclassName={cn("overflow-hidden border-zinc-200 has-[[data-slot=input-group-control]:focus-visible]:border-neutral-200 has-[[data-slot=input-group-control]:focus-visible]:ring-0",+ "shadow-[0_2px_8px_rgba(0,0,0,0.04),0_0_32px_-4px_rgba(99,102,241,0.4)] transition-shadow has-[[data-slot=input-group-control]:focus-visible]:shadow-[0_2px_8px_rgba(0,0,0,0.04),0_0_36px_-4px_rgba(99,102,241,0.45)]",isRecording &&- "border-red-400 ring-1 ring-red-400 has-[[data-slot=input-group-control]:focus-visible]:border-red-400 has-[[data-slot=input-group-control]:focus-visible]:ring-red-400",+ "border-red-400 shadow-[0_2px_8px_rgba(0,0,0,0.04),0_0_32px_-4px_rgba(248,113,113,0.45)] ring-1 ring-red-400 has-[[data-slot=input-group-control]:focus-visible]:border-red-400 has-[[data-slot=input-group-control]:focus-visible]:shadow-[0_2px_8px_rgba(0,0,0,0.04),0_0_32px_-4px_rgba(248,113,113,0.45)] has-[[data-slot=input-group-control]:focus-visible]:ring-red-400",)}><FileChips@@ -287,9 +287,7 @@ export function ChatInput({onBlur={mentions.close}disabled={isInputDisabled}placeholder={resolvedPlaceholder}- className="caret-transparent placeholder:indent-3"/>- <BlockCaret textareaId={inputId} />{isRecording && !value && (<div className="pointer-events-none absolute inset-0 flex items-center justify-center"><RecordingIndicatordiff --git a/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatInput/components/BlockCaret.tsx b/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatInput/components/BlockCaret.tsxdeleted file mode 100644index bb990c8ca4..0000000000--- a/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatInput/components/BlockCaret.tsx+++ /dev/null@@ -1,182 +0,0 @@-"use client";--import { useEffect, useState } from "react";--interface Props {- textareaId: string;-}--// Style properties that must be mirrored from the textarea onto a hidden-// measurement div so that span.offsetTop/offsetLeft inside the mirror equal-// the caret's pixel position inside the textarea.-const MIRROR_PROPERTIES = [- "direction",- "boxSizing",- "width",- "height",- "overflowX",- "overflowY",- "borderTopWidth",- "borderRightWidth",- "borderBottomWidth",- "borderLeftWidth",- "borderStyle",- "paddingTop",- "paddingRight",- "paddingBottom",- "paddingLeft",- "fontStyle",- "fontVariant",- "fontWeight",- "fontStretch",- "fontSize",- "fontSizeAdjust",- "lineHeight",- "fontFamily",- "textAlign",- "textTransform",- "textIndent",- "letterSpacing",- "wordSpacing",- "tabSize",- "whiteSpace",- "wordWrap",- "wordBreak",-] as const;--interface Coords {- left: number;- top: number;- height: number;-}--function getCaretCoordinates(- textarea: HTMLTextAreaElement,- position: number,-): Coords {- const computed = window.getComputedStyle(textarea);- const mirror = document.createElement("div");-- mirror.style.position = "absolute";- mirror.style.top = "0";- mirror.style.left = "-9999px";- mirror.style.visibility = "hidden";- mirror.style.whiteSpace = "pre-wrap";- mirror.style.wordWrap = "break-word";-- for (const prop of MIRROR_PROPERTIES) {- mirror.style[prop as never] = computed[prop as never];- }-- mirror.textContent = textarea.value.substring(0, position);- const marker = document.createElement("span");- // Fall back to a real char so the span has a measurable bounding box even- // when the cursor is at end-of-input.- marker.textContent = textarea.value.substring(position) || ".";- mirror.appendChild(marker);- document.body.appendChild(mirror);-- const fontSize = parseFloat(computed.fontSize);- const lineHeight = parseFloat(computed.lineHeight) || fontSize * 1.2;- const coords: Coords = {- left: marker.offsetLeft,- top: marker.offsetTop,- height: lineHeight,- };-- document.body.removeChild(mirror);- return coords;-}--const CARET_WIDTH = 3;--export function BlockCaret({ textareaId }: Props) {- const [pos, setPos] = useState<Coords | null>(null);- const [visible, setVisible] = useState(true);-- useEffect(() => {- const textarea = document.getElementById(- textareaId,- ) as HTMLTextAreaElement | null;- if (!textarea) return;-- let frame = 0;-- function update() {- if (!textarea) return;- if (document.activeElement !== textarea) {- setPos(null);- return;- }- if (textarea.selectionStart !== textarea.selectionEnd) {- // Hide bar during text selection — the bar over highlighted ranges- // would look broken.- setPos(null);- return;- }- const c = getCaretCoordinates(textarea, textarea.selectionEnd);- setPos({- left: c.left - textarea.scrollLeft,- top: c.top - textarea.scrollTop,- height: c.height,- });- }-- // Each keystroke fires a burst of events (keydown + input + keyup, …).- // Coalesce them into a single measurement per animation frame so the- // synchronous reflow in getCaretCoordinates runs at most once per frame- // instead of several times per keystroke.- function scheduleUpdate() {- if (frame) return;- frame = window.requestAnimationFrame(() => {- frame = 0;- update();- });- }-- update();- const events = [- "input",- "keyup",- "keydown",- "click",- "focus",- "blur",- "scroll",- "select",- ];- for (const ev of events) textarea.addEventListener(ev, scheduleUpdate);- window.addEventListener("resize", scheduleUpdate);-- return () => {- if (frame) window.cancelAnimationFrame(frame);- for (const ev of events) textarea.removeEventListener(ev, scheduleUpdate);- window.removeEventListener("resize", scheduleUpdate);- };- }, [textareaId]);-- useEffect(() => {- if (!pos) return;- // Reset to visible whenever the caret moves so typing keeps the bar- // solid — only blinks once the user pauses.- setVisible(true);- const interval = setInterval(() => setVisible((v) => !v), 530);- return () => clearInterval(interval);- }, [pos]);-- if (!pos) return null;-- return (- <div- aria-hidden="true"- className="pointer-events-none absolute z-10 bg-blue-500"- style={{- left: pos.left,- top: pos.top - 3,- height: pos.height,- width: CARET_WIDTH,- opacity: visible ? 1 : 0,- }}- />- );-}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 0468285dd3..3f43ace257 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@@ -59,7 +59,7 @@ export function ComposerPlusMenu({data-testid="composer-plus-button"disabled={disabled}className={cn(- "border-zinc-300 bg-white text-zinc-500 hover:border-zinc-400 hover:bg-zinc-50 hover:text-zinc-700",+ "border-neutral-200 bg-white text-zinc-500 shadow-sm hover:border-neutral-200 hover:bg-neutral-50 hover:text-zinc-700",disabled && "opacity-40",)}>diff --git a/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatInput/components/RecordingButton.tsx b/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatInput/components/RecordingButton.tsxindex efba442807..f9b697e170 100644--- a/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatInput/components/RecordingButton.tsx+++ b/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatInput/components/RecordingButton.tsx@@ -28,7 +28,7 @@ export function RecordingButton({disabled={disabled}onClick={onClick}className={cn(- "border-zinc-300 bg-white text-zinc-500 hover:border-zinc-400 hover:bg-zinc-50 hover:text-zinc-700",+ "border-neutral-200 bg-white text-zinc-500 shadow-sm hover:border-neutral-200 hover:bg-neutral-50 hover:text-zinc-700",disabled && "opacity-40",isRecording && "animate-pulse bg-red-500 text-white hover:bg-red-600",isTranscribing && "bg-zinc-100 text-zinc-400",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 6a78d5e1c7..f496a0e415 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@@ -588,6 +588,7 @@ export function ChatMessagesContainer({from={message.role}key={message.id}data-message-id={message.id}+ className="duration-300 animate-in fade-in slide-in-from-bottom-2 fill-mode-both"><MessageContentclassName={@@ -703,7 +704,10 @@ export function ChatMessagesContainer({</div>)}{!readOnly && showIndicator && lastMessage?.role !== "assistant" && (- <Message from="assistant">+ <Message+ from="assistant"+ className="duration-300 animate-in fade-in slide-in-from-bottom-2 fill-mode-both"+ ><MessageContent className="text-[1rem] leading-relaxed">{indicator}</MessageContent>diff --git a/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatMessagesContainer/components/StoppedTaskCard.tsx b/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatMessagesContainer/components/StoppedTaskCard.tsxindex 406620622d..1a8441f944 100644--- a/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatMessagesContainer/components/StoppedTaskCard.tsx+++ b/autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatMessagesContainer/components/StoppedTaskCard.tsx@@ -4,7 +4,7 @@ import { Text } from "@/components/atoms/Text/Text";export function StoppedTaskCard() {return (- <div className="my-2 flex items-start gap-3 rounded-medium bg-stone-50 p-4">+ <div className="my-2 flex items-start gap-3 rounded-xl border border-zinc-200/70 bg-white p-4 shadow-sm duration-500 animate-in fade-in slide-in-from-bottom-2 fill-mode-both"><div className="flex h-9 w-9 shrink-0 items-center justify-center rounded-small bg-purple-50"><SquareIcon size={16} weight="fill" className="text-purple-500" /></div>diff --git a/autogpt_platform/frontend/src/app/(platform)/copilot/components/ToolAccordion/ToolAccordion.tsx b/autogpt_platform/frontend/src/app/(platform)/copilot/components/ToolAccordion/ToolAccordion.tsxindex 02749573cc..8bdae5722d 100644--- a/autogpt_platform/frontend/src/app/(platform)/copilot/components/ToolAccordion/ToolAccordion.tsx+++ b/autogpt_platform/frontend/src/app/(platform)/copilot/components/ToolAccordion/ToolAccordion.tsx@@ -39,7 +39,11 @@ export function ToolAccordion({return (<div- className={cn("mt-2 w-full rounded-lg bg-stone-50 px-3 py-2", className)}+ className={cn(+ "mt-2 w-full rounded-xl border border-zinc-200/70 bg-white px-3 py-2 shadow-sm",+ "duration-500 animate-in fade-in slide-in-from-bottom-2 fill-mode-both",+ className,+ )}><buttontype="button"diff --git a/autogpt_platform/frontend/src/app/(platform)/copilot/copilotStreamSmoothing.ts b/autogpt_platform/frontend/src/app/(platform)/copilot/copilotStreamSmoothing.tsnew file mode 100644index 0000000000..7c85d87a26--- /dev/null+++ b/autogpt_platform/frontend/src/app/(platform)/copilot/copilotStreamSmoothing.ts@@ -0,0 +1,137 @@+import type { UIMessageChunk } from "ai";++/**+ * Client-side "typewriter" smoothing for the copilot SSE stream.+ *+ * The backend relays LLM output in irregular bursts (provider token batches ++ * Redis relay), so raw `text-delta` chunks make prose jump a phrase at a time.+ * This TransformStream re-chunks text/reasoning deltas into word-sized deltas+ * paced `TICK_DELAY_MS` apart so text flows steadily regardless of network+ * burst size.+ *+ * Pacing is adaptive: each tick emits ~1/`BACKLOG_DRAIN_TICKS` of the+ * buffered backlog (minimum one word), so output starts fast after a burst+ * and decelerates as it catches up — a 300-word burst drains in ~76 ticks+ * (<1 s) instead of 300.+ *+ * Ordering guarantees:+ * - Any non-delta chunk (`text-end`, tool chunks, `finish`, …) flushes the+ * pending buffer for the current part before passing through, so the+ * stream envelope AI SDK's parser depends on is never reordered.+ * - A delta for a different part id (or part type) also flushes first.+ * - Deltas carrying `providerMetadata` are treated as barriers and passed+ * through unsplit — splitting would either drop or duplicate the metadata.+ *+ * Only trailing partial words are held back between ticks; whitespace is+ * always emitted with the word preceding it, so Streamdown's+ * incomplete-markdown handling sees the same boundaries it would on the raw+ * stream.+ */++const TICK_DELAY_MS = 10;+const BACKLOG_DRAIN_TICKS = 25;++type SmoothableChunk = Extract<+ UIMessageChunk,+ { type: "text-delta" | "reasoning-delta" }+>;++interface PendingText {+ type: SmoothableChunk["type"];+ id: string;+ text: string;+}++function isSmoothable(chunk: UIMessageChunk): chunk is SmoothableChunk {+ return chunk.type === "text-delta" || chunk.type === "reasoning-delta";+}++function makeDelta(pending: PendingText, delta: string): UIMessageChunk {+ return pending.type === "text-delta"+ ? { type: "text-delta", id: pending.id, delta }+ : { type: "reasoning-delta", id: pending.id, delta };+}++/**+ * Cut points after each complete word (word + its trailing whitespace).+ * A trailing run of non-whitespace is a partial word and gets no cut point —+ * it stays buffered until more text or a flush arrives.+ */+function findWordCutPoints(text: string): number[] {+ const wordWithTrailingSpace = /\s*\S+\s+/gy;+ const cuts: number[] = [];+ while (wordWithTrailingSpace.exec(text)) {+ cuts.push(wordWithTrailingSpace.lastIndex);+ }+ return cuts;+}++function defaultWait(ms: number) {+ return new Promise<void>((resolve) => setTimeout(resolve, ms));+}++export function createSmoothingTransform(+ wait: (ms: number) => Promise<void> = defaultWait,+): TransformStream<UIMessageChunk, UIMessageChunk> {+ let pending: PendingText | null = null;++ function flushPending(+ controller: TransformStreamDefaultController<UIMessageChunk>,+ ) {+ if (pending && pending.text.length > 0) {+ controller.enqueue(makeDelta(pending, pending.text));+ }+ pending = null;+ }++ async function drainWords(+ controller: TransformStreamDefaultController<UIMessageChunk>,+ ) {+ while (pending) {+ const cuts = findWordCutPoints(pending.text);+ if (cuts.length === 0) return;+ const wordsThisTick = Math.max(+ 1,+ Math.ceil(cuts.length / BACKLOG_DRAIN_TICKS),+ );+ const cutIndex = cuts[Math.min(wordsThisTick, cuts.length) - 1];+ controller.enqueue(makeDelta(pending, pending.text.slice(0, cutIndex)));+ pending.text = pending.text.slice(cutIndex);+ await wait(TICK_DELAY_MS);+ }+ }++ // The bundled lib.dom typings predate the Transformer `cancel` hook+ // (whatwg/streams#1283); extend the type until the TS lib catches up.+ const transformer: Transformer<UIMessageChunk, UIMessageChunk> & {+ cancel?: (reason: unknown) => void;+ } = {+ async transform(chunk, controller) {+ if (!isSmoothable(chunk) || chunk.providerMetadata) {+ flushPending(controller);+ controller.enqueue(chunk);+ return;+ }+ if (pending && (pending.id !== chunk.id || pending.type !== chunk.type)) {+ flushPending(controller);+ }+ if (!pending) {+ pending = { type: chunk.type, id: chunk.id, text: "" };+ }+ pending.text += chunk.delta;+ await drainWords(controller);+ },+ flush(controller) {+ flushPending(controller);+ },+ // Reader cancellation (stop button, unmount) tears the stream down —+ // nothing can be delivered after it, so drop the buffer instead of+ // flushing and let any in-flight drain loop exit without enqueueing+ // into the cancelled stream.+ cancel() {+ pending = null;+ },+ };++ return new TransformStream<UIMessageChunk, UIMessageChunk>(transformer);+}diff --git a/autogpt_platform/frontend/src/app/(platform)/copilot/copilotStreamTransport.ts b/autogpt_platform/frontend/src/app/(platform)/copilot/copilotStreamTransport.tsindex 24776fb8a7..6155cf4190 100644--- a/autogpt_platform/frontend/src/app/(platform)/copilot/copilotStreamTransport.ts+++ b/autogpt_platform/frontend/src/app/(platform)/copilot/copilotStreamTransport.ts@@ -1,7 +1,8 @@import { environment } from "@/services/environment";import { DefaultChatTransport } from "ai";-import type { FileUIPart } from "ai";+import type { ChatTransport, FileUIPart, UIMessage } from "ai";+import { createSmoothingTransform } from "./copilotStreamSmoothing";import { getCopilotAuthHeaders } from "./helpers";import type { CopilotLlmModel, CopilotMode } from "./store";@@ -22,6 +23,23 @@ interface CreateTransportArgs {copilotModelRef: MutableValue<CopilotLlmModel | undefined>;}+/**+ * `DefaultChatTransport` with typewriter smoothing on live sends.+ *+ * POST streams (new user turns) are piped through the word-pacing transform+ * so bursty backend deltas render as steady text. GET-resume streams are+ * deliberately left raw — they replay the whole turn from `0-0`, and slow-+ * typing already-produced history would be worse than a single jump.+ */+class SmoothedCopilotChatTransport extends DefaultChatTransport<UIMessage> {+ async sendMessages(+ options: Parameters<ChatTransport<UIMessage>["sendMessages"]>[0],+ ) {+ const stream = await super.sendMessages(options);+ return stream.pipeThrough(createSmoothingTransform());+ }+}+/*** Build the `DefaultChatTransport` that wires `useChat` directly at the* Python backend's SSE endpoint (bypassing the Next.js serverless proxy to@@ -41,7 +59,7 @@ export function createCopilotTransport({}: CreateTransportArgs) {const baseUrl = `${environment.getAGPTServerBaseUrl()}/api/chat/sessions/${sessionId}/stream`;- return new DefaultChatTransport({+ return new SmoothedCopilotChatTransport({api: baseUrl,prepareSendMessagesRequest: async ({ messages }) => {const last = messages[messages.length - 1];diff --git a/autogpt_platform/frontend/src/app/(platform)/copilot/useCopilotStream.ts b/autogpt_platform/frontend/src/app/(platform)/copilot/useCopilotStream.tsindex 0a58d784d6..06a8d15298 100644--- a/autogpt_platform/frontend/src/app/(platform)/copilot/useCopilotStream.ts+++ b/autogpt_platform/frontend/src/app/(platform)/copilot/useCopilotStream.ts@@ -42,6 +42,13 @@ import { useWakeResync } from "./useWakeResync";*/const FINISH_REFETCH_SETTLE_MS = 500;+/**+ * Batch AI SDK message updates into ~30 ms paints. The smoothing transform in+ * the transport emits word-sized deltas ~10 ms apart; without throttling each+ * word would re-render the whole chat tree.+ */+const STREAM_RENDER_THROTTLE_MS = 30;+interface UseCopilotStreamArgs {sessionId: string | null;hydratedMessages: UIMessage[] | undefined;@@ -119,7 +126,10 @@ export function useCopilotStream({resumeStream,} = useChat(chatRuntime- ? { chat: chatRuntime.chat }+ ? {+ chat: chatRuntime.chat,+ experimental_throttle: STREAM_RENDER_THROTTLE_MS,+ }: {id: "new",},diff --git a/autogpt_platform/frontend/src/app/(platform)/library/agents/[id]/components/NewAgentLibraryView/NewAgentLibraryView.tsx b/autogpt_platform/frontend/src/app/(platform)/library/agents/[id]/components/NewAgentLibraryView/NewAgentLibraryView.tsxindex 8647836b48..38d7f5d3f6 100644--- a/autogpt_platform/frontend/src/app/(platform)/library/agents/[id]/components/NewAgentLibraryView/NewAgentLibraryView.tsx+++ b/autogpt_platform/frontend/src/app/(platform)/library/agents/[id]/components/NewAgentLibraryView/NewAgentLibraryView.tsx@@ -177,12 +177,12 @@ export function NewAgentLibraryView() {<RunAgentModaltriggerSlot={<Button- variant="primary"- size="large"+ variant="outline"+ size="small"className="w-full"disabled={isTemplateLoading && activeTab === "templates"}>- <PlusIcon size={20} /> New task+ <PlusIcon size={16} /> New agent task</Button>}agent={agent}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 f90f76bae3..0328815dba 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@@ -130,7 +130,7 @@ export function LibraryAgentCard({type="button"onClick={() => router.push(`/library/agents/${id}`)}data-testid="library-agent-card-see-runs-link"- className="inline-flex items-center gap-1 rounded-md px-2 py-1.5 text-[13px] font-medium text-zinc-600 transition-colors hover:bg-zinc-50 hover:text-zinc-800"+ className="inline-flex items-center gap-1 whitespace-nowrap rounded-md px-2 py-1.5 text-[13px] font-medium text-zinc-600 transition-colors hover:bg-zinc-50 hover:text-zinc-800"><EyeIcon size={14} className="shrink-0" />See tasks@@ -148,7 +148,7 @@ export function LibraryAgentCard({);router.push(`/copilot?autosubmit=true#prompt=${prompt}`);}}- className="inline-flex items-center gap-1 rounded-md px-2 py-1.5 text-[13px] font-medium text-zinc-600 transition-colors hover:bg-zinc-50 hover:text-zinc-800"+ className="inline-flex items-center gap-1 whitespace-nowrap rounded-md px-2 py-1.5 text-[13px] font-medium text-zinc-600 transition-colors hover:bg-zinc-50 hover:text-zinc-800"><ChatCircleDotsIcon size={14} className="shrink-0" />Chatdiff --git a/autogpt_platform/frontend/src/app/(platform)/library/components/LibraryAgentList/LibraryAgentList.tsx b/autogpt_platform/frontend/src/app/(platform)/library/components/LibraryAgentList/LibraryAgentList.tsxindex 3ee23ea247..8820571298 100644--- a/autogpt_platform/frontend/src/app/(platform)/library/components/LibraryAgentList/LibraryAgentList.tsx+++ b/autogpt_platform/frontend/src/app/(platform)/library/components/LibraryAgentList/LibraryAgentList.tsx@@ -226,7 +226,7 @@ export function LibraryAgentList({<AnimatePresence mode="popLayout"><motion.divkey={`${activeTab}-${selectedFolderId || "all"}`}- className="grid grid-cols-1 gap-6 sm:grid-cols-2 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4"+ className="grid grid-cols-1 gap-6 sm:grid-cols-[repeat(auto-fill,minmax(21rem,1fr))]"variants={activeContainerVariants}initial="hidden"animate="show"diff --git a/autogpt_platform/frontend/src/app/(public)/tour/chat/components/TourChatContainer/TourChatContainer.tsx b/autogpt_platform/frontend/src/app/(public)/tour/chat/components/TourChatContainer/TourChatContainer.tsxindex 994e5c0485..47f5124620 100644--- a/autogpt_platform/frontend/src/app/(public)/tour/chat/components/TourChatContainer/TourChatContainer.tsx+++ b/autogpt_platform/frontend/src/app/(public)/tour/chat/components/TourChatContainer/TourChatContainer.tsx@@ -16,11 +16,7 @@ export function TourChatContainer({ chat }: Props) {return (<div className="flex h-full min-h-0 w-full flex-col px-2 lg:px-0">- {/* Tour-only card styling. These descendant selectors target the shared- ToolAccordion markup (.bg-stone-50 / .py-2) by class name — if those- classes change in ToolAccordion, update them here too. Scoped this- way to avoid modifying the shared component. */}- <div className="mx-auto flex h-full min-h-0 w-full max-w-3xl flex-col bg-[#fafafa] pb-8 [&_.bg-stone-50]:rounded-xl [&_.bg-stone-50]:border [&_.bg-stone-50]:border-zinc-200/70 [&_.bg-stone-50]:bg-white [&_.bg-stone-50]:!py-2 [&_.bg-stone-50]:shadow-sm [&_.py-2]:py-0">+ <div className="mx-auto flex h-full min-h-0 w-full max-w-3xl flex-col bg-[#fafafa] pb-8"><TourMessageListmessages={chat.messages}isStreaming={chat.isStreaming}diff --git a/autogpt_platform/frontend/src/components/layout/AppSidebar/AppSidebar.tsx b/autogpt_platform/frontend/src/components/layout/AppSidebar/AppSidebar.tsxindex 7d9fd29074..ac34964076 100644--- a/autogpt_platform/frontend/src/components/layout/AppSidebar/AppSidebar.tsx+++ b/autogpt_platform/frontend/src/components/layout/AppSidebar/AppSidebar.tsx@@ -25,6 +25,7 @@ import {SquaresFourIcon,StorefrontIcon,} from "@phosphor-icons/react";+import { Button } from "@/components/atoms/Button/Button";import { LoadingSpinner } from "@/components/atoms/LoadingSpinner/LoadingSpinner";import { cn } from "@/lib/utils";import { motion, useReducedMotion } from "framer-motion";@@ -34,8 +35,8 @@ import { ComponentProps, ReactNode, Suspense } from "react";import { getSidebarItemVariants, sidebarContainerVariants } from "./animations";import { AppSidebarHeader } from "./components/AppSidebarHeader/AppSidebarHeader";import { RecentChats } from "./components/RecentChats/RecentChats";-import { SidebarOrgSwitcher } from "./components/SidebarOrgSwitcher/SidebarOrgSwitcher";import { SidebarSearch } from "./components/SidebarSearch/SidebarSearch";+import { SidebarUserActions } from "./components/SidebarUserActions/SidebarUserActions";type NavLink = {name: string;@@ -137,7 +138,10 @@ function CollapsibleNavGroup({<SidebarGroupclassName={cn("py-1", scrollable && "flex min-h-0 flex-1 flex-col")}>- <SidebarGroupLabel asChild className="text-[13px] font-medium">+ <SidebarGroupLabel+ asChild+ className="text-[13px] font-medium text-zinc-500"+ ><CollapsibleTrigger>{label}<CaretDownIcon@@ -191,20 +195,27 @@ export function AppSidebar(props: Props) {<motion.div variants={itemVariants}><SidebarGroup className="mt-2 py-1 group-data-[collapsible=icon]:mt-0"><SidebarGroupContent>- <SidebarMenu>- <SidebarMenuItem>- <SidebarMenuButton- asChild- tooltip="New Task"- className="justify-center rounded-lg bg-zinc-800 font-medium text-white group-data-[collapsible=icon]:justify-start hover:!bg-zinc-900 hover:!text-white"- >- <Link href="/copilot">- <NewTaskIcon />- <span className="truncate">New Task</span>- </Link>- </SidebarMenuButton>- </SidebarMenuItem>- </SidebarMenu>+ <Button+ as="NextLink"+ href="/copilot"+ variant="primary"+ size="small"+ aria-label="New Task"+ leftIcon={<NewTaskIcon />}+ className={cn(+ "relative h-10 w-full overflow-hidden",+ "shadow-[inset_0_1px_0_rgba(255,255,255,0.18),0_4px_16px_-6px_rgba(139,92,246,0.45)]",+ "transition-all duration-300",+ "hover:-translate-y-px hover:shadow-[inset_0_1px_0_rgba(255,255,255,0.3),0_6px_22px_-6px_rgba(139,92,246,0.7)]",+ "before:absolute before:inset-0 before:-translate-x-full before:bg-gradient-to-r before:from-transparent before:via-white/20 before:to-transparent before:transition-transform before:duration-700 before:ease-out hover:before:translate-x-full",+ "motion-reduce:transition-none motion-reduce:before:hidden motion-reduce:hover:translate-y-0",+ "group-data-[collapsible=icon]:size-8 group-data-[collapsible=icon]:min-w-0 group-data-[collapsible=icon]:px-0",+ )}+ >+ <span className="truncate group-data-[collapsible=icon]:hidden">+ New Task+ </span>+ </Button></SidebarGroupContent></SidebarGroup></motion.div>@@ -239,7 +250,7 @@ export function AppSidebar(props: Props) {</motion.div></SidebarContent>- <SidebarOrgSwitcher />+ <SidebarUserActions /><SidebarRail /></Sidebar>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 83987c8878..4f43990db6 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@@ -16,7 +16,7 @@ export function AppSidebarHeader() {const isCollapsed = state === "collapsed";return (- <SidebarHeader className="flex animate-fade-in flex-row items-center justify-between gap-2 p-2 group-data-[collapsible=icon]:flex-col">+ <SidebarHeader className="mb-2.5 flex animate-fade-in flex-row items-center justify-between gap-2 p-2 group-data-[collapsible=icon]:flex-col"><Linkhref="/copilot"aria-label="AutoGPT"@@ -28,7 +28,7 @@ export function AppSidebarHeader() {{isCollapsed ? (<AutoGPTLogo hideText viewBox="47 -1 42 42" className="size-8" />) : (- <AutoGPTLogo className="h-7 w-auto" />+ <AutoGPTLogo className="ml-2.5 mt-2 h-10 w-auto" />)}</Link>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 1268d71840..1f89ef00b6 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@@ -76,7 +76,7 @@ export function RecentChats() {<div className="mt-2 flex flex-col gap-4">{groupSessionsByDate(sessions).map((group) => (<div key={group.label}>- <div className="px-2 pb-1 text-xs font-medium text-zinc-600">+ <div className="px-2 pb-1 text-xs font-medium text-zinc-500">{group.label}</div><SidebarMenu>{group.sessions.map(renderItem)}</SidebarMenu>diff --git a/autogpt_platform/frontend/src/components/layout/AppSidebar/components/SidebarOrgSwitcher/SidebarOrgSwitcher.tsx b/autogpt_platform/frontend/src/components/layout/AppSidebar/components/SidebarOrgSwitcher/SidebarOrgSwitcher.tsxdeleted file mode 100644index f9883038a2..0000000000--- a/autogpt_platform/frontend/src/components/layout/AppSidebar/components/SidebarOrgSwitcher/SidebarOrgSwitcher.tsx+++ /dev/null@@ -1,141 +0,0 @@-"use client";--import Avatar, {- AvatarFallback,- AvatarImage,-} from "@/components/atoms/Avatar/Avatar";-import {- DropdownMenu,- DropdownMenuContent,- DropdownMenuItem,- DropdownMenuLabel,- DropdownMenuSeparator,- DropdownMenuTrigger,-} from "@/components/molecules/DropdownMenu/DropdownMenu";-import {- SidebarFooter,- SidebarMenu,- SidebarMenuButton,- SidebarMenuItem,-} from "@/components/ui/sidebar";-import { CaretUpDownIcon, CheckIcon } from "@phosphor-icons/react";--import { useOrgTeamSwitcher } from "@/components/layout/Navbar/components/OrgTeamSwitcher/useOrgTeamSwitcher";--// Sidebar-width variant of the OrgTeamSwitcher (the Navbar renders the compact-// top-bar variant). Reuses the same useOrgTeamSwitcher hook so both layouts-// share behavior. "Create organization" is intentionally omitted until the org-// management frontend ships — same as the Navbar switcher.-export function SidebarOrgSwitcher() {- const {- orgs,- teams,- activeOrg,- activeTeam,- switchOrg,- switchTeam,- isLoaded,- } = useOrgTeamSwitcher();-- if (!isLoaded || orgs.length === 0) {- return null;- }-- return (- <SidebarFooter className="p-2">- <SidebarMenu>- <SidebarMenuItem>- <DropdownMenu>- <DropdownMenuTrigger asChild>- <SidebarMenuButton- size="lg"- tooltip={activeOrg?.name}- aria-label="Switch organization"- data-testid="sidebar-org-switcher-trigger"- className="rounded-lg data-[state=open]:bg-zinc-100 hover:bg-zinc-100"- >- <Avatar className="size-6 shrink-0">- <AvatarImage- src={activeOrg?.avatarUrl ?? ""}- alt=""- aria-hidden="true"- />- <AvatarFallback className="text-xs" aria-hidden="true">- {activeOrg?.name?.charAt(0) || "O"}- </AvatarFallback>- </Avatar>- <div className="flex min-w-0 flex-1 flex-col text-left">- <span className="truncate text-sm font-medium">- {activeOrg?.name}- </span>- {activeTeam ? (- <span className="truncate text-xs text-zinc-500">- {activeTeam.name}- </span>- ) : null}- </div>- <CaretUpDownIcon className="ml-auto size-4 shrink-0 text-zinc-500" />- </SidebarMenuButton>- </DropdownMenuTrigger>-- <DropdownMenuContent- side="top"- align="start"- className="w-[--radix-popper-anchor-width] min-w-56"- data-testid="sidebar-org-switcher-content"- >- <DropdownMenuLabel className="text-xs uppercase text-zinc-400">- Organizations- </DropdownMenuLabel>- {orgs.map((org) => (- <DropdownMenuItem- key={org.id}- onClick={() => switchOrg(org.id)}- className="gap-2"- >- <Avatar className="size-5 shrink-0">- <AvatarImage src={org.avatarUrl ?? ""} alt="" />- <AvatarFallback className="text-xs">- {org.name.charAt(0)}- </AvatarFallback>- </Avatar>- <span className="flex-1 truncate">{org.name}</span>- {org.isPersonal ? (- <span className="text-xs text-zinc-400">Personal</span>- ) : null}- {org.id === activeOrg?.id ? (- <CheckIcon className="size-4 text-green-600" />- ) : null}- </DropdownMenuItem>- ))}-- {teams.length > 0 ? (- <>- <DropdownMenuSeparator />- <DropdownMenuLabel className="text-xs uppercase text-zinc-400">- Teams- </DropdownMenuLabel>- {teams.map((team) => (- <DropdownMenuItem- key={team.id}- onClick={() => switchTeam(team.id)}- className="gap-2"- >- <span className="flex-1 truncate">{team.name}</span>- {team.joinPolicy === "PRIVATE" ? (- <span className="text-xs text-zinc-400">Private</span>- ) : null}- {team.id === activeTeam?.id ? (- <CheckIcon className="size-4 text-green-600" />- ) : null}- </DropdownMenuItem>- ))}- </>- ) : null}- </DropdownMenuContent>- </DropdownMenu>- </SidebarMenuItem>- </SidebarMenu>- </SidebarFooter>- );-}diff --git a/autogpt_platform/frontend/src/components/layout/AppSidebar/components/SidebarOrgSwitcher/__tests__/SidebarOrgSwitcher.test.tsx b/autogpt_platform/frontend/src/components/layout/AppSidebar/components/SidebarOrgSwitcher/__tests__/SidebarOrgSwitcher.test.tsxdeleted file mode 100644index 4113bc2b24..0000000000--- a/autogpt_platform/frontend/src/components/layout/AppSidebar/components/SidebarOrgSwitcher/__tests__/SidebarOrgSwitcher.test.tsx+++ /dev/null@@ -1,129 +0,0 @@-import { SidebarProvider } from "@/components/ui/sidebar";-import { useOrgTeamStore } from "@/services/org-team/store";-import { render, screen, waitFor } from "@/tests/integrations/test-utils";-import userEvent from "@testing-library/user-event";-import { beforeEach, describe, expect, it } from "vitest";--import { SidebarOrgSwitcher } from "../SidebarOrgSwitcher";--const PERSONAL_ORG = {- id: "org-personal",- name: "Jane's Org",- slug: "jane",- avatarUrl: null,- isPersonal: true,- memberCount: 1,-};--const COMPANY_ORG = {- id: "org-company",- name: "Acme Inc",- slug: "acme",- avatarUrl: null,- isPersonal: false,- memberCount: 12,-};--const DEFAULT_TEAM = {- id: "team-default",- name: "General",- slug: "general",- isDefault: true,- joinPolicy: "OPEN",- orgId: COMPANY_ORG.id,-};--const PRIVATE_TEAM = {- id: "team-private",- name: "Skunkworks",- slug: "skunkworks",- isDefault: false,- joinPolicy: "PRIVATE",- orgId: COMPANY_ORG.id,-};--function baseState() {- return {- activeOrgID: COMPANY_ORG.id,- activeTeamID: DEFAULT_TEAM.id,- orgs: [PERSONAL_ORG, COMPANY_ORG],- teams: [DEFAULT_TEAM, PRIVATE_TEAM],- isLoaded: true,- };-}--function seedStore(overrides: Partial<ReturnType<typeof baseState>> = {}) {- useOrgTeamStore.setState({ ...baseState(), ...overrides });-}--function renderSwitcher() {- return render(- <SidebarProvider>- <SidebarOrgSwitcher />- </SidebarProvider>,- );-}--async function openSwitcher() {- await userEvent.click(screen.getByTestId("sidebar-org-switcher-trigger"));- await waitFor(() => {- expect(screen.getByTestId("sidebar-org-switcher-content")).toBeDefined();- });-}--describe("SidebarOrgSwitcher", () => {- beforeEach(() => {- window.localStorage.clear();- });-- it("renders nothing before the org context has loaded", () => {- seedStore({ isLoaded: false });- renderSwitcher();- expect(screen.queryByTestId("sidebar-org-switcher-trigger")).toBeNull();- });-- it("renders nothing when the user belongs to no orgs", () => {- seedStore({ orgs: [], teams: [] });- renderSwitcher();- expect(screen.queryByTestId("sidebar-org-switcher-trigger")).toBeNull();- });-- it("shows the active org and team on the trigger", () => {- seedStore();- renderSwitcher();- const trigger = screen.getByTestId("sidebar-org-switcher-trigger");- expect(trigger.textContent).toContain(COMPANY_ORG.name);- expect(trigger.textContent).toContain(DEFAULT_TEAM.name);- });-- it("lists every org and team with badges when opened", async () => {- seedStore();- renderSwitcher();- await openSwitcher();-- expect(screen.getByText(PERSONAL_ORG.name)).toBeDefined();- expect(screen.getAllByText(COMPANY_ORG.name).length).toBeGreaterThan(0);- expect(screen.getByText("Personal")).toBeDefined();- expect(screen.getByText(PRIVATE_TEAM.name)).toBeDefined();- expect(screen.getByText("Private")).toBeDefined();- });-- it("does not surface Create organization (hidden until org mgmt ships)", async () => {- seedStore();- renderSwitcher();- await openSwitcher();- expect(screen.queryByText("Create organization")).toBeNull();- });-- it("switches the active org when another org is picked", async () => {- seedStore();- renderSwitcher();- await openSwitcher();-- await userEvent.click(screen.getByText(PERSONAL_ORG.name));-- await waitFor(() => {- expect(useOrgTeamStore.getState().activeOrgID).toBe(PERSONAL_ORG.id);- });- });-});diff --git a/autogpt_platform/frontend/src/components/layout/AppSidebar/components/SidebarUserActions/SidebarUserActions.tsx b/autogpt_platform/frontend/src/components/layout/AppSidebar/components/SidebarUserActions/SidebarUserActions.tsxnew file mode 100644index 0000000000..3bdc24d821--- /dev/null+++ b/autogpt_platform/frontend/src/components/layout/AppSidebar/components/SidebarUserActions/SidebarUserActions.tsx@@ -0,0 +1,84 @@+"use client";++import { useGetV2GetUserProfile } from "@/app/api/__generated__/endpoints/store/store";+import { okData } from "@/app/api/helpers";+import { UsageIndicator } from "@/app/(platform)/PlatformChrome/components/UsageIndicator/UsageIndicator";+import {+ Tooltip,+ TooltipContent,+ TooltipTrigger,+} from "@/components/atoms/Tooltip/BaseTooltip";+import { AccountMenu } from "@/components/layout/Navbar/components/AccountMenu/AccountMenu";+import { AgentActivityDropdown } from "@/components/layout/Navbar/components/AgentActivityDropdown/AgentActivityDropdown";+import { Wallet } from "@/components/layout/Navbar/components/Wallet/Wallet";+import { getAccountMenuItems } from "@/components/layout/Navbar/helpers";+import { SidebarFooter } from "@/components/ui/sidebar";+import { isLogoutInProgress } from "@/lib/autogpt-server-api/helpers";+import { useSupabase } from "@/lib/supabase/hooks/useSupabase";++export function SidebarUserActions() {+ const { user, isLoggedIn, isUserLoading } = useSupabase();+ const logoutInProgress = isLogoutInProgress();+ const dynamicMenuItems = getAccountMenuItems(user?.role);++ const { data: profile, isLoading: isProfileLoading } = useGetV2GetUserProfile(+ {+ query: {+ select: okData,+ enabled: isLoggedIn && !!user && !logoutInProgress,+ queryKey: ["/api/store/profile", user?.id],+ },+ },+ );++ if (!isLoggedIn) return null;++ const isLoadingProfile = isProfileLoading || isUserLoading;++ return (+ <SidebarFooter className="border-t border-zinc-100 px-4 shadow-[0_-2px_8px_rgba(0,0,0,0.04)]">+ <div className="flex w-full items-center justify-between group-data-[collapsible=icon]:flex-col group-data-[collapsible=icon]:gap-1">+ <Tooltip>+ <TooltipTrigger asChild>+ <div className="[&_button:hover]:bg-zinc-100 [&_button[data-state=open]]:bg-zinc-100 [&_button]:flex [&_button]:h-8 [&_button]:w-8 [&_button]:items-center [&_button]:justify-center [&_button]:rounded-lg [&_button]:bg-transparent [&_button]:p-0 [&_button]:transition-colors [&_svg]:!size-5">+ <AgentActivityDropdown />+ </div>+ </TooltipTrigger>+ <TooltipContent side="top">Agent activity</TooltipContent>+ </Tooltip>+ <Tooltip>+ <TooltipTrigger asChild>+ <div>+ <UsageIndicator />+ </div>+ </TooltipTrigger>+ <TooltipContent side="top">Today's usage</TooltipContent>+ </Tooltip>+ {profile && (+ <Tooltip>+ <TooltipTrigger asChild>+ <div className="group-data-[collapsible=icon]:hidden">+ <Wallet key={profile.username} compact />+ </div>+ </TooltipTrigger>+ <TooltipContent side="top">Credits</TooltipContent>+ </Tooltip>+ )}+ <Tooltip>+ <TooltipTrigger asChild>+ <div>+ <AccountMenu+ userName={profile?.name || profile?.username}+ userEmail={user?.email}+ avatarSrc={profile?.avatar_url ?? ""}+ menuItemGroups={dynamicMenuItems}+ isLoading={isLoadingProfile}+ />+ </div>+ </TooltipTrigger>+ <TooltipContent side="top">Account</TooltipContent>+ </Tooltip>+ </div>+ </SidebarFooter>+ );+}diff --git a/autogpt_platform/frontend/src/app/(platform)/PlatformChrome/components/InsetHeaderActions/__tests__/InsetHeaderActions.test.tsx b/autogpt_platform/frontend/src/components/layout/AppSidebar/components/SidebarUserActions/__tests__/SidebarUserActions.test.tsxsimilarity index 88%rename from autogpt_platform/frontend/src/app/(platform)/PlatformChrome/components/InsetHeaderActions/__tests__/InsetHeaderActions.test.tsxrename to autogpt_platform/frontend/src/components/layout/AppSidebar/components/SidebarUserActions/__tests__/SidebarUserActions.test.tsxindex 89bd768249..7bd00811f0 100644--- a/autogpt_platform/frontend/src/app/(platform)/PlatformChrome/components/InsetHeaderActions/__tests__/InsetHeaderActions.test.tsx+++ b/autogpt_platform/frontend/src/components/layout/AppSidebar/components/SidebarUserActions/__tests__/SidebarUserActions.test.tsx@@ -4,7 +4,7 @@ import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";import { server } from "@/mocks/mock-server";-import { InsetHeaderActions } from "../InsetHeaderActions";+import { SidebarUserActions } from "../SidebarUserActions";const mockUseSupabase = vi.fn();vi.mock("@/lib/supabase/hooks/useSupabase", () => ({@@ -48,24 +48,24 @@ afterEach(() => {server.resetHandlers();});-describe("InsetHeaderActions", () => {+describe("SidebarUserActions", () => {it("renders nothing when the viewer is logged out", () => {mockUseSupabase.mockReturnValue({user: null,isLoggedIn: false,isUserLoading: false,});- const { container } = render(<InsetHeaderActions />);+ const { container } = render(<SidebarUserActions />);expect(container.firstChild).toBeNull();});- it("renders the header actions for a logged-in user", async () => {+ it("renders the user actions row for a logged-in user", async () => {mockUseSupabase.mockReturnValue({user: { id: "u1", email: "[email protected]", role: "user" },isLoggedIn: true,isUserLoading: false,});- render(<InsetHeaderActions />);+ render(<SidebarUserActions />);expect(screen.getByTestId("agent-activity")).toBeDefined();expect(screen.getByTestId("usage-indicator")).toBeDefined();diff --git a/autogpt_platform/frontend/src/components/layout/Navbar/components/Wallet/Wallet.tsx b/autogpt_platform/frontend/src/components/layout/Navbar/components/Wallet/Wallet.tsxindex 932f8cd70b..ecb0f1844d 100644--- a/autogpt_platform/frontend/src/components/layout/Navbar/components/Wallet/Wallet.tsx+++ b/autogpt_platform/frontend/src/components/layout/Navbar/components/Wallet/Wallet.tsx@@ -273,7 +273,7 @@ export function Wallet({ compact = false }: Props) {className={cn("group relative flex flex-nowrap items-center gap-2 rounded-md px-3 py-2 text-sm",compact- ? "rounded-xl border border-zinc-200 bg-zinc-100 py-1 hover:bg-zinc-200"+ ? "h-8 rounded-lg px-2 py-0 transition-colors hover:bg-zinc-100": "bg-zinc-50",)}onClick={onWalletOpen}@@ -288,7 +288,11 @@ export function Wallet({ compact = false }: Props) {Earn credits{" "}</span>)}- <span className="text-sm font-semibold">+ <span+ className={cn(+ compact ? "text-xs font-medium" : "text-sm font-semibold",+ )}+ >{formatCredits(credits)}</span>{!compact &&@@ -308,7 +312,7 @@ export function Wallet({ compact = false }: Props) {<divclassName={cn("pointer-events-none absolute inset-0 bg-violet-400 duration-2000 ease-in-out",- compact ? "rounded-xl" : "rounded-md",+ compact ? "rounded-lg" : "rounded-md",flash ? "opacity-50 duration-0" : "opacity-0",)}/>diff --git a/autogpt_platform/frontend/src/lib/constants.ts b/autogpt_platform/frontend/src/lib/constants.tsindex 39fa298e09..f1c9132e3e 100644--- a/autogpt_platform/frontend/src/lib/constants.ts+++ b/autogpt_platform/frontend/src/lib/constants.ts@@ -14,6 +14,3 @@ export const API_KEY_HEADER_NAME = "X-API-Key";// Layoutexport const NAVBAR_HEIGHT_PX = 60;-// Height of the new-layout inset header (the `h-12` bar in PlatformChrome).-// Keep in sync with that header so viewport-bound pages can subtract it.-export const INSET_HEADER_HEIGHT_PX = 48;diff --git a/autogpt_platform/frontend/src/playwright/library-happy-path.spec.ts b/autogpt_platform/frontend/src/playwright/library-happy-path.spec.tsindex 17c02397a6..18f7c430f5 100644--- a/autogpt_platform/frontend/src/playwright/library-happy-path.spec.ts+++ b/autogpt_platform/frontend/src/playwright/library-happy-path.spec.ts@@ -504,7 +504,7 @@ test("library happy path: user can delete a completed task from the run sidebar"// Sidebar should drop the only run, returning the page to initial// task-entry state.await expect(- page.getByRole("button", { name: /^(Setup your task|New task)$/i }),+ page.getByRole("button", { name: /^(Setup your task|New agent task)$/i }),).toBeVisible({ timeout: 15000 });});diff --git a/autogpt_platform/frontend/src/playwright/pages/library.page.ts b/autogpt_platform/frontend/src/playwright/pages/library.page.tsindex f2e648b341..6e1efa178f 100644--- a/autogpt_platform/frontend/src/playwright/pages/library.page.ts+++ b/autogpt_platform/frontend/src/playwright/pages/library.page.ts@@ -490,7 +490,7 @@ export async function clickRunButton(page: Page): Promise<void> {const setupTaskButton = page.getByRole("button", {name: /Setup your task/i,});- const newTaskButton = page.getByRole("button", { name: /^New task$/i });+ const newTaskButton = page.getByRole("button", { name: /^New agent task$/i });const rerunTaskButton = page.getByRole("button", { name: /Rerun task/i });const runNowButton = page.getByRole("button", { name: /Run now/i });const actionButtons = [@@ -810,7 +810,10 @@ async function getVisibleAgentDetailSurface(page: Page): Promise<string> {"setup-task",page.getByRole("button", { name: /^Setup your task$/i }).first(),],- ["new-task", page.getByRole("button", { name: /^New task$/i }).first()],+ [+ "new-task",+ page.getByRole("button", { name: /^New agent task$/i }).first(),+ ],["scheduled-tab", page.getByRole("tab", { name: /^Scheduled$/i }).first()],];