Fix inconsistent theme chrome on non-mounted workspaces#1432
Fix inconsistent theme chrome on non-mounted workspaces#1432lederniermagicien wants to merge 1 commit intomanaflow-ai:mainfrom
Conversation
When the system appearance changes (light/dark mode toggle) or Ghostty reloads its config, the default background color updates and a ghosttyDefaultBackgroundDidChange notification fires. However, only the currently-mounted WorkspaceContentView (one workspace at a time, per WorkspaceMountPolicy.maxMountedWorkspaces=1) observes this notification and calls workspace.applyGhosttyChrome(). Non-mounted workspaces retain stale bonsplit chrome until the user switches to them and their view fires onAppear. This causes inconsistent tab bar/split bar colors after: - System appearance toggles with multiple workspaces - Session restore creating workspaces before the first surface triggers a config reload Fix: observe ghosttyDefaultBackgroundDidChange in ContentView (which owns the full tabManager.tabs list) and push applyGhosttyChrome to every workspace. The existing isNoOp guard inside applyGhosttyChrome ensures workspaces already at the correct color are skipped.
|
@lederniermagicien is attempting to deploy a commit to the Manaflow Team on Vercel. A member of the Team first needs to authorize it. |
There was a problem hiding this comment.
Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughA new listener for appearance changes is added to ContentView that detects Ghostty background color and opacity updates, automatically propagating these changes to all mounted workspaces via Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
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 Tip You can validate your CodeRabbit configuration file in your editor.If your editor has YAML language server, you can enable auto-completion and validation by adding |
There was a problem hiding this comment.
No issues found across 1 file
Since this is your first cubic review, here's how it works:
- cubic automatically reviews your code and comments on bugs and improvements
- Teach cubic by replying to its comments. cubic learns from your replies and gets better over time
- Add one-off context when rerunning by tagging
@cubic-dev-aiwith guidance or docs links (includingllms.txt) - Ask questions if you need clarification on any suggestion
Problem
When the system appearance changes (light/dark mode toggle) or Ghostty reloads its config, the default background color updates and a
ghosttyDefaultBackgroundDidChangenotification fires. However, only the currently-mountedWorkspaceContentView(one workspace at a time, perWorkspaceMountPolicy.maxMountedWorkspaces=1) observes this notification and callsworkspace.applyGhosttyChrome(). Non-mounted workspaces retain stale bonsplit chrome until the user switches to them and their view firesonAppear.This causes inconsistent tab bar/split bar colors after:
Fix
Observe
ghosttyDefaultBackgroundDidChangeinContentView(which owns the fulltabManager.tabslist) and pushapplyGhosttyChrometo every workspace. The existingisNoOpguard insideapplyGhosttyChromeensures workspaces already at the correct color are skipped.Why this is safe
applyGhosttyChromehas a built-in no-op check: if the workspace's chrome hex already matches, it returns immediatelyContentView(one per window) iterates only its owntabManager.tabsSummary by cubic
Fixes inconsistent tab/split chrome across workspaces by updating all tabs when the default background changes. When system appearance or config reload updates the background, every workspace now refreshes immediately.
ghosttyDefaultBackgroundDidChangeinContentViewand callapplyGhosttyChromefor each workspace with the current background color/opacity.Written for commit 0646798. Summary will update on new commits.
Summary by CodeRabbit