Repository navigation
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (2)
Included review availability: Your plan provides up to 10 included reviews per hour; 3 remain after this review. 📝 WalkthroughWalkthroughThe patch updates Priority: ➖ Normal — Schedule the IME rendering fix because it addresses a Windows Korean composition defect affecting placeholder masking and committed text in Codex and Claude terminals. Severity of issue fixed: Medium Merge Risk: ⚪ Minimal · up to This change masks terminal placeholders during IME composition while preserving trailing text and restores normal rendering when composition ends. No concrete merge-blocking risk remains. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
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.
ℹ️ No critical issues — a focused, well-tested fix with two minor suggestions below.
Reviewed changes
- xterm
CompositionHelperpatch: placeholder mask — during preedit the patched helper dispatches a cancelablexterm-composition-remainderevent and, when the terminal owns a stock Codex/Claude placeholder, covers the row remainder (including soft-wrapped continuation rows) with an opaque mask built from per-cell background colors, replacing the oldvisibility: hiddenCSS. - Orca wiring —
installTerminalImeComposerPlaceholderMaskgains axterm-composition-remainderlistener thatpreventDefaults for structurally-verified placeholders; the.xterm-composition-remainder { visibility: hidden }rule is removed fromterminal.css. - Placeholder detection —
isStockPlaceholderjoins continuation rows with a space only between non-wrapped rows, so a soft-wrapped placeholder reconstructs to its exact stock string and is detected. - Tests — the mask suite now asserts RGB / light-RGB / palette / inverse background resolution, wrapped-row masking, and that no input reaches the pty during or after the masked composition.
ℹ️ Native Windows/Linux IME validation is still outstanding
The PR body lists before/after visual proof and native Windows/Linux IME validation as pending. The change is renderer-only (a DOM overlay), but IME event ordering and composition rendering differ meaningfully across the three platforms, so the mask should be exercised on Windows and Linux before this lands rather than macOS-only.
ℹ️ Nitpicks
src/shared/terminal-composer-draft.test.ts:254("keeps a wrapped stock placeholder out of draft metadata") models the continuation asrowsBelow: [' anything']withoutrowsBelowWrapped: [true], so it exercises the space-inserting (hard-newline) path — not the soft-wrap path this PR'sisStockPlaceholderchange actually fixes. The soft-wrap case is covered end-to-end by the resize test in the mask suite; a direct unit case withrowsBelowWrapped: [true]would pin the regression at its source.- During composition the new
xterm-composition-remainderhandler and the existingonRenderhandler each callsyncPlaceholderOwnership(), soreadTerminalCursorLineContextruns twice per repaint while composing. Bounded and minor, but the duplicate read is avoidable.
DeepSeek Pro (free via Pullfrog for OSS) | 𝕏
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
- Removed the redundant
onRenderownership sync —installTerminalImeComposerPlaceholderMaskno longer re-reads the cursor line context on every render during composition. xterm's ownonRenderhandler invokesupdateCompositionElements, which dispatches the cancelablexterm-composition-remainderevent handled here, so ownership now syncs exactly once per render-time decision. - Added a unit test for soft-wrapped placeholder detection —
terminal-composer-draft.test.tspins the mid-word soft-wrap case at its source (rowsBelowWrapped: [true, …]→ placeholder;[false, …]→ draft with a newline). - Added a repaint-read regression test — the mask suite asserts
readTerminalCursorLineContextis called exactly once per remainder decision and never after disposal.
DeepSeek Pro (free via Pullfrog for OSS) | 𝕏
|
Thank you for this, and I am sorry about the outcome — the core problem it fixes was already resolved and shipped about a week before you opened this, so most of the change now duplicates what is on main. That is our fault for not closing the loop on the issue sooner, and it cost you real work. I want to be specific about what you found that the earlier fix did not, because it is still broken today.
It also has a consequence past input handling that I do not think you claimed, and which makes it matter more: once we stop recognising the wrapped hint, we treat it as text the user typed. So a stock prompt can leak into places that are only ever supposed to hold real input. Would you open a small PR with just that piece — the change and its test, the two files under the shared directory? It is about ten lines, touches nothing else, and I will merge it quickly. Full credit stays with you. The reason I cannot take the rest: it also rewrites our bundled terminal component, and that file has been substantially reworked since you branched — the same region was rebuilt for character-width handling a few weeks ago. Bringing your version forward would not be a merge so much as writing it again against different code, and that is not a fair thing to ask of you. On the masking work itself: what landed covers the contract this issue set — one composition session owns the mask at a time, a newer start supersedes an older one, a stale end cannot clear the current owner, the placeholder is identified structurally rather than by how it looks, and end, blur and disposal all clear it. Your approach reached the same place by a different mechanism. If you think there is a case the shipped version still gets wrong, say which one and I will look — I would rather reopen than lose it. One genuinely open gap you raised that I do not think is covered: wrapped placeholder rows. If you want to take that on top of the ten-line fix above, it would be welcome. Closing this one as superseded, not as wrong. Thanks again — the wrap bug is a good catch and I would like it back as its own PR. |

ELI5
IME preedit covers placeholder hints cleanly.
What Changed
Mask wrapped placeholders with the terminal background; preserve trailing user text. Add discriminating wrap tests and remove duplicate repaint reads.
Why
Placeholder hints must not be treated as user-authored input.
Linked Issue
Fixes #17104.
Visual Proof
Isolated Electron/xterm fixture with CDP composition input. Before recreates the old mask adapter on the patched runtime; after uses the final adapter. Synthetic content, not full-app screenshots.
Before
After
Testing
427 tests passed on macOS; reverting either reviewed fix fails its regression. Renderer/Node typechecks, xterm consistency, lint and formatting passed. Synthetic Electron/CDP composition and cancellation passed.
Full macOS validation (Node 24, pnpm 12):
pnpm lint,pnpm typecheck,pnpm test --maxWorkers=4, andpnpm buildall executed. Typecheck and complete desktop/Web/native build passed.Full suite at
f2fc9a3365: 76,615 passed / 7 failed / 391 skipped. Final-HEAD serial follow-ups: 22 passed; performance/timeout and registry-install failures cleared without relaxing assertions or policies.Still failing: 4 real Claude CLI startup checks (5/10-second initialization deadlines) and 1 English runtime-catalog test. All reproduced on base
bba68b1. Full lint fails on the same 7 catalog entries; later extraction/coverage gates passed separately. Full lint/test are not green.AI Disclosure
OpenAI Codex.
Review
Self-reviewed; Pullfrog reports no new issues. Human review pending.
Agent skill upstream boundary
Notes
No new permissions, platform-specific paths/shortcuts, Git commands or wire fields. Folder workspaces and remote ownership considered; full mobile/platform QA remains unrun.
Checklist