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.
Type Parameters
Section titled “Type Parameters”TData
Implements
Section titled “Implements”ISink<TData>
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new LiveRegionSink<
TData>(stream,options):LiveRegionSink<TData>
Defined in: packages/app-report/src/sink/live-region-sink.ts:80
Parameters
Section titled “Parameters”stream
Section titled “stream”WritableStream<string>
options
Section titled “options”LiveRegionSinkOptions<TData>
Returns
Section titled “Returns”LiveRegionSink<TData>
Methods
Section titled “Methods”close()
Section titled “close()”close(
signal?):Promise<void>
Defined in: packages/app-report/src/sink/live-region-sink.ts:213
Parameters
Section titled “Parameters”signal?
Section titled “signal?”AbortSignal
Returns
Section titled “Returns”Promise<void>
Implementation of
Section titled “Implementation of”flush()
Section titled “flush()”flush(
signal?):Promise<void>
Defined in: packages/app-report/src/sink/live-region-sink.ts:202
Parameters
Section titled “Parameters”signal?
Section titled “signal?”AbortSignal
Returns
Section titled “Returns”Promise<void>
Implementation of
Section titled “Implementation of”write()
Section titled “write()”write(
event,signal?):Promise<void>
Defined in: packages/app-report/src/sink/live-region-sink.ts:109
Parameters
Section titled “Parameters”ReportEvent<TData>
signal?
Section titled “signal?”AbortSignal
Returns
Section titled “Returns”Promise<void>