Skip to content

fix(rich,runtime): prevent Kitty graphics quota lockout in long-running sessions #3159

Closed

Description

@Xuepoo

Priority: P1 | Area: area:runtime | Labels: fix, P1, area:runtime | Milestone: v0.1.0 | RFC: OQ-008 | Task: CTX-1828

Summary

In long-running bitty sessions across multiple panes/workspaces (especially when running TUIs that animate or re-render inline images via a=T,U=1,i=<id> such as hermes, alongside direct placement tools such as chafa -f kitty), the Kitty graphics protocol eventually stops displaying new images until bitty is restarted:

  1. Combined virtual re-transmits (a=T,U=1,i=<id> with wire_image != 0) accumulate dead images and p=0 prototypes: Re-transmitting the same non-zero i=<id> in combined virtual mode did not supersede the prior stored image and its linked p=0 virtual prototype for (origin, wire_image), filling the 32-slot per-origin placement budget and 64-slot global image store within a few dozen frames.
  2. Cross-kind per-origin placement budget lockout: Once an origin held 32 virtual prototypes (and 0 blit placements), subsequent direct blit placements (chafa -f kitty) on that origin failed check_placement_quota_for_origin with QuotaExceeded (and vice versa).
  3. Multi-pane global image/placement cap lockout: When 2+ panes collectively reached KITTY_PLACE_MAX_IMAGES (64) without any single pane reaching KITTY_PER_ORIGIN_MAX_IMAGES (64), Runtime transmissions refused with QuotaExceeded instead of reclaiming the transmitting origin's own oldest images or unreferenced/oldest images.
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:runtimefix

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions