tui: IME preedit (composition) text renders white and is invisible on light themes
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
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=lightand also with thesystemtheme while the terminal is in a light scheme - Not reproducible on dark themes (white composition text is visible there)
Steps to reproduce
- Put the terminal and opencode in a light theme (
theme.name = "one-light"/"github-light"/"catppuccin-latte", orsystemwith a light terminal scheme). - Focus the prompt input.
- Switch to a Chinese IME and start typing pinyin, e.g.
zhe yang— do not commit yet. - 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
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de anomalyco/opencode
-
core: OpenRouter BYOK sessions record cost = 0 since v2.2.0 (ignores cost_details.upstream_inference_cost)Posiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abiertoreproduced
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
anomalyco/opencode#60558 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
anomalyco/opencode#60541 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 67/100
anomalyco/opencode#60529 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
TUI permission prompt for MCP tools doesn't show the call argumentsPosiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 73/100
anomalyco/opencode#60350 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
glob: literal null and undefined directory names search the workspace rootPosiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abiertoreproduced
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
anomalyco/opencode#60306 · 1 comentario ·
Los mantenedores suelen responder en 1 día
Todos los issues de anomalyco/opencode
Issues similares
-
area:cli bug P4
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Los mantenedores suelen responder en 1 día
-
bug from-studio
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
esengine/DeepSeek-Reasonix#14868 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
loopbackio/loopback-next#11878 ·
Los mantenedores suelen responder en 2 días
-
bug 🐛
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
comunica/comunica#1925 · 1 comentario ·
Los mantenedores suelen responder en 1 día