Skip to content

fix(wework): keep Windows sidebar dark in dark mode - #2490

Merged
qdaxb merged 2 commits into
wecode-ai:mainfrom
sdadunderscoresdad:fix/wework-sidebar-dark-mode-windows
Aug 7, 2026
Merged

qdaxb merged 2 commits into
wecode-ai:mainfrom
sdadunderscoresdad:fix/wework-sidebar-dark-mode-windows

Conversation

@sdadunderscoresdad

@sdadunderscoresdad sdadunderscoresdad commented Aug 7, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Fix the Windows wework sidebar falling back to a light/white background in dark mode.
  • Root cause: the CSS rule [data-theme='dark'][data-sidebar-translucent='false'] required both attributes on the same element, but data-theme lives on <html> while data-sidebar-translucent='false' lives on the sidebar <aside> (Windows Tauri only). The rule never matched, so the opaque light background rgb(243 243 243) won over the dark value inherited from <html>.
  • Fix: add a descendant selector [data-theme='dark'] [data-sidebar-translucent='false'] so the opaque Windows sidebar stays dark in dark mode.

Test plan

  • CSS cascade verified with real Chromium: dark + Windows aside resolves to rgb(33 33 33); light-mode and non-Windows behavior unchanged (6 other scenarios identical)
  • wework unit tests pass (307 files / 3016 tests)
  • prettier + eslint pass on changed files
  • Windows: manually confirm the sidebar renders dark in dark mode

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Bug Fixes
    • Improved sidebar appearance in dark mode when translucency is disabled.
    • Ensured Windows uses an opaque sidebar background consistently.

sdadunderscoresdad and others added 2 commits August 7, 2026 17:24
The opaque dark-theme sidebar rule required data-theme='dark' and
data-sidebar-translucent='false' on the same element, but the theme
lives on <html> while the translucent opt-out lives on the sidebar
<aside>, so the rule never matched and the sidebar fell back to a
light background on Windows. Add a descendant selector so dark mode
keeps the opaque sidebar dark.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Aug 7, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

The Windows sidebar test now checks the forced opaque state. The dark-theme CSS selector also handles data-sidebar-translucent="false" on an ancestor element.

Changes

Windows sidebar behavior

Layer / File(s) Summary
Sidebar opacity test and dark-theme selector
wework/src/components/layout/DesktopSidebar.test.tsx, wework/src/styles/globals.css
The Windows test checks data-sidebar-translucent="false". The dark-theme selector supports colocated and ancestor attributes.

Estimated code review effort: 2 (Simple) | ~5 minutes

Possibly related PRs

Suggested reviewers: qdaxb, icycrystal4, micro66

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the Windows sidebar dark-mode fix, which is the main change in the pull request.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
wework/src/components/layout/DesktopSidebar.test.tsx (1)

235-238: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Add a regression assertion for the dark opaque color.

The new assertion verifies only data-sidebar-translucent="false". It does not verify the CSS behavior changed by this PR. If this test loads wework/src/styles/globals.css, assert that the dark opaque sidebar resolves --color-sidebar to 33 33 33; otherwise add a focused stylesheet test.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@wework/src/components/layout/DesktopSidebar.test.tsx` around lines 235 - 238,
Extend the relevant dark-theme sidebar test near the data-sidebar-translucent
assertion to verify that the opaque sidebar resolves --color-sidebar to 33 33
33. If DesktopSidebar.test.tsx does not load globals.css, add a focused
stylesheet assertion instead, while preserving the existing translucency check.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@wework/src/components/layout/DesktopSidebar.test.tsx`:
- Around line 235-238: Extend the relevant dark-theme sidebar test near the
data-sidebar-translucent assertion to verify that the opaque sidebar resolves
--color-sidebar to 33 33 33. If DesktopSidebar.test.tsx does not load
globals.css, add a focused stylesheet assertion instead, while preserving the
existing translucency check.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 6289bc16-cad2-43e3-8d21-ab8f96bf6627

📥 Commits

Reviewing files that changed from the base of the PR and between 4e095c7 and b199887.

📒 Files selected for processing (2)
  • wework/src/components/layout/DesktopSidebar.test.tsx
  • wework/src/styles/globals.css

@qdaxb
qdaxb added this pull request to the merge queue Aug 7, 2026
Merged via the queue into wecode-ai:main with commit 4694439 Aug 7, 2026
47 checks passed
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