Repository navigation
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: 📥 CommitsReviewing files that changed from the base of the PR and between fbe94ce and 678da10298e2bc4fa5608ff8bd9cf315d54c671f. ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (21)
🚧 Files skipped from review as they are similar to previous changes (19)
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughThis pull request adds Merge Risk: 🔵 Low · up to Inline image support is enabled by default in live terminal panes, allowing terminal output to invoke additional image parsing, including alpha Kitty support. The change is mergeable with owner awareness because malformed or unusually heavy image streams could increase renderer resource or stability risk, although no specific exploitable defect is identified. 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
Full details: Description checkExplanation The description explains the feature, rationale, implementation details, limitation, review status, and automated testing. However, it omits the required linked issue and visual proof section, and manual smoke testing remains pending. Resolution Add a valid issue reference under a Linked Issue section, such as Full details: Docstring CoverageExplanation Docstring coverage is 5.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 20 functions across 20 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: Pro
Run ID: 01cbf973-c1c9-422d-bcbb-728bf6bd844e
📥 Commits
Reviewing files that changed from the base of the PR and between a09a00f and f23eadfa52264c70eeb11d800c0c0eabacc748ec.
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (20)
package.jsonsrc/renderer/src/components/settings/TerminalSettingsPreview.tsxsrc/renderer/src/lib/pane-manager/pane-container-listener-lifecycle.test.tssrc/renderer/src/lib/pane-manager/pane-dom-creation.tssrc/renderer/src/lib/pane-manager/pane-drag-reorder.test.tssrc/renderer/src/lib/pane-manager/pane-drop-no-op.test.tssrc/renderer/src/lib/pane-manager/pane-fit-resize-observer.test.tssrc/renderer/src/lib/pane-manager/pane-initial-fit-lifecycle.test.tssrc/renderer/src/lib/pane-manager/pane-lifecycle.test.tssrc/renderer/src/lib/pane-manager/pane-lifecycle.tssrc/renderer/src/lib/pane-manager/pane-manager-types.tssrc/renderer/src/lib/pane-manager/pane-reveal-repaint.test.tssrc/renderer/src/lib/pane-manager/pane-split-close.test.tssrc/renderer/src/lib/pane-manager/pane-split-scroll.test.tssrc/renderer/src/lib/pane-manager/pane-terminal-gpu-acceleration.test.tssrc/renderer/src/lib/pane-manager/pane-tree-ops.test.tssrc/renderer/src/lib/pane-manager/pane-tree-reparent-frame.test.tssrc/renderer/src/lib/pane-manager/pane-webgl-context-recovery.test.tssrc/renderer/src/lib/pane-manager/pane-webgl-refresh-lifecycle.test.tssrc/renderer/src/lib/pane-manager/pane-webgl-renderer.test.ts
| // Why: image addon for protocol parity with live panes. | ||
| try { | ||
| const imgAddon = new ImageAddon({ | ||
| enableSizeReports: false, | ||
| sixelSupport: true, | ||
| sixelScrolling: true, | ||
| iipSupport: true, | ||
| kittySupport: true, | ||
| storageLimit: 16, | ||
| showPlaceholder: true | ||
| }) | ||
| terminal.loadAddon(imgAddon) | ||
| imageAddonRef.current = imgAddon | ||
| } catch (err) { | ||
| console.warn('[settings preview] image addon failed to attach', err) | ||
| } |
There was a problem hiding this comment.
🩺 Stability & Availability | 🟡 Minor | ⚡ Quick win
Dispose imgAddon on loadAddon failure for consistency with the ligatures pattern.
If new ImageAddon(...) succeeds but terminal.loadAddon(imgAddon) throws, the addon instance is not disposed — the ligatures addon handler at lines 286–289 calls addon.dispose() in its catch block. Follow the same pattern here to avoid a potential resource leak and keep the two addon attachment paths consistent.
🛡️ Proposed fix
try {
const imgAddon = new ImageAddon({
enableSizeReports: false,
sixelSupport: true,
sixelScrolling: true,
iipSupport: true,
kittySupport: true,
storageLimit: 16,
showPlaceholder: true
})
- terminal.loadAddon(imgAddon)
- imageAddonRef.current = imgAddon
+ try {
+ terminal.loadAddon(imgAddon)
+ imageAddonRef.current = imgAddon
+ } catch (loadErr) {
+ imgAddon.dispose()
+ throw loadErr
+ }
} catch (err) {
console.warn('[settings preview] image addon failed to attach', err)
}📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| // Why: image addon for protocol parity with live panes. | |
| try { | |
| const imgAddon = new ImageAddon({ | |
| enableSizeReports: false, | |
| sixelSupport: true, | |
| sixelScrolling: true, | |
| iipSupport: true, | |
| kittySupport: true, | |
| storageLimit: 16, | |
| showPlaceholder: true | |
| }) | |
| terminal.loadAddon(imgAddon) | |
| imageAddonRef.current = imgAddon | |
| } catch (err) { | |
| console.warn('[settings preview] image addon failed to attach', err) | |
| } | |
| // Why: image addon for protocol parity with live panes. | |
| try { | |
| const imgAddon = new ImageAddon({ | |
| enableSizeReports: false, | |
| sixelSupport: true, | |
| sixelScrolling: true, | |
| iipSupport: true, | |
| kittySupport: true, | |
| storageLimit: 16, | |
| showPlaceholder: true | |
| }) | |
| try { | |
| terminal.loadAddon(imgAddon) | |
| imageAddonRef.current = imgAddon | |
| } catch (loadErr) { | |
| imgAddon.dispose() | |
| throw loadErr | |
| } | |
| } catch (err) { | |
| console.warn('[settings preview] image addon failed to attach', err) | |
| } |
There was a problem hiding this comment.
♻️ Duplicate comments (1)
src/renderer/src/lib/pane-manager/pane-lifecycle.ts (1)
56-62: 🩺 Stability & Availability | 🟠 Major | ⚡ Quick winMissing try/catch around ImageAddon construction and loading — still unaddressed.
This concern was raised in a previous review:
new ImageAddon(...)orterminal.loadAddon(...)can throw since this is a beta addon (Kitty support noted as alpha upstream). If it fails,openTerminalaborts entirely and the user gets no terminal pane. The settings preview that previously served as the comparison point has been removed, but the core risk remains — image rendering is non-essential and should degrade gracefully.🛡️ Proposed fix: wrap ImageAddon in try/catch
// Storage capped at 64MB (half default) since Orca may have many panes. - const imageAddon = new ImageAddon({ enableSizeReports: false, storageLimit: 64 }) - terminal.loadAddon(imageAddon) - pane.imageAddon = imageAddon + try { + const imageAddon = new ImageAddon({ enableSizeReports: false, storageLimit: 64 }) + terminal.loadAddon(imageAddon) + pane.imageAddon = imageAddon + } catch (err) { + console.warn('[pane] image addon failed to attach', err) + }
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: cb358114-8eec-4d33-912a-4eef5534b42c
📥 Commits
Reviewing files that changed from the base of the PR and between f23eadfa52264c70eeb11d800c0c0eabacc748ec and 71c36a055f1bd89f7b5f4738ec671884fbbdcc7c.
📒 Files selected for processing (2)
src/renderer/src/components/terminal-pane/terminal-capability-replies.tssrc/renderer/src/lib/pane-manager/pane-lifecycle.ts
71c36a0 to
97cb660
Compare
|
This is exactly the feature I’m looking for |
97cb660 to
0851150
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. |
0851150 to
37cdeb4
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. |
37cdeb4 to
fd60a83
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. |
1 similar comment
|
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. |
Greptile SummaryThe PR adds inline terminal image rendering through the xterm image addon and updates device capability negotiation to advertise SIXEL support.
Confidence Score: 4/5The PR should fix the capability mismatch before merging so panes that fail to initialize image support do not advertise SIXEL to terminal applications. Image-addon initialization is intentionally allowed to fail without aborting the pane, but DA1 negotiation still claims graphics support and can cause probing applications to emit image protocols that the surviving text-only pane cannot render. Files Needing Attention: src/renderer/src/components/terminal-pane/terminal-capability-replies.ts and src/renderer/src/lib/pane-manager/pane-lifecycle.ts
|
| Filename | Overview |
|---|---|
| src/renderer/src/lib/pane-manager/pane-lifecycle.ts | Adds best-effort ImageAddon attachment and pane-level disposal; failure isolation creates a capability-state mismatch with the unconditional DA1 response. |
| src/renderer/src/components/terminal-pane/terminal-capability-replies.ts | Changes the default DA1 identity to advertise SIXEL unconditionally, including panes where image-addon initialization failed. |
| src/renderer/src/lib/pane-manager/pane-manager-types.ts | Adds nullable ownership of the image addon to the internal pane lifecycle state. |
| src/renderer/src/lib/pane-manager/pane-image-addon-attach.test.ts | Covers successful attachment and graceful constructor/load failures, but not DA1 behavior after those failures. |
| package.json | Adds the renderer-bundled image addon using the same devDependency convention as sibling xterm addons. |
| pnpm-lock.yaml | Locks the compatible image addon package and xterm peer dependency. |
Reviews (1): Last reviewed commit: "test(terminal): use T[] for image-addon ..." | Re-trigger Greptile
| // registered after the addon's own DA1 handler and therefore pre-empts it | ||
| // (xterm dispatches CSI handlers newest-first). The reply must advertise the | ||
| // graphics support itself or sixel-probing tools (lsix, chafa) never emit. | ||
| export const DEFAULT_DA1_RESPONSE = '\x1b[?62;4;9;22c' |
There was a problem hiding this comment.
When ImageAddon construction or loading fails, the pane remains open without an image handler, but this unconditional DA1 response still advertises SIXEL support. Probing applications such as lsix or chafa then emit image sequences the pane cannot render, producing missing images or unusable terminal output instead of selecting a fallback.
Knowledge Base Used: Terminal runtime and interaction
5350592 to
9576ae4
Compare
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]>
b9418c7 to
b8fd634
Compare
…l inline images Adds @xterm/addon-image to live panes and the settings preview terminal so inline image output renders alongside existing SIXEL/IIP/Kitty escape sequences. No new settings toggle: enabled by default like other addons. Co-Authored-By: Claude Sonnet 5 <[email protected]>
…gle-voiced Review fixes for the image addon integration: - Advertise sixel in DA1: Orca's capability responder pre-empts the image addon's own DA1 handler (registered later, dispatched first), so probing tools like lsix never saw graphics support. DEFAULT_DA1_RESPONSE now reports the sixel-capable identity the addon would have sent. - Disable enableSizeReports: xterm's built-in CSI 14t/16t/18t responder duplicated Orca's existing pixel-size responder, sending two replies per query (stray-input class stablyai#7329). - Drop ImageAddon from the settings preview: PREVIEW_BUFFER contains no image sequences and stdin is disabled, so it was dead weight per mount. - Trim addon options to the two that differ in intent from upstream defaults. Co-Authored-By: Claude Fable 5 <[email protected]>
A beta addon construct/load error must not abort openTerminal. Dispose a half-attached instance and keep the text pane usable, matching WebGL/ligatures. Co-authored-by: s546126 <[email protected]>
Rebase onto current main dropped pnpm-lock.yaml; re-add @xterm/[email protected] against main's current xterm patch hash. Co-authored-by: s546126 <[email protected]>
Satisfies the typescript/array-type lint on the new attach isolation tests.
ImageAddon construct/load failures leave a text-only pane, but DA1 still claimed sixel via DEFAULT_DA1_RESPONSE. Resolve the identity from the public pane's hasImageSupport flag so probing tools fall back instead of emitting unrenderable sequences. Co-authored-by: s546126 <[email protected]>
A new main fixture landed after the previous merge-base and must include the nullable image addon field. Co-authored-by: s546126 <[email protected]>
b8fd634 to
7264d47
Compare
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 three-protocol image integration and adds coordinated loading, capability signaling, and resource limits. |
Summary
@xterm/addon-image(devDependency, matching other renderer-only xterm addons) to live terminal panes, enabling inline image rendering for SIXEL, iTerm2 IIP, and Kitty Graphics Protocol (Kitty support is alpha upstream).ESC[?62;4;9;22c) from Orca's capability responder — it pre-empts the addon's own DA1 handler (xterm dispatches CSI handlers newest-first), so without this, probing tools likelsixnever detect graphics support. Windows ConPTY identity already carried the sixel bit and is unchanged.enableSizeReportsstays off: Orca's existing pixel-size responder already answersCSI 14t/16t; enabling xterm's built-in responder would send duplicate replies (the [Bug] Remote server + terminal work #7329 stray-input class).Known limitation
Inline images are rendered client-side only. The daemon snapshot/restore path serializes text cells via
SerializeAddon, which carries no image data — so images displayed before an SSH reconnect, window reload, or cold restore do not reappear in the restored pane. Live output after reconnect renders normally. Persisting images across restores would require teaching the daemon-side emulator/history replay to retain image sequences and is left for a follow-up.Review
Multi-agent review (8 finder angles + adversarial verification) ran on the initial commit; confirmed findings fixed in 71c36a05:
DEFAULT_DA1_RESPONSE.enableSizeReports: truedouble-answeredCSI 14t/16talongside Orca's responder → set tofalse.PREVIEW_BUFFERcontains no image sequences and stdin is disabled → removed.Refuted candidates (verified safe): addon double-dispose (xterm AddonManager guards it),
openTerminalre-entry leak (each pane opens exactly once), image loss on WebGL renderer recreation (addon re-blits on the forced refresh).Test plan
pnpm typecheckpasses with zero errorspty-connection.test.ts(338),terminal-capability-replies.test.ts,pane-lifecycle.test.ts,TerminalSettingsPreview.lifecycle.test.tsx— 382 passedpane-manager/+settings/+terminal-query-reply— 128 files, 906 tests passedlsix,wezterm imgcat,kitty icatagainst a live pane🤖 Generated with Claude Code
ELI5
Terminals can show inline images (SIXEL, iTerm2, and Kitty graphics). Tools that draw charts or previews in the terminal finally render inside Orca panes.