You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
tui v2: sidebar slot colors stay stale after system theme change #40023
TUI sidebar slot content does not update its foreground colors after the terminal switches between light and dark mode. The sidebar shell updates, but the built-in Context and MCP slot content keeps colors from the mode in which the TUI was opened.
Active TUI plugins: local TPS sidebar plugin (oc-tps.tsx)
Theme configuration: vercel, mode: "system"
Reproduction
Set theme.mode to "system" and use a theme with both light and dark variants, such as vercel.
Open the TUI while the terminal follows the system light appearance. Context and the MCP list initially render correctly.
Switch the terminal's system appearance to dark without restarting the TUI.
Observe that the sidebar background/title updates to dark mode, but Context and MCP text retains its light-mode dark foreground and becomes nearly invisible.
Restart the TUI while the terminal follows the system dark appearance, then switch the terminal's system appearance to light. The failure is reversed: Context and MCP retain dark-mode light foregrounds and become nearly invisible.
Expected Behavior
All sidebar content, including built-in Context and MCP plugins, updates its foreground colors when the TUI detects a terminal light/dark mode change.
Actual Behavior
Only the sidebar shell updates. Built-in slot content retains colors from the mode active at mount time. The problem reproduces consistently in both directions and does not depend on MCP server configuration.
Screenshots
Light -> dark
Dark -> light
Additional Context
The issue is visible in built-in sidebar slots; the local TPS plugin is only an additional symptom:
tui/src/feature-plugins/sidebar/context.tsx stores const theme = props.context.theme in View.
tui/src/feature-plugins/sidebar/mcp.tsx does the same.
This appears to capture a theme snapshot. The theme provider changes the selected mode and updates the sidebar shell, while these slot colors remain stale.
This also makes custom sidebar plugins unable to safely use context.theme for mode-aware colors. A local TPS sidebar plugin either inherits a foreground that is only visible in one mode or captures the mode active at mount.
This issue might be a duplicate of existing issues. Please check:
TUI dark/light mode does not follow Windows system theme #36252: TUI dark/light mode does not follow Windows system theme — covers related behavior where the TUI does not react to system theme changes (different platform/scope but overlapping root cause area)
Activity
github-actions commentedon Aug 1, 2026
This issue might be a duplicate of existing issues. Please check:
github-actions commentedon Oct 2, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.