Skip to content

fix(app): keep workspace message text readable on accent themes - #51528

Closed
Dante-dan wants to merge 6 commits into
anomalyco:devfrom
Dante-dan:workspace-contrast
Closed

Dante-dan wants to merge 6 commits into
anomalyco:devfrom
Dante-dan:workspace-contrast

Conversation

@Dante-dan

@Dante-dan Dante-dan commented Sep 26, 2026 •

Copy link
Copy Markdown
Contributor

Issue for this PR

Closes #50986

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Workspace user messages use the theme accent background, but paired it with a foreground meant for a different surface. One Dark Pro dark mode therefore rendered the message at about 1.1:1 contrast. I added an accent foreground token chosen against the resolved accent background and used it for the workspace message and mention prefix. This keeps the accent styling while choosing readable text for bright as well as dark accents. The selector and contrast diagnosis were documented in the issue discussion.

How did you verify your code works?

  • Current head merged v2 at de2cacd; upstream pending-message selectors and spacing remain intact.
  • bun test src/theme/v2/resolve.test.ts in packages/ui: 84 passed, 99 assertions, covering built-in color schemes, custom fallback and an overridden accent surface. git diff --check passed.
  • bun run check through the unmodified pre-push hook passed: full lint and SDK documentation checks, then 36/36 typecheck tasks. Astro diagnostics passed despite sandbox log-directory warnings.
  • Rendered an actual workspace message in the local app using One Dark Pro dark mode. Text is readable on the blue accent surface. The provider rejected the optional response request; this screenshot verifies message rendering, not a successful model response.

Screenshots / recordings

Before: Issue screenshot.

After, current code with One Dark Pro dark mode:

Readable workspace message

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

@github-actions

Copy link
Copy Markdown
Contributor

Thanks for your contribution!

This PR doesn't have a linked issue. All PRs must reference an existing issue.

Please:

  1. Open an issue describing the bug/feature (if one doesn't exist)
  2. Add Fixes #<number> or Closes #<number> to this PR description

See CONTRIBUTING.md for details.

@github-actions

Copy link
Copy Markdown
Contributor

The following comment was made by an LLM, it may be inaccurate:

@github-actions

Copy link
Copy Markdown
Contributor

Automated PR Cleanup

Thank you for contributing to opencode.

Due to the high volume of PRs from users and AI agents, we periodically close older PRs using automated criteria so maintainers can focus review time on the most active and community-supported contributions.

This PR was closed because it matched the following cleanup criteria:

  • The PR was created more than 1 month ago
  • The PR had fewer than 2 positive reactions
  • Positive reactions are counted as thumbs-up, heart, celebration, or rocket reactions on the PR

PRs created within the last month are not affected by this cleanup.

If you believe this PR was closed incorrectly, or if you are still actively working on it, please leave a comment explaining why it should be reopened. A maintainer can review and reopen it if appropriate.

Thanks again for taking the time to contribute.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

desktop: One Dark Pro workspace messages have low contrast

1 participant