diff --git a/ui/src/pages/chat/chat-responsive.browser.test.ts b/ui/src/pages/chat/chat-responsive.browser.test.ts index 8cbb945e857b..d086e55a825c 100644 --- a/ui/src/pages/chat/chat-responsive.browser.test.ts +++ b/ui/src/pages/chat/chat-responsive.browser.test.ts @@ -2067,6 +2067,7 @@ describeBrowserLayout.concurrent("chat responsive browser layout", () => { it.each([ [393, 852], + [900, 500], [1366, 900], [1920, 1080], ] as const)("uses compact radii and optical chat-box insets at %sx%s", async (width, height) => { @@ -2118,14 +2119,17 @@ describeBrowserLayout.concurrent("chat responsive browser layout", () => { expect(geometry.assistantBubble?.paddingRight).toBe(0); expect(geometry.composer?.borderRadius).toBe(mediumRadius); - const composerInset = width <= 768 ? 4 : 8; - const textareaBlockInset = width <= 768 ? 10 : composerInset; + const usesCompactComposer = width <= 768 || (width <= 932 && height <= 500 && width > height); + const composerInset = usesCompactComposer ? 4 : 8; + const textareaBlockInset = usesCompactComposer ? 10 : composerInset; expect(geometry.textarea?.paddingTop).toBe(textareaBlockInset); expect(geometry.textarea?.paddingRight).toBe(composerInset); expect(geometry.textarea?.paddingBottom).toBe(textareaBlockInset); - expect(geometry.textarea?.paddingLeft).toBe(composerInset - 4); - expect(geometry.footer?.paddingLeft).toBe(composerInset); - expect(geometry.footer?.paddingRight).toBe(composerInset); + expect(geometry.textarea?.paddingLeft).toBe( + usesCompactComposer ? composerInset : composerInset - 4, + ); + expect(geometry.footer?.paddingLeft).toBe(8); + expect(geometry.footer?.paddingRight).toBe(8); // #105866 splits the block inset evenly around the footer so the // settings chip centers between the divider and the card edge. expect(geometry.footer?.paddingTop).toBe(composerInset / 2); diff --git a/ui/src/styles/chat/layout.css b/ui/src/styles/chat/layout.css index 9c06593c6f85..574f4cc51395 100644 --- a/ui/src/styles/chat/layout.css +++ b/ui/src/styles/chat/layout.css @@ -3098,7 +3098,7 @@ button.chat-pr__diff { border-top: 1px solid color-mix(in srgb, var(--border) 64%, transparent); /* Split the inset evenly so the settings chip sits centered between the divider and the card edge instead of hugging the divider. */ - padding: calc(var(--chat-box-inset) / 2) var(--chat-box-inset); + padding: calc(var(--chat-box-inset) / 2) max(var(--chat-box-inset), 8px); } .agent-chat__composer-meta, @@ -4120,6 +4120,7 @@ button.chat-pr__diff { max-height: calc(7em + var(--chat-box-inset) + var(--chat-box-inset)); padding-top: 10px; padding-bottom: 10px; + padding-left: var(--chat-box-inset); font-size: var(--control-ui-input-text-size); }