Skip to content

feat(ui): add kitty graphics protocol support for inline images - #1484

Merged
MathurAditya724 merged 6 commits into
mainfrom
issue-1482-kitty-graphics
Aug 26, 2026
Merged

feat(ui): add kitty graphics protocol support for inline images#1484
MathurAditya724 merged 6 commits into
mainfrom
issue-1482-kitty-graphics

Conversation

@jared-outpost

@jared-outpost jared-outpost Bot commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Adds support for the kitty graphics protocol alongside the existing sixel rendering. Newer terminals (kitty, WezTerm, Ghostty, recent Konsole) prefer kitty, which transmits full RGBA pixels directly — preserving color and transparency without palette quantization. The terminal probe now detects kitty via its graphics query, and sentry api renders image attachments via kitty when available, falling back to sixel on older terminals. SENTRY_NO_SIXEL disables both.

Sixel is kept as the fallback rather than dropped: it remains the only option on terminals that don't speak kitty.

Testing

vitest run test/lib/kitty-image.test.ts test/lib/sixel.test.ts test/commands/api.test.ts (261 pass), biome check clean on changed files, check:env-coverage passes. tsc errors are pre-existing (missing generated files, unrelated to this change).

Closes #1482

@vercel

vercel Bot commented Aug 26, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
cli Ready Ready Preview Aug 26, 2026 7:33pm

Request Review

@jared-outpost
jared-outpost Bot marked this pull request as ready for review August 26, 2026 09:56
@jared-outpost
jared-outpost Bot requested a review from BYK August 26, 2026 09:56
@github-actions github-actions Bot added the risk: high PR risk score: high label Aug 26, 2026
Comment thread packages/cli/src/lib/sixel.ts
Comment thread packages/cli/src/lib/sixel.ts Outdated
@BYK

BYK commented Aug 26, 2026

Copy link
Copy Markdown
Member

We should now rename all sixel references in config and flags to graphics. Also, given all modern terminals support Kitty protocol, is there any good reason to keep supporting sixel?

@BYK BYK changed the title feat(api): add kitty graphics protocol support for inline images feat(ui): add kitty graphics protocol support for inline images Aug 26, 2026

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 2 potential issues.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 0cab151. Configure here.

Comment thread packages/cli/src/lib/sixel.ts
Comment thread packages/cli/src/lib/db/defaults.ts
jared-outpost Bot and others added 6 commits August 27, 2026 01:01
Detect the kitty graphics protocol alongside sixel in the terminal probe
and prefer it when available. Kitty transmits full RGBA pixels directly,
so color and transparency are preserved without palette quantization.

sentry api renders image attachments via kitty first, falling back to
sixel on older terminals. SENTRY_NO_SIXEL disables both.

Fixes #1482
/ now accept either
 (sixel) or , so kitty-only terminals
still get a real pixel budget instead of falling back to the 800 px
default.

Fixes the bug reported by sentry[bot] / cursor[bot].
Renames SENTRY_NO_SIXEL to SENTRY_NO_GRAPHICS (old name kept as a

deprecated alias) now that the toggle governs both kitty and sixel, and

adds a persistent `sentry cli defaults graphics on/off` setting. Inline

graphics are opt-out: capable terminals render images by default.

Removes the dashboard-specific opt-in (--sixel flag, SENTRY_DASHBOARD_SIXEL,

timeseries_sixel displayType). `sentry dashboard view` now renders as a

graphics canvas on capable terminals via the same global setting, preferring

kitty and falling back to sixel. Detection stays env-only so the --help

banner never opens the database; the stored graphics preference is read only

in the TTY-gated image paths.
sixelBanner only called optedOut(), so a persisted `graphics off`
preference still emitted the sixel help banner. Now it also checks
getGraphicsPreference() === false, matching canRenderSixel /
canRenderKitty and the documented semantics of the preference.
@MathurAditya724
MathurAditya724 force-pushed the issue-1482-kitty-graphics branch from eb5812a to 5ca32bb Compare August 26, 2026 19:32
@MathurAditya724
MathurAditya724 merged commit 72a014d into main Aug 26, 2026
33 checks passed
@MathurAditya724
MathurAditya724 deleted the issue-1482-kitty-graphics branch August 26, 2026 19:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk: high PR risk score: high

Projects

None yet

Development

Successfully merging this pull request may close these issues.

kitty graphics support

2 participants