fix(web): keep chat history within viewport

This commit is contained in:
Kayvan Sylvan 2026-08-03 10:52:29 -07:00
parent 829fa3bd07
commit 56d330f5e8
2 changed files with 12 additions and 1 deletions

View file

@ -155,7 +155,7 @@
$: showObsidian = $featureFlags.enableObsidianIntegration;
</script>
<div class="chat-container flex gap-0 p-2 w-full h-screen">
<div class="chat-container flex h-full min-h-0 w-full gap-0 p-2">
<!-- Left Column -->
<aside class="flex flex-col gap-2 pr-2 left-column" style="width: {leftColumnWidth}%">
<!-- Dropdowns Group with Model Config -->

View file

@ -0,0 +1,11 @@
import { readFileSync } from 'node:fs';
import { describe, expect, it } from 'vitest';
const source = readFileSync(new URL('./Chat.svelte', import.meta.url), 'utf8');
describe('Chat viewport layout', () => {
it('fits the route viewport instead of extending to the full screen height', () => {
expect(source).toMatch(/class="chat-container[^"]*\bh-full\b[^"]*\bmin-h-0\b/);
expect(source).not.toMatch(/class="chat-container[^"]*\bh-screen\b/);
});
});