Skip to content

Terminal bg forced opaque#84

Merged
lawrencecchen merged 1 commit intomainfrom
hstack-sibling-buttons
Mar 30, 2026
Merged

Terminal bg forced opaque#84
lawrencecchen merged 1 commit intomainfrom
hstack-sibling-buttons

Conversation

@lawrencecchen
Copy link
Copy Markdown

@lawrencecchen lawrencecchen commented Mar 30, 2026

Summary by cubic

Use the pane (terminal) background with full opacity for the tab bar split-button overlay to remove transparency artifacts and match the terminal color. This keeps the bar consistent in minimal mode and on hover.

Written for commit 5a5f9d9. Summary will update on new commits.

@lawrencecchen lawrencecchen merged commit 4bdce14 into main Mar 30, 2026
1 check passed
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 30, 2026

Warning

Rate limit exceeded

@lawrencecchen has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 19 minutes and 20 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 19 minutes and 20 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 8d7066c8-6247-48b9-9f7b-732ba63913bd

📥 Commits

Reviewing files that changed from the base of the PR and between 77d6def and 5a5f9d9.

📒 Files selected for processing (1)
  • Sources/Bonsplit/Internal/Views/TabBarView.swift
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch hstack-sibling-buttons

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 and usage tips.

Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

No issues found across 1 file

@greptile-apps
Copy link
Copy Markdown

greptile-apps bot commented Mar 30, 2026

Greptile Summary

This PR fixes a visual transparency issue where the split-button backdrop in the tab bar was bleeding through (showing as semi-transparent) when a terminal pane was active. The fix is a targeted one-line change that replaces TabBarColors.barBackground(for:) with an explicitly opaque version of TabBarColors.nsColorPaneBackground(for:).

Key changes:

  • Forces the split-button backdrop colour to be fully opaque via .withAlphaComponent(1.0), preventing the terminal background from showing through.
  • Switches the colour source from the bar background (fallback: .windowBackgroundColor) to the pane background (fallback: .textBackgroundColor), semantically matching the visible pane content behind the buttons.
  • No logic changes, no new APIs, and no impact on themed (custom chrome colour) setups — both helpers resolve to the same custom colour when one is configured.

Confidence Score: 5/5

  • Safe to merge — the change is a focused one-line fix with no runtime risk.
  • The only finding is a P2 style note about the fallback colour semantic shift (.windowBackgroundColor.textBackgroundColor) in non-themed setups. This is a minor visual concern and does not represent a regression or data issue. Themed setups are entirely unaffected. No P0/P1 issues identified.
  • No files require special attention.

Important Files Changed

Filename Overview
Sources/Bonsplit/Internal/Views/TabBarView.swift Single-line change swaps the split-button backdrop colour source from barBackground (fallback: .windowBackgroundColor) to nsColorPaneBackground (fallback: .textBackgroundColor) and forces full opacity via .withAlphaComponent(1.0). Fixes terminal transparency bleed-through; minor fallback-colour semantic shift in non-themed setups.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[Resolve backdrop colour] --> B{Custom chrome colour set?}
    B -- Yes --> C[Use custom chrome colour]
    B -- No --> D["NEW fallback: .textBackgroundColor"]
    C --> E[Force fully opaque via withAlphaComponent 1.0]
    D --> E
    E --> F[Render split-button backdrop]
    G["OLD fallback: .windowBackgroundColor"] -. replaced .-> D
Loading

Reviews (1): Last reviewed commit: "Use terminal bg (paneBackground forced o..." | Re-trigger Greptile

if showSplitButtons {
let shouldShow = presentationMode != "minimal" || isHoveringTabBar
let bg = TabBarColors.barBackground(for: appearance)
let bg = Color(nsColor: TabBarColors.nsColorPaneBackground(for: appearance).withAlphaComponent(1.0))
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Fallback color semantically changed for non-themed setups

The previous code used TabBarColors.barBackground(for:), which falls back to .windowBackgroundColor (the standard macOS window chrome background, typically a warm light-gray ~#ECECEC in light mode). The new code uses nsColorPaneBackground(for:), which falls back to .textBackgroundColor (the document/text background, typically pure white #FFFFFF in light mode).

These system colors are visibly distinct, so in the default (un-themed) case the split-button backdrop will no longer match the rest of the tab bar background, potentially creating a noticeable seam between the tab strip and the backdrop rectangle.

If the intent is strictly to force opacity while keeping the same visual background, you could express this as:

let bg = Color(nsColor: TabBarColors.nsColorBarBackground(for: appearance).withAlphaComponent(1.0))

(adding a matching nsColorBarBackground helper that mirrors the existing nsColorPaneBackground pattern but uses .windowBackgroundColor as the fallback).

If the intent is genuinely to match the pane/terminal background colour behind the buttons (which makes sense when a terminal fills the pane), the change is correct as-is — but it may be worth a comment explaining why paneBackground rather than barBackground is used here.

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.

1 participant