Improve terminal output backpressure

Adds ACK-backed renderer output admission control for PTY data, bounding per-PTY and global renderer in-flight output while preserving PTY ingestion for runtime state and notifications.
This commit is contained in:
Neil
2026-06-07 00:41:42 -07:00
committed by GitHub
parent 8a6b8eb223
commit dff2d02891
7 changed files with 285 additions and 42 deletions
+1
View File
@@ -901,6 +901,7 @@ export type PreloadApi = {
signal: (id: string, signal: string) => void
kill: (id: string, opts?: { keepHistory?: boolean }) => Promise<void>
ackColdRestore: (id: string) => void
ackData: (id: string, charCount: number) => void
hasChildProcesses: (id: string) => Promise<boolean>
getForegroundProcess: (id: string) => Promise<string | null>
getCwd: (id: string) => Promise<string>
+3
View File
@@ -683,6 +683,9 @@ const api = {
ackColdRestore: (id: string): void => {
ipcRenderer.send('pty:ackColdRestore', { id })
},
ackData: (id: string, charCount: number): void => {
ipcRenderer.send('pty:ackData', { id, charCount })
},
kill: (id: string, opts?: { keepHistory?: boolean }): Promise<void> =>
ipcRenderer.invoke('pty:kill', { id, keepHistory: opts?.keepHistory ?? false }),