Skip to content

LiveRegionSink

Defined in: packages/app-report/src/sink/live-region-sink.ts:62

A re-rendered region at the bottom of the terminal showing every open scope’s current line plus a tail of its recent output — BuildKit’s vertex display and indicatif’s MultiProgress generalised. A completed scope’s line is flushed above the region as permanent scrollback; the region itself is erased and redrawn in place via ANSI cursor movement, clamped to terminal.rows - 1 so it never exceeds the viewport.

Degrades to plain sequential WritableStreamSink behaviour (no ANSI cursor codes) when terminal.interactive is false — required, not just a fallback: redrawing in place corrupts non-interactive (CI) logs.

Overflow heuristic when every open scope’s line doesn’t fit terminal.rows - 1: the oldest (longest-running) scopes are dropped first, keeping the most recently started ones visible; once every visible scope has its one line, remaining budget is spent on tail lines, most-recent scope first.

data events are formatted and flushed to scrollback unconditionally (not gated by showCompleted, which only governs scope completion lines) — a domain payload arriving mid-run is as legitimate a piece of output as a finished scope, and dropping it would make this sink unusable with any formatter that renders data (e.g. a benchmark suite’s result table). diagnostic events are flushed the same way, for the same reason.

TData

new LiveRegionSink<TData>(stream, options): LiveRegionSink<TData>

Defined in: packages/app-report/src/sink/live-region-sink.ts:80

WritableStream<string>

LiveRegionSinkOptions<TData>

LiveRegionSink<TData>

close(signal?): Promise<void>

Defined in: packages/app-report/src/sink/live-region-sink.ts:213

AbortSignal

Promise<void>

ISink.close


flush(signal?): Promise<void>

Defined in: packages/app-report/src/sink/live-region-sink.ts:202

AbortSignal

Promise<void>

ISink.flush


write(event, signal?): Promise<void>

Defined in: packages/app-report/src/sink/live-region-sink.ts:109

ReportEvent<TData>

AbortSignal

Promise<void>

ISink.write