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.
fix(frontend): prevent mobile expert pill overlap (#15448)
Ubbec77f53e1850b
diff --git a/autogpt_platform/frontend/src/app/(platform)/PlatformChrome/PlatformChrome.tsx b/autogpt_platform/frontend/src/app/(platform)/PlatformChrome/PlatformChrome.tsxindex c52187b37e..faf54eb397 100644--- a/autogpt_platform/frontend/src/app/(platform)/PlatformChrome/PlatformChrome.tsx+++ b/autogpt_platform/frontend/src/app/(platform)/PlatformChrome/PlatformChrome.tsx@@ -31,7 +31,7 @@ interface Props {// Mobile header buttons float over the content, so they get a pill surface to// stay readable against whatever scrolls underneath.const mobileTriggerClassName =- "rounded-full border border-[#DADADC] bg-white hover:bg-[#F5F5F6]";+ "rounded-full border border-[#DADADC] bg-white shadow-md hover:bg-[#F5F5F6]";export function PlatformChrome({ children }: Props) {const {diff --git a/autogpt_platform/frontend/src/app/(platform)/copilot/CopilotPage.tsx b/autogpt_platform/frontend/src/app/(platform)/copilot/CopilotPage.tsxindex 36e7ce0ee6..8d641a580d 100644--- a/autogpt_platform/frontend/src/app/(platform)/copilot/CopilotPage.tsx+++ b/autogpt_platform/frontend/src/app/(platform)/copilot/CopilotPage.tsx@@ -141,7 +141,7 @@ function MainArea({key={`chat-host-${sessionId ?? "new"}`}droppedFiles={droppedFiles}onDroppedFilesConsumed={() => setDroppedFiles([])}- hasFloatingControls={showNewLayout}+ hasFloatingControls={isMobile || showNewLayout}/>{/* Owns the session-entry reset that forgets the previous chat'sartifact. */}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 d73f8e7ea5..b6327daa6f 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@@ -488,6 +488,7 @@ export function ChatMessagesContainer({className={cn("mx-auto flex min-h-full w-full max-w-3xl flex-1 flex-col gap-6 px-6 pb-4 pt-14",isCompact && "gap-4 px-4 pt-4",+ showThreadHeader && hasFloatingControls && "max-lg:pt-32",!showThreadHeader && "pt-4",)}style={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 c75879c905..7b40d9047a 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@@ -20,8 +20,7 @@ interface Props {expertIdentity?: ExpertIdentity | null;/** The roster has not settled yet for an expert-scoped session. */isResolvingExpertIdentity?: boolean;- /** The new layout floats the sidebar and workspace-files controls over the- * chat's top-left corner below `lg`; the chip clears them. */+ /** Floating mobile controls need a separate row above the chip. */hasFloatingControls?: boolean;}@@ -48,7 +47,7 @@ export function ThreadHeader({<divclassName={cn("pointer-events-none absolute inset-x-0 top-3 flex justify-start px-4",- hasFloatingControls && "max-md:pl-28 md:max-lg:pl-20",+ hasFloatingControls && "max-lg:top-16",)}><TooltipProvider>@@ -59,7 +58,7 @@ export function ThreadHeader({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"+ 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"><ExpertAvatarname={name}