From 2c43a0fbfb7d1d65911484afab970d3f36a0dd5b Mon Sep 17 00:00:00 2001 From: Daniel Han Date: Tue, 26 May 2026 13:05:31 +0000 Subject: [PATCH] Studio: cap generated-image overlay to 520px x min(70vh, 620px) Previous overlay used `max-h-full max-w-full object-contain`, which fills whatever flex area is available. On large viewports that scales a generated image past its intrinsic resolution and turns it soft. Explicit caps: `h-auto`, `w-auto`, `max-w-[520px]`, `max-h-[min(70vh, 620px)]`. Aspect ratio preserved, only downscales. Wrapped the image in an `inline-block` relative box so the download/close buttons anchor to the image's actual top-right corner instead of the wider flex container. --- .../src/components/assistant-ui/thread.tsx | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/studio/frontend/src/components/assistant-ui/thread.tsx b/studio/frontend/src/components/assistant-ui/thread.tsx index 1951922b74..2cf43f39ad 100644 --- a/studio/frontend/src/components/assistant-ui/thread.tsx +++ b/studio/frontend/src/components/assistant-ui/thread.tsx @@ -231,13 +231,17 @@ const GeneratedImageViewportOverlay: FC<{ hideComposer?: boolean }> = ({ aria-label="Generated image preview" >
-
- {overlay.title} -
+
+
+ {overlay.title} +
+