diff --git a/desktop/src/__tests__/pages.test.tsx b/desktop/src/__tests__/pages.test.tsx
index d9f6f374..5a3f7479 100644
--- a/desktop/src/__tests__/pages.test.tsx
+++ b/desktop/src/__tests__/pages.test.tsx
@@ -12,6 +12,7 @@ import { ToolInspection } from '../pages/ToolInspection'
// Layout components (chrome is now here, not in pages)
import { AppShell } from '../components/layout/AppShell'
+import { Sidebar } from '../components/layout/Sidebar'
import { UserMessage } from '../components/chat/UserMessage'
import { useChatStore } from '../stores/chatStore'
import { useTabStore } from '../stores/tabStore'
@@ -36,12 +37,37 @@ describe('Content-only pages render without errors', () => {
})
it('ActiveSession renders with chat components', () => {
+ const SESSION_ID = 'test-active-session'
+ useTabStore.setState({ tabs: [{ sessionId: SESSION_ID, title: 'Test', status: 'idle' }], activeTabId: SESSION_ID })
+ useChatStore.setState({
+ sessions: {
+ [SESSION_ID]: {
+ messages: [],
+ chatState: 'idle',
+ connectionState: 'connected',
+ streamingText: '',
+ streamingToolInput: '',
+ activeToolUseId: null,
+ activeToolName: null,
+ activeThinkingId: null,
+ pendingPermission: null,
+ tokenUsage: { input_tokens: 0, output_tokens: 0 },
+ elapsedSeconds: 0,
+ statusVerb: '',
+ slashCommands: [],
+ elapsedTimer: null,
+ },
+ },
+ })
const { container } = render()
// Should have the title area and chat input
expect(container.innerHTML).toContain('Untitled Session')
// ChatInput has a textarea
expect(container.querySelector('textarea')).toBeInTheDocument()
expect(container.innerHTML).not.toContain('Preview')
+ // Cleanup
+ useTabStore.setState({ tabs: [], activeTabId: null })
+ useChatStore.setState({ sessions: {} })
})
it('ActiveSession shows a single primary action button while a turn is active', () => {
@@ -123,11 +149,11 @@ describe('Chat attachments', () => {
describe('AppShell layout renders chrome', () => {
it('AppShell renders sidebar and session shell', () => {
- const { container } = render()
+ const { container } = render()
expect(container.querySelector('aside')).toBeInTheDocument()
expect(container.innerHTML).toContain('New session')
expect(container.innerHTML).toContain('Scheduled')
- expect(container.innerHTML).toContain('Select a project')
+ expect(container.innerHTML).toContain('All projects')
})
})
diff --git a/desktop/src/components/chat/chatBlocks.test.tsx b/desktop/src/components/chat/chatBlocks.test.tsx
index 21517d0b..1b5d13fa 100644
--- a/desktop/src/components/chat/chatBlocks.test.tsx
+++ b/desktop/src/components/chat/chatBlocks.test.tsx
@@ -108,6 +108,6 @@ describe('chat blocks', () => {
expect(container.textContent).toContain('Allow')
// react-diff-viewer-continued uses styled-components tables that don't
// fully render in jsdom, so we verify the DiffViewer wrapper is mounted
- expect(container.querySelector('[class*="rounded-lg"]')).toBeTruthy()
+ expect(container.querySelector('[class*="rounded-[var(--radius-lg)]"]')).toBeTruthy()
})
})