Skip to content

Commit 0da7a75

Browse files
fix(tui): raise ink maxFps to 60 to stop flickering
The flicker was coming from the renderer path, not from chat state churn. `Input.tsx` keeps typing local to `@inkjs/ui`’s `TextInput`, so the whole chat transcript is not re-rendering on every keypress. The actual hot path is `tui.tsx`, where Ink renders the terminal UI and throttles frame updates. TextInput redraws the line on each keystroke, including the inverse-video cursor; when you type faster than the default render cadence, some terminals show that as flicker/skipped repaint. Raising `maxFps` does not change app behavior, just lets the TUI flush input updates more smoothly.
1 parent 5635427 commit 0da7a75

2 files changed

Lines changed: 2 additions & 0 deletions

File tree

src/tui.test.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ describe('tui', () => {
3636

3737
expect(render).toHaveBeenCalledWith(expect.anything(), {
3838
incrementalRendering: true,
39+
maxFps: 60,
3940
});
4041
expect(screen.setClearHandler).toHaveBeenCalledWith(expect.any(Function));
4142

src/tui.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ export function renderApp(): void {
77
const tree = <App />;
88
const app = render(tree, {
99
incrementalRendering: true,
10+
maxFps: 60,
1011
});
1112

1213
screen.setClearHandler(() => {

0 commit comments

Comments
 (0)