Skip to content

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

Open
Dante-dan wants to merge 1 commit into
anomalyco:v2from
Dante-dan:workspace-contrast
Open

Dante-dan wants to merge 1 commit into
anomalyco:v2from
Dante-dan:workspace-contrast

Conversation

@Dante-dan

Copy link
Copy Markdown

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?

  • bun test src/theme/v2/resolve.test.ts in packages/ui: 84 passed, including all built-in themes in both color schemes and a custom theme fallback.
  • bun typecheck in packages/ui: passed.
  • bun run check: lint passed with 0 errors and 0 warnings; full typecheck stopped because this worktree lacks the astro executable for services/www.
  • bun run typecheck:e2e reported two errors in untouched performance probe files.
  • The targeted Playwright regression could not launch Chromium on this macOS sandbox (MachPortRendezvousServer permission denied). The expected browser version was unavailable, and downloading it hit the host disk limit.

Screenshots / recordings

Before: One Dark Pro workspace screenshot from the issue. The after screenshot in the updated E2E test could not be captured on this host because Chromium was blocked as described above.

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:

This branch has not been deployed

No deployments
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.

1 participant