Fix pane background alpha stacking with translucent themes#30
Fix pane background alpha stacking with translucent themes#30EduardoBautista wants to merge 1 commit intomanaflow-ai:mainfrom
Conversation
paneBackground() returns the chrome background color with alpha baked in. When Ghostty's background-opacity is < 1.0, the terminal renderer already draws a translucent background. Painting another translucent layer here causes alpha stacking (two layers at 0.9 combine to 0.99), making the result appear nearly opaque. Return .clear when the resolved color has alpha < 1.0, matching the existing pattern in GhosttyTerminalView.panelBackgroundFillColor().
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.
📝 WalkthroughWalkthroughThe change modifies tab bar color computation to prevent double alpha compositing when translucent backgrounds are in use. Both SwiftUI Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ 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 CodeRabbit can enforce grammar and style rules using `languagetool`.Configure the |
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
Summary
.clearfrompaneBackground()/nsColorPaneBackground()when the resolved chrome color has alpha < 1.0GhosttyTerminalView.panelBackgroundFillColor()Context
PR #29 fixed intermediate split wrapper/container layers but
SplitViewContainerstill applies.background(TabBarColors.paneBackground(...))at the root, which paints a duplicate translucent layer.Test plan
background-opacity = 0.9: single pane should be visibly transparentbackground-opacity = 1.0(or unset): solid background, no regressionSummary by cubic
Fixes pane background alpha stacking with translucent themes so transparency looks correct in split panes. If the resolved chrome background is translucent, we stop drawing a second translucent layer.
TabBarColors.paneBackground(...)andnsColorPaneBackground(...)return.clearwhenalphaComponent < 0.999.GhosttyTerminalView.panelBackgroundFillColor().Written for commit ac2ea07. Summary will update on new commits.
Summary by CodeRabbit
Bug Fixes