-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Description
Summary
The generic renderer's stale-frame resize guard appears to be inappropriate for the embedded runtime.
Observed behavior
In an embedded host using libghostty, resize can enter a state where:
- the UI continues repainting
- resize events are delivered
- PTY/input continue to flow
- but the terminal body remains visually stuck on the last presented frame during resize
This was reproduced while integrating Ghostty as an embedded terminal host for cmux on Ubuntu.
Root cause found locally
The issue appears to come from renderer/generic.zig re-presenting the last completed frame during resize while the resized cell buffers catch up.
That policy makes sense for native hosts that want to avoid a blank flash during synchronous display requests.
For the embedded runtime, it caused a visibly stale terminal instead.
Local fix
I tested a local change that disables that stale-frame guard for apprt.embedded while preserving the current behavior for other runtimes.
Related draft PR in the manaflow fork:
Question
Would you consider an embedded-runtime-specific renderer policy here acceptable upstream, or is there a better place to express this distinction?