CommandCodeAI / CommandCodeAI/command-code

IME candidate/preedit window stuck at bottom-left in WSL (Japanese/IME input)

Open
#316 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

p1
Dominant language
No language data
Stars
4k
Forks
350
PR merge metrics
No merged PRs in 30d

Description

IME Bug Report: Japanese IME candidate window position stuck at bottom-left

Environment

  • OS: Windows 11 + WSL2 (Ubuntu)
  • IME: Microsoft IME (標準), Google 日本語入力
  • Terminals tried:
    • Windows Terminal
    • WezTerm
    • wsltty (Mintty via WSL)
    • VS Code WSL Remote integrated terminal
    • SSH (sshd inside WSL → connect from Windows terminal)
  • All terminals reproduce the same issue

Current Behavior

When typing Japanese in Command Code's TUI, the IME candidate/preedit window always appears at the bottom-left corner of the terminal, regardless of where the actual cursor is. This makes Japanese input extremely difficult — you have to look at the bottom-left corner to see what you're typing while the actual text appears elsewhere.

Expected Behavior

The IME candidate window should appear near the text cursor position, as it does in normal terminal input (e.g., bash, vim, etc.).

Likely Cause

Since the issue reproduces across all terminal emulators and connection methods (local ConPTY, SSH bypassing ConPTY, Mintty), it's almost certainly not a terminal emulator issue. The root cause is likely in Command Code's TUI framework — specifically, it's probably not sending proper Cursor Position Report (CPR) responses via DSR (Device Status Report, \e[6n), or not responding to it at all. The terminal/ConPTY relies on CPR to tell the IME where to render the candidate window.

Steps to Reproduce

  1. Open Command Code in any WSL terminal
  2. Switch to Japanese IME (Microsoft IME or Google Japanese Input)
  3. Start typing — the preedit/candidate window will appear at the bottom-left corner of the TUI
  4. Moving the cursor or typing in different positions does not change the candidate window location

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in Command Code's TUI cursor and input handling, focusing on Cursor Position Report responses to the DSR sequence \e[6n. Reproduce with Japanese IME in the listed WSL terminals, then verify that the candidate or preedit window follows the text cursor instead of remaining at the bottom-left.

Written by the indexing model from the issue text.

Assessment

Tech stack
linux
Domain
cli, internationalization
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.