Repository navigation
Conversation
Greptile SummaryThis PR adds inline image support to Orca's terminal panes by integrating the official
Confidence Score: 5/5Safe to merge. Changes are renderer-only and additive: a new xterm addon is instantiated per pane with explicit memory bounds and disposed on pane close, and an environment variable is injected into all three PTY spawn paths to advertise capability to TUIs. All three PTY spawn paths are consistently updated. The ImageAddon follows the same creation/load/dispose lifecycle pattern as every other addon in the codebase. Memory is bounded at multiple layers (per-image payload cap, pixel limit, per-pane FIFO storage cap). SIXEL is explicitly disabled. Test coverage verifies the constructor options, load order, and disposal. No IPC, authentication, filesystem, or network code was touched. Files Needing Attention: No files require special attention.
|
| Filename | Overview |
|---|---|
| src/renderer/src/lib/pane-manager/pane-dom-creation.ts | Adds ImageAddon instantiation with bounded options (8 MB payload cap, 4 MP pixels, 16 MB storage, FIFO eviction). SIXEL is explicitly disabled. The addon is always created and assigned to the pane object. |
| src/renderer/src/lib/pane-manager/pane-lifecycle.ts | Loads imageAddon after terminal.open() and before WebGL attachment (consistent with other addon ordering). Disposes it in disposePane() using the same try/catch pattern as all other addons. |
| src/renderer/src/lib/pane-manager/pane-manager-types.ts | Adds optional imageAddon?: ImageAddon to ManagedPaneInternal. Not surfaced on the public ManagedPane type, consistent with webglAddon and ligaturesAddon. |
| src/main/providers/local-pty-provider.ts | Adds ORCA_IMAGE_PROTOCOL: 'kitty' to the PTY spawn environment. Consistent with the other two spawn paths. |
| src/main/daemon/pty-subprocess.ts | Adds ORCA_IMAGE_PROTOCOL: 'kitty' to the daemon subprocess environment, advertising Kitty graphics capability to TUIs running under the daemon path. |
| src/relay/pty-handler.ts | Adds ORCA_IMAGE_PROTOCOL: 'kitty' to the relay PTY spawn environment, completing the three-path coverage for the environment variable advertisement. |
| src/renderer/src/lib/pane-manager/pane-lifecycle.test.ts | New test verifies loadAddon:image is called during openTerminal and that imageAddon.dispose() is called exactly once on pane disposal. |
| src/renderer/src/lib/pane-manager/pane-dom-creation.test.ts | New test verifies that all ImageAddon constructor options match the intended bounds (pixelLimit, storageLimit, size caps, sixelSupport: false, iipSupport: true, kittySupport: true). |
Sequence Diagram
sequenceDiagram
participant Shell as Shell / TUI
participant PTY as PTY Provider
participant Renderer as Renderer createPaneDOM
participant xterm as xterm.js Terminal
participant ImageAddon as ImageAddon
PTY->>Shell: "spawn(env: {ORCA_IMAGE_PROTOCOL: 'kitty', ...})"
Note over Shell: TUI detects Kitty graphics support
Renderer->>ImageAddon: "new ImageAddon({pixelLimit, storageLimit, kittySizeLimit, iipSizeLimit, ...})"
Renderer->>xterm: new Terminal(opts)
Renderer->>xterm: terminal.open(xtermContainer)
Renderer->>xterm: loadAddon(fitAddon)
Renderer->>xterm: loadAddon(imageAddon)
Renderer->>xterm: loadAddon(searchAddon, ...)
Renderer->>xterm: attachWebgl(pane)
Shell-->>xterm: Kitty / iTerm2 image escape sequences
xterm->>ImageAddon: decode and render (RGBA canvas overlay)
Note over ImageAddon: Bounded: 8MB payload, 4MP pixels, 16MB/pane FIFO
Note over Renderer: On pane close
Renderer->>ImageAddon: imageAddon.dispose()
Renderer->>xterm: terminal.dispose()
Reviews (2): Last reviewed commit: "fix(terminal): advertise inline image ca..." | Re-trigger Greptile
|
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: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (12)
🚧 Files skipped from review as they are similar to previous changes (12)
📝 WalkthroughWalkthroughAdds Merge Risk: ⚪ Minimal · up to This change adds inline image support with bounded payloads, decoded image sizes, retained storage, and pane cleanup; no actionable merge-blocking risk remains after normal checks and review. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 Checkov (3.3.9)package.jsonCheckov timed out on this file 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 |
|
thanks for the PR. will review it. since it touches terminal, it will have a longer review time as we ensure it doesn't cause any functionality or performance regression for the terminal |
|
@coderabbitai review The linked-issue compatibility warning now has verified client follow-ups: MoonshotAI/kimi-code#2454 is open with 716/716 |
|
✅ Action performedReview finished.
|
…-images # Conflicts: # pnpm-lock.yaml
|
Thanks for working on this. This PR would directly unblock an important part of my Orca workflow. I use Orca on both Windows and macOS for coding-agent sessions, where screenshots, generated assets, and UI/debugging output need to be reviewed inline. I’d be happy to test a build of this branch on both platforms, including image sizing, scrolling, repeated image output, and pane lifecycle behavior, if that would help move the review forward. |
|
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. |
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
src/main/providers/local-pty-provider.ts (1)
671-681: 🗄️ Data Integrity & Integration | 🟠 MajorPreserve the Kitty image protocol contract across PTY builders.
ORCA_IMAGE_PROTOCOL=kittyis not immutable in the current builders: caller/env hook values can replace it. Local, relay, and daemon PTYs should either reapply this marker after every environment hook or reject overrides for this key.
[low_effort_andhigh_reward]
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 4a7a4031-5ae8-49e0-a308-0a8d83c1a584
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (12)
package.jsonsrc/main/daemon/pty-subprocess.test.tssrc/main/daemon/pty-subprocess.tssrc/main/providers/local-pty-provider.test.tssrc/main/providers/local-pty-provider.tssrc/relay/pty-handler.test.tssrc/relay/pty-handler.tssrc/renderer/src/lib/pane-manager/pane-dom-creation.test.tssrc/renderer/src/lib/pane-manager/pane-dom-creation.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.ts
🚧 Files skipped from review as they are similar to previous changes (6)
- src/renderer/src/lib/pane-manager/pane-dom-creation.ts
- src/renderer/src/lib/pane-manager/pane-lifecycle.test.ts
- package.json
- src/renderer/src/lib/pane-manager/pane-manager-types.ts
- src/renderer/src/lib/pane-manager/pane-dom-creation.test.ts
- src/renderer/src/lib/pane-manager/pane-lifecycle.ts
|
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. |
|
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 <s546126@users.noreply.github.com> Co-authored-by: XRX193 <XRX193@users.noreply.github.com> Co-authored-by: lmsh7 <lmsh7@users.noreply.github.com>
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 <s546126@users.noreply.github.com> Co-authored-by: XRX193 <XRX193@users.noreply.github.com> Co-authored-by: lmsh7 <lmsh7@users.noreply.github.com>
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 <s546126@users.noreply.github.com> Co-authored-by: XRX193 <XRX193@users.noreply.github.com> Co-authored-by: lmsh7 <lmsh7@users.noreply.github.com>
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 <s546126@users.noreply.github.com> Co-authored-by: XRX193 <XRX193@users.noreply.github.com> Co-authored-by: lmsh7 <lmsh7@users.noreply.github.com>
…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 <s546126@users.noreply.github.com> Co-authored-by: XRX193 <XRX193@users.noreply.github.com> Co-authored-by: lmsh7 <lmsh7@users.noreply.github.com> * 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 <m4air@m4airs-MacBook-Air.local> Co-authored-by: s546126 <s546126@users.noreply.github.com> Co-authored-by: XRX193 <XRX193@users.noreply.github.com> Co-authored-by: lmsh7 <lmsh7@users.noreply.github.com> Co-authored-by: Neil <4138956+nwparker@users.noreply.github.com> Co-authored-by: Neil <neil@stably.ai>
|
Closing as superseded by merged PR #19512, which incorporates the inline image support and environment signaling from this work with broader protocol and lifecycle coverage. |
## Summary Treat `TERM_PROGRAM=Orca` as Kitty-image capable in `pi-tui`'s terminal capability detection, so image components render inline instead of falling back to text when running inside Orca. - Recognize Orca as supporting Kitty inline images, true color, and OSC 8 hyperlinks. - Preserve the existing tmux and screen precedence guards. - Gate images on Orca's capability advertisement: require both `TERM_PROGRAM=Orca` and Orca's `ORCA_IMAGE_PROTOCOL=kitty` signal before enabling Kitty output, so existing Orca releases that do not yet advertise image support safely keep the text fallback. - Add a regression test and the package/CLI changesets. ## Related - Requested by maintainer approval in [#7357](#7357) (lgtm). - Depends on the Orca-side capability advertisement, which has landed: [stablyai/orca#19512](stablyai/orca#19512) (merged 2026-09-18, `09073086a8`) exports `ORCA_IMAGE_PROTOCOL=kitty` on the daemon, local, and relay PTY paths, and forwards it across the WSL boundary. Supersedes [stablyai/orca#11706](stablyai/orca#11706), which was closed in favor of #19512. ## Testing - `pnpm --filter @moonshot-ai/pi-tui test` — focused regression suite passes. - `pnpm --filter @moonshot-ai/pi-tui typecheck` — passes.
…s#9329) ## Summary Treat `TERM_PROGRAM=Orca` as Kitty-image capable in `pi-tui`'s terminal capability detection, so image components render inline instead of falling back to text when running inside Orca. - Recognize Orca as supporting Kitty inline images, true color, and OSC 8 hyperlinks. - Preserve the existing tmux and screen precedence guards. - Gate images on Orca's capability advertisement: require both `TERM_PROGRAM=Orca` and Orca's `ORCA_IMAGE_PROTOCOL=kitty` signal before enabling Kitty output, so existing Orca releases that do not yet advertise image support safely keep the text fallback. - Add a regression test and the package/CLI changesets. ## Related - Requested by maintainer approval in [earendil-works#7357](earendil-works#7357) (lgtm). - Depends on the Orca-side capability advertisement, which has landed: [stablyai/orca#19512](stablyai/orca#19512) (merged 2026-09-18, `09073086a8`) exports `ORCA_IMAGE_PROTOCOL=kitty` on the daemon, local, and relay PTY paths, and forwards it across the WSL boundary. Supersedes [stablyai/orca#11706](stablyai/orca#11706), which was closed in favor of #19512. ## Testing - `pnpm --filter @moonshot-ai/pi-tui test` — focused regression suite passes. - `pnpm --filter @moonshot-ai/pi-tui typecheck` — passes. (cherry picked from commit f09d01b)
…endil-works/pi#9329) ## Summary Treat `TERM_PROGRAM=Orca` as Kitty-image capable in `pi-tui`'s terminal capability detection, so image components render inline instead of falling back to text when running inside Orca. - Recognize Orca as supporting Kitty inline images, true color, and OSC 8 hyperlinks. - Preserve the existing tmux and screen precedence guards. - Gate images on Orca's capability advertisement: require both `TERM_PROGRAM=Orca` and Orca's `ORCA_IMAGE_PROTOCOL=kitty` signal before enabling Kitty output, so existing Orca releases that do not yet advertise image support safely keep the text fallback. - Add a regression test and the package/CLI changesets. ## Related - Requested by maintainer approval in [earendil-works/pi#7357](earendil-works/pi#7357) (lgtm). - Depends on the Orca-side capability advertisement, which has landed: [stablyai/orca#19512](stablyai/orca#19512) (merged 2026-09-18, `09073086a8`) exports `ORCA_IMAGE_PROTOCOL=kitty` on the daemon, local, and relay PTY paths, and forwards it across the WSL boundary. Supersedes [stablyai/orca#11706](stablyai/orca#11706), which was closed in favor of badlogic/pi-mono#19512. ## Testing - `pnpm --filter @moonshot-ai/pi-tui test` — focused regression suite passes. - `pnpm --filter @moonshot-ai/pi-tui typecheck` — passes. (cherry picked from commit f09d01b85e0384647fcab6779d35ab9dabe04be3) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…s#9329) ## Summary Treat `TERM_PROGRAM=Orca` as Kitty-image capable in `pi-tui`'s terminal capability detection, so image components render inline instead of falling back to text when running inside Orca. - Recognize Orca as supporting Kitty inline images, true color, and OSC 8 hyperlinks. - Preserve the existing tmux and screen precedence guards. - Gate images on Orca's capability advertisement: require both `TERM_PROGRAM=Orca` and Orca's `ORCA_IMAGE_PROTOCOL=kitty` signal before enabling Kitty output, so existing Orca releases that do not yet advertise image support safely keep the text fallback. - Add a regression test and the package/CLI changesets. ## Related - Requested by maintainer approval in [earendil-works#7357](earendil-works#7357) (lgtm). - Depends on the Orca-side capability advertisement, which has landed: [stablyai/orca#19512](stablyai/orca#19512) (merged 2026-09-18, `09073086a8`) exports `ORCA_IMAGE_PROTOCOL=kitty` on the daemon, local, and relay PTY paths, and forwards it across the WSL boundary. Supersedes [stablyai/orca#11706](stablyai/orca#11706), which was closed in favor of #19512. ## Testing - `pnpm --filter @moonshot-ai/pi-tui test` — focused regression suite passes. - `pnpm --filter @moonshot-ai/pi-tui typecheck` — passes.
Summary
Fixes #11668.
Screenshots
Not included. This change renders protocol output inside the existing terminal surface; the Electron renderer bundle and addon lifecycle are covered below, but the current Pi/Kimi releases do not emit image sequences for
TERM_PROGRAM=Orcayet (see Notes).Testing
pnpm lint- code-quality, type-aware, reliability, and max-lines gates passed; the command stopped on pre-existing stale generated skill manifests.pnpm typecheckpnpm test- 36/36 focused tests passed. The full suite hit the 15-minute limit with unrelated environment failures (restricted Electron download/network access, unavailable WSL, and denied system-directory writes).pnpm build-pnpm build:electron-vitepassed; native/release targets were not run.AI Review Report
Reviewed addon ownership, activation order, pane disposal, memory pressure, protocol scope, renderer bundling, and the capability negotiation used by Pi Code and Kimi Code. The review rejected globally spoofing Kitty/Ghostty environment variables because they could enable unrelated terminal-specific behavior. Instead, Orca keeps its existing
TERM_PROGRAM=Orcaidentity and the client allowlists need a small compatibility follow-up.Cross-platform review covered macOS, Linux, and Windows. This PR is renderer-only and adds no shortcut, label, path, shell, PTY-provider, or Electron platform branch. Local, SSH, WSL, and relay terminals all feed the same pane renderer, so protocol parsing is shared across execution hosts.
Security Audit
Terminal output is untrusted input. The addon is the official xterm implementation rather than a custom decoder, SIXEL is disabled because it is outside this issue, sequence payloads are capped at 8 MB, decoded images at roughly 4 million pixels, and retained storage at 16 MB per pane with FIFO eviction. Image storage is explicitly disposed when a pane closes.
No command execution, filesystem path handling, IPC, authentication, credentials, secrets, or network requests were added.
Notes
Orca keeps its existing
TERM_PROGRAM=Orcaidentity and does not setKITTY_WINDOW_IDor impersonate another terminal. Client-side compatibility is tracked by verified follow-ups:pi-tuisuite passes 716/716 tests and type-checks.pi-tuibuild pass. A PR will be opened after the required maintainerlgtm.