Skip to content

fix(terminal): recover Kitty Unicode images after eviction and renderer reload - #33120

Open
JhaceLam wants to merge 18 commits into
stablyai:mainfrom
JhaceLam:codex/terminal-image-recovery
Open

JhaceLam wants to merge 18 commits into
stablyai:mainfrom
JhaceLam:codex/terminal-image-recovery

Conversation

@JhaceLam

@JhaceLam JhaceLam commented Oct 24, 2026 •

Copy link
Copy Markdown

ELI5

An image printed once by a terminal program should still be visible after Orca reloads. This restores Kitty Unicode-placeholder images from a bounded local cache without asking the running program to send them again.

What Changed

  • Retain Kitty Unicode virtual-placement metadata independently of decoded pixels and restore visible placements lazily after eviction, alternate-buffer disposal or renderer reload.
  • Persist validated snapshots by host-qualified PTY/pane, with 128 MiB overall, 32 MiB per pane, 1,024 records, seven-day retention and bounded restore/retry work.
  • Commit changed-key invalidations before image writes; preserve bounded failed-read barriers and reject stale in-flight results. Reuse the existing hide pass so image-free renders do not scan cells twice.
  • Update source/generated addon patches and focused regressions. Inherited SIXEL/iTerm2 sections are preserved; this adds no physical Kitty/SIXEL/iTerm2 replay, scaling or Claude-specific behavior.

Why

The terminal text snapshot contains placeholder cells, but those cells cannot reconstruct the image bytes. Keeping only decoded pixels in memory also makes eviction destructive. Retaining bounded encoded data and restoring only visible prototypes addresses both cases without retaining every decoded bitmap. Requiring PTY retransmission would add a replay dependency to every terminal program; the local cache lets renderer recovery work without that cooperation.

Linked Issue

Fixes #33118

Related: #23547, #30383, #32714. HiDPI scaling remains separate from this change and from #30349.

Visual Proof

Feature illustration from earlier source builds; these images are not current-SHA validation evidence. Current hidden-CDP results are listed under Testing.

Before: placeholder rows remain but the image is missing

After: the orange image is recovered after renderer reload

Testing

Unchanged exact146f standalone: four image files, 65 passed under each entry. The valid native before/after control deliberately aborts a Chromium IndexedDB transaction; actual quota exhaustion and a historical user-crash reproduction were not performed.

Exact combined source validation and retained evidence limits

Exact private combination d7dcaad8c922ac7112f192589556f7c19145b1a4 contains image 146f572, rich output a4aa01b and fixtures 3b65d5f on main 4cd62c4. Executed on macOS with Node 24.22.1 and default Bun 1.4.4.

128 related root files: 1723 passed/7 inherited conditional skip per entry; four mobile files: 77 passed. Frozen root/mobile/cloud preparation and all 16 integration commands passed, including full typecheck/lint/quality, fresh mobile-web/CLI/orcad/E2E builds, and the required five-fixture-file changed gate.

The configured official Claude Code 2.1.309 passed 207 renderer/plugin checks at this exact private SHA, separate from the related-root counts. 5 hidden Electron cases passed; all 14 fresh CDP PNGs were personally inspected and hashed. The selected owned CLI binary/version is recorded separately.

Recorded commands: pnpm tc; pnpm lint --maxWorkers=2; pnpm run test:claude-rich-output; hidden Playwright settings/image-reload specs with --project electron-headless --workers=1 --retries=0. Private delta gate: pnpm check:changed --base=b1e09c5696fa4e7221aa5fd7e19d7cb9b202e886 --maxWorkers=2 (20 checks passed, internal composition base). Public standalone reproduction commands are listed above; the earlier failed 75b9 run remains failed.

This is related/affected validation using current main's test set, including its upstream case retirements/renames. Earlier complete, failed and partial runs retain their own SHA/platform attribution.

Manual interactive desktop testing, hosted CI, native Windows/Linux execution and installer validation remain unperformed; hidden checks were automated through CDP.

AI Disclosure

AI-assisted implementation and automated validation using OpenAI Codex. The author requested these contributions.

Review

Exact published head: 146f57277ba9919e0ec71e69ffa8569c5ad8a4e6. The exact146f full AI review finished, selecting all 12 eligible files; the existing filter excludes the lockfile. No new actionable finding; the cache-invalidation thread is resolved.

Hosted workflows: PR Checks: completed/action_required, 0 jobs. Bot/local success does not replace maintainer workflow authorization or human approval.

Agent skill upstream boundary

  • Not applicable: no upstream skill-installer code or data is copied.

Notes

Independent test-fixture fixes are now in #33348. The existing SixelHandler, IIPHandler, ImageRenderer and ImageAddon sections of the checked-in source patch are byte-identical to synchronized upstream db8fc6d0cc; this PR preserves those inherited hunks and does not add SIXEL/iTerm2 recovery behavior.

This is a best-effort cache, not permanent transcript storage. Clearing application site data removes the cached images. Cache quota and IndexedDB failure preserve live rendering but can prevent subsequent recovery.

Checklist

  • Explained final scope, user impact, mechanism and motivation.
  • Automated tests added/updated; focused, static and source-build checks completed as listed.
  • Reviewed correctness, process/cache ownership, cross-platform and remote compatibility limits.
  • Upstream CI authorization/execution and native Windows/Linux installer validation.

@coderabbitai

coderabbitai Bot commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: aa6f3b20-99a2-4f33-9c4c-276359014a2d
Commits

Reviewing files that changed from the base of the PR and between 9b0170c and 146f572.

Files ignored due to path filters: 1
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
Files selected for processing: 12
  • config/patches/@xterm__addon-image@0.10.0-beta.301.patch
  • config/patches/xterm-src/@xterm__addon-image@0.10.0-beta.301.src.patch
  • config/scripts/xterm-image-kitty-placeholder-contract.test.mjs
  • config/scripts/xterm-image-kitty-placeholder-lifecycle.test.mjs
  • config/scripts/xterm-image-kitty-recovery.test.mjs
  • config/scripts/xterm-kitty-placeholder-test-terminal.mjs
  • src/renderer/src/components/terminal-pane/pty-connection/terminal-keydown-fit.ts
  • src/renderer/src/lib/pane-manager/pane-inline-images.ts
  • src/renderer/src/lib/pane-manager/terminal-kitty-replay-cache.test.ts
  • src/renderer/src/lib/pane-manager/terminal-kitty-replay-cache.ts
  • src/renderer/src/lib/pane-manager/terminal-kitty-replay-storage.ts
  • tests/e2e/terminal-kitty-image-reload.spec.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 6 remain after this review.

Walkthrough

The image addon adds bounded recovery for Kitty Unicode-placeholder images. It retains placement metadata separately from decoded pixels and can restore cached image snapshots after eviction or renderer reloads. The renderer cache uses terminal scopes and IndexedDB retention limits. The Kitty handler validates recovery results and guards against stale asynchronous decodes. The patch also updates image decoding and rendering behavior. Tests cover recovery, cache behavior, and visibility across reloads.

Priority: Normal

Severity of issue fixed: Medium

Merge Risk: Minimal · up to 146f5

The change adds a bounded local cache so Kitty Unicode-placeholder images can reappear after eviction or a renderer reload. The earlier concerns about failed cache writes exposing stale images and about extra per-render scanning are addressed at the current head. No concrete merge-blocking risk remains in the reviewed code; hosted CI and maintainer approval are still pending.

Pre-merge checks: Passed 4
Check name Status Explanation
Title check Passed The title clearly and concisely describes the main change: recovering Kitty Unicode images after eviction and renderer reload.
Linked Issues check Passed Active direct issue [#33118] requires recovery of Kitty Unicode-placeholder images without PTY retransmission. The changes retain virtual-placement metadata independently of decoded pixels, restore vi…
Out of Scope Changes check Passed The changes remain within [#33118]. Cache scope wiring, IndexedDB persistence, addon patch updates, lifecycle handling, and focused tests support Kitty Unicode-placeholder recovery. The stated scope e…
Description check Passed The pull request description follows the required template and clearly explains the user impact, implementation, motivation, linked issue, visual proof, testing, AI use, review status, scope boundarie…
Full details: Linked Issues check

Explanation

Active direct issue [#33118] requires recovery of Kitty Unicode-placeholder images without PTY retransmission. The changes retain virtual-placement metadata independently of decoded pixels, restore visible placements lazily, and persist validated image snapshots in IndexedDB by host-qualified PTY and pane. The implementation applies size, count, age, concurrency, and retry limits. It handles deletion, ID reuse, resets, failed writes, and stale asynchronous reads. Focused unit, contract, lifecycle, and end-to-end tests cover reload, eviction, alternate-buffer disposal, and stale-result prevention.

Full details: Out of Scope Changes check

Explanation

The changes remain within [#33118]. Cache scope wiring, IndexedDB persistence, addon patch updates, lifecycle handling, and focused tests support Kitty Unicode-placeholder recovery. The stated scope excludes physical Kitty replay, Sixel, iTerm2 replay, HiDPI scaling, and Claude-specific behavior. The existing Sixel and IIP sections are preserved inherited patch content and do not establish new recovery behavior.

Full details: Description check

Explanation

The pull request description follows the required template and clearly explains the user impact, implementation, motivation, linked issue, visual proof, testing, AI use, review status, scope boundaries, limitations, and checklist. It also documents unperformed hosted CI authorization and native Windows/Linux validation.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1


Review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: ee91ed06-924a-4d70-a3d2-8fa011097af5
Commits

Reviewing files that changed from the base of the PR and between 30733ac and bb9baf51cbf59616ea0ab3e222b31b5332b8c0f9.

Files ignored due to path filters: 1
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
Files selected for processing: 11
  • config/patches/@xterm__addon-image@0.10.0-beta.301.patch
  • config/patches/xterm-src/@xterm__addon-image@0.10.0-beta.301.src.patch
  • config/scripts/xterm-image-kitty-placeholder-contract.test.mjs
  • config/scripts/xterm-image-kitty-placeholder-lifecycle.test.mjs
  • config/scripts/xterm-image-kitty-recovery.test.mjs
  • config/scripts/xterm-kitty-placeholder-test-terminal.mjs
  • src/renderer/src/components/terminal-pane/pty-connection/terminal-keydown-fit.ts
  • src/renderer/src/lib/pane-manager/pane-inline-images.ts
  • src/renderer/src/lib/pane-manager/terminal-kitty-replay-cache.test.ts
  • src/renderer/src/lib/pane-manager/terminal-kitty-replay-cache.ts
  • tests/e2e/terminal-kitty-image-reload.spec.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

@JhaceLam
JhaceLam force-pushed the codex/terminal-image-recovery branch from bb9baf5 to a499261 Compare October 24, 2026 10:28
@JhaceLam
JhaceLam marked this pull request as draft October 24, 2026 11:35
@JhaceLam

JhaceLam commented Oct 24, 2026 •

Copy link
Copy Markdown
Author

Current published head for #33120: 146f57277ba9919e0ec71e69ffa8569c5ad8a4e6 (OPEN/Ready). Image code/head is unchanged this round; earlier image validation keeps its original attribution.

The independent current heads are image 146f57277ba9919e0ec71e69ffa8569c5ad8a4e6, rich aa40e7e5d1deca36c20d7d1716dd46e32f20569f and fixtures f6d31efa6e50315b6582cb81b6c3a6e284a1de80. Actual-main dcbfc42c1d81953392ac975437abb98ad5a11007 read-only merges are clean, with13/100/29 paths and zero fixture/feature overlap. No newer-main runtime build, whole inventory or native Windows/Linux execution is claimed; prior private/UI/native evidence retains its recorded SHA/runtime.

Hosted action_required runs have zero jobs and still need maintainer workflow authorization. They are not running or failed tests; there are no failed jobs to rerun. Exact-SHA AI review and non-author human maintainer approval remain separate. This updates the existing request for material published evidence; it creates no duplicate authorization request.

@JhaceLam
JhaceLam marked this pull request as ready for review October 24, 2026 13:22
@JhaceLam

Copy link
Copy Markdown
Author

@coderabbitai full review

This PR is now ready for review. Please review the complete updated diff at current head 12f808955f1f950a2e2962c1543fd6e70e968519, including the repeated-eviction recovery fix. The previous actionable finding has been addressed; validation limits remain documented in the PR description.

@coderabbitai

coderabbitai Bot commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor
✅ Action performed

Full review finished.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2


Review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 6ceed366-d071-4afe-a951-58df24cdd1f9
Commits

Reviewing files that changed from the base of the PR and between 7868c30 and 12f8089.

Files ignored due to path filters: 1
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
Files selected for processing: 11
  • config/patches/@xterm__addon-image@0.10.0-beta.301.patch
  • config/patches/xterm-src/@xterm__addon-image@0.10.0-beta.301.src.patch
  • config/scripts/xterm-image-kitty-placeholder-contract.test.mjs
  • config/scripts/xterm-image-kitty-placeholder-lifecycle.test.mjs
  • config/scripts/xterm-image-kitty-recovery.test.mjs
  • config/scripts/xterm-kitty-placeholder-test-terminal.mjs
  • src/renderer/src/components/terminal-pane/pty-connection/terminal-keydown-fit.ts
  • src/renderer/src/lib/pane-manager/pane-inline-images.ts
  • src/renderer/src/lib/pane-manager/terminal-kitty-replay-cache.test.ts
  • src/renderer/src/lib/pane-manager/terminal-kitty-replay-cache.ts
  • tests/e2e/terminal-kitty-image-reload.spec.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.

@JhaceLam

Copy link
Copy Markdown
Author

@coderabbitai review

Please review the follow-up changes at current head 6ae1825f87b65b582ad4bbddd7b09fc22495b34c. The identified findings have been fixed with regressions and the targeted checks pass. The PR remains Ready for review, with full-repository validation limitations documented separately.

@coderabbitai

coderabbitai Bot commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor
⚠️ Action not completed

Already reviewed the last commit. Use @coderabbitai full review to rerun a review of the entire changeset.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@JhaceLam

Copy link
Copy Markdown
Author

@coderabbitai review

Please review the test-fixture follow-up at fcb934ab2047738408143e80d9f0347d34dae026. Assertions and deadlines are unchanged: wait for editor readiness, use serve-sim's public export, and construct the same real Git history with commit/tree objects. All 14 fixture assertions, full typecheck/lint/changed-code quality, the current source build and the hidden Electron three-reload/no-retransmission scenario pass. The complete Node run is queued behind #33131 to avoid fixture contention; its test environment and current limits are disclosed in the PR description.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1


Review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 295fecc9-a3cd-46e6-9327-997bc694e8d4
Commits

Reviewing files that changed from the base of the PR and between 6ae1825 and fcb934a.

Files selected for processing: 4
  • config/scripts/zcode-credential-workflow.test.mjs
  • src/main/emulator/serve-sim-kill-contract.test.ts
  • src/main/git/worktree-base-divergence-real-git.test.ts
  • src/renderer/src/components/editor/RichMarkdownEditor.focus-leave.test.tsx

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 5 remain after this review.

@coderabbitai

coderabbitai Bot commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor
⚠️ Action not completed

Already reviewed the last commit. Use @coderabbitai full review to rerun a review of the entire changeset.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1


Review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 91c7a420-0534-4d89-be5b-c58c0650023b
Commits

Reviewing files that changed from the base of the PR and between fcb934a and 0b02d77.

Files selected for processing: 1
  • config/scripts/zcode-credential-workflow.test.mjs

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 6 remain after this review.

@JhaceLam

Copy link
Copy Markdown
Author

@coderabbitai full review

Please review the full current changeset at 4029abb4773fbd7876fed3f7fd337463c83d9985. Both follow-up identity findings have been addressed with before/after regression evidence, and their threads are resolved. The current complete Node test run is in progress with isolated, zero-retry CI options; its limits are disclosed in the PR description. Please attach the complete review to this head so that a discussion-reply acknowledgement is not mistaken for the full review.

@coderabbitai

coderabbitai Bot commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor
✅ Action performed

Full review finished.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1


Review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: b31adb7e-bc2c-4ddf-a2a4-18c19d04ad87
Commits

Reviewing files that changed from the base of the PR and between 7868c30 and 4029abb.

Files ignored due to path filters: 1
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
Files selected for processing: 15
  • config/patches/@xterm__addon-image@0.10.0-beta.301.patch
  • config/patches/xterm-src/@xterm__addon-image@0.10.0-beta.301.src.patch
  • config/scripts/xterm-image-kitty-placeholder-contract.test.mjs
  • config/scripts/xterm-image-kitty-placeholder-lifecycle.test.mjs
  • config/scripts/xterm-image-kitty-recovery.test.mjs
  • config/scripts/xterm-kitty-placeholder-test-terminal.mjs
  • config/scripts/zcode-credential-workflow.test.mjs
  • src/main/emulator/serve-sim-kill-contract.test.ts
  • src/main/git/worktree-base-divergence-real-git.test.ts
  • src/renderer/src/components/editor/RichMarkdownEditor.focus-leave.test.tsx
  • src/renderer/src/components/terminal-pane/pty-connection/terminal-keydown-fit.ts
  • src/renderer/src/lib/pane-manager/pane-inline-images.ts
  • src/renderer/src/lib/pane-manager/terminal-kitty-replay-cache.test.ts
  • src/renderer/src/lib/pane-manager/terminal-kitty-replay-cache.ts
  • tests/e2e/terminal-kitty-image-reload.spec.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 5 remain after this review.

@JhaceLam

Copy link
Copy Markdown
Author

@coderabbitai full review

Please review the complete current changeset at 8f44f3b888c748dd8563bc42b95058bda06f9da3. The latest actionable findings have been fixed with before/after regression evidence and their threads are resolved. Full typecheck, lint, changed-code quality, build and hidden Electron checks pass; complete repository runs are still in progress and explicitly disclosed in Testing. Please distinguish this full review from discussion-reply confirmations.

@coderabbitai

coderabbitai Bot commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor
✅ Action performed

Full review finished.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1


Review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 30783e12-b7b6-4ae3-a752-e6bb27cd7d29
Commits

Reviewing files that changed from the base of the PR and between 7868c30 and 8f44f3b.

Files ignored due to path filters: 1
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
Files selected for processing: 15
  • config/patches/@xterm__addon-image@0.10.0-beta.301.patch
  • config/patches/xterm-src/@xterm__addon-image@0.10.0-beta.301.src.patch
  • config/scripts/xterm-image-kitty-placeholder-contract.test.mjs
  • config/scripts/xterm-image-kitty-placeholder-lifecycle.test.mjs
  • config/scripts/xterm-image-kitty-recovery.test.mjs
  • config/scripts/xterm-kitty-placeholder-test-terminal.mjs
  • config/scripts/zcode-credential-workflow.test.mjs
  • src/main/emulator/serve-sim-kill-contract.test.ts
  • src/main/git/worktree-base-divergence-real-git.test.ts
  • src/renderer/src/components/editor/RichMarkdownEditor.focus-leave.test.tsx
  • src/renderer/src/components/terminal-pane/pty-connection/terminal-keydown-fit.ts
  • src/renderer/src/lib/pane-manager/pane-inline-images.ts
  • src/renderer/src/lib/pane-manager/terminal-kitty-replay-cache.test.ts
  • src/renderer/src/lib/pane-manager/terminal-kitty-replay-cache.ts
  • tests/e2e/terminal-kitty-image-reload.spec.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 7 remain after this review.

@JhaceLam

Copy link
Copy Markdown
Author

@coderabbitai full review

Please review the current complete changeset at 26c558384be3b0be631547ad2e0d4aa152c77e93. The restore-persistence finding is fixed and resolved. Three new regressions fail before and pass after: read-only replay with zero/256 other placements, and stale replay after replacement-upload eviction. All 165 image/cache/launch cases, strict addon compilation, host typecheck, changed-code quality, focused lint, E2E build and hidden reload validation pass. Complete repository runs remain a separate pending gate; interrupted attempts are not reported as passed.

@coderabbitai

coderabbitai Bot commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor
✅ Action performed

Full review finished.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1


Review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 8b92c2af-f154-4598-a241-2e7da1f11364
Commits

Reviewing files that changed from the base of the PR and between 7868c30 and 26c5583.

Files ignored due to path filters: 1
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
Files selected for processing: 15
  • config/patches/@xterm__addon-image@0.10.0-beta.301.patch
  • config/patches/xterm-src/@xterm__addon-image@0.10.0-beta.301.src.patch
  • config/scripts/xterm-image-kitty-placeholder-contract.test.mjs
  • config/scripts/xterm-image-kitty-placeholder-lifecycle.test.mjs
  • config/scripts/xterm-image-kitty-recovery.test.mjs
  • config/scripts/xterm-kitty-placeholder-test-terminal.mjs
  • config/scripts/zcode-credential-workflow.test.mjs
  • src/main/emulator/serve-sim-kill-contract.test.ts
  • src/main/git/worktree-base-divergence-real-git.test.ts
  • src/renderer/src/components/editor/RichMarkdownEditor.focus-leave.test.tsx
  • src/renderer/src/components/terminal-pane/pty-connection/terminal-keydown-fit.ts
  • src/renderer/src/lib/pane-manager/pane-inline-images.ts
  • src/renderer/src/lib/pane-manager/terminal-kitty-replay-cache.test.ts
  • src/renderer/src/lib/pane-manager/terminal-kitty-replay-cache.ts
  • tests/e2e/terminal-kitty-image-reload.spec.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 7 remain after this review.

@JhaceLam

Copy link
Copy Markdown
Author

The scope warning's SIXEL/iTerm2 examples are inherited from the existing addon patch, rather than changes introduced by this PR. I compared src/SixelHandler.ts and src/IIPHandler.ts sections in the patch against the current GitHub base 7868c30ce70617a943b1b3df3d026c60a3a08549; both sections are byte-for-byte identical. Comparing the entire patched addon to the original npm package includes Orca's pre-existing changes; the PR delta should be compared to Orca's base branch.

The four small test fixture changes are intentional and listed in Testing: they fix public entry resolution, editor initialization ordering, and real-Git fixture identity/construction discovered while running the complete repository gate. They preserve the assertions and do not change SIXEL/iTerm2 behavior.

The new placement-deletion finding is independently reproduced and a regression-tested candidate is ready in an isolated checkout. I am letting the current complete run finish before rebuilding and applying it, so the recorded test SHA stays accurate.

@JhaceLam

Copy link
Copy Markdown
Author

@coderabbitai full review

Please review the complete current changeset at 8eb9c1d03c6680088717d57781929a6fbc3d4fa8. The latest review fix and independent full-run fixture repairs are pushed. The current full typecheck, full lint, changed-code quality, build and hidden Electron validation pass; the production census inventory is unchanged and its default-heap regression now passes. Complete repository runs on these clean heads are in progress serially with isolation and zero retries, and remain explicitly pending in the description. The image PR also passes 171 image/cache/launch cases and retains full-deletion safety.

@coderabbitai

coderabbitai Bot commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor
✅ Action performed

Full review finished.

@JhaceLam

Copy link
Copy Markdown
Author

@coderabbitai full review

Ready head: 18b4c1d0d35c0f64a7dc002931d410b3e452e730; synchronized with upstream db8fc6d0cc9bf7e7f945d54d7387fc2539ee0e3a.

The six independent fixture edits have been removed from this feature diff and preserved in #33348 (five remaining fixes; upstream #33338 retired the census). The source patch's SixelHandler and IIPHandler sections are byte-identical to upstream db8fc6d: their complete embedded-diff SHA-256 values are respectively 42c8ec8c1db8b486a7730d03f1910b20eeafd9e6e0438161974ee7c5e302de75 and 0b25ac143bbbb606ebbc7ffd4ae5baebf2d5b2b90ac478ead06666b572ea1d6d. ImageRenderer/ImageAddon sections are unchanged too. Please assess the incremental patch change rather than treating inherited patch hunks as new SIXEL/iTerm2 work. No replay support for those protocols is added.

Current-head full typecheck/lint/quality, 55 focused cases, fresh CLI/current-platform orcad builds and hidden three-reload Electron verification pass; the actual screenshot was inspected. The complete Node gate is in progress and is not claimed green.

@coderabbitai

coderabbitai Bot commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor
✅ Action performed

Full review finished.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1


Review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: b8fb991e-ac50-49ae-a51e-cfecac1dd830
Commits

Reviewing files that changed from the base of the PR and between db8fc6d and 18b4c1d.

Files ignored due to path filters: 1
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
Files selected for processing: 11
  • config/patches/@xterm__addon-image@0.10.0-beta.301.patch
  • config/patches/xterm-src/@xterm__addon-image@0.10.0-beta.301.src.patch
  • config/scripts/xterm-image-kitty-placeholder-contract.test.mjs
  • config/scripts/xterm-image-kitty-placeholder-lifecycle.test.mjs
  • config/scripts/xterm-image-kitty-recovery.test.mjs
  • config/scripts/xterm-kitty-placeholder-test-terminal.mjs
  • src/renderer/src/components/terminal-pane/pty-connection/terminal-keydown-fit.ts
  • src/renderer/src/lib/pane-manager/pane-inline-images.ts
  • src/renderer/src/lib/pane-manager/terminal-kitty-replay-cache.test.ts
  • src/renderer/src/lib/pane-manager/terminal-kitty-replay-cache.ts
  • tests/e2e/terminal-kitty-image-reload.spec.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.

@JhaceLam

Copy link
Copy Markdown
Author

@coderabbitai full review

New Ready head: aee9f552359e95e425d8520a829fbd8c448f4b12. The named physical-delete regression from the last full review is fixed and replied to. Four old-addon cases fail before and pass after; all 59 image/recovery/cache cases pass. Three real hidden Electron cases pass with zero retries: named lowercase/uppercase delete pixel checks and three renderer reloads without retransmission. Screenshots were inspected. Canonical addon regeneration/check, strict frozen install, full typecheck/lint/changed quality, fresh CLI/current-platform orcad/mobile-web/E2E builds pass.

The complete Node gate for this SHA is tracked separately while its release-cache fixtures are prepared. Earlier complete runs are not assigned to this new SHA. Matching clean-upstream controls reproduce the independent fixture failures; those repairs stay solely in #33348. The feature description now closes only its actual feature issue, and the unrelated fixture issue is left to its dedicated PR. Source sections for Sixel/IIP/ImageRenderer/ImageAddon still match the upstream base byte-for-byte. Please review the full current feature diff once for this new SHA.

@coderabbitai

coderabbitai Bot commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor
✅ Action performed

Full review finished.

@JhaceLam

Copy link
Copy Markdown
Author

@coderabbitai resume

@coderabbitai

coderabbitai Bot commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor
✅ Action performed

Reviews resumed. No new commits to review.

@JhaceLam

Copy link
Copy Markdown
Author

@coderabbitai full review

Exact published Ready head: 514431fd792d13bce0fa18177a8465cbe4f164a0. Please review the entire current PR. This full-review request is sent once for this SHA after the verified normal nonforce update; earlier-head completion is historical. Workflow authorization and maintainer approval remain separate.

@coderabbitai

coderabbitai Bot commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor
✅ Action performed

Full review finished.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

Nitpick comments: 1
config/patches/xterm-src/@xterm__addon-image@0.10.0-beta.301.src.patch: 1

1617-1619: Trivial · Performance & Scalability · Quick win

The early-return gate no longer skips the per-row placeholder scan in the app.

The app always passes readKittyImage (pane-inline-images.ts:63-69), so restoreMissing is always set. The condition this._virtualPlacements.size === 0 && !this.restoreMissing is therefore never true in the app. Before this change, a terminal with no virtual placements returned immediately.

ImageStorage.render now calls onRenderLine for every visible row. This includes the empty-cache path at Lines 412-417. Each call runs _placeholderCell on every column. The cost applies to every terminal with the image addon on every render, including terminals that never show an image. hidePlaceholderGlyphs already scans the full viewport on every onWriteParsed, so the work is duplicated.

Add a cheap signal that a placeholder cell exists in the viewport. Have hidePlaceholderGlyphs record it, and gate the render path on it. Detect the placeholder before the FgFlags.INVISIBLE skip. Cells that are already hidden must still count.

♻️ Proposed gate (plus the flag set in `hidePlaceholderGlyphs`)
-    if (this._virtualPlacements.size === 0 && !this.restoreMissing) {
+    if (this._virtualPlacements.size === 0 && !(this.restoreMissing && this._viewportHasPlaceholders)) {
       return;
     }

Outside the selected range, add private _viewportHasPlaceholders = false;. In hidePlaceholderGlyphs, reset it to false before the row loop. Set it to true when a cell matches PLACEHOLDER_CHAR, before the INVISIBLE check.


Review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 4f8b6d60-d44b-49bd-bf64-e6b9a85fec4b
Commits

Reviewing files that changed from the base of the PR and between 9b0170c and 514431f.

Files ignored due to path filters: 1
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
Files selected for processing: 11
  • config/patches/@xterm__addon-image@0.10.0-beta.301.patch
  • config/patches/xterm-src/@xterm__addon-image@0.10.0-beta.301.src.patch
  • config/scripts/xterm-image-kitty-placeholder-contract.test.mjs
  • config/scripts/xterm-image-kitty-placeholder-lifecycle.test.mjs
  • config/scripts/xterm-image-kitty-recovery.test.mjs
  • config/scripts/xterm-kitty-placeholder-test-terminal.mjs
  • src/renderer/src/components/terminal-pane/pty-connection/terminal-keydown-fit.ts
  • src/renderer/src/lib/pane-manager/pane-inline-images.ts
  • src/renderer/src/lib/pane-manager/terminal-kitty-replay-cache.test.ts
  • src/renderer/src/lib/pane-manager/terminal-kitty-replay-cache.ts
  • tests/e2e/terminal-kitty-image-reload.spec.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.

@JhaceLam

Copy link
Copy Markdown
Author

@coderabbitai full review

Please review the full current diff at published head 146f57277ba9919e0ec71e69ffa8569c5ad8a4e6 after the cache-invalidation and viewport-scan corrections. Valid before/after controls, exact current validation and limits are in the updated description; the existing cache thread has been replied to and resolved. Earlier-head coverage is historical.

@coderabbitai

coderabbitai Bot commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor
✅ Action performed

Full review finished.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Kitty Unicode-placeholder images disappear after renderer reload without PTY retransmission

1 participant