Skip to content

fix: use Harness theme aliases in dark mode - #12

Open
haotian-lu-prog wants to merge 2 commits into
AHGGG:masterfrom
haotian-lu-prog:agent/fix-dark-theme-contrast
Open

fix: use Harness theme aliases in dark mode#12
haotian-lu-prog wants to merge 2 commits into
AHGGG:masterfrom
haotian-lu-prog:agent/fix-dark-theme-contrast

Conversation

@haotian-lu-prog

Copy link
Copy Markdown

Summary

  • derive Side Chat surfaces, borders, text, controls, and bubbles from the Harness semantic theme aliases
  • keep the legacy --dsw-* variables as fallbacks for compatibility with older hosts
  • add regression coverage for the selection toolbar and annotation editor theme contracts

Why

In DeepSeek Harness dark mode, the plugin's selection toolbar and other Side Chat surfaces could render with their light fallback backgrounds while inheriting the host's light foreground color. This produced white or near-white text on a white surface and made the controls unreadable.

The current Harness theme publishes colors through semantic aliases such as --dsw-alias-bg-layer-2, --dsw-alias-label-primary, and --dsw-alias-border-l2. Using those aliases keeps the plugin synchronized with both light and dark palettes without hard-coding a separate dark theme.

User impact

The Side Chat panel, selected-text action toolbar, annotation editor, message bubbles, and interactive states now remain readable in both light and dark appearance modes.

Validation

  • npm run typecheck
  • npm run lint
  • npm run test (76 tests)
  • npm_config_cache=/private/tmp/dsh-side-chat-npm-cache npm run pack:verify
  • real-browser visual smoke test with the Harness rc.6 theme sheets:
    • dark: rgb(44, 44, 46) surface / rgb(249, 250, 251) text (13.34:1 contrast)
    • light: rgb(255, 255, 255) surface / rgb(15, 17, 21) text

@AHGGG

AHGGG commented Aug 15, 2026

Copy link
Copy Markdown
Owner

Thanks for your contribution! it looks like the issue still persists
image

@AHGGG

AHGGG commented Aug 15, 2026

Copy link
Copy Markdown
Owner

Maybe we need to add @deepseek-ai/dsh-client-ui-theme to devDependencies, I'll fix it

@AHGGG
AHGGG marked this pull request as ready for review August 15, 2026 16:05
@AHGGG

AHGGG commented Aug 15, 2026

Copy link
Copy Markdown
Owner

Could you please verify that dark mode works on your machine? I'll merge this PR if everything looks good.
image

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants