opencode icon indicating copy to clipboard operation
opencode copied to clipboard

Diffs invisible on light mode, regardless of theme

Open gabrielmontagne opened this issue 1 month ago • 18 comments

Description

Hi, edits have become illegible on my light-mode terminal. All/most diffs colors seem to be baked to white, so only on dark backgrounds they become legible.

Image

Here using the GitHub theme,

Image

OpenCode version

1.0.121

Steps to reproduce

No response

Screenshot and/or share link

No response

Operating System

Debian 12

Terminal

xcfe4-terminal

gabrielmontagne avatar Nov 30 '25 23:11 gabrielmontagne

This issue might be a duplicate of existing issues. Please check:

  • #4666: Bug: Highlighted text invisible with transparent custom themes
  • #4427: System theme (regression in 1.0.69 with foreground text rendering issues)

Feel free to ignore if none of these address your specific case.

github-actions[bot] avatar Nov 30 '25 23:11 github-actions[bot]

Got the same problem. Using opencode v1.0.125, Ghostty 1.2.3, macOS Sequoia 15.7.1

Image

akronb avatar Dec 01 '25 16:12 akronb

I think this is the same problem that I'm having, except I can't see anything at all, my install is mostly unusable.

Image

This is 1.0.127; switching between "light mode" and "dark mode" in the menu doesn't do anything.

If I switch the whole system to light mode, it is still extremely low contrast:

Image

awwright avatar Dec 03 '25 02:12 awwright

What terminal and theme are you using?

rekram1-node avatar Dec 03 '25 04:12 rekram1-node

In my case I'm using catppuccin latte for both iterm2 and opencode.

nesl247 avatar Dec 03 '25 17:12 nesl247

@rekram1-node Just the "System" theme, but no theme is readable. This is the "solarized" theme:

Image

awwright avatar Dec 03 '25 18:12 awwright

This looks like you are using terminals that do not support truecolor (xcfe4-terminal and built-in macos terminal before Sequoia). Opentui and therefor opencode does currently not support non-truecolor terminals. This will come, but might be a while. In the mean time I can only suggest you use a terminal that supports truecolor like Ghostty, Kitty, Alacritty, iTerm2 etc.

kommander avatar Dec 05 '25 13:12 kommander

@kommander I'm using Ghostty 1.2.3 with the Alabaster theme and macOS Sequoia 15.7.1, but I still can't see diffs for some files. I've tried changing Ghostty and opencode themes, but the result is still the same.

I have no problem with .md files, but diffs for .sql, .sh, .dbml are invisible. Maybe there is the same issue with different files, but I didn't check that.

Image Image Image Image

Also, I can't see the title in the "Rename session" dialog.

Image

akronb avatar Dec 05 '25 14:12 akronb

This is so weird, in ghostty it works fine for me for anything that does not have a parser like .vim files.

Screenshot 2025-12-05 at 20.49.00.png

Can you try with bunx opencode-ai@snapshot-kmdr-debug?

kommander avatar Dec 05 '25 22:12 kommander

This looks like you are using terminals that do not support truecolor (xcfe4-terminal and built-in macos terminal before Sequoia). Opentui and therefor opencode does currently not support non-truecolor terminals. This will come, but might be a while. In the mean time I can only suggest you use a terminal that supports truecolor like Ghostty, Kitty, Alacritty, iTerm2 etc.

Hi, I tried, with Alacritty, but no luck,

Image

this is the GitHub theme, running opencode 1.0.134.

gabrielmontagne avatar Dec 06 '25 01:12 gabrielmontagne

Did you try running bunx opencode-ai@snapshot-kmdr-debug?

kommander avatar Dec 06 '25 02:12 kommander

Did you try running bunx opencode-ai@snapshot-kmdr-debug?

I'm testing bunx opencode-ai@snapshot-kmdr-debug OS: macOS Tahoe 26.0.1 Host: MacBook Air M1, 2020 Shell: zsh 5.9 Terminal: ghostty 1.2.3 COLORTERM: truecolor (tested with echo $COLORTERM) Using the OpenCode theme here The tested file has no extension (bash script)

It was reproduced

Image

I changed the dark/light by "toggle appearance"

Image

I asked them to cat the file in plan mode.

Image

Also, I see a similar issue with "no matching items" Image

koichincom avatar Dec 06 '25 08:12 koichincom

@kommander I've tried your snapshot, but the result is still the same. It works on write, but it's unreadable on edit. Here are screenshots from opencode-ai@snapshot-kmdr-debug

Image Image

akronb avatar Dec 06 '25 12:12 akronb

Could you please try again with bunx opencode-ai@snapshot-kmdr-debug? Trying a different fix now.

kommander avatar Dec 08 '25 15:12 kommander

@kommander It's working!!!!! Although, "no matching files" issue persists

Image Image

koichincom avatar Dec 08 '25 16:12 koichincom

@kommander Yeah, this has resolved my problem with diffs, thanks!

But I still get unreadable parts of interface, like "No matching items" or "Rename session" dialog.

Image Image

akronb avatar Dec 08 '25 18:12 akronb

Okay, I'll check the other issues as well and bring that in the next official release.

kommander avatar Dec 08 '25 19:12 kommander

This should be better in 1.0.137?

kommander avatar Dec 09 '25 13:12 kommander

@kommander All good on my side, thanks!

akronb avatar Dec 09 '25 14:12 akronb

It's working great for me too, even on my non-truecolor terms. Thanks so much!

gabrielmontagne avatar Dec 09 '25 14:12 gabrielmontagne