Skip to content

renderer/generic: stale-frame resize guard appears wrong for embedded runtime #11223

@shuhei0866

Description

@shuhei0866

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions