Repository navigation
Resolve a separate sidebar's content against its own backdrop - #14841
teamleaderleo merged 2 commits into
Conversation
A sidebar with its own material backdrop resolves that material against the app appearance, so its content must use the same scheme when an opaque terminal theme disagrees. A sidebar sharing the terminal backdrop keeps following the terminal. Fails on main: the separate-sidebar cases resolve to the terminal scheme.
Since manaflow-ai#10149 sidebar content follows the terminal-derived scheme, but a sidebar that doesn't share the terminal backdrop draws an NSVisualEffectView material that inherits the app appearance. With a Light app setting and a dark terminal theme, inactive workspace rows drew white text on the light material. WindowAppearanceSnapshot now takes the ambient scheme and derives sidebarContentColorScheme and the sidebar tint scheme from it unless unifySurfaceBackdrops is on; unified sidebars and all other chrome keep the terminal authority. Snapshots built without an ambient scheme keep the previous behavior.
|
I have read the CLA Document v2.2 and I hereby sign the CLA |
|
Thanks for opening your first cmux pull request! We're a small team and the outside-PR queue is long, so a reply can take a while — sometimes longer than we'd like. If this one goes quiet and you'd like eyes on it, comment here and we'll pick it up. A few things that help:
|
|
All contributors have signed the CLA ✍️ ✅ |
a509d35 to
dcabd78
Compare
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: manaflow-ai/cmux/.coderabbit.yaml Review profile: ASSERTIVE Plan: Advanced Run ID: 📒 Files selected for processing (3)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughThe snapshot now selects the sidebar scheme based on backdrop unification. Separate sidebars use the ambient app scheme when available; unified backdrops use the resolved terminal scheme. The resolver passes the ambient scheme, and tests cover both configurations. ChangesSidebar appearance
Priority: ➖ Normal Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix · Severity of issue fixed: Medium Suggested reviewers: Merge Risk: ⚪ Minimal · up to The sidebar scheme change matches the reported appearance behavior. No actionable merge blocker is established; normal checks remain appropriate. Security Architecture ReviewSecurity architecture risk: 🔵 Low · up to The change affects how sidebars choose text and tint colors. The reviewed paths lead to visual rendering, with no identified new security exposure. Compatibility for callers that do not supply an ambient scheme is preserved. Retained concerns Security review detailsSecurity Blast Radius
Trust Boundaries and Controls
🚥 Pre-merge checks | ✅ 24 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (24 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
|
Merge receipt for |
f5c179f iOS: fix the test failures that keep iOS CI red on main (manaflow-ai#14803) 8685bf5 Hold update relaunch while agents are mid-turn (manaflow-ai#14969) dc90332 Keep CLI socket-discovery tests off the host's real cmux (manaflow-ai#14919) dd3c91b docs: shorten root agent instructions and link existing procedures (manaflow-ai#14998) 8c744df Rename edits inline or in the palette, never in an alert (manaflow-ai#14986) 9ae4383 Calmer chrome motion: appear instantly, fade out only, no overshoot (manaflow-ai#14984) 6510f56 Write opencode config JSON without escaping slashes (cmux 7140) (manaflow-ai#14805) ab5e7da ci: stop catch-up merges from failing the CLA check (manaflow-ai#14913) 52c8f41 Add cmux session move for Claude sessions (manaflow-ai#14959) 36785b1 Hide decorative Settings sidebar icons from VoiceOver (manaflow-ai#14989) 4c7158c Label the sound preview button and fix mistranslated action verbs (manaflow-ai#14983) e704a77 Bound untracked paths stored in last-turn diff baselines (manaflow-ai#14980) f073df1 Fix remote Files sidebar for names that change under NFD (manaflow-ai#14978) 5c68499 Bump bonsplit: mouse wheel scrolls the overflowed tab strip (manaflow-ai#14985) 9466dcb Keep agent resume bindings through the update-relaunch save (manaflow-ai#14971) ef8b037 docs: take release notes from a Changelog section in each PR instead of CHANGELOG.md edits (manaflow-ai#14934) 6eddfd7 ci: skip the delta diff when main moved further than the pull request (manaflow-ai#14987) fefcec7 ci: attribute red PR runs to the machine or the code, re-run machine failures once (manaflow-ai#14977) c185deb Accept file drops on remote tmux mirror panes (manaflow-ai#14981) 90773c7 test: make CmuxSidebarGit probe waits event-driven (manaflow-ai#14973) 1f2dbfe ci: skip the scheduled Blacksmith cache warmers while owned pools serve PRs (manaflow-ai#14827) 2850651 docs: add a guide to customizing cmux's look (manaflow-ai#14850) b66e365 Resolve a separate sidebar's content against its own backdrop (manaflow-ai#14841) 88a9360 UI tests: one labelled frame per action, built in CI; scripts/ui-test (manaflow-ai#14966) 20cfa78 fix(omo): resolve relative file refs in the shadow config without double-loading OpenCode config (manaflow-ai#14935) f0e964c ci: make the aggregate app-host product the default, layers opt-in (manaflow-ai#14975) 52dce98 ci: run and register the machine-failure test (manaflow-ai#14972) 7bf48bc ci: route compile admission by kept-build distance across minis (manaflow-ai#14949) 44fa3f5 Offer cmux in Open With for Markdown, source, and text files (manaflow-ai#14968) 45c2d66 Replay the Claude session id of agents in cmux ssh (cmux-tui) panes (manaflow-ai#14906) b4c1b31 Label icon-only chrome buttons and localize project panel text (manaflow-ai#14926) 14a6909 seed prefetch: keep the seed adopt would pick, of any seeded width (manaflow-ai#14944) 19e73d2 ci: self-calibrating warm-distance compile estimates (manaflow-ai#14932) fa98d86 ci: redispatch focused runs the Mac failed before any test started (manaflow-ai#14963)
With the app set to Light and a dark terminal theme, inactive rows in the left sidebar now draw dark text on the light sidebar material instead of white. Fixes #14840.
A sidebar that doesn't share the terminal backdrop draws an
NSVisualEffectViewmaterial that inherits the app appearance, but since #10149 its content followed the terminal-derived scheme.WindowAppearanceSnapshotnow takes the ambient scheme (the resolver passessettings.colorScheme, whichContentViewfills fromAppearanceSettings.effectiveColorScheme(for: appearanceMode, …)) and uses it forsidebarContentColorSchemeand the sidebar tint scheme unlessunifySurfaceBackdropsis on. Unified sidebars,chromeColorScheme, and the rest of the chrome keep the terminal authority. Snapshots built without an ambient scheme keep the old behavior, so directWindowAppearanceSnapshot(...)callers are unchanged.The tint scheme lives in the shared
sidebarSettings, so the right sidebar's material tint variant follows the same rule; its content scheme is untouched.Evidence
64423f01d4addssidebarSchemeFollowsTheSurfaceItIsDrawnOn(unified/separate × terminal/ambient disagreement).swift test --package-path Packages/macOS/CmuxAppKitSupportUIon that commit: 54 tests, 4 issues, all in the separate-sidebar cases.dcabd785d6is the fix; it also updates two existing resolver tests that asserted the separate sidebar follows the terminal. Same command: 54 tests pass.python3 scripts/verify-local.py --affected upstream/main --swift-changed upstream/main: 3/3 checks pass.CMUX_DEV_BACKEND_MODE=local), Light,theme = light:0x96f: on main the inactive row title is white on the light material; with this branch it's dark. Dark mode renders as before.cmuxTestsapp-host suites.WindowAppearanceSnapshotTestsbuilds snapshots without an ambient scheme, so it should keep the old behavior; CI will confirm.Related: #10509 fixes group-header labels in the SwiftUI sidebar and doesn't touch this path. #13353 proposes separating UI appearance from terminal themes more broadly.
Summary by CodeRabbit