Skip to content

Kitty image disappears after opening and closing a TUI in the same panel #2437

Closed

Description

@Xuepoo

Owner dogfooding repro (screenshot in the report):

  1. In a panel, render a kitty image: chafa ~/Pictures/Networks/linus.webp -f kitty (image visible).
  2. Run a full-screen TUI in the same panel, e.g. btop.
  3. Exit the TUI back to the shell prompt.
  4. The chafa image is gone; it does not reappear above the prompt/scrollback.

Expected: the primary-screen image placement survives the alternate-screen round trip and is repainted (or the image cell data is retained and re-presented) when the TUI exits.

Hypotheses:

  • 1049/47/1047 alternate-screen enter/exit drops placements or image storage for the primary screen.
  • Image placements are not re-emitted on the restore path; the renderer only has the current frame, and scrollback/cell storage loses the image reference.
  • Reflow/scrollback anchoring invalidates the placement after the TUI repaint.

Scope:

  • Reproduce with chafa and a plain kitty +kitten icat image; test with btop/vim/less.
  • Check kitty graphics storage/placement lifetime across 1049 enter/exit, and whether a redraw of the prompt row re-emits placements.
  • Add a regression that switches to alt screen and back with an image in the primary grid and asserts the image remains (pixel/placement-level, not just text).
  • Verify no unbounded image retention; the fix must keep the existing graphics memory quotas.

Priority: P1 | Area: graphics/vt | Labels: fix,P1,area:vt,area:render | Milestone: 0.0.26 | RFC: - | Task: -

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1area:renderarea:vtfix

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions