sync: atualiza o fork com o upstream e reaplica o scroll de TUI - #1
Merged
Merged
Conversation
CompileFromSource extracts the ghostty source under the consuming app's
directory (.dart_tool/hooks_runner/.../ghostty-source-<hash>/), which is
frequently inside the app's own git repository. Ghostty's build (Config.zig)
shells out to git to derive its version, and because the extracted source has
no .git of its own, that discovery walks up into the app's repo and reads the
app's tag.
When the app is checked out on a tag that isn't vX.Y.Z -- e.g. a CI release
build tagged `myapp-v1.2.3` -- Config.zig panics:
thread panic: tagged releases must be in vX.Y.Z format matching build.zig
This breaks every tagged release build for any consumer whose tag scheme
differs from ghostty's, on all four desktop targets. It only escapes local
dev because an untagged HEAD falls into the branch/short-hash path.
Fence git at the extracted source's parent via GIT_CEILING_DIRECTORIES (must
be absolute) so the upward walk stops before reaching the app repo. Ghostty
then finds no repository and cleanly falls back to a dev version through the
existing Config.zig error.GitNotRepository path -- not a hack, the intended
fallback.
Verified end-to-end: with a `cockpit-v1.15.0` tag on the consumer repo (which
otherwise reproduces the panic), a cold `zig build` completes and emits a
dylib exporting the expected symbols.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Prevent Ghostty source builds from reading consumer Git tags, avoiding version-detection failures in tagged releases.
Add repeatable benchmarks for terminal input throughput and Flutter frame performance. The suite measures streaming and interactive input alongside clean, partial, full-screen, new-glyph, and first-frame rendering under a fixed terminal and font setup, then emits normalized results for comparison across revisions. Note: I provided the direction and used GPT 5.5 to write the benchmark suite, including its README.
Prepare libghostty v0.0.12 with new clipboard, compression, and geometry APIs; lower overhead query, formatting, and Kitty image paths; and fixes across resize, selection, grid, callback, and source build behavior. This also includes the breaking Kitty temporary file directory API.
Prepare flterm v0.0.5 with clipboard writes, idle scrollback compression, lower overhead Kitty graphics caching, improved color behavior, and fixes for IME layout, viewport scrolling, and Windows text input. This also trims published package contents and updates the libghostty dependency to v0.0.12.
Reconnect terminal text input when another client takes ownership of the platform connection, and clear any active preedit state before reopening it. This keeps IME input recoverable without sending updates through an orphaned connection. Replaces elias8#124
Sync libghostty with the latest Ghostty source and bindings, exposing scrollback limits, desktop notifications, and progress reports through the native and WASM APIs. This also updates flterm to use the new terminal construction API and adds coverage for the new behavior.
Forward libghostty's scrollback limits, desktop notifications, and progress reports through flterm. Replace the single scrollback limit with separate byte and line limits, expose the new callback types through the package API, and apply the configured options when terminals are created or reconfigured.
Remove the iOS Mach O alignment patcher and its tests now that Ghostty builds Apple targets on Apple hosts with Apple's native linker. This follows [Ghostty #13430](ghostty-org/ghostty#13430), which switches those builds away from Zig's Mach O linker and makes the post build alignment patch unnecessary.
The compile hook only passed `-Dtarget` when cross-compiling (os != current || arch != current). For a native build the flag was omitted, so Zig defaulted the CPU model to `native` and tuned ghostty-vt for the build machine. On a CI runner that means AVX2/AVX-512, and the resulting library crashes with an illegal instruction (0xC000001D) on consumer CPUs without those extensions -- e.g. the Windows release "flashes and closes" with no log on some machines. Local source builds escaped it because native == the dev CPU. Pass `-Dtarget` unconditionally; an explicit target resolves to the arch's baseline CPU. This mirrors the upstream release workflow (.github/workflows/build.yml), which already passes `-Dtarget` for every artifact -- including the native ones -- which is why the prebuilt releases run on older CPUs while the native compile path did not. Verified: a native `zig build -Dtarget=aarch64-macos` still builds the dylib successfully. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Pass the iOS deployment version into Zig targets for source builds and CI artifacts, producing aarch64-ios.13.0 and aarch64-ios.13.0-simulator for the iOS 13 minimum. This keeps the binary load command aligned with the framework's MinimumOSVersion. Resolves elias8#127
Bumps [dart-lang/setup-dart/.github/workflows/publish.yml](https://github.com/dart-lang/setup-dart) from 1 to 1.7.2. - [Release notes](https://github.com/dart-lang/setup-dart/releases) - [Changelog](https://github.com/dart-lang/setup-dart/blob/main/CHANGELOG.md) - [Commits](dart-lang/setup-dart@v1...v1.7.2) --- updated-dependencies: - dependency-name: dart-lang/setup-dart/.github/workflows/publish.yml dependency-version: 1.7.2 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
Invalidate selection during widget updates without notifying listeners, preventing `setState` calls during build while keeping explicit selection clearing observable through the controller API. Resolves elias8#136
Bumps [dart-lang/setup-dart/.github/workflows/publish.yml](https://github.com/dart-lang/setup-dart) from 1.7.2 to 1.8.0. - [Release notes](https://github.com/dart-lang/setup-dart/releases) - [Changelog](https://github.com/dart-lang/setup-dart/blob/main/CHANGELOG.md) - [Commits](dart-lang/setup-dart@v1.7.2...v1.8.0) --- updated-dependencies: - dependency-name: dart-lang/setup-dart/.github/workflows/publish.yml dependency-version: 1.8.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
…m 1.7.2 to 1.8.0 (elias8#139)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ias8#132) Pass -Dtarget so source-compiled libraries use the target CPU baseline instead of the build machine's CPU.
…scroll) With mouse tracking enabled (TUIs like Claude Code / vim in the alt-buffer), the gesture detector only handled pointer down/move/up — there was no onPointerSignal for the wheel, so the inner Scrollable swallowed it (scrolling the viewport scrollback, which is empty/frozen in the alt-buffer). The app never received the wheel as a mouse report, so its internal scroll did nothing. Now, when tracked, onPointerSignal forwards the wheel to the app as mouse button four (up) / five (down) presses (proportional for mouse notches, accumulated fractions for trackpad; Shift bypasses so Shift+wheel stays local). The inner Scrollable is set to NeverScrollableScrollPhysics under mouse tracking so the two don't fight over the pointer signal (which was killing the app's internal scroll). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> (cherry picked from commit a987855)
PointerScrollEvent only covers the mouse wheel and macOS's synthesized trackpad scroll; two-finger trackpad on macOS frequently arrives as pan/zoom gestures instead, which weren't forwarded, so internal TUI scroll did nothing on the trackpad. Handle onPointerPanZoomStart/Update as well, routing the pan delta through the same wheel-forward path. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The wheel/pan-zoom forwarding landed with Portuguese comments; the rest of the repository is documented in English. Comment-only change, plus a dart format pass on the _forwardScroll signature.
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.
Sincroniza este fork com os 37 commits que o
elias8/libghosttyacumulou desde23/jul/2026 e reaplica, por cima da base nova, o único patch que ainda é
exclusivo daqui: o encaminhamento de scroll para TUIs sob mouse tracking.
O objetivo prático é dar ao Cockpit um ref novo para repinar. Hoje o
cockpit/pubspec.yamlaponta para a tagcockpit-pin-flterm-cpu-baseline(
103be857), cuja base é de 23/jul — 37 commits atrás do upstream.Por que a divergência encolheu tanto
Dos 5 commits que a tag do pin carregava, 3 já foram absorvidos pelo
upstream e por isso saem daqui:
469fb1c6— isolamento do git no build hook103be857— compile no CPU baseline (-Dtarget)e7bd2265— reattach do IME órfãoSobra o patch de scroll (2 commits), que continua aberto como elias8#119.
O que entra
1. Sincronização com
elias8/libghostty@main(30b0b79)Destaques do que o fork estava perdendo:
libghosttyv0.0.12 efltermv0.0.5reports (feat(libghostty): expose upstream terminal APIs elias8/libghostty#129, feat(flterm): expose terminal options and callbacks elias8/libghostty#130)
ghostty.versionsai de
15484b6para4d605bffix(flterm): reconexão de text input deslocado (fix(flterm): reconnect displaced text input clients elias8/libghostty#126) e supressão denotificações de seleção durante o build (fix(flterm): avoid selection notifications during build elias8/libghostty#138)
(fix(libghostty): set iOS deployment target to version 13 elias8/libghostty#133) — o arquivo
fix_ios_page_alignment.darte seus testes deixam deexistir
2. Encaminhamento de scroll sob mouse tracking (2 commits, autoria do Jacob)
Com mouse tracking ligado — TUIs como
claudeevimna tela alternativa — owheel precisa virar reporte de mouse para o app em vez de rolar o scrollback do
viewport. Sem isso o
Scrollablefilho engole o evento e, como a telaalternativa não tem scrollback, o scroll interno do app simplesmente não
funciona.
terminal_gesture_detector.dart: passa a trataronPointerSignal(
PointerScrollEvent) e os gestosonPointerPanZoomStart/onPointerPanZoomUpdate— no macOS o trackpad chega como pan/zoom, não comoscroll, então sem esse segundo caminho o scroll de dois dedos não encaminha
nada. Ambos convergem para
_forwardScroll, que converte o delta vertical empassos de linha e emite botão 4 (cima) / 5 (baixo). Mouse é tratado como
discreto (mínimo de uma linha por notch); trackpad é contínuo e acumula o
resíduo fracionário, para não rolar rápido demais.
terminal_view.dart: oScrollabledo viewport recebeNeverScrollableScrollPhysicsenquanto houver mouse tracking, de modo que osdois consumidores não disputem o mesmo pointer signal.
3. Tradução dos comentários para inglês
O patch de scroll tinha sido escrito com comentários em português, destoando do
resto do repositório. Ficaram em inglês num commit separado, que também aplica
dart formatna assinatura de_forwardScroll. É mudança só de comentário —nenhuma linha de lógica muda.
Verificação
Rebase feito por cherry-pick limpo sobre
upstream/main, sem conflito.Depois do merge
Cortar uma tag nova e trocar o
refdos dois blocos dedependency_overridesdo
cockpit/pubspec.yaml. Vale revisar, na mesma passada, o comentário longoque hoje descreve os quatro fixes carregados — três deles viraram upstream e o
texto ficou desatualizado.
Um cuidado no repin: como o
ghostty.versionmudou, osource: compilevaibuildar uma versão diferente do Ghostty. Confirmar que
ghostty_terminal_compression_activity— chamado no construtor doTerminalControllerImpldo Cockpit — continua exportado, já que foi exatamenteesse símbolo que causou o
dlsym: symbol not foundno incidente anterior.