Skip to content
Closed
Show file tree
Hide file tree
Changes from 45 commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
5252adc
Add workspace hidden state and CLI commands
austinywang May 16, 2026
c10a3ca
Add sidebar hidden workspace accordion
austinywang May 16, 2026
96bbc5c
Cover workspace visibility persistence
austinywang May 16, 2026
4749a8c
Fix hidden workspace focus and history
austinywang May 17, 2026
1d18aad
Address hidden workspace review feedback
austinywang May 17, 2026
ea7abe0
Tighten hidden workspace edge cases
austinywang May 17, 2026
8bfed01
Fix sidebar action bundle compile errors
austinywang May 17, 2026
722ba74
Tighten hidden workspace selection handling
austinywang May 17, 2026
bec89c4
Merge remote-tracking branch 'origin/main' into issue-4261-snooze-hid…
austinywang May 18, 2026
9611bd1
Address workspace visibility review feedback
austinywang May 18, 2026
969e450
Merge remote-tracking branch 'origin/main' into issue-4261-snooze-hid…
austinywang May 18, 2026
079ff14
Merge remote-tracking branch 'origin/main' into issue-4261-snooze-hid…
austinywang May 18, 2026
ce0c66d
Centralize visible workspace reordering
austinywang May 18, 2026
a8d025a
Disable dragging hidden workspace rows
austinywang May 18, 2026
28799b7
Cache sidebar workspace drop state
austinywang May 18, 2026
af71440
Merge remote-tracking branch 'origin/main' into issue-4261-snooze-hid…
austinywang May 18, 2026
e4b04e7
Tighten hidden workspace drop and index handling
austinywang May 18, 2026
f1e6508
Address workspace visibility review feedback
austinywang May 18, 2026
5dac3f2
Align v1 workspace list indices with visible selection
austinywang May 18, 2026
c388024
Address follow-up workspace visibility review feedback
austinywang May 18, 2026
de30266
Preserve sidebar selection anchor after drops
austinywang May 18, 2026
e0b3538
Align workspace actions with visible workspace ordering
austinywang May 18, 2026
298c60f
Align Japanese wake workspace wording
austinywang May 18, 2026
6be122e
Preserve hidden slots when moving workspaces to top
austinywang May 18, 2026
726c998
Keep sidebar row equality local
austinywang May 18, 2026
c0d0946
Align socket workspace visibility semantics
austinywang May 18, 2026
570c6e7
Merge branch 'main' of https://github.com/manaflow-ai/cmux into issue…
austinywang May 19, 2026
728d481
Merge main into workspace visibility PR
austinywang Jun 4, 2026
9d5c481
Fix sidebar hidden workspace reordering
austinywang Jun 4, 2026
25cd2e8
Restore visible workspace selection API
austinywang Jun 4, 2026
db48f1d
Fix Bonsplit empty area workspace drops
austinywang Jun 4, 2026
627702d
Fix sidebar autoscroll deinit cleanup
austinywang Jun 4, 2026
b39bb0e
Reveal hidden workspaces on selection
austinywang Jun 4, 2026
ff8f320
Reconcile sidebar selection after snooze
austinywang Jun 4, 2026
22bcff5
Avoid find focus side effects for inactive targets
austinywang Jun 4, 2026
9a99e94
Share sidebar selection reconciliation after row actions
austinywang Jun 4, 2026
2871bb0
Tighten command shortcut keycode fallback
austinywang Jun 4, 2026
0229219
Block punctuation shortcut fallback mismatches
austinywang Jun 4, 2026
5208881
Allow shifted punctuation physical fallback
austinywang Jun 4, 2026
6b6b7dc
Localize workspace snooze strings
austinywang Jun 4, 2026
42851f9
Merge origin/main into workspace visibility PR
austinywang Jun 6, 2026
36f2457
Add regression for show workspace index resolution
austinywang Jun 6, 2026
786be67
Fix workspace visibility command edge cases
austinywang Jun 6, 2026
30df65d
Merge origin/main into workspace visibility PR
austinywang Jun 6, 2026
bc2218d
Fix detach result return type
austinywang Jun 6, 2026
ae5a306
Add regression for selecting hidden workspace refs
austinywang Jun 6, 2026
dec325c
Resolve hidden workspace refs on select
austinywang Jun 6, 2026
91a3239
Focus workspace after context-menu wake
austinywang Jun 6, 2026
255ffc4
Merge remote-tracking branch 'origin/main' into issue-4261-snooze-hid…
austinywang Jun 6, 2026
eb28d5c
Merge remote-tracking branch 'origin/main' into issue-4261-snooze-hid…
austinywang Jun 10, 2026
d539a37
Refresh Swift file length budget after merging main
austinywang Jun 10, 2026
c97be1e
Merge remote-tracking branch 'origin/main' into issue-4261-snooze-hid…
austinywang Jun 10, 2026
c26d90b
Refresh Swift file length budget after merging main
austinywang Jun 10, 2026
10d9abc
Clamp out-of-range visible workspace reorder index
austinywang Jun 10, 2026
8258cd9
Bump Swift file length budget for reorder clamp fix
austinywang Jun 10, 2026
4bb4fc9
Fix hidden-workspace interactions with workspace groups and focus paths
austinywang Jun 10, 2026
a21dc30
Advance ghostty submodule to main's SHA (34cbf180d)
austinywang Jun 10, 2026
315c6c3
Route socket workspace.action move/close through visible list
austinywang Jun 10, 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
196 changes: 186 additions & 10 deletions CLI/cmux.swift

Large diffs are not rendered by default.

1,451 changes: 1,413 additions & 38 deletions Resources/Localizable.xcstrings

Large diffs are not rendered by default.

32 changes: 25 additions & 7 deletions Sources/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6784,20 +6784,32 @@ final class AppDelegate: NSObject, NSApplicationDelegate, UNUserNotificationCent
"fr=\(beforeResponder)"
)
#endif
let target = context.keyboardFocusCoordinator.findShortcutTarget(
currentResponder: window?.firstResponder
)
guard target != .none else {
#if DEBUG
let afterResponder = window?.firstResponder.map { String(describing: type(of: $0)) } ?? "nil"
dlog(
"find.shortcut.app.end target=\(target) result=0 " +
"targetWin={\(debugWindowToken(window))} fr=\(afterResponder)"
)
#endif
return false
}

if let window {
mainWindowVisibilityController.focusForInWindowCommand(window, reason: .findShortcut)
}

let target = context.keyboardFocusCoordinator.findShortcutTarget(
currentResponder: window?.firstResponder
)
let result: Bool
switch target {
case .rightSidebarFileSearch:
result = context.keyboardFocusCoordinator.focusFileSearch()
case .mainPanelFind:
result = context.tabManager.startSearch()
case .none:
assertionFailure("Unhandled find shortcut target")
result = false
}
#if DEBUG
Expand Down Expand Up @@ -9696,7 +9708,7 @@ final class AppDelegate: NSObject, NSApplicationDelegate, UNUserNotificationCent

waitForContext { context in
let tabManager = context.tabManager
let initialIndex = tabManager.tabs.firstIndex(where: { $0.id == tabManager.selectedTabId }) ?? 0
let initialWorkspaceId = tabManager.selectedTabId ?? tabManager.visibleWorkspaceTabs.first?.id
let tab = tabManager.addTab()
guard let initialPanelId = tab.focusedPanelId else { return }

Expand Down Expand Up @@ -9726,7 +9738,10 @@ final class AppDelegate: NSObject, NSApplicationDelegate, UNUserNotificationCent
"expectedSurfaceId": targetPanelId.uuidString
])

tabManager.selectTab(at: initialIndex)
if let initialWorkspaceId,
let initialWorkspace = tabManager.tabs.first(where: { $0.id == initialWorkspaceId }) {
tabManager.selectWorkspace(initialWorkspace)
}
}
}
}
Expand Down Expand Up @@ -13246,13 +13261,16 @@ final class AppDelegate: NSObject, NSApplicationDelegate, UNUserNotificationCent
// goto_tab fallback from creating a new window when the index is out of bounds.
if let digit = numberedConfiguredShortcutDigit(event: event, action: .selectWorkspaceByNumber) {
if let manager = tabManager,
let targetIndex = WorkspaceShortcutMapper.workspaceIndex(forDigit: digit, workspaceCount: manager.tabs.count) {
let targetIndex = WorkspaceShortcutMapper.workspaceIndex(
forDigit: digit,
workspaceCount: manager.visibleWorkspaceTabs.count
) {
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Resolved
#if DEBUG
cmuxDebugLog(
"shortcut.action name=workspaceDigit digit=\(digit) targetIndex=\(targetIndex) manager=\(debugManagerToken(manager)) \(debugShortcutRouteSnapshot(event: event))"
)
#endif
manager.selectTab(at: targetIndex)
manager.selectVisibleWorkspace(at: targetIndex)
}
return true
}
Expand Down
4 changes: 3 additions & 1 deletion Sources/CmuxSocketEventMapper.swift
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,9 @@ enum CmuxSocketEventMapper {
case "workspace.rename":
publishResult(name: "workspace.renamed", category: "workspace", method: method, params: params, result: result)
case "workspace.reorder", "workspace.reorder_many":
break
publishResult(name: "workspace.reordered", category: "workspace", method: method, params: params, result: result)
case "workspace.hide", "workspace.show":
publishResult(name: "workspace.visibility_changed", category: "workspace", method: method, params: params, result: result)
case "workspace.move_to_window":
publishResult(name: "workspace.moved", category: "workspace", method: method, params: params, result: result)
case "workspace.action":
Expand Down
24 changes: 4 additions & 20 deletions Sources/ContentView+MoveTabToNewWorkspace.swift
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ extension ContentView {
}

struct SidebarBonsplitTabNewWorkspaceDropOverlay: NSViewRepresentable {
let tabManager: TabManager
@Binding var selectedTabIds: Set<UUID>
@Binding var lastSidebarSelectionIndex: Int?
@Binding var dropIndicator: SidebarDropIndicator?
let performMoveToNewWorkspace: (BonsplitTabDragPayload.Transfer) -> (workspaceId: UUID, sidebarIndex: Int?)?

func makeNSView(context: Context) -> SidebarBonsplitTabNewWorkspaceDropView {
return SidebarBonsplitTabNewWorkspaceDropView()
Expand All @@ -46,31 +46,15 @@ struct SidebarBonsplitTabNewWorkspaceDropOverlay: NSViewRepresentable {
dropIndicator = isActive ? SidebarDropIndicator(tabId: nil, edge: .bottom) : nil
}
nsView.performMove = { transfer in
guard let app = AppDelegate.shared,
let result = app.moveBonsplitTabToNewWorkspace(
tabId: transfer.tab.id,
destinationManager: tabManager,
focus: true,
focusWindow: true,
placementOverride: .end
) else {
guard let result = performMoveToNewWorkspace(transfer) else {
return false
}

selectedTabIds = [result.destinationWorkspaceId]
syncSidebarSelection(preferredSelectedTabId: result.destinationWorkspaceId)
selectedTabIds = [result.workspaceId]
lastSidebarSelectionIndex = result.sidebarIndex
return true
}
}

private func syncSidebarSelection(preferredSelectedTabId: UUID? = nil) {
let selectedId = preferredSelectedTabId ?? tabManager.selectedTabId
if let selectedId {
lastSidebarSelectionIndex = tabManager.tabs.firstIndex { $0.id == selectedId }
} else {
lastSidebarSelectionIndex = nil
}
}
}

final class SidebarBonsplitTabNewWorkspaceDropView: NSView {
Expand Down
Loading
Loading