diff --git a/apps/client/__tests__/composer-landing.spec.tsx b/apps/client/__tests__/composer-landing.spec.tsx index 54cf7951..78f2c487 100644 --- a/apps/client/__tests__/composer-landing.spec.tsx +++ b/apps/client/__tests__/composer-landing.spec.tsx @@ -1,3 +1,5 @@ +import { readFileSync } from 'node:fs' + import { renderToStaticMarkup } from 'react-dom/server' import { describe, expect, it } from 'vitest' @@ -5,6 +7,29 @@ import { ComposerLanding } from '#~/components/composer-landing/ComposerLanding' import { ComposerStarterGuide } from '#~/components/composer-landing/ComposerStarterGuide' describe('composer landing', () => { + it('keeps starter layout horizontal spacing owned by the shared 10px surface padding', () => { + const layoutStyles = readFileSync( + new URL( + '../src/components/composer-landing/ComposerStarterLayout.scss', + import.meta.url + ), + 'utf8' + ) + const routeStyles = readFileSync( + new URL('../src/routes/ChatRoute.scss', import.meta.url), + 'utf8' + ) + + expect(layoutStyles).toContain('--chat-surface-padding: 10px') + expect(layoutStyles).not.toContain('--chat-surface-padding: 6px') + expect(routeStyles).toContain( + 'padding: calc(var(--chat-header-overlay-content-offset) + 12px) 0 16px' + ) + expect(routeStyles).not.toContain( + 'padding: calc(var(--chat-header-overlay-content-offset) + 12px) 24px 16px' + ) + }) + it('keeps starter content inside one full-height landing region', () => { const html = renderToStaticMarkup( diff --git a/apps/client/src/components/composer-landing/ComposerStarterLayout.scss b/apps/client/src/components/composer-landing/ComposerStarterLayout.scss index 644e6001..ae6aa436 100644 --- a/apps/client/src/components/composer-landing/ComposerStarterLayout.scss +++ b/apps/client/src/components/composer-landing/ComposerStarterLayout.scss @@ -105,9 +105,3 @@ margin-top: auto; } } - -@media (max-width: 600px) { - .composer-starter-layout { - --chat-surface-padding: 6px; - } -} diff --git a/apps/client/src/routes/ChatRoute.scss b/apps/client/src/routes/ChatRoute.scss index 57763529..75d444ee 100644 --- a/apps/client/src/routes/ChatRoute.scss +++ b/apps/client/src/routes/ChatRoute.scss @@ -47,7 +47,7 @@ align-items: center; justify-content: center; overflow: auto; - padding: calc(var(--chat-header-overlay-content-offset) + 12px) 24px 16px; + padding: calc(var(--chat-header-overlay-content-offset) + 12px) 0 16px; } } } diff --git a/changelog/0.1.0-beta.10/client.md b/changelog/0.1.0-beta.10/client.md index 35262b11..abac64df 100644 --- a/changelog/0.1.0-beta.10/client.md +++ b/changelog/0.1.0-beta.10/client.md @@ -5,3 +5,6 @@ - Refine Launcher menu surfaces with opaque theme-owned root and language submenus, keep icon-label spacing consistent at 6px, and show the platform settings shortcut alongside the settings command. - Remove the duplicate plugin configuration entry from the settings sidebar now that plugin management lives in the plugin marketplace, and safely redirect obsolete plugin settings links to General. - Keep the new-session environment menu coherent when only the built-in default is available, and preserve a visible, keyboard-accessible control for restoring a collapsed status bar. +- Normalize new-session composer edge spacing to the shared 10px inset across compact and medium desktop windows while keeping the wide 800px layout centered. + +![New-session composer with consistent edge spacing](./compact-composer-padding.jpg) diff --git a/changelog/0.1.0-beta.10/compact-composer-padding.jpg b/changelog/0.1.0-beta.10/compact-composer-padding.jpg new file mode 100644 index 00000000..17fea393 Binary files /dev/null and b/changelog/0.1.0-beta.10/compact-composer-padding.jpg differ