Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

tui: IME preedit (composition) text renders white and is invisible on light themes

Abierto Apto para principiantes
#60,469 2 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
2/5
Tiempo estimado
1-3 horas
Aptitud para principiantes
75/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
typescript
Área
cli, frontend

Línea de trabajo

Empieza en el código de entrada de la solicitud de la TUI y sigue el recorrido hasta donde el texto de preedición del IME recibe su color de primer plano; el issue no indica el archivo ni la prueba. Compara ese estilo con el token text del tema y luego ejecuta las pruebas pertinentes de la solicitud o de la TUI. Se considera terminado cuando el texto de preedición sigue siendo legible en temas claros y continúa marcado como provisional.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

Description

When typing Chinese with the Microsoft Pinyin IME in the TUI, the preedit / composition string (the pinyin before you confirm it) is rendered in white. On any light theme the prompt background is also light, so the composition text is effectively invisible — you cannot see what you are typing until you press space and the characters are committed.

Committed text is fine (renders in the normal dark text color); only the composition string is affected.

Environment

  • opencode CLI 2.2.0 (opencode-cli.exe, Windows x64, bundled with the desktop app)
  • OS: Windows 11 Insider 10.0.28020
  • Terminal: Windows Terminal 1.25.2733.0
  • Terminal app theme: light, color scheme: VSCode Light Modern (so the terminal's default foreground is already dark — this is not a terminal color-scheme problem)
  • IME: Microsoft Pinyin (default Win11 IME)
  • Reproduced with theme.mode = light and also with the system theme while the terminal is in a light scheme
  • Not reproducible on dark themes (white composition text is visible there)

Steps to reproduce

  1. Put the terminal and opencode in a light theme (theme.name = "one-light" / "github-light" / "catppuccin-latte", or system with a light terminal scheme).
  2. Focus the prompt input.
  3. Switch to a Chinese IME and start typing pinyin, e.g. zhe yang — do not commit yet.
  4. Observe the composition string in the input line.

Expected

The composition string should be readable — ideally using the theme's text color (or a new dedicated token such as textComposition / textPreedit) and optionally an underline to mark it as provisional.

Actual

The composition string is drawn in white (#ffffff-ish), producing near-zero contrast on the light prompt background.

Additional context

  • The theme schema has no token for IME/composition/preedit text. I dumped the full token list from the docs (text, textMuted, background, backgroundPanel, backgroundElement, border*, diff*, markdown*, syntax*) and there is nothing that maps to this element, so a custom theme cannot work around it — the color appears to be hard-coded.
  • Changing the Windows Terminal color scheme to a light one (dark default foreground) does not help, which confirms the color is set by opencode rather than inherited from the terminal.
  • Related but distinct: #55101 (Chinese IME preedit overlaps the prompt placeholder) — same area of the UI, different symptom.

Suggested fix

Use theme.text (or add a textPreedit token defaulting to text) for the composition string instead of a fixed white, and keep the underline as the provisional-state indicator.

Lenguaje dominante
TypeScript
Estrellas
221k
Forks
29.6k
Merge medio
7 h 41 min
PR fusionados (30 d)
510

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de anomalyco/opencode

Todos los issues de anomalyco/opencode

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.