Repository navigation
Fix Cloud VM panel text readability across all terminal themes - #7538
Conversation
The CloudVMLoadingPanelView paints the terminal theme's background color (from the user's Ghostty config) but rendered its text with SwiftUI semantic colors (.primary/.secondary/.tertiary/.orange) that resolve against the system light/dark appearance, not the actual background. On a dark theme under a light system appearance (and vice versa) the failed- state message rendered dark-on-dark and was unreadable. Derive the panel's colorScheme from the background's luminance via the existing WindowChromeColorResolver.readableColorScheme(for:) and pin it with .environment(\.colorScheme,), so text always contrasts with the panel on every theme. Co-Authored-By: Claude <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Warning Review limit reachedNext included review available in 3 minutes. View limit detailsLimit details: You’ve used all 10 included reviews currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: Repository: manaflow-ai/cmux/.coderabbit.yaml Review profile: ASSERTIVE Plan: Advanced Run ID: 📒 Files selected for processing (1)
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Advanced Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 10 included reviews per hour; 5 remain after this review. 📝 WalkthroughWalkthroughChangesPanel Background Color Scheme
Priority: ⬇️ Low Estimated code review effort: 1 (Trivial) | ~5 minutes Change: Bug fix Suggested reviewers: Merge Risk: ⚪ Minimal · up to The change improves loading-panel readability, and theme updates refresh the panel while visible. No merge-blocking risk remains. 🚥 Pre-merge checks | ✅ 25✅ Passed checks (25 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 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 |
Greptile SummaryThis PR updates the Cloud VM loading/error panel colors.
Confidence Score: 5/5The changed panel looks mergeable after a small UI freshness cleanup.
Sources/Panels/PanelContentView.swift Important Files Changed
Reviews (1): Last reviewed commit: "Fix Cloud VM panel text readability acro..." | Re-trigger Greptile |
| } | ||
| .padding(32) | ||
| .frame(maxWidth: .infinity, maxHeight: .infinity) | ||
| .background(Color(nsColor: GhosttyApp.shared.defaultBackgroundColor)) | ||
| .background(Color(nsColor: backgroundColor)) |
There was a problem hiding this comment.
When the Ghostty background changes while this Cloud VM panel is already open, backgroundColor and readableScheme stay tied to the last outer body evaluation instead of the next timeline refresh. The panel previously read the background inside the timeline-rendered subtree, so a theme reload could repaint on the next tick; now the visible loading/error panel can keep the old background and text scheme until unrelated panel state forces a rebuild.
Rule Used: Flag SwiftUI changes that can cause stale state, b... (source)
|
All contributors have signed the CLA ✍️ ✅ |
|
Mac fleet instructions for head JOB_JSON=$(~/.local/bin/cmux-ci submit --kind cmux --command 'CMUX_FLEET_BUILD_TAG=pr-7538-1b6d9a14 /Users/Shared/cmux-build-fleet/recipes/cmux.sh https://github.com/manaflow-ai/cmux.git 1b6d9a14ef5784a93f1d8c814593de02ae7358a4' --artifact artifacts/cmux.app.zip --workspace https://github.com/manaflow-ai/cmux/pull/7538 --source-digest 1b6d9a14ef5784a93f1d8c814593de02ae7358a4 --cache-key cmux:pr-7538 --min-free-bytes 268435456000 --label cmux --label ram48)
JOB_ID=$(python3 -c 'import json,sys; print(json.load(sys.stdin)["id"])' <<<"$JOB_JSON")
~/.local/bin/cmux-ci wait "$JOB_ID" --receipt artifacts/fleet/$JOB_ID.json
~/.local/bin/cmux-ci publish-hq "$JOB_ID"Use an existing campaign job ID if one is already posted; do not submit a duplicate. A wait timeout leaves the remote job running. Published results will include an exact-head artifact link and timing/disk receipt. This recipe validates the macOS app only, not iOS or tests. Never use maclease or put credentials in a PR comment. |
# Conflicts: # Sources/Panels/CloudVMLoadingPanelView.swift
|
Reviewed: the loading panel still paints the Ghostty background with semantic text colors and no color-scheme override, so this is still needed. I merged main in. Main moved the modifiers from |
4aa2736 Fix cmux events access-denied stream error (manaflow-ai#10712) f4ff9af ci: never let a focused test run pass after executing zero tests (manaflow-ai#14053) fbaf239 Fix persistent LaunchServices registration from duplicate plist keys (manaflow-ai#12990) 7b1cb4a Fix Hermes gateway with symlinked venv Python (manaflow-ai#12996) b6b2720 ssh-tmux mirror: preserve deliberate pane titles (manaflow-ai#10714) 33edbc7 Fix Cloud VM panel text readability across all terminal themes (manaflow-ai#7538) 30dccd6 fix: prevent detached TUI preferred editor processes (manaflow-ai#10681) 22eec58 Reap disowned shell watchers on parent PID reuse (issue 10926) (manaflow-ai#11035) 0b9b318 ci: start Linux-only jobs beside Fast static checks (manaflow-ai#14181) 9e78d22 ci: one git archive for the trusted router; delete duplicate CI guard tests (manaflow-ai#14199) 20e79e6 feat: load local cmux config packs (manaflow-ai#13356) 224327b ci: download the admission DerivedData seed while packages resolve (manaflow-ai#14184) 886a6f0 ci: run changed suites inside compile admission (manaflow-ai#14182) # Conflicts: # .github/workflows/ci-guards.yml # .github/workflows/ci-macos.yml # .github/workflows/ci.yml # .github/workflows/test-e2e.yml # .github/workflows/test-macos-suite.yml
The Cloud VM loading/error panel (
CloudVMLoadingPanelView) paints the terminal theme's background color from the user's Ghostty config, but rendered its text with SwiftUI semantic colors (.primary/.secondary/.tertiary/.orange) that resolve against the system light/dark appearance rather than the actual background. On a dark theme under a light system appearance (and the reverse), the "Base unavailable" message rendered dark-on-dark and was unreadable — the reported bug.Fix: derive the panel's color scheme from the background's luminance using the existing
WindowChromeColorResolver.readableColorScheme(for:)(the same helper cmux already uses for readable chrome text over terminal backgrounds) and pin it with.environment(\.colorScheme,). Text now contrasts with the panel on every theme, light or dark.Scope: presentational only, no string or logic changes. No new user-facing strings, so localization is unaffected. Principled fix (reuses the established readable-scheme helper rather than hardcoding colors).
Verified: cloud Release-capable Debug build compiles (tag
cvmerr). The live failed-panel visual is best confirmed in dogfood since forcing the.failedphase requires a real provisioning failure and this CLI build has no panel-screenshot verb.🤖 Generated with Claude Code
Need help on this PR? Tag
/codesmithwith what you need. Autofix is disabled.Note
Low Risk
Presentational SwiftUI change only; reuses an existing contrast helper with no auth, provisioning, or logic changes.
Overview
Fixes unreadable text on the Cloud VM loading/error panel when the terminal theme background disagrees with the system light/dark appearance.
CloudVMLoadingPanelViewstill uses the Ghostty default background, but it now derives a readableColorSchemeviaWindowChromeColorResolver.readableColorScheme(for:)(same approach as window chrome) and applies.environment(\.colorScheme, readableScheme)so.primary/.secondary/.tertiaryresolve against the panel, not macOS appearance alone.Reviewed by Cursor Bugbot for commit 29cb166. Bugbot is set up for automated code reviews on this repo. Configure here.
Summary by cubic
Fixes unreadable text in the Cloud VM loading/error panel when the terminal theme and system appearance don't match. The panel now derives a readable color scheme from the terminal background and pins it via
.environment(\.colorScheme), so text keeps contrast across themes.WindowChromeColorResolver.readableColorScheme(for:), the same helper used for window chrome text.Written for commit a1da579. Summary will update on new commits.
Summary by CodeRabbit