import { describe, it, expect, vi, beforeEach, afterEach } from 'vitest' import { stubMatchMedia } from '@/test/test-utils' import { render, screen, fireEvent, waitFor } from '@testing-library/react' import { useState } from 'react' import { SideQuestionDialog } from './SideQuestionDialog' const mocks = vi.hoisted(() => ({ askSideQuestion: vi.fn(), })) vi.mock('@/api/opencode', async (importOriginal) => ({ ...(await importOriginal()), askSideQuestion: mocks.askSideQuestion, })) const renderDialog = (props: Partial> = {}) => render( , ) function FocusHost() { const [open, setOpen] = useState(false) return ( <>