Default to Kitty graphics; pin agg v1.11.0-sixel#89
Conversation
Now that the pinned agg renders the Kitty graphics protocol (built on the Kitty-capable avt fork), make Kitty the default for recordings instead of forcing sixel. pkg/pty: advertise a deterministic Kitty graphics identity (a normalized KITTY_WINDOW_ID) to the recorded app instead of scrubbing it. Apps detect Kitty graphics support purely from the environment (e.g. Terminal.Gui's KittyGraphicsSupportDetector keys off KITTY_WINDOW_ID), so the recorded app now prefers Kitty graphics, which agg renders. Host-specific Kitty/Ghostty operational vars are still stripped so the advertised identity is deterministic regardless of the recording terminal. pkg/gif, internal/release: bump the pinned agg to v1.11.0-sixel. Docs: note Kitty graphics support in README; refresh version references. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5fefe85c91
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| } | ||
|
|
||
| return filtered | ||
| return append(filtered, "KITTY_WINDOW_ID="+kittyWindowID) |
There was a problem hiding this comment.
Preserve Kitty-only frames when trimming
With default --trim enabled, setting KITTY_WINDOW_ID here makes apps that choose Kitty emit image data as Kitty APC strings (ESC _ G ... ST) instead of sixel. The trimmer only starts on hasVisibleOutput or hasSixelOutput in pkg/record/record.go, and hasVisibleOutput skips APC strings, so a Kitty-image-only first frame is treated as setup and is dropped unless later text appears; image-only Kitty recordings can end up empty or truncated. Add Kitty graphics detection to the trim-start logic before advertising Kitty by default.
Useful? React with 👍 / 👎.
The trimmer starts the kept region on hasVisibleOutput or hasSixelOutput, but hasVisibleOutput skips APC strings, so a Kitty-image-only first frame was dropped as setup once Kitty became the default. Recognize Kitty graphics APC commands (ESC _ G ... ST) in the trim-start logic so image-only Kitty recordings are preserved. Addresses Codex review on #89. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Addressed in 2356106: |
Now that the pinned
aggrenders the Kitty graphics protocol (built on the Kitty-capableavtfork — see tig/agg#7), make Kitty the default for recordings instead of forcing sixel.Changes
KITTY_WINDOW_ID) to the recorded app instead of scrubbing it. Apps detect Kitty graphics support purely from the environment (e.g. Terminal.Gui'sKittyGraphicsSupportDetectorkeys offKITTY_WINDOW_ID), so the recorded app now prefers Kitty graphics, which agg renders. Host-specific Kitty/Ghostty operational vars are still stripped so the advertised identity is deterministic regardless of the recording terminal.v1.11.0-sixel.This reverses the env-scrubbing from #88 (v0.8.2), whose rationale — "agg cannot render Kitty graphics" — no longer holds.
Validation
Built locally against agg v1.11.0-sixel and recorded the Terminal.Gui Mandelbrot scenario: the app emits Kitty graphics (2400+
_Gpayloads in the cast, no sixel) and agg renders the fractal in the GIF.🤖 Generated with Claude Code