Repository navigation
fix(ui): follow the host theme when style variables are missing - #406
Conversation
Default the card's colour variables with light-dark() so they track the
effective color-scheme, and read the spec's --color-text-{success,danger,warning}
names instead of non-spec ones.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Theme defaults and shared component colors src/ui/workspace-app.css |
The root defines light and dark theme defaults. Shared component colors and common controls use theme variables without hard-coded fallbacks. |
Workspace and instruction colors src/ui/workspace-app.css |
Workspace and instruction colors, statuses, and previews use shared theme variables without hard-coded fallbacks. |
Review and diff colors src/ui/workspace-app.css |
Review labels, file-kind badges, paths, statuses, and diff backgrounds use shared theme variables without hard-coded fallbacks. |
Priority:
Estimated code review effort: 2 (Simple) | ~12 minutes
Change: Bug fix
Possibly related PRs
- Waishnav/devspace#404: Adds replay QA for MCP cards and reports the host-variable and dark-card issues addressed by this stylesheet update.
Merge Risk: 
Minimal · up to c208a
-
The theme fallback changes are mergeable with no remaining actionable risk.
Pre-merge checks: 
5
-
Full details: Docstring Coverage
-
Explanation
No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0 files. (1 skipped: 1 unsupported.)
-
Finishing Touches: 💡 1
-
🧪 Generate unit tests (beta)
-
- Commit to this branch
- Create a new PR
🛠️ Fix failing CI checks: 💡
-
- Commit to this branch
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
A rabbit checks the colors in the light,
Then tests the dark theme through the night.
Shared tokens guide each shade in place,
No fallback hues remain to chase.
The workspace glows; the diffs look right!
Comment @coderabbitai help to get the list of available commands.
A host that sends
theme: "light"but nostyles.variablesgot a dark card on a light page. Every card colour came from a host variable with a hard-coded dark fallback, so the fallbacks ignored the theme the card had already applied to the document. Separately, the card read--color-success-text,--color-danger-textand--color-warning-text, which aren't MCP Apps style variable names (the spec has--color-text-successand friends), so hosts never filled them and the+N -Mstats fell back to pale green and red even on light backgrounds.The fix declares defaults once on
:rootwithlight-dark(), which follows the effectivecolor-schemethatapplyDocumentThemepins to the host theme. Host variables are still set inline on the root, so they win whenever present. The per-use hard-coded fallbacks are removed, and the status colours now use the spec names. The diff viewer's--diffs-*backgrounds were built from the same fallbacks, so they follow along with no further change. Minor side effect: the three slightly different dark greys and text greys used as fallbacks are now one value each, so a bare dark host differs by a few shades.Checked with the replay QA harness (
codex-edit-review, #404) againstorigin/mainand this branch, in a themed host and a bare host (theme only, no variables), light and dark. The bare light host is the bug.Bare light host, before / after
Bare light host, expanded diff, before / after
Themed light host (diff stat colours), before / after
Themed dark host, before / after
Bare dark host, before / after
Expanded diffs after the change, themed host: light, dark.
pnpm typecheck,pnpm testandpnpm buildpass locally. Only the local MCP Apps host was used, not ChatGPT or Claude. The Smoke check fails on every PR because of the koffi release issue fixed by #403.🤖 Generated with Claude Code
Summary by CodeRabbit