Skip to content
Open
Changes from 3 commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
33c15bc
fix: restore sidebar workspace icon size
austinywang May 29, 2026
d38650b
fix: guard sidebar icon row metrics
austinywang May 29, 2026
2f91595
fix: clarify sidebar icon metric invariant
austinywang May 29, 2026
abdd78a
test: expect shared sidebar chrome icon metrics
austinywang May 29, 2026
8865058
fix: restore sidebar chrome icon size
austinywang May 29, 2026
0f6cd6b
test: restore release titlebar icon metrics
austinywang May 29, 2026
aaddc23
fix: restore release titlebar icon scale
austinywang May 29, 2026
99dab20
fix: restore release sidebar toggle symbol
austinywang May 29, 2026
7dc55c5
test: require titlebar controls to fit sidebar
austinywang May 29, 2026
984a12f
fix: fit release-size titlebar controls in sidebar
austinywang May 29, 2026
a51ce49
test: require sidebar-width titlebar spacing
austinywang May 29, 2026
73a618c
fix: fill sidebar titlebar lane with release spacing
austinywang May 29, 2026
c8afb1c
fix: return computed titlebar control size
austinywang May 29, 2026
fb661ee
test: keep sidebar titlebar chrome to release slots
austinywang May 29, 2026
80d3e91
fix: keep focus history out of sidebar chrome
austinywang May 29, 2026
5e1a5ed
fix: use release slots in titlebar accessory
austinywang May 29, 2026
696c750
fix: derive sidebar titlebar slot count
austinywang May 30, 2026
7d6a391
fix: reserve sidebar titlebar hint space
austinywang May 30, 2026
8dc7bbd
fix: constrain sidebar titlebar chrome styles
austinywang May 30, 2026
b7ceab1
fix: avoid crashing on sidebar icon padding mismatch
austinywang May 30, 2026
13ee964
merge: resolve conflicts with main
austinywang Jun 1, 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
47 changes: 38 additions & 9 deletions Sources/ContentView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10884,14 +10884,14 @@ struct VerticalTabsSidebar: View {
isSelected: Bool,
dropRows: [ExtensionSidebarBrowserStackDropRow]
) -> some View {
let targetRowHeight: CGFloat = 54
let targetRowHeight = ExtensionBrowserStackSidebarMetrics.tileHeight

return Button {
selectExtensionSidebarWorkspace(row.workspaceId)
} label: {
extensionBrowserStackIcon(row.leadingIcon, size: 28)
extensionBrowserStackIcon(row.leadingIcon, size: ExtensionBrowserStackSidebarMetrics.iconSize)
.frame(maxWidth: .infinity)
.frame(height: 54)
.frame(height: targetRowHeight)
.background(
RoundedRectangle(cornerRadius: 13, style: .continuous)
.fill(
Expand Down Expand Up @@ -10957,13 +10957,16 @@ struct VerticalTabsSidebar: View {
isSelected: Bool,
dropRows: [ExtensionSidebarBrowserStackDropRow]
) -> some View {
let targetRowHeight: CGFloat = compact ? 34 : 38
let targetRowHeight = ExtensionBrowserStackSidebarMetrics.rowHeight(compact: compact)
let rowHorizontalPadding = ExtensionBrowserStackSidebarMetrics.rowHorizontalPadding(compact: compact)
let rowVerticalPadding = ExtensionBrowserStackSidebarMetrics.rowVerticalPadding(compact: compact)
let rowCornerRadius = ExtensionBrowserStackSidebarMetrics.rowCornerRadius(compact: compact)

return Button {
selectExtensionSidebarWorkspace(row.workspaceId)
} label: {
HStack(spacing: 9) {
extensionBrowserStackIcon(row.leadingIcon, size: compact ? 22 : 24)
extensionBrowserStackIcon(row.leadingIcon, size: ExtensionBrowserStackSidebarMetrics.iconSize)
Text(row.title)
.font(.system(size: compact ? 12.5 : 13, weight: .medium))
.foregroundColor(isSelected ? .primary : .primary.opacity(0.82))
Expand All @@ -10977,14 +10980,14 @@ struct VerticalTabsSidebar: View {
.lineLimit(1)
}
}
.padding(.horizontal, compact ? 7 : 10)
.padding(.vertical, compact ? 6 : 7)
.padding(.horizontal, rowHorizontalPadding)
.padding(.vertical, rowVerticalPadding)
.background(
RoundedRectangle(cornerRadius: compact ? 8 : 10, style: .continuous)
RoundedRectangle(cornerRadius: rowCornerRadius, style: .continuous)
.fill(isSelected ? Color.primary.opacity(0.12) : Color.clear)
)
.overlay(
RoundedRectangle(cornerRadius: compact ? 8 : 10, style: .continuous)
RoundedRectangle(cornerRadius: rowCornerRadius, style: .continuous)
.stroke(isSelected ? cmuxAccentColor().opacity(0.55) : Color.clear, lineWidth: 1)
)
.contentShape(Rectangle())
Expand Down Expand Up @@ -11128,6 +11131,32 @@ struct VerticalTabsSidebar: View {
return snapshotsById
}

private enum ExtensionBrowserStackSidebarMetrics {
static let iconSize: CGFloat = 28
static let tileHeight: CGFloat = 54

private static let regularRowHeight: CGFloat = 38
private static let compactRowHeight: CGFloat = 34

static func rowHeight(compact: Bool) -> CGFloat {
compact ? compactRowHeight : regularRowHeight
}

static func rowHorizontalPadding(compact: Bool) -> CGFloat {
compact ? 7 : 10
}

static func rowVerticalPadding(compact: Bool) -> CGFloat {
let height = rowHeight(compact: compact)
precondition(iconSize <= height, "iconSize (\(iconSize)) must not exceed rowHeight (\(height))")
return (height - iconSize) / 2
}
Comment thread
austinywang marked this conversation as resolved.
Comment thread
austinywang marked this conversation as resolved.

static func rowCornerRadius(compact: Bool) -> CGFloat {
compact ? 8 : 10
}
}

private func extensionBrowserStackIcon(
_ icon: CmuxExtensionSidebarRenderIcon?,
size: CGFloat
Expand Down
Loading