feat/vt-boundary #26

Merged
clawdie merged 4 commits from feat/vt-boundary into main 2026-10-02 07:36:24 +02:00
Owner
No description provided.
- Wrap libghostty-vt terminal and formatter via narrow CGO boundary
- Provide safe Go types (Terminal, Format, New, Write, Resize, ReadText, Close)
- Format terminal content as plain text or VT escape sequences without callbacks
- Zero runtime shared library dependency (statically linked archive)
- Add comprehensive lifecycle, write/read, and resize unit tests
- Connect vt.Terminal to paneState in newPane and stream PTY output to VT engine
- Wire pane.read to output rendered, clean screen text via vt.ReadText()
- Support format="vt" for formatted ANSI output and format="raw" for stream buffer
- Close vt.Terminal cleanly during pane teardown
- Verified with -race across full test suite
- scripts/build-ghostty-vt.sh: auto-detect Zig 0.16.0 binary across standard
  paths on debby/valhala if ZIG is unset; detect target platform from uname -s
  (x86_64-linux vs x86_64-freebsd) when TARGET is unset.
- Makefile: add build/test/check/clean targets ensuring libghostty-vt.a is
  built automatically before go build or go test.
- internal/wire: add PaneResizeParams supporting direct grid dimensions
  (cols, rows) and relative directional resize (direction, amount).
- internal/server: implement pane.resize dispatch wiring p.proc.Resize and
  p.vtTerm.Resize, updating scroll/viewport and revision.
- internal/server: add TestPaneResize testing live PTY resize verified via
  stty size, directional resizing, and error handling.
- internal/server: add thread-safe getScroll and getDimensions accessors on
  paneState; use them in paneToWire and pane.resize dispatch to prevent
  concurrent read/write data races across multiple client connections.
- internal/server: add TestConcurrentPaneResizeAndRead exercising concurrent
  pane.resize, pane.read, and session.snapshot under go test -race.
- Makefile: output binary to bin/herdr, make vt target depend on archive path
  to avoid redundant Zig rebuilds when archive is up to date, and add .gitignore.
- scripts/build-ghostty-vt.sh: remove redundant hardcoded candidate paths in
  favor of $HOME-relative paths and PATH lookup.
clawdie deleted branch feat/vt-boundary 2026-10-02 07:36:24 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
clawdie/bherdr!26
No description provided.