[codex] Fix terminal IME composition handling
Summary
- Preserve IME composition state when adapting keyboard events.
- Avoid Wave global/custom terminal key handling while IME composition is active.
- Add broader CJK font fallback while keeping Hack as the primary terminal font.
- Fix the
.fixed-fontCSS declaration to use a validfont:property.
Why
IME composition key events can flow through Wave keyboard handling and terminal custom key handling. In interactive terminal prompts, this can cause unexpected input while composing text with Korean, Japanese, Chinese, or other composition-based input methods.
The terminal font fallback also previously relied only on Hack/monospace. Keeping Hack first preserves the existing monospace behavior, while adding Noto CJK and common platform CJK fallbacks improves glyph coverage for multilingual terminal output.
Verification
npm run build:devin a clean worktree from this commit- Build completed with exit code 0
- Existing Vite warnings observed: browser externalization for
fs/path, circular chunk warning for cytoscape/mermaid - Image optimizer reported missing optional
sharppackage, but the build command still completed successfully
[!NOTE]
Reviews paused
It 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
reviews.auto_review.auto_pause_after_reviewed_commitssetting.Use the following commands to manage reviews:
@coderabbitai resumeto resume automatic reviews.@coderabbitai reviewto trigger a single review.Use the checkboxes below for quick actions:
- [ ] ▶️ Resume reviews
- [ ] 🔍 Trigger review
Walkthrough
The PR propagates IME/composition state into keyboard adapters and makes global, terminal, and TermWrap handlers consume composing events early. It adds a DefaultTermFontFamily constant and default config key term:fontfamily, updates JSON fixed-font CSS to the expanded fallback, and changes terminal WebGL default handling so WebGL is disabled unless explicitly enabled.
Estimated code review effort
🎯 3 (Moderate) | ⏱️ ~20 minutes
🚥 Pre-merge checks | ✅ 4 | ❌ 1
❌ Failed checks (1 warning)
| Check name | Status | Explanation | Resolution |
|---|---|---|---|
| Docstring Coverage | ⚠️ Warning | Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. | Write docstrings for the functions missing them to satisfy the coverage threshold. |
✅ Passed checks (4 passed)
| Check name | Status | Explanation |
|---|---|---|
| Title check | ✅ Passed | The title '[codex] Fix terminal IME composition handling' clearly and concisely describes the main change: fixing IME composition handling in the terminal, which is the primary focus of all changeset modifications across keyboard event handling, font configuration, and composition-aware input routing. |
| Description check | ✅ Passed | The description comprehensively explains the changeset: it documents IME composition state preservation, avoids terminal key handling during composition, adds CJK font fallbacks, and fixes CSS properties—all of which directly correspond to the actual file changes. |
| Linked Issues check | ✅ Passed | Check skipped because no linked issues were found for this pull request. |
| Out of Scope Changes check | ✅ Passed | Check skipped because no linked issues were found for this pull request. |
✏️ Tip: You can configure your own custom pre-merge checks in the settings.
✨ Finishing Touches
🧪 Generate unit tests (beta)
- [ ] Create PR with unit tests
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 @coderabbitai help to get the list of available commands.
@coderabbitai review
Review triggered. 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.✅ Actions performed