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
- tmux 3.4+ with sixel support on the host — without this the rest is unobservable
allow-passthrough on
- add
@xterm/addon-image and loadAddon it in useShellTerminal.ts alongside the existing addons
- 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.
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, andwebgl;@xterm/addon-imageis not installed, so sixel and iTerm2 inline images are never decoded.2. Nothing survives tmux to reach it.
shell-websocket.service.ts:157attaches withso 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:
strings tmux | grep -ci sixel)--enable-sixelallow-passthroughoptionA
pipe-panecapture 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
allow-passthrough on@xterm/addon-imageandloadAddonit inuseShellTerminal.tsalongside the existing addonsWebglAddon, and set the addon's pixel-memory limit so long scrollback does not grow unboundedSteps 3-4 are small; step 1 is host configuration, not application code.
Scope limits worth recording
@xterm/addon-imagecovers sixel and iTerm2 inline images. It does not implement the kitty graphics protocol, sokitty +kitten icatand TUIs built on that protocol stay unsupported.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.