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 577ee98593
commit 85a48203db
213 changed files with 7065 additions and 3852 deletions
@@ -91,7 +91,7 @@ describe('ToolMessage Sticky Header Regression', () => {
);
};
const { lastFrame } = renderWithProviders(
const { lastFrame, waitUntilReady, unmount } = renderWithProviders(
<Box height={terminalHeight}>
<TestComponent />
</Box>,
@@ -100,6 +100,7 @@ describe('ToolMessage Sticky Header Regression', () => {
uiState: { terminalWidth },
},
);
await waitUntilReady();
// Initial state: tool-1 should be visible
await waitFor(() => {
@@ -112,6 +113,7 @@ describe('ToolMessage Sticky Header Regression', () => {
await act(async () => {
listRef?.scrollBy(5);
});
await waitUntilReady();
// tool-1 header should still be visible because it is sticky
await waitFor(() => {
@@ -130,6 +132,7 @@ describe('ToolMessage Sticky Header Regression', () => {
await act(async () => {
listRef?.scrollBy(17);
});
await waitUntilReady();
await waitFor(() => {
expect(lastFrame()).toContain('tool-2');
@@ -138,6 +141,7 @@ describe('ToolMessage Sticky Header Regression', () => {
// tool-1 should be gone now (both header and content)
expect(lastFrame()).not.toContain('tool-1');
expect(lastFrame()).toMatchSnapshot();
unmount();
});
it('verifies that ShellToolMessage in a ToolGroupMessage in a ScrollableList has sticky headers', async () => {
@@ -177,7 +181,7 @@ describe('ToolMessage Sticky Header Regression', () => {
);
};
const { lastFrame } = renderWithProviders(
const { lastFrame, waitUntilReady, unmount } = renderWithProviders(
<Box height={terminalHeight}>
<TestComponent />
</Box>,
@@ -186,6 +190,7 @@ describe('ToolMessage Sticky Header Regression', () => {
uiState: { terminalWidth },
},
);
await waitUntilReady();
await waitFor(() => {
expect(lastFrame()).toContain(SHELL_COMMAND_NAME);
@@ -196,11 +201,13 @@ describe('ToolMessage Sticky Header Regression', () => {
await act(async () => {
listRef?.scrollBy(5);
});
await waitUntilReady();
await waitFor(() => {
expect(lastFrame()).toContain(SHELL_COMMAND_NAME);
});
expect(lastFrame()).toContain('shell-06');
expect(lastFrame()).toMatchSnapshot();
unmount();
});
});