Description
Bug Report
Describe the bug
File attachment badges (e.g. txt, md, pdf,img) have invisible text when a theme sets background to "transparent" or "none". The badge colored box renders correctly but the label inside is not visible.
Expected behavior
Badge label text should be readable regardless of whether background is transparent.
Root cause
Both badge render sites use theme.background as the text foreground color:
packages/opencode/src/cli/cmd/tui/feature-plugins/system/session-v2.tsx:174-183
<span style={{ bg: theme.secondary, fg: theme.background }}>
{file.mime}
</span>
packages/opencode/src/cli/cmd/tui/routes/session/index.tsx:1383-1391
<span style={{ bg: bg(), fg: theme.background }}>
{MIME_BADGE[file.mime] ?? file.mime}
</span>
- theme.tsx:201-205 resolves
"transparent"/"none" to RGBA(0,0,0,0), making the text fully transparent.
Plugins
@sahiljassal/opencode-anthropic-auth, @tarquinen/opencode-dcp
OpenCode version
1.15.13
Steps to reproduce
To Reproduce
- Use a theme with
"background": "transparent" (e.g. gruvbox)
- Attach a file or reference one in chat
- Observe the badge — colored box shows but text label is missing
Screenshot and/or share link
Gruvbox (broken): badge renders as colored box with no label text
Other theme (working): badge renders with visible label (e.g. txt)
Operating System
macOS 26.5
Terminal
Ghostty
Description
Bug Report
Describe the bug
File attachment badges (e.g.
txt,md,pdf,img) have invisible text when a theme setsbackgroundto"transparent"or"none". The badge colored box renders correctly but the label inside is not visible.Expected behavior
Badge label text should be readable regardless of whether background is transparent.
Root cause
Both badge render sites use theme.background as the text foreground color:
packages/opencode/src/cli/cmd/tui/feature-plugins/system/session-v2.tsx:174-183packages/opencode/src/cli/cmd/tui/routes/session/index.tsx:1383-1391"transparent"/"none"to RGBA(0,0,0,0), making the text fully transparent.Plugins
@sahiljassal/opencode-anthropic-auth,@tarquinen/opencode-dcpOpenCode version
1.15.13
Steps to reproduce
To Reproduce
"background": "transparent"(e.g. gruvbox)Screenshot and/or share link
Gruvbox (broken): badge renders as colored box with no label text
Other theme (working): badge renders with visible label (e.g. txt)
Operating System
macOS 26.5
Terminal
Ghostty