Skip to content

Inline terminal images (sixel) are blocked by the tmux attach path #45

Description

@devswha

Goal

Let a CLI that prints an inline image (imgcat, sixel-emitting TUIs) show that image in the browser terminal instead of escape-sequence noise.

Why it does not work today

Two independent gaps, and the tmux one comes first.

1. The browser terminal has no image decoder. The shell loads clipboard, fit, web-links, and webgl; @xterm/addon-image is not installed, so sixel and iTerm2 inline images are never decoded.

2. Nothing survives tmux to reach it. shell-websocket.service.ts:157 attaches with

tmux … attach-session -t <session>

so the browser receives tmux's rendering of its own screen model, not the program's raw bytes. tmux drops sequences it does not understand.

Measured on this host:

requirement present needed
tmux version 3.2a 3.4+
sixel compiled in (strings tmux | grep -ci sixel) 0 built with --enable-sixel
allow-passthrough option does not exist tmux 3.3+

A pipe-pane capture does preserve the DCS payload, but that path is the program's raw output and is not what the shell websocket streams, so it does not help.

Order of work

  1. tmux 3.4+ with sixel support on the host — without this the rest is unobservable
  2. allow-passthrough on
  3. add @xterm/addon-image and loadAddon it in useShellTerminal.ts alongside the existing addons
  4. verify it coexists with WebglAddon, and set the addon's pixel-memory limit so long scrollback does not grow unbounded

Steps 3-4 are small; step 1 is host configuration, not application code.

Scope limits worth recording

  • @xterm/addon-image covers sixel and iTerm2 inline images. It does not implement the kitty graphics protocol, so kitty +kitten icat and TUIs built on that protocol stay unsupported.
  • Because the capability depends on the operator's tmux build, inline images cannot be promised as a baseline feature for self-hosted installs. It should degrade quietly rather than be advertised.

Not blocked by this

Image handling in the chat surface (attachments and showImagePreviews) is a separate, working path. This issue is only about the terminal view.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions