Skip to content

Default to Kitty graphics; pin agg v1.11.0-sixel#89

Merged
tig merged 2 commits into
mainfrom
claude/kitty-graphics-default
Jun 22, 2026
Merged

Default to Kitty graphics; pin agg v1.11.0-sixel#89
tig merged 2 commits into
mainfrom
claude/kitty-graphics-default

Conversation

@tig

@tig tig commented Jun 22, 2026

Copy link
Copy Markdown
Member

Now that the pinned agg renders the Kitty graphics protocol (built on the Kitty-capable avt fork — see tig/agg#7), make Kitty the default for recordings instead of forcing sixel.

Changes

  • 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 pinned agg to v1.11.0-sixel.
  • docs: note Kitty graphics support in README; refresh version references.

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+ _G payloads in the cast, no sixel) and agg renders the fractal in the GIF.

🤖 Generated with Claude Code

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>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread pkg/pty/session.go
}

return filtered
return append(filtered, "KITTY_WINDOW_ID="+kittyWindowID)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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>
@tig

tig commented Jun 22, 2026

Copy link
Copy Markdown
Member Author

Addressed in 2356106: hasTrimStartOutput now also recognizes Kitty graphics APC commands (ESC _ G … ST) via a new hasKittyGraphicsOutput, so a Kitty-image-only first frame is no longer dropped as setup. Added TestHasKittyGraphicsOutput and TestTrimCastPreservesKittyOnlyGraphics covering it.

@tig tig closed this Jun 22, 2026
@tig tig reopened this Jun 22, 2026
@tig tig merged commit fa4639d into main Jun 22, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant