tui: IME preedit (composition) text renders white and is invisible on light themes
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 75/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- typescript
Hướng nghiên cứu
Bắt đầu từ mã nhập liệu của lời nhắc TUI và lần theo đến nơi văn bản soạn trước của IME nhận màu tiền cảnh; issue không nêu tên tệp hay bài kiểm thử. So sánh kiểu hiển thị đó với token text của giao diện và chạy các bài kiểm thử liên quan đến lời nhắc hoặc TUI. Công việc hoàn tất khi văn bản soạn trước vẫn dễ đọc trên giao diện sáng và vẫn được đánh dấu là tạm thời.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- TypeScript
- Star
- 221k
- Fork
- 29.6k
- Merge trung bình
- 7 giờ 41 phút
- Pull request đã merge (30 ngày)
- 510
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của anomalyco/opencode
-
core: OpenRouter BYOK sessions record cost = 0 since v2.2.0 (ignores cost_details.upstream_inference_cost)Có thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mởreproduced
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
anomalyco/opencode#60558 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
anomalyco/opencode#60541 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 67/100
anomalyco/opencode#60529 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
TUI permission prompt for MCP tools doesn't show the call argumentsCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 73/100
anomalyco/opencode#60350 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
glob: literal null and undefined directory names search the workspace rootCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mởreproduced
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
anomalyco/opencode#60306 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của anomalyco/opencode
Issue tương tự
-
Add: Disco Mix SDĐang mởcheck:passed streams:add
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
Maintainer thường phản hồi trong vòng 1 ngày
-
level2 nsoc26
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
GauravKarakoti/SecureFlow#1488 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
deltachat/deltachat-desktop#6914 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
area:cli bug P4
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug from-studio
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
esengine/DeepSeek-Reasonix#14868 ·
Maintainer thường phản hồi trong vòng 1 ngày