From b146aaf63613569c72b7f3d0e451d72034c4e0ce Mon Sep 17 00:00:00 2001
From: Andrew Khadder <54488379+khandrew1@users.noreply.github.com>
Date: Mon, 29 Dec 2025 10:01:31 -0800
Subject: [PATCH 1/2] chore: consistent styling for ChatGPT and MCP apps
---
.../chat-v2/thread/mcp-apps-renderer.tsx | 85 +++++++++++++++----
1 file changed, 70 insertions(+), 15 deletions(-)
diff --git a/client/src/components/chat-v2/thread/mcp-apps-renderer.tsx b/client/src/components/chat-v2/thread/mcp-apps-renderer.tsx
index 1c3ee93bb..b7387562f 100644
--- a/client/src/components/chat-v2/thread/mcp-apps-renderer.tsx
+++ b/client/src/components/chat-v2/thread/mcp-apps-renderer.tsx
@@ -887,22 +887,39 @@ export function MCPAppsRenderer({
const isPip = effectiveDisplayMode === "pip";
const isFullscreen = effectiveDisplayMode === "fullscreen";
+ const isMobilePlaygroundMode =
+ isPlaygroundActive && playgroundDeviceType === "mobile";
+ const isContainedFullscreenMode =
+ isPlaygroundActive &&
+ (playgroundDeviceType === "mobile" ||
+ playgroundDeviceType === "tablet");
+
+ const containerClassName = (() => {
+ if (isFullscreen) {
+ if (isContainedFullscreenMode) {
+ return "absolute inset-0 z-10 w-full h-full bg-background flex flex-col";
+ }
+ return "fixed inset-0 z-40 w-full h-full bg-background flex flex-col";
+ }
- let containerClassName = "mt-3 space-y-2 relative group";
- if (isFullscreen) {
- containerClassName =
- "fixed inset-0 z-50 w-full h-full bg-background flex flex-col";
- } else if (isPip) {
- containerClassName = [
- "fixed top-4 inset-x-0 z-40 w-full max-w-4xl mx-auto space-y-2",
- "bg-background/95 backdrop-blur supports-[backdrop-filter]:bg-background/80",
- "shadow-xl border border-border/60 rounded-xl p-3",
- ].join(" ");
- }
+ if (isPip) {
+ if (isMobilePlaygroundMode) {
+ return "absolute inset-0 z-10 w-full h-full bg-background flex flex-col";
+ }
+ return [
+ "fixed top-4 inset-x-0 z-40 w-full max-w-4xl mx-auto space-y-2",
+ "bg-background/95 backdrop-blur supports-[backdrop-filter]:bg-background/80",
+ "shadow-xl border border-border/60 rounded-xl p-3",
+ ].join(" ");
+ }
+
+ return "mt-3 space-y-2 relative group";
+ })();
return (
- {(isPip || isFullscreen) && (
+ {((isFullscreen && isContainedFullscreenMode) ||
+ (isPip && isMobilePlaygroundMode)) && (
)}
+ {isFullscreen && !isContainedFullscreenMode && (
+
+
+
+ {toolName}
+
+
+
+ )}
+
+ {isPip && !isMobilePlaygroundMode && (
+
+ )}
{/* Uses SandboxedIframe for DRY double-iframe architecture */}
Date: Mon, 29 Dec 2025 10:05:05 -0800
Subject: [PATCH 2/2] chore: formatting
---
client/src/components/chat-v2/thread/mcp-apps-renderer.tsx | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/client/src/components/chat-v2/thread/mcp-apps-renderer.tsx b/client/src/components/chat-v2/thread/mcp-apps-renderer.tsx
index b7387562f..3ee0011a6 100644
--- a/client/src/components/chat-v2/thread/mcp-apps-renderer.tsx
+++ b/client/src/components/chat-v2/thread/mcp-apps-renderer.tsx
@@ -891,8 +891,7 @@ export function MCPAppsRenderer({
isPlaygroundActive && playgroundDeviceType === "mobile";
const isContainedFullscreenMode =
isPlaygroundActive &&
- (playgroundDeviceType === "mobile" ||
- playgroundDeviceType === "tablet");
+ (playgroundDeviceType === "mobile" || playgroundDeviceType === "tablet");
const containerClassName = (() => {
if (isFullscreen) {