Reduce frame preparation and transport costs so local terminals can
consume image updates with less CPU work. Bound pending frames when
output stalls and fix per-frame GPU resource growth so sustained
rendering does not accumulate work or retain native handles.
Keep raw transport as the default and make file transport opt-in for
terminals that acknowledge image uploads.
#1328 partially superseded, but it has `NativeImage.adoptRgbaFile(path,
width, height)` that adopts an existing producer-created RGBA file
lazily. Eligible renders send that same path without reading, copying,
or rewriting its pixels.
Separate the native implementation from the TypeScript bindings. Keep
core on
the public bindings and keep the current native artifact packages and
release
workflows.
packages/native owns the Zig source, tests, benches, and vendor updates.
The
package is private and unpublished for now Core still packages the
@opentui/core-* artifacts. build:native, test:native, and bench:native
still
work from core and delegate to native.
Expose a Zig import root and a no-JS hello example for proof of concept,
not a focus point, just a smoke test.
one sentence: check should not be inclusive.
drawTextBufferInternal did not clip a width-1 glyph at currentX == -1.
The transparent text path then calculated an invalid u32 index and read
past the cell buffer.
Clip each glyph when its range ends at or before column 0.
Assert that the index is in the cell buffer before direct access.
This fixes the abort in OpenCode issue
[#42094](https://github.com/anomalyco/opencode/issues/42094).
The stack includes trySetTransparentTextCellFast and
bufferDrawTextBufferView.
Pass transient buffers to FFI calls as borrowed objects so Node keeps
the JavaScript owner alive for the synchronous
native read. Raw addresses can outlive the object that backs them, which
lets GC corrupt styled text and cursor option
data
Fixes#1212
Generation wrap could make stale link IDs valid again and let them
access
unrelated URLs. Retire exhausted slots so stale IDs remain invalid for
the
lifetime of the pool.
Add conditional exports (bun/node/default) so each runtime resolves
the correct variant, and add a packed dist smoke test that verifies
imports work in both Node.js and Bun.
Native calls previously accepted raw pointers, allowing stale references to
dereference freed memory after object destruction. Use generation-tagged
handles so stale, wrong-kind, and borrowed child references fail safely
instead of causing use-after-free.
Co-authored-by: Simon Klee <hello@simonklee.dk>