feat(core): add embedded terminal renderable - #1340
Draft
jlongster wants to merge 4 commits into
Draft
Conversation
jlongster
force-pushed
the
embedded-terminal-renderable
branch
2 times, most recently
from
August 5, 2026 20:22
66dd0de to
15a31ab
Compare
jlongster
force-pushed
the
embedded-terminal-renderable
branch
from
August 5, 2026 20:42
15a31ab to
69878ca
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The runtime layer in #1338 owns Ghostty terminal state and input semantics, but it cannot render into OpenTUI or participate in layout, focus, cursor, mouse, and portable TypeScript FFI. The previous renderable PR (#1308) proved this behavior against a dynamic C loader and an older OpenTUI native surface.
This PR ports that user-facing layer onto the pinned Ghostty Zig module and current OpenTUI handle/Node/Bun architecture.
Changes
RenderStatedirty rows, colors, styles, graphemes, wide cells, and cursor state directly intoOptimizedBuffer.drawGraphemeoperation.EmbeddedTerminalRenderablewith focus, Kitty releases, paste, mouse forwarding, scrollback fallback, resize propagation, hardware cursor ownership, and cleanup.Scope
This is the second layer of native GitHub Stack #1341 and targets #1338. It excludes PTY/process ownership, screen snapshots/change notifications, benchmarks, examples, selection/search, and child-terminal graphics.
Testing
x86_64-freebsdcustom-target build passedbun run fmt:checkbun run lintThe full Node lane reached one unrelated ALSA audio-device failure after all embedded-terminal tests passed. The full Bun lane reached the embedded-terminal tests successfully before an unrelated Bun runtime crash in the existing diff suite.