apprt: add output_activity action for throttled IO-path activity heartbeat - #3
apprt: add output_activity action for throttled IO-path activity heartbeat#3onliner10 wants to merge 2 commits into
Conversation
Single squashed commit of all thdxg/ghostty customizations on top of upstream ghostty-org, so the downstream delta is always exactly one commit ahead. Regenerated automatically by sync-upstream.yml.
…tbeat Add GHOSTTY_ACTION_OUTPUT_ACTIVITY, a throttled heartbeat emitted from the terminal IO path whenever the child/pty produces output. It carries the current scrollbar geometry (ghostty_action_scrollbar_s) and is delivered via the surface mailbox -> app-tick -> performAction track, not the renderer thread. Unlike the renderer-track scrollbar action, this keeps firing while the surface is occluded (the renderer parks on occlusion), so embedders can drive an activity indicator for in-place TUI redraws and backgrounded tabs. Throttled to at most once per 500ms in Termio.processOutputLocked, reusing the cursor-reset throttle idiom: the Instant compare runs per pty chunk while the scrollbar read only happens when emitting. The action is appended last in both the Zig Action.Key enum and the C ghostty_action_tag_e so existing tag values are unchanged.
09a367f to
586363e
Compare
2e36519 to
3a6478a
Compare
|
Thanks for this, @onliner10 — the change itself is exactly right, and I've verified end to end that it's the signal Macterm needs: an occlusion-independent output heartbeat that the render-track The catch is purely mechanical, not about the code. This fork stays exactly one commit ahead of So I've carried the change forward the way the command-wrapper patch is maintained:
Full credit is preserved — the patch keeps your authorship on the commit. Given that, I'm going to land the change via the |
|
Thank you! I hope we can finally get activity indicator right 😅 I’m
running multiple parallel coding agents, so it’s actually really important
for me to track which ones require my input and which ones do not.
Do I understand it right that you also make the changes for macterm to
actually use this signal?
Btw should you need any help on macterm development, feel free to reach me
out directly!
W dniu wt., 14 lip 2026 o 17:42 Ethan (Taehoon) Lee <
***@***.***> napisał(a):
… Closed #3 <#3>.
—
Reply to this email directly, view it on GitHub
<#3?email_source=notifications&email_token=ABDYUL2JMZD7DTSJKLMRQQ35EZIIDA5CNFSNUABQM5UWIORPF5TWS5BNNB2WEL2JONZXKZKFOZSW45CON52GSZTJMNQXI2LPNYXTENZZG4YTGMBVHAZTRJTSMVQXG33OU5WWK3TUNFXW5JLFOZSW45FMMZXW65DFOJPWG3DJMNVQ#event-27971305838>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABDYUL2FQTRI5TAETMQ4YOD5EZIIDAVCNFSNUABGKJSXA33TNF2G64TZHMYTENBXGEZTEMRRGM5US43TOVSTWNBYGI3TEOJQGQYDLILWAI>
.
Triage notifications, keep track of coding agent tasks and review pull
requests on the go with GitHub Mobile for iOS
<https://github.com/notifications/mobile/ios/ABDYUL7ROSSBKWAO6EXCGPD5EZIIDA5CNFSNUABQM5UWIORPF5TWS5BNNB2WEL2JONZXKZKFOZSW45CON52GSZTJMNQXI2LPNYXTENZZG4YTGMBVHAZTRJTSMVQXG33OU5WWK3TUNFXW5JLFOZSW45FKMZXW65DFOJPWS33T>
and Android
<https://github.com/notifications/mobile/android/ABDYUL352YGNXNNK2RNT3VD5EZIIDA5CNFSNUABQM5UWIORPF5TWS5BNNB2WEL2JONZXKZKFOZSW45CON52GSZTJMNQXI2LPNYXTENZZG4YTGMBVHAZTRJTSMVQXG33OU5WWK3TUNFXW5JLFOZSW45FOMZXW65DFOJPWC3TEOJXWSZA>.
Download it today!
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Yes!
Thanks! Truly appreciated 😊 |
What
Adds
GHOSTTY_ACTION_OUTPUT_ACTIVITY: a heartbeat emitted from the IO path (throttled to 500ms, reusing the existing cursor-reset throttle idiom) whenever the pty produces output, carrying the current scrollbar geometry. Unlikescrollbar, which comes from the renderer and stops while occluded, this fires regardless of visibility. Purely additive — appended last in bothAction.Keyandghostty_action_tag_e, no existing behavior changes.Why
macterm needs an occlusion-independent output signal to drive its per-tab activity indicator — for minimized/backgrounded tabs, and for raw-mode TUIs (editors, AI coding CLIs) that redraw in place with no scrollback growth.
scrollbarcan't cover either case.Embedder-only API addition, no user-facing config surface.
Testing
Built locally, swapped into a macterm debug build, confirmed end-to-end (instrumented logging) that the action fires and reaches the app layer while occluded and during raw-mode in-place redraws.
AI disclosure
Written with Claude Code, driven by me — I designed the throttle/routing approach, reviewed the full diff, and understand its interaction with renderer occlusion and the surface mailbox.
Note
No existing issue — this is a fork-specific embedder API addition, not a user-facing feature. Happy to adjust process if preferred.