d0ugal / d0ugal/graith

Add bulk viewport extraction to go-libghostty

Open
#1,441 0 comments 0 reactions 0 assignees View on GitHub
daemon dependencies enhancement size: M testing
Dominant language
Go
Stars
2
Forks
0
Avg merge
5h 49m
Merged PRs (30d)
189

Description

Follow up to #1432.

Graith now adopts an exact go-libghostty revision for the native daemon terminal adapter. The public wrapper is a strong long-term ownership boundary and its complete test suite passes against the newer Ghostty revision pinned by Graith.

The remaining upstream opportunity is a public bulk viewport snapshot API. Graith currently uses the public render-state row and cell iterators, which preserves one binding shape but crosses cgo several times per visible cell.

Acceptance criteria:

- Design and upstream a public bulk snapshot API in https://tangled.org/mitchellh.com/go-libghostty, or document why the existing API should remain iterative.
- Preserve render-state iterator lifetimes and exact grapheme, wide-cell, background-only palette/RGB, style, cursor, resize, and alternate-screen semantics.
- Benchmark iterative and bulk extraction with the shared synthetic #1432 corpus at 80x24, 120x40, and a sizeable retained-scrollback reconstruction workload.
- Keep the native helper process crash boundary and bounded private protocol; this optimization must not move untrusted VT parsing into graithd.
- Upgrade the exact go-libghostty and Ghostty revisions as one reviewed dependency unit and run Darwin/Linux amd64/arm64 build, race, fuzz, compatibility, licensing, SBOM, and provenance checks.
- Remove any Graith-side extraction workaround made obsolete by the upstream API.

Reference pins when created (2026-07-18): go-libghostty e9e1010f80b1ced0b7efcdb300f4838513c0816e; Ghostty 91f66da24527fa02d92b5fd0b41cd020f553a64c.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the public render-state row and cell iterators in go-libghostty and the native helper process boundary used by Graith. Compare iterative and bulk extraction using the shared synthetic #1432 corpus at the specified workloads, then verify iterator, rendering, cursor, resize, and alternate-screen semantics. Done includes an upstream API or documented rationale, removal of obsolete Graith workarounds, dependency upgrades, and the listed platform and assurance checks.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
cli, performance
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.