Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
52b8088
Add hover background to split action buttons
lawrencecchen Mar 28, 2026
81af9da
Prevent fade overlays from bleeding into bottom separator
lawrencecchen Mar 28, 2026
f2dc14b
Render bottom separator above fade overlays to prevent bleed
lawrencecchen Mar 28, 2026
a787166
Exclude drop zone from scroll fade threshold
lawrencecchen Mar 28, 2026
9ae375c
Revert button hover, fix fade threshold with 32pt buffer
lawrencecchen Mar 28, 2026
0feca11
Fix right fade threshold: subtract drop zone, 4pt tolerance
lawrencecchen Mar 28, 2026
e9b2e4b
Add leading padding to split buttons, fix fade threshold
lawrencecchen Mar 28, 2026
9a45708
Rework tab bar: full-width scroll with floating split buttons
lawrencecchen Mar 28, 2026
9932983
Use ultraThinMaterial blur for floating split buttons
lawrencecchen Mar 28, 2026
7dff656
Make split buttons group full height
lawrencecchen Mar 28, 2026
d47ab35
Full-height split button blur background
lawrencecchen Mar 28, 2026
a6758c5
Inset split buttons from bottom separator
lawrencecchen Mar 28, 2026
1e538ae
Fix blur overlapping separator
lawrencecchen Mar 28, 2026
1690dd1
Use matching tab bar bg for split buttons, clear separator
lawrencecchen Mar 28, 2026
389a665
Use regularMaterial blur for split buttons
lawrencecchen Mar 28, 2026
c20b219
Try thickMaterial for split buttons
lawrencecchen Mar 28, 2026
cf62e85
Fade gradient + solid barFill for floating split buttons
lawrencecchen Mar 28, 2026
1d38fa2
Use extended right fade as split buttons backdrop
lawrencecchen Mar 28, 2026
6be43dd
Add 5 debug styles for split button background
lawrencecchen Mar 28, 2026
ec3432e
Add Split Button Style debug window to Debug menu
lawrencecchen Mar 28, 2026
7e70970
Clean up: no-bg floating buttons, alphabetical debug menu
lawrencecchen Mar 28, 2026
e64bbe8
Revert to HStack sibling layout, add debug menu docs to CLAUDE.md
lawrencecchen Mar 28, 2026
3be593d
Add Split Button Layout debug window with 5 switchable approaches
lawrencecchen Mar 28, 2026
064660c
Fix fade gradient color to match tab bar background
lawrencecchen Mar 28, 2026
e6edc1e
Add fade color debug window with 6 color options
lawrencecchen Mar 28, 2026
79dbc9b
Use mask for scroll fades, fixes color mismatch
lawrencecchen Mar 28, 2026
419f6a9
Hide scroll fades in minimal mode unless hovering
lawrencecchen Mar 28, 2026
d59f040
Remove split buttons from layout when hidden in minimal mode
lawrencecchen Mar 30, 2026
91af725
Always show fades, overlay buttons to prevent scroll jump
lawrencecchen Mar 30, 2026
d064bb0
Add hover-only mask fade behind split buttons
lawrencecchen Mar 30, 2026
7f852bf
Reduce button mask area to 90pt
lawrencecchen Mar 30, 2026
0bed9ad
Animate button mask smoothly
lawrencecchen Mar 30, 2026
7f4b3e2
Fade entire button group together via opacity
lawrencecchen Mar 30, 2026
5bf7ea1
Add blur behind buttons with fade mask
lawrencecchen Mar 30, 2026
c5609a8
Use theme barBackground for button backdrop
lawrencecchen Mar 30, 2026
d1c78d1
Blur + theme tint for button backdrop
lawrencecchen Mar 30, 2026
00360af
More tint (0.85), less blur
lawrencecchen Mar 30, 2026
6977684
Tint 0.2, clear bottom border
lawrencecchen Mar 30, 2026
6afa2f0
Use terminal bg color, add scroll trailing padding for buttons
lawrencecchen Mar 30, 2026
01ba1fe
Less blur, paneBackground at 0.75 opacity
lawrencecchen Mar 30, 2026
1bfca09
paneBackground at 0.9 opacity
lawrencecchen Mar 30, 2026
af34d5c
0.97 opacity for button backdrop
lawrencecchen Mar 30, 2026
3732418
Test: fully opaque paneBackground
lawrencecchen Mar 30, 2026
ef502f8
Test: solid red backdrop
lawrencecchen Mar 30, 2026
2e26ca6
Gradient + solid paneBackground backdrop, no mask
lawrencecchen Mar 30, 2026
f372b7c
Force opaque paneBackground for button backdrop
lawrencecchen Mar 30, 2026
524b3cb
Use barBackground for button backdrop
lawrencecchen Mar 30, 2026
b3c9dd1
Use terminal bg (paneBackground forced opaque)
lawrencecchen Mar 30, 2026
74194fa
Pre-composite backdrop color for exact match
lawrencecchen Mar 30, 2026
eeb9d67
Add 6 switchable backdrop styles in debug window
lawrencecchen Mar 30, 2026
ff8b0a4
Mask-based button area hiding, no backdrop color needed
lawrencecchen Mar 30, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,14 @@ When adding a regression test for a bug fix, use a two-commit structure so CI pr

This makes it visible in the GitHub PR UI (Commits tab, check statuses) that the test genuinely fails without the fix.

## Debug menu

The app has a **Debug** menu in the macOS menu bar (only in DEBUG builds). Use it for visual iteration:

- **Debug > Debug Windows** contains panels for tuning layout, colors, and behavior. Entries are alphabetical with no dividers.
- To add a debug toggle or visual option: create an `NSWindowController` subclass with a `shared` singleton, add it to the "Debug Windows" menu in `Sources/cmuxApp.swift`, and add a SwiftUI view with `@AppStorage` bindings for live changes.
- When the user says "debug menu" or "debug window", they mean this menu, not `defaults write`.

## Pitfalls

- **Custom UTTypes** for drag-and-drop must be declared in `Resources/Info.plist` under `UTExportedTypeDeclarations` (e.g. `com.splittabbar.tabtransfer`, `com.cmux.sidebar-tab-reorder`).
Expand Down
97 changes: 80 additions & 17 deletions Sources/cmuxApp.swift
Original file line number Diff line number Diff line change
Expand Up @@ -474,14 +474,12 @@ struct cmuxApp: App {

Divider()
Menu("Debug Windows") {
Button("Debug Window Controls…") {
DebugWindowControlsWindowController.shared.show()
Button("Background Debug…") {
BackgroundDebugWindowController.shared.show()
}

Button("Browser Import Hint Debug…") {
BrowserImportHintDebugWindowController.shared.show()
}

Button(
String(
localized: "debug.menu.browserProfilePopoverDebug",
Expand All @@ -490,26 +488,21 @@ struct cmuxApp: App {
) {
BrowserProfilePopoverDebugWindowController.shared.show()
}

Button("Debug Window Controls…") {
DebugWindowControlsWindowController.shared.show()
}
Button("Menu Bar Extra Debug…") {
MenuBarExtraDebugWindowController.shared.show()
}
Button("Settings/About Titlebar Debug…") {
SettingsAboutTitlebarDebugWindowController.shared.show()
}

Divider()
Button("Sidebar Debug…") {
SidebarDebugWindowController.shared.show()
}

Button("Background Debug…") {
BackgroundDebugWindowController.shared.show()
}

Button("Menu Bar Extra Debug…") {
MenuBarExtraDebugWindowController.shared.show()
Button("Split Button Layout Debug…") {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Localize new Split Button debug UI strings

This commit introduces new user-visible English literals (for example, the new Debug menu entry and window labels) without String(localized:defaultValue:) keys, so the feature will remain untranslated in non-English locales. The repo policy in AGENTS.md explicitly requires all user-facing strings to be localized (including English and Japanese entries in Localizable.xcstrings), so this should be converted before landing.

Useful? React with 👍 / 👎.

SplitButtonLayoutDebugWindowController.shared.show()
}

Divider()

Button("Open All Debug Windows") {
openAllDebugWindows()
}
Expand Down Expand Up @@ -3334,6 +3327,76 @@ private struct MenuBarExtraDebugView: View {
}
}

// MARK: - Split Button Layout Debug Window

private final class SplitButtonLayoutDebugWindowController: NSWindowController, NSWindowDelegate {
static let shared = SplitButtonLayoutDebugWindowController()

private init() {
let window = NSPanel(
contentRect: NSRect(x: 0, y: 0, width: 320, height: 240),
styleMask: [.titled, .closable, .utilityWindow],
backing: .buffered,
defer: false
)
window.title = "Split Button Layout"
window.titleVisibility = .visible
window.titlebarAppearsTransparent = false
window.isMovableByWindowBackground = true
window.isReleasedWhenClosed = false
window.identifier = NSUserInterfaceItemIdentifier("cmux.splitButtonLayoutDebug")

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 Badge Register new debug panel as an auxiliary close target

The new panel gets its own window identifier here, but that identifier is not added to cmuxAuxiliaryWindowIdentifiers, which is what closePanelOrWindow() checks for the Cmd+W path. As a result, when this debug panel is key, Cmd+W will route to tab/panel closing logic instead of closing the debug window itself.

Useful? React with 👍 / 👎.

window.center()
window.contentView = NSHostingView(rootView: SplitButtonLayoutDebugView())
AppDelegate.shared?.applyWindowDecorations(to: window)
super.init(window: window)
window.delegate = self
}

@available(*, unavailable)
required init?(coder: NSCoder) { fatalError() }

func show() {
window?.center()
window?.makeKeyAndOrderFront(nil)
}
}

private struct SplitButtonLayoutDebugView: View {
@AppStorage("debugFadeColorStyle") private var backdropStyle = 0

private let options: [(Int, String)] = [
(0, "Pre-composited paneBackground"),
(1, "Raw paneBackground (opaque)"),
(2, "barBackground (tab chrome)"),
(3, "windowBackgroundColor"),
(4, "controlBackgroundColor"),
(5, "Pre-composited barBackground"),
]

var body: some View {
VStack(alignment: .leading, spacing: 10) {
Text("Button Backdrop Color")
.font(.headline)

ForEach(options, id: \.0) { id, label in
HStack {
Image(systemName: backdropStyle == id ? "checkmark.circle.fill" : "circle")
.foregroundColor(backdropStyle == id ? .accentColor : .secondary)
Text(label)
}
.contentShape(Rectangle())
.onTapGesture { backdropStyle = id }
}

Text("Changes apply live.")
.font(.caption)
.foregroundColor(.secondary)
}
.padding(16)
.frame(maxWidth: .infinity, alignment: .topLeading)
}
}

// MARK: - Background Debug Window

private final class BackgroundDebugWindowController: NSWindowController, NSWindowDelegate {
Expand Down
2 changes: 1 addition & 1 deletion vendor/bonsplit
Loading