Problem
The sidebar header badge renders text using fg={theme.background}:
<box backgroundColor={props.theme.accent}>
<text fg={props.theme.background}>
<b>AFT</b>
</text>
</box>
(Source: src/tui/sidebar.tsx, line ~605)
When the user's theme sets background: "none" (transparent — the documented way to respect terminal transparency, per https://opencode.ai/docs/themes/#terminal-defaults), theme.background resolves to RGBA(0,0,0,0). The badge text becomes fully transparent and invisible.
This makes transparent themes — including the built-in system theme when the terminal has a custom background — effectively unusable with the plugin sidebar.
The same issue exists in the magic-context plugin (src/tui/slots/sidebar-content.tsx, line ~693), which uses the identical pattern.
Environment
- Plugin version: 0.40.1
- OpenCode: 1.17.9
- Terminal: iTerm2 with transparency enabled
- Theme: custom theme with
"background": "none"
Expected behavior
Badge text should remain visible regardless of whether theme.background is transparent.
Suggested fix
Use a high-contrast color for badge text instead of theme.background. For example:
Or compute a contrasting color from theme.accent (the badge background), similar to how opencode's selectedForeground() handles transparent backgrounds in packages/tui/src/theme/index.ts.
Problem
The sidebar header badge renders text using
fg={theme.background}:(Source:
src/tui/sidebar.tsx, line ~605)When the user's theme sets
background: "none"(transparent — the documented way to respect terminal transparency, per https://opencode.ai/docs/themes/#terminal-defaults),theme.backgroundresolves toRGBA(0,0,0,0). The badge text becomes fully transparent and invisible.This makes transparent themes — including the built-in
systemtheme when the terminal has a custom background — effectively unusable with the plugin sidebar.The same issue exists in the magic-context plugin (
src/tui/slots/sidebar-content.tsx, line ~693), which uses the identical pattern.Environment
"background": "none"Expected behavior
Badge text should remain visible regardless of whether
theme.backgroundis transparent.Suggested fix
Use a high-contrast color for badge text instead of
theme.background. For example:Or compute a contrasting color from
theme.accent(the badge background), similar to how opencode'sselectedForeground()handles transparent backgrounds inpackages/tui/src/theme/index.ts.