Repository navigation
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Team Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (10)
🚧 Files skipped from review as they are similar to previous changes (10)
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughThe change adds Priority: ➖ Normal — Impact reflects medium issue severity. Severity of issue fixed: Medium Merge Risk: ⚪ Minimal · up to This change adds bounded, lifecycle-managed inline image rendering to terminal panes, with coverage for loading, disposal, retries, and image rendering. No current merge-readiness risk is identified. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 37.50% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 16 functions across 9 files. (1 skipped: 1 unsupported.)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Team
Run ID: 16438633-6332-43e5-b712-d5dfe9845532
📥 Commits
Reviewing files that changed from the base of the PR and between f1d8545 and cc974b6b1e422a5c46d997a2b700552f37a738a5.
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (8)
package.jsonsrc/renderer/src/lib/pane-manager/pane-dom-creation.tssrc/renderer/src/lib/pane-manager/pane-lifecycle.tssrc/renderer/src/lib/pane-manager/pane-manager-types.tssrc/renderer/src/lib/pane-manager/pane-public-view.tssrc/renderer/src/lib/pane-manager/terminal-inline-image-addon.test.tssrc/renderer/src/lib/pane-manager/terminal-inline-image-addon.tstests/e2e/terminal-inline-image.spec.ts
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.
There was a problem hiding this comment.
✅ No new issues found — one behavior change worth flagging below.
Reviewed changes
@xterm/addon-imageadoption — adds the xterm.js-org addon (0.10.0-beta.300) whose peer range exactly matches the@xterm/xtermOrca already ships, enabling SIXEL and iTerm2 IIP (and, by default, the kitty protocol) decoding.- Lazy, memoised loader —
terminal-inline-image-addon.tsdefers the ~80 KB chunk behind a dynamicimport()with a memoised constructor, a per-paneinlineImageAttachTokenthat drops late resolves for disposed panes, and a failed-load path that re-arms for the next pane. - Pane lifecycle wiring — attaches after
terminal.open(), disposes indisposePane, and exposesimageAddon?onManagedPanefor probes. - Tests — unit spec covers lazy/memoised/dispose-race/failure/idempotent paths; the e2e spec builds a hand-rolled PNG in-test, emits it through the PTY via
nodeTerminalCommand, and asserts decoded cells throughgetImageAtBufferCellwith a real red-pixel readback.
ℹ️ Primary DA1 now identifies the terminal as VT220+SIXEL, not just to image TUIs
@xterm/addon-image registers its own primary-DA1 (CSI c) handler during activate(), and because xterm dispatches CSI handlers most-recently-registered first, that handler replaces xterm's stock reply (\x1b[?1;2c, or \x1b[?6c under TERM=linux) with \x1b[?62;4;9;22c (VT220 + SIXEL + charsets + ANSI colors). Every program that queries DA1 now sees a different terminal identity, not only the image-capable TUIs, and the change is not opt-outable without also disabling SIXEL (sixelSupport gates the reply). Secondary DA (CSI > c) is unaffected. This is the addon's intended feature-detection mechanism, so it is informational rather than a defect — flagging it only so the identification change is a conscious decision, since the PR frames it narrowly as "answers DA1 probes."
Technical details
# DA1 identification change
## Affected sites
- `src/renderer/src/lib/pane-manager/terminal-inline-image-addon.ts:17` — `sixelSupport: true` (the addon default regardless) drives the addon's `_da1` reply `\x1b[?62;4;9;22c`.
- Verified in the installed `@xterm/[email protected]` source: `activate()` registers `{ final: 'c' }` → `_da1`; xterm's `EscapeSequenceParser` dispatches CSI handlers LIFO, so the addon's handler runs before `InputHandler.sendDeviceAttributesPrimary`.
## Required outcome
- None required for merge. Confirm no integration keys on the stock `\x1b[?1;2c` reply, and consider a changelog line noting the identification change.
## Open questions for the human
- Should this be called out in the release notes alongside the image-rendering feature, given it affects terminal identification broadly (e.g. tmux sixel passthrough detection will now activate)?DeepSeek Pro (free via Pullfrog for OSS) | 𝕏
There was a problem hiding this comment.
✅ No new issues found in the delta.
Reviewed changes (since the prior review at cc974b6)
- Boot-time prime of the image addon —
main.tsxandweb/main.tsxnow callprimeTerminalInlineImageAddon()right after first render (mirroringprimeTerminalWebglAddon), so the deferred chunk resolves before the first pane opens andopenTerminalattaches the parser hook synchronously. This closes the first-pane race where an OSC 1337 / SIXEL sequence parsed before the lazy attach would have been consumed and lost. - Live
imageAddonon the public pane view —toPublicPanenow exposesimageAddonas a getter (get imageAddon() { return pane.imageAddon ?? null }), so a view handed out earlier (onPaneCreated, a retainedgetActivePaneresult) observes the addon once it attaches. - Two new unit tests — synchronous first-pane attach after a resolved prime, and the retained-view getter observing attach/dispose.
Both changes are correct and consistent with the existing WebGL loader and entry-point patterns; the static import in main.tsx pulls in only the small loader module (the addon type is import type, the chunk itself stays behind import('@xterm/addon-image')), and the web entry keeps the dynamic-import shape it uses for WebGL.
DeepSeek Pro (free via Pullfrog for OSS) | 𝕏
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Team
Run ID: d5e1b0fc-367d-4ade-a489-a9579ae9bb33
📥 Commits
Reviewing files that changed from the base of the PR and between cc974b6b1e422a5c46d997a2b700552f37a738a5 and f3617b5d4f355dff78240586058ee913e7fd585a.
📒 Files selected for processing (5)
src/renderer/src/lib/pane-manager/pane-public-view.tssrc/renderer/src/lib/pane-manager/terminal-inline-image-addon.test.tssrc/renderer/src/lib/pane-manager/terminal-inline-image-addon.tssrc/renderer/src/main.tsxsrc/renderer/src/web/main.tsx
🚧 Files skipped from review as they are similar to previous changes (2)
- src/renderer/src/lib/pane-manager/pane-public-view.ts
- src/renderer/src/lib/pane-manager/terminal-inline-image-addon.ts
Included review availability: Your plan provides up to 10 included reviews per hour; 8 remain after this review.
|
Re the Pullfrog note on DA1 identity — good catch, and it turns out the identity does not change in Orca, for a reason worth recording: Orca installs its own primary-DA responder ( The flip side, now stated in the PR description and in a comment next to the addon options (efee8751): TUIs that autodetect SIXEL purely from DA1 (yazi, chafa) still see no SIXEL flag in this PR. IIP/kitty emitters and explicitly configured SIXEL work. Advertising SIXEL properly means changing the DA1 string in every responder and echo filter (renderer, daemon startup barrier, ConPTY) in one coherent change, so I left it as a follow-up rather than let it leak in from the addon by registration order. |
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes (delta against the prior review at f3617b5)
- Documented the DA1 identity ordering —
terminal-inline-image-addon.tsgained a comment explaining why the addon's SIXEL-advertising primary-DA reply (\x1b[?62;4;9;22c) does not actually change the terminal identity: Orca's owninstallTerminalCapabilityReplyHandlersregisters its{ final: 'c' }responder later (at PTY connect, afteropenTerminalattached the addon), and xterm dispatches CSI handlers LIFO, so Orca's\x1b[?1;2ckeeps winning. I confirmed this ordering againstterminal-capability-replies.tsandpty-input-recovery.ts:187; the comment is accurate and closes out the informational DA1 note from the initial review. - Guarded the web entry's loader-module import —
web/main.tsxnow attaches a rejection handler toimport('../lib/pane-manager/terminal-inline-image-addon'), degrading to aconsole.warninstead of an unhandled rejection when the loader chunk fails to load. The renderer entry (main.tsx) needs no equivalent because it uses a static import andprimeTerminalInlineImageAddonalready absorbs its own failure internally.
Both changes are correct and consistent with the existing loader patterns.
DeepSeek Pro (free via Pullfrog for OSS) | 𝕏
|
For the record, this overlaps with #11706 (opened 2026-07-31, now conflicting with
Happy to fold anything from #11706 in, or to close this one if the maintainers prefer to land that branch. |
|
@AmethystLiang @nwparker @OrcaWin — would one of you be up for taking a look at this when you get a chance? Tagging you three since you triaged the related tickets (#13336 → #11668 dup, #18414 "looking into it") and #11706's review request. Where it stands:
If you'd rather land #11706 or an internal version instead, that's fine too — just say so and I'll close this one. Thanks! |
…addon-image The embedded terminal parsed no image protocol, so yazi/chafa/timg fell back to block art and agents that emit screenshots (pi, Kimi, OpenCode) left a blank gap. Load the xterm.js-org image addon after open(), deferred off the boot chunk like the WebGL addon, with a 64 MB FIFO storage cap; dispose it with the pane and drop an in-flight load for a pane closed meanwhile. Expose the addon on the public pane view so callers can read decoded images by buffer cell. Fixes stablyai#11668 Refs stablyai#13336, stablyai#18414, stablyai#18481, stablyai#6880 Co-Authored-By: Claude Fable 5.1 <[email protected]>
…ublic pane view Review follow-ups: the addon hooks the parser, so an image sequence parsed before it attaches is lost. Prime the chunk right after first render in both renderer entries (like the WebGL addon) so the first pane attaches synchronously from the memoised constructor. Expose imageAddon on the public pane view through a getter so a view retained before the attach observes it. Co-Authored-By: Claude Fable 5.1 <[email protected]>
…; document DA1 ordering Co-Authored-By: Claude Fable 5.1 <[email protected]>
efee875 to
23066c0
Compare
|
Note GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer. |
Add opt-in inline terminal images (SIXEL, iTerm2 IIP, Kitty graphics) through @xterm/addon-image, designed to keep idle terminals unaffected. Performance: - The addon (base64-inlined wasm decoders + protocol handlers) loads off the boot critical path via a deferred loader that mirrors the WebGL addon: primed after first paint only when the setting is on, read back synchronously at attach, with a 3-attempt cap so a transient failure never disables images for the session and a missing chunk never refetches per pane. renderer-boot-graph guards against eager import. - enableSizeReports:false so the addon never sets windowOptions and double-answers Orca's own CSI 14t/16t responder. - Perf-tuned decode/storage limits (storageLimit, sixel/iip/kitty size caps) in one place. Correctness: - Orca's DA1 handler wins over the addon's (last-registered-first), and the default DA1 response never advertised Sixel (;4), so DA1-detecting tools (chafa, img2sixel, viu, timg) never emitted it. The winning handler now appends ;4 while the setting is on, resolved per query so a live toggle changes the next DA1; idempotent against the ConPTY response that already lists it. - ORCA_IMAGE_PROTOCOL=kitty is exported to spawned shells (local, daemon, relay/SSH) and forwarded across the WSL boundary, so image-capable agents can pick an encoder. Unknown image sequences are swallowed by xterm when the addon is detached, so this never garbles output. - Settings toggle (default on) gates rendering and DA1 advertisement. Cross-checked against community PRs #7775, #11706, and #19201 at the end; credited below. Co-authored-by: s546126 <[email protected]> Co-authored-by: XRX193 <[email protected]> Co-authored-by: lmsh7 <[email protected]>
Add opt-in inline terminal images (SIXEL, iTerm2 IIP, Kitty graphics) through @xterm/addon-image, designed to keep idle terminals unaffected. Performance: - The addon (base64-inlined wasm decoders + protocol handlers) loads off the boot critical path via a deferred loader that mirrors the WebGL addon: primed after first paint only when the setting is on, read back synchronously at attach, with a 3-attempt cap so a transient failure never disables images for the session and a missing chunk never refetches per pane. renderer-boot-graph guards against eager import. - enableSizeReports:false so the addon never sets windowOptions and double-answers Orca's own CSI 14t/16t responder. - Perf-tuned decode/storage limits (storageLimit, sixel/iip/kitty size caps) in one place. Correctness: - Orca's DA1 handler wins over the addon's (last-registered-first), and the default DA1 response never advertised Sixel (;4), so DA1-detecting tools (chafa, img2sixel, viu, timg) never emitted it. The winning handler now appends ;4 while the setting is on, resolved per query so a live toggle changes the next DA1; idempotent against the ConPTY response that already lists it. - ORCA_IMAGE_PROTOCOL=kitty is exported to spawned shells (local, daemon, relay/SSH) and forwarded across the WSL boundary, so image-capable agents can pick an encoder. Unknown image sequences are swallowed by xterm when the addon is detached, so this never garbles output. - Settings toggle (default on) gates rendering and DA1 advertisement. Cross-checked against community PRs #7775, #11706, and #19201 at the end; credited below. Co-authored-by: s546126 <[email protected]> Co-authored-by: XRX193 <[email protected]> Co-authored-by: lmsh7 <[email protected]>
Add opt-in inline terminal images (SIXEL, iTerm2 IIP, Kitty graphics) through @xterm/addon-image, designed to keep idle terminals unaffected. Performance: - The addon (base64-inlined wasm decoders + protocol handlers) loads off the boot critical path via a deferred loader that mirrors the WebGL addon: primed after first paint only when the setting is on, read back synchronously at attach, with a 3-attempt cap so a transient failure never disables images for the session and a missing chunk never refetches per pane. renderer-boot-graph guards against eager import. - enableSizeReports:false so the addon never sets windowOptions and double-answers Orca's own CSI 14t/16t responder. - Perf-tuned decode/storage limits (storageLimit, sixel/iip/kitty size caps) in one place. Correctness: - Orca's DA1 handler wins over the addon's (last-registered-first), and the default DA1 response never advertised Sixel (;4), so DA1-detecting tools (chafa, img2sixel, viu, timg) never emitted it. The winning handler now appends ;4 while the setting is on, resolved per query so a live toggle changes the next DA1; idempotent against the ConPTY response that already lists it. - ORCA_IMAGE_PROTOCOL=kitty is exported to spawned shells (local, daemon, relay/SSH) and forwarded across the WSL boundary, so image-capable agents can pick an encoder. Unknown image sequences are swallowed by xterm when the addon is detached, so this never garbles output. - Settings toggle (default on) gates rendering and DA1 advertisement. Cross-checked against community PRs #7775, #11706, and #19201 at the end; credited below. Co-authored-by: s546126 <[email protected]> Co-authored-by: XRX193 <[email protected]> Co-authored-by: lmsh7 <[email protected]>
Add opt-in inline terminal images (SIXEL, iTerm2 IIP, Kitty graphics) through @xterm/addon-image, designed to keep idle terminals unaffected. Performance: - The addon (base64-inlined wasm decoders + protocol handlers) loads off the boot critical path via a deferred loader that mirrors the WebGL addon: primed after first paint only when the setting is on, read back synchronously at attach, with a 3-attempt cap so a transient failure never disables images for the session and a missing chunk never refetches per pane. renderer-boot-graph guards against eager import. - enableSizeReports:false so the addon never sets windowOptions and double-answers Orca's own CSI 14t/16t responder. - Perf-tuned decode/storage limits (storageLimit, sixel/iip/kitty size caps) in one place. Correctness: - Orca's DA1 handler wins over the addon's (last-registered-first), and the default DA1 response never advertised Sixel (;4), so DA1-detecting tools (chafa, img2sixel, viu, timg) never emitted it. The winning handler now appends ;4 while the setting is on, resolved per query so a live toggle changes the next DA1; idempotent against the ConPTY response that already lists it. - ORCA_IMAGE_PROTOCOL=kitty is exported to spawned shells (local, daemon, relay/SSH) and forwarded across the WSL boundary, so image-capable agents can pick an encoder. Unknown image sequences are swallowed by xterm when the addon is detached, so this never garbles output. - Settings toggle (default on) gates rendering and DA1 advertisement. Cross-checked against community PRs #7775, #11706, and #19201 at the end; credited below. Co-authored-by: s546126 <[email protected]> Co-authored-by: XRX193 <[email protected]> Co-authored-by: lmsh7 <[email protected]>
…9512) * feat(terminal): inline images via @xterm/addon-image, perf-first Add opt-in inline terminal images (SIXEL, iTerm2 IIP, Kitty graphics) through @xterm/addon-image, designed to keep idle terminals unaffected. Performance: - The addon (base64-inlined wasm decoders + protocol handlers) loads off the boot critical path via a deferred loader that mirrors the WebGL addon: primed after first paint only when the setting is on, read back synchronously at attach, with a 3-attempt cap so a transient failure never disables images for the session and a missing chunk never refetches per pane. renderer-boot-graph guards against eager import. - enableSizeReports:false so the addon never sets windowOptions and double-answers Orca's own CSI 14t/16t responder. - Perf-tuned decode/storage limits (storageLimit, sixel/iip/kitty size caps) in one place. Correctness: - Orca's DA1 handler wins over the addon's (last-registered-first), and the default DA1 response never advertised Sixel (;4), so DA1-detecting tools (chafa, img2sixel, viu, timg) never emitted it. The winning handler now appends ;4 while the setting is on, resolved per query so a live toggle changes the next DA1; idempotent against the ConPTY response that already lists it. - ORCA_IMAGE_PROTOCOL=kitty is exported to spawned shells (local, daemon, relay/SSH) and forwarded across the WSL boundary, so image-capable agents can pick an encoder. Unknown image sequences are swallowed by xterm when the addon is detached, so this never garbles output. - Settings toggle (default on) gates rendering and DA1 advertisement. Cross-checked against community PRs #7775, #11706, and #19201 at the end; credited below. Co-authored-by: s546126 <[email protected]> Co-authored-by: XRX193 <[email protected]> Co-authored-by: lmsh7 <[email protected]> * fix(terminal): bound inline image memory and classify Kitty replies * fix(terminal): bound image decode and release image resources on cleanup * fix(terminal): address image addon review feedback * test(terminal): stub setPaneInlineImagesEnabled in appearance manager fakes * fix(terminal): evict unplaced kitty payloads before displayed images Byte-budget eviction dropped the oldest transmitted blob regardless of placement, so a new upload could erase a visible image while abandoned blobs still held budget. Unplaced payloads now go first and displayed ones only when that is not enough. The incoming image is always stored, so an oversized one overshoots the cap by one payload instead of being dropped after the protocol already acked OK. * fix(terminal): gate DA1 Sixel on real addon attachment; claim SSH image spec in CI - DA1 advertised Sixel from the setting alone, so a pane whose lazy addon chunk was still loading (or had failed all three attempts) told feature-detecting tools to emit DCS that nothing could render. Track the attached decoder per terminal and require it before setting the ;4 bit. - tests/e2e/terminal-inline-images-ssh.spec.ts was Docker-gated but claimed by no lane runner, so pr-e2e-gate-contract failed and the spec would have self-skipped green forever. - Reject non-positive PNG IHDR dimensions before decode: they are parsed with signed shifts, so a dimension >= 0x80000000 came back negative and slipped past the pixel-limit comparison. - One resolveTerminalInlineImagesEnabled() for the default-on setting; the four call sites mixed '?? true' with '!== false', which disagree on null. - One readInlineImageResources() walk of the addon internals instead of two copies that could drift against the patched dependency. - Isolate the deferred-attach drain per pane; make the zoom-invariance and backing-storage e2e assertions fail when the feature is dead. * refactor(terminal): one lazy xterm addon loader for webgl and image terminal-image-addon-loader was a structural clone of the webgl one — same memo, attempt cap, and .then(ok,err)-clears-memo recovery. Both now wrap createLazyXtermAddonLoader; each keeps its literal import() specifier so the bundler still splits the chunk (verified against a fresh build: addon-image stays out of the boot graph). * refactor(terminal): name openTerminal's addon flags; pin image addon limits Two adjacent optional booleans could be swapped without a type error once inline images added the second one. * docs(terminal): state the real per-pane image ceiling; drop test ordering dependency storageLimit:32 reads like the pane's budget but keys three pools — decoded pixels, retained encoded Kitty blobs, and pending WASM decoders — so the worst case is ~98 MB per pane with no cross-pane governor. Say so at the constant. pane-inline-images.test.ts's deferred case needed to run first; it now takes a fresh module instead, and the rest prime in beforeAll. Verified by running the file with that test moved last. * fix(terminal): satisfy rebased static analysis gate * fix(terminal): complete casting gate cleanup * fix(terminal): recover failed image addon loads * fix(terminal): bound image decoder allocations --------- Co-authored-by: m4air <[email protected]> Co-authored-by: s546126 <[email protected]> Co-authored-by: XRX193 <[email protected]> Co-authored-by: lmsh7 <[email protected]> Co-authored-by: Neil <[email protected]> Co-authored-by: Neil <[email protected]>
|
Closing as superseded by merged PR #19512, which incorporates the @xterm/addon-image approach with deferred loading, remote transport coverage, and bounded image resources. |

ELI5
Programs running inside Orca's terminal can now show pictures. When a tool like yazi, chafa, timg, or a coding agent (pi, Kimi, OpenCode) prints an image using the standard terminal image sequences, Orca draws the image in the terminal instead of leaving a blank gap.
What Changed
@xterm/addon-image(the xterm.js-org addon,0.10.0-beta.300, whose peer range is exactly the@xterm/xterm 6.1.0-beta.303Orca already ships). It handles SIXEL and the iTerm2 inline image protocol (OSC 1337), plus part of the kitty graphics protocol.\x1b[?62;4;9;22c, advertising SIXEL), but xterm dispatches CSI handlers most-recently-registered first and Orca installs its own DA1 responder (installTerminalCapabilityReplyHandlers, with the replay guard and ConPTY variant) at PTY connect, afteropenTerminalattached the addon — so Orca's\x1b[?1;2ckeeps winning (verified against@xterm/headless). Consequence: TUIs that autodetect SIXEL purely from DA1 (yazi, chafa) still see no SIXEL flag in this PR; IIP/kitty emitters (pi, Kimi, OpenCode, OMP with a forced protocol) and explicitly configured SIXEL work. Advertising SIXEL means updating every DA1 responder and reply-echo filter (renderer, daemon startup, ConPTY) coherently, which is a follow-up.terminal-inline-image-addon.tsloads the addon with a dynamicimport()so the ~80 KB chunk stays off the boot path (same reasoning as the WebGL addon loader). The constructor is memoised, so only the first pane pays the async hop; later panes attach synchronously. A failed chunk load is warned and not memoised, so one transient failure does not disable images for the session.openTerminalattaches it afterterminal.open();disposePanedisposes it. A pane closed while the chunk is still loading bumps a token so the late resolve is dropped instead of loading into a disposed terminal.ManagedPane(public view) exposesimageAddonso callers and probes can read decoded images by buffer cell viagetImageAtBufferCell.Not in this PR (follow-ups): advertising SIXEL in DA1 (see above); a settings toggle to turn images off (as #13336 suggested, mirroring the GPU/ligature precedent); image persistence across remote reattach, because
@xterm/addon-serializedoes not serialise images, so a paired remote terminal restored from a snapshot shows the placeholder for images received before the reattach.Why
Fixes the most-requested terminal gap on the tracker: #11668 (pi / Kimi inline images), with #13336 (yazi / chafa detection, closed as duplicate), #18414 (broken image rendering vs Ghostty), #18481 (SSH remote images) and #6880 (capability detection) all describing the same missing feature. Every image-capable TUI already speaks SIXEL or IIP, and the xterm.js org maintains a first-party addon for exactly this, so adopting it is far cheaper and safer than a bespoke decoder.
Linked Issue
Fixes #11668
Refs #13336, #18414, #18481, #6880
Visual Proof
Same script (
node print-inline-image.js, which writes an OSC 1337 sequence with a PNG) run in the embedded terminal.Before (main): the sequence is silently consumed, nothing is drawn.
After (this branch): the image renders inline at the requested cell size and the cursor advances past it.
Testing
pnpm typecheck,pnpm exec oxlint src tests,audit:code-quality:*,check:*-ratchet,check:reliability-gates— pass (the only typecheck errors are the two pre-existing duplicate-key errors insrc/main/agent-hooks/first-work-branch-rename.test.tson main).vitest run src/renderer/src/lib/pane-manager src/renderer/src/components/terminal-pane— 5075 passed.New unit spec
terminal-inline-image-addon.test.ts: lazy load + memoised reuse, dispose-before-load drops the late attach, dispose clears the addon, idempotent attach, failed chunk load warns and allows retry.New e2e spec
tests/e2e/terminal-inline-image.spec.ts(electron-headless): builds a 16×16 PNG in-test, prints it through the PTY vianodeTerminalCommand(no printf, so it runs on Windows shells too), then asserts every cell of the 8×4 image area resolves throughgetImageAtBufferCelland reads back the red pixel. Passes locally on macOS (Apple Silicon).Platforms actually tested: macOS 26 (arm64). Linux/Windows: no platform-specific code paths, the addon is pure renderer-side JS on top of xterm.js; CI e2e should cover.
Remote/SSH: rendering happens in the renderer on the received byte stream, so remote shells get images too ([Feature]: Inline images in desktop terminal for SSH remote shells (Windows frontend shows [Image #1] placeholder) #18481). Reattach from a serialised snapshot loses images received earlier (placeholder), see "Not in this PR".
I manually tested these changes locally
Automated tests added/updated, or explained why not below
AI Disclosure
Implemented with Claude Code (Claude Fable 5.1); the author reviewed, ran the checks, and captured the screenshots.
Review
Agent review summary:
process.platformbranches, no paths; the addon is renderer-only JS on top of xterm.js and the e2e usesnodeTerminalCommandso it does not rely onprintf.@xterm/addon-serializeoutput, so snapshot-based reattach shows a placeholder.storageLimit: 64MB FIFO plus the addon'spixelLimit(16 M px) decode guard.enableSizeReportsstays at the addon default soCSI 14/16/18 tsize queries answer, which image TUIs need for layout.Image/canvas path and SIXEL via its own decoder; no file download support (IIPinline=0is ignored), no network.Agent skill upstream boundary
docs/reference/agent-skill-sharing-upstream-boundary.mdand copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.Notes
pnpm-lock.yamlgains only the@xterm/addon-imageentry.0.10.0-beta.300was published 2026-08-24, clearing the workspace's 3-dayminimumReleaseAge.Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)Author X handle: N/A
🤖 Generated with Claude Code