Skip to content

feat(cmdg): implement robust inline image rendering and non-blocking UI#149

Closed
kurokirasama wants to merge 1 commit into
ThomasHabets:masterfrom
kurokirasama:feat/inline-images
Closed

feat(cmdg): implement robust inline image rendering and non-blocking UI#149
kurokirasama wants to merge 1 commit into
ThomasHabets:masterfrom
kurokirasama:feat/inline-images

Conversation

@kurokirasama

Copy link
Copy Markdown
Contributor

This PR implements robust inline image rendering for the cmdg terminal client.

Key Features:

  • High-Density HTML Rendering: Integrated a custom C-based renderer for improved information density and layout preservation.
  • Terminal Image Protocols: Support for Kitty and iTerm2 protocols with automatic terminal detection (Ghostty, Kitty, iTerm2, WezTerm).
  • Pixel-Perfect Scrolling: Images now slide smoothly behind UI boundaries using pixel-based source rectangle clipping, avoiding aspect-ratio distortion.
  • Instant Responsiveness: Refactored the UI to move image processing and line wrapping into background goroutines, ensuring the interface remains interactive even with heavy emails.
  • Optimized Performance: Implemented parallel resolution of inline images.
  • Clean Implementation: All engine-specific branding and legacy lynx dependencies have been removed.

Supported Terminals: Ghostty, Kitty, iTerm2, WezTerm, and other modern terminals with Kitty protocol support.

- Integrated a custom C-based HTML renderer (Matcha engine) for high information density.
- Implemented support for Kitty and iTerm2 terminal image protocols.
- Added pixel-perfect vertical clipping and smooth scrolling for images.
- Refactored message loading to be non-blocking with background resolution.
- Optimized performance with parallel image resolution.
- Added automatic terminal protocol detection.
- Scrubbed all engine-specific branding from user-facing output.
@kurokirasama

Copy link
Copy Markdown
Contributor Author

hey!! not sure if you'll accept this since it introduces quite a few changes, but I really struggle to make this work and I think is a really great feature!!

@kurokirasama kurokirasama deleted the feat/inline-images branch May 27, 2026 02:43
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