Migrate core render util to use xterm.js as part of the rendering loop. (#19044)

This commit is contained in:
Jacob Richman
2026-02-18 16:46:50 -08:00
committed by GitHub
parent 04c52513e7
commit 04f65f3d55
213 changed files with 7065 additions and 3852 deletions
@@ -101,32 +101,38 @@ describe('<DefaultAppLayout />', () => {
mockUIState.streamingState = StreamingState.Idle;
});
it('renders BackgroundShellDisplay when shells exist and active', () => {
it('renders BackgroundShellDisplay when shells exist and active', async () => {
mockUIState.backgroundShells.set(123, createMockShell(123));
mockUIState.activeBackgroundShellPid = 123;
mockUIState.backgroundShellHeight = 5;
const { lastFrame } = render(<DefaultAppLayout />);
const { lastFrame, waitUntilReady, unmount } = render(<DefaultAppLayout />);
await waitUntilReady();
expect(lastFrame()).toMatchSnapshot();
unmount();
});
it('hides BackgroundShellDisplay when StreamingState is WaitingForConfirmation', () => {
it('hides BackgroundShellDisplay when StreamingState is WaitingForConfirmation', async () => {
mockUIState.backgroundShells.set(123, createMockShell(123));
mockUIState.activeBackgroundShellPid = 123;
mockUIState.backgroundShellHeight = 5;
mockUIState.streamingState = StreamingState.WaitingForConfirmation;
const { lastFrame } = render(<DefaultAppLayout />);
const { lastFrame, waitUntilReady, unmount } = render(<DefaultAppLayout />);
await waitUntilReady();
expect(lastFrame()).toMatchSnapshot();
unmount();
});
it('shows BackgroundShellDisplay when StreamingState is NOT WaitingForConfirmation', () => {
it('shows BackgroundShellDisplay when StreamingState is NOT WaitingForConfirmation', async () => {
mockUIState.backgroundShells.set(123, createMockShell(123));
mockUIState.activeBackgroundShellPid = 123;
mockUIState.backgroundShellHeight = 5;
mockUIState.streamingState = StreamingState.Responding;
const { lastFrame } = render(<DefaultAppLayout />);
const { lastFrame, waitUntilReady, unmount } = render(<DefaultAppLayout />);
await waitUntilReady();
expect(lastFrame()).toMatchSnapshot();
unmount();
});
});