CommandCodeAI / CommandCodeAI/command-code

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

Aperta
#316 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

p1
Lingua principale
Nessun dato sulla lingua
Stelle
4k
Fork
350
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

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

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Iniziare dalla gestione del cursore e dell'input nella TUI di Command Code, concentrandosi sulle risposte di tipo Cursor Position Report alla sequenza DSR \e[6n. Riprodurre il problema con l'IME giapponese nei terminali WSL elencati, quindi verificare che la finestra candidate o preedit segua il cursore di testo invece di rimanere in basso a sinistra.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
linux
Ambito
cli, internationalization
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Tranquilla
Chiarezza
Abbastanza chiara
Idoneità per principianti
48/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.