Skip to content

Add user CSS override hook for desktop app theming (VS Code workbench.css equivalent) #40177

Closed as not planned

Description

@cngonzo

Problem

Desktop app ignores custom TUI themes (~/.config/opencode/themes/). Message fills use CSS vars (not theme tokens), making hue-based distinction impossible without direct CSS access. Current workaround (CDP injection) breaks on app updates.

Evidence

  • User message: [data-component="user-message"] [data-slot="user-message-text"] → var(--v2-background-bg-layer-02)
  • AI message: [data-slot="session-turn-assistant-content"] → transparent
  • Verified: Electron renderer ignores filesystem theme discovery

Proposed Solution

Add user CSS override file (e.g. ~/.config/opencode/desktop.css) that loads AFTER bundled themes, allowing:

/* Example: 180° hue separation */
[data-slot="session-turn-assistant-content"] {
  background: hsl(from var(--v2-background-bg-base) calc(h + 180) 100% 8%);
}

Why This Matters

Users need visual distinction during scroll (not just luminance contrast) for accessibility and workflow efficiency. Current hard-coded theme system prevents personalization.

Activity

  1. github-actions commented on Aug 2, 2026

    @github-actions
    Contributor

    This issue doesn't fully meet our contributing guidelines.

    What needs to be fixed:

    • This appears to be a feature request but the title does not start with [FEATURE]: as required by the feature request template.
    • The issue does not use the feature request template, which requires a verification checkbox confirming you searched for existing issues and that this is not a duplicate.

    Please edit this issue to address the above within 2 hours, or it will be automatically closed.

    If you believe this was flagged incorrectly, please let a maintainer know.

  2. github-actions commented on Aug 2, 2026

    @github-actions
    Contributor

    This issue has been automatically closed because it was not updated to meet our contributing guidelines within the 2-hour window.

    Feel free to open a new issue that follows our issue templates.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions