Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions apps/client/__tests__/composer-landing.spec.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,35 @@
import { readFileSync } from 'node:fs'

import { renderToStaticMarkup } from 'react-dom/server'
import { describe, expect, it } from 'vitest'

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(
<ComposerLanding className='composer-landing--starter'>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,3 @@
margin-top: auto;
}
}

@media (max-width: 600px) {
.composer-starter-layout {
--chat-surface-padding: 6px;
}
}
2 changes: 1 addition & 1 deletion apps/client/src/routes/ChatRoute.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
}
Expand Down
3 changes: 3 additions & 0 deletions changelog/0.1.0-beta.10/client.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading