Skip to content
Closed
Show file tree
Hide file tree
Changes from 5 commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
1ced57b
Add configurable iOS toolbar rows
Jun 26, 2026
3209251
Update Swift file length budget
Jun 26, 2026
1d18fe1
Merge origin/main
Jun 26, 2026
5f86d83
Address iOS toolbar row review
Jun 26, 2026
c38e281
Update toolbar migration tests for v4 rows
Jun 26, 2026
062129c
Add regression test for same-row toolbar moves
Jun 26, 2026
84722cf
Avoid same-row toolbar move churn
Jun 26, 2026
5ef5ad0
Merge remote-tracking branch 'origin/main' into issue-6090-ios-multip…
Jun 26, 2026
2d9f701
Stabilize shell integration path test
Jun 27, 2026
34acb0d
Merge remote-tracking branch 'origin/main' into issue-6090-ios-multip…
Jun 27, 2026
ec39915
Merge remote-tracking branch 'origin/main' into issue-6090-ios-multip…
Jun 27, 2026
5be3d3f
Merge remote-tracking branch 'origin/main' into issue-6090-ios-multip…
austinywang Jun 29, 2026
ded38f8
Document intentional within-row reorder for Shared Shortcuts
austinywang Jun 30, 2026
2dd9033
Merge origin/main into issue-6090-ios-multiple-configurable-toolbar-rows
austinywang Jul 2, 2026
b3ae54c
Merge origin/main into issue-6090-ios-multiple-configurable-toolbar-rows
austinywang Jul 2, 2026
9af23e5
Document intentional top-anchored toolbar row growth
austinywang Jul 2, 2026
62a3e27
Merge remote-tracking branch 'origin/main' into issue-6090-ios-multip…
austinywang Jul 2, 2026
02a707a
Merge remote-tracking branch 'origin/main' into issue-6090-ios-multip…
austinywang Jul 3, 2026
b250a77
Address iOS toolbar row review feedback
austinywang Jul 3, 2026
69a1f22
Satisfy toolbar row policy review
austinywang Jul 3, 2026
b27b3a8
Keep shared shortcuts row reordering local
austinywang Jul 3, 2026
4aef6c4
Move toolbar height metrics to value type
austinywang Jul 3, 2026
c6984ca
Merge remote-tracking branch 'origin/main' into issue-6090-ios-multip…
austinywang Jul 4, 2026
d59b949
Regenerate Swift file length budget
austinywang Jul 4, 2026
0aee117
Fix shared shortcut cross-row reordering
austinywang Jul 4, 2026
9825ace
Merge remote-tracking branch 'origin/main' into issue-6090-ios-multip…
austinywang Jul 4, 2026
625d33a
Refresh Swift file length budget
austinywang Jul 4, 2026
00bc0ce
Merge remote-tracking branch 'origin/main' into issue-6090-ios-multip…
austinywang Jul 4, 2026
f900bc8
Merge remote-tracking branch 'origin/main' into issue-6090-ios-multip…
austinywang Jul 4, 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
44 changes: 21 additions & 23 deletions .github/swift-file-length-budget.tsv
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,22 @@
# Reduce counts as files shrink. CI fails if tracked files exceed this budget.
34629 CLI/cmux.swift
17838 Sources/AppDelegate.swift
16128 Sources/ContentView.swift
16109 Sources/ContentView.swift
13913 Sources/TerminalController.swift
12878 Sources/Workspace.swift
12838 Sources/Workspace.swift
12237 Sources/GhosttyTerminalView.swift
12144 cmuxTests/AppDelegateShortcutRoutingTests.swift
11578 Sources/Panels/BrowserPanel.swift
11567 Sources/Panels/BrowserPanel.swift
9497 cmuxTests/CLINotifyProcessIntegrationRegressionTests.swift
8016 CLI/cmux_open.swift
7986 Sources/Panels/BrowserPanelView.swift
7952 Sources/Panels/BrowserPanelView.swift
7366 cmuxTests/WorkspaceUnitTests.swift
7218 cmuxTests/WorkspaceRemoteConnectionTests.swift
6916 Packages/iOS/CmuxMobileShell/Sources/CmuxMobileShell/MobileShellComposite.swift
6895 Packages/iOS/CmuxMobileShell/Sources/CmuxMobileShell/MobileShellComposite.swift
6317 cmuxTests/SessionPersistenceTests.swift
6217 cmuxTests/GhosttyConfigTests.swift
6183 Sources/TabManager.swift
6084 Sources/TextBoxInput.swift
6077 Sources/TextBoxInput.swift
5915 cmuxTests/TerminalAndGhosttyTests.swift
5573 cmuxTests/BrowserConfigTests.swift
4487 Sources/Panels/FilePreviewPanel.swift
Expand All @@ -28,11 +28,11 @@
3934 Sources/Feed/FeedPanelView.swift
3926 cmuxTests/TabManagerUnitTests.swift
3896 cmuxTests/WindowAndDragTests.swift
3745 Packages/iOS/CmuxMobileTerminal/Sources/CmuxMobileTerminal/GhosttySurfaceView.swift
3699 cmuxTests/CLIGenericHookPersistenceTests.swift
3702 Packages/iOS/CmuxMobileTerminal/Sources/CmuxMobileTerminal/GhosttySurfaceView.swift
3669 cmuxTests/CLIGenericHookPersistenceTests.swift
3397 Sources/CmuxConfig.swift
3364 cmuxTests/TabManagerSessionSnapshotTests.swift
3058 Sources/Update/UpdateTitlebarAccessory.swift
3053 Sources/Update/UpdateTitlebarAccessory.swift
2876 cmuxTests/CMUXOpenCommandTests.swift
2875 Sources/SessionIndexView.swift
2606 Sources/KeyboardShortcutSettings.swift
Expand All @@ -47,23 +47,23 @@
2091 cmuxTests/ShortcutAndCommandPaletteTests.swift
2078 Sources/SessionPersistence.swift
1952 Sources/KeyboardShortcutSettingsFileStore.swift
1949 Sources/Panels/BrowserWebAuthnSupport.swift
1945 Sources/RestorableAgentSession.swift
1900 cmuxTests/NotificationAndMenuBarTests.swift
1866 Sources/Panels/BrowserWebAuthnSupport.swift
1810 Sources/SessionIndexStore.swift
1748 Sources/WindowDragHandleView.swift
1732 cmuxTests/WorkspacePullRequestSidebarTests.swift
1687 cmuxTests/MarkdownPanelTests.swift
1680 cmuxUITests/BrowserPaneNavigationKeybindUITests.swift
1656 Sources/FileExplorerView.swift
1652 cmuxTests/CMUXCLIErrorOutputRegressionTests.swift
1581 Packages/iOS/CmuxMobileTerminal/Sources/CmuxMobileTerminal/TerminalInputTextView.swift
1626 Packages/iOS/CmuxMobileTerminal/Sources/CmuxMobileTerminal/TerminalInputTextView.swift
1560 cmuxTests/TextBoxMentionCompletionTests.swift
1547 cmuxTests/TerminalControllerSocketSecurityTests.swift
1500 cmuxUITests/MultiWindowNotificationsUITests.swift
1499 cmuxTests/OmnibarAndToolsTests.swift
1452 Sources/RemoteTmuxControlConnection.swift
1447 Sources/FileExplorerStore.swift
1433 Sources/RemoteTmuxControlConnection.swift
1384 cmuxTests/KeyboardShortcutSettingsFileStoreStartupTests.swift
1380 cmuxUITests/MenuKeyEquivalentRoutingUITests.swift
1373 cmuxTests/AppDelegateIssue2907RoutingTests.swift
Expand All @@ -77,8 +77,8 @@
1209 Packages/macOS/CmuxCommandPalette/Tests/CmuxCommandPaletteTests/CommandPaletteSearchEngineTests.swift
1204 cmuxTests/FileExplorerStoreTests.swift
1197 cmuxTests/CodexAppServerSessionTests.swift
1169 Sources/RemoteTmuxController.swift
1166 Sources/VaultAgentProcessScanner.swift
1164 Sources/RemoteTmuxController.swift
1161 cmuxTests/SidebarOrderingTests.swift
1144 cmuxTests/PiVaultAgentPersistenceTests.swift
1121 cmuxTests/AgentHibernationTests.swift
Expand All @@ -101,33 +101,33 @@
905 Sources/CmuxSSHURLRequest.swift
899 Sources/Panels/MarkdownWebRenderer.swift
885 Sources/Panels/TerminalPanel.swift
878 Packages/iOS/CmuxMobileShellUI/Sources/CmuxMobileShellUI/WorkspaceDetailView.swift
877 Packages/Shared/CmuxAgentChat/Tests/CmuxAgentChatTests/ChatConversationStoreTests.swift
877 Packages/iOS/CmuxMobileShellUI/Sources/CmuxMobileShellUI/WorkspaceDetailView.swift
871 cmuxTests/ClaudeHookSurfaceResolutionSwiftTests.swift
868 Sources/Panels/BrowserScreenshotSnapshotter.swift
859 Packages/macOS/CmuxControlSocket/Sources/CmuxControlSocket/Coordinator/Workspace/ControlCommandCoordinator+Workspace.swift
847 cmuxTests/AgentSessionAutoResumeSettingsTests.swift
845 cmuxTests/SSHStartupSignalLifecycleTests.swift
830 Sources/TaskManagerTypes.swift
825 Packages/iOS/CmuxMobileShellUI/Sources/CmuxMobileShellUI/TerminalComposerView.swift
824 Sources/MainWindowFocusController.swift
813 Packages/iOS/CmuxMobileShellUI/Sources/CmuxMobileShellUI/TerminalComposerView.swift
810 Packages/macOS/CmuxSwiftRender/Tests/CmuxSwiftRenderTests/SwiftViewInterpreterTests.swift
803 Packages/iOS/CmuxMobilePairedMac/Sources/CmuxMobilePairedMac/MobilePairedMacStore.swift
802 Sources/WorkspaceContentView.swift
797 Sources/ClosedItemHistory.swift
779 cmuxUITests/BrowserOmnibarSuggestionsUITests.swift
773 Sources/App/MenuBarExtraController.swift
769 Packages/macOS/CmuxTerminal/Sources/CmuxTerminal/Surface/TerminalSurface+Input.swift
768 cmuxUITests/BrowserFixtureInteractionUITests.swift
762 Packages/iOS/CmuxMobileTransport/Sources/CmuxMobileTransport/CmxNetworkByteTransport.swift
760 Packages/macOS/CMUXAgentLaunch/Tests/CMUXAgentLaunchTests/AgentLaunchSanitizerTests.swift
773 Sources/App/MenuBarExtraController.swift
756 Sources/Panels/AgentSessionWebRendererCoordinator.swift
755 CLI/CMUXCLI+AgentHookDefinitions.swift
754 Sources/TerminalController+ControlWorkspaceContext.swift
752 cmuxUITests/CloseWorkspaceCmdDUITests.swift
739 cmuxTests/CLICodexHookTimeoutRegressionTests.swift
738 Packages/macOS/CMUXProjectModel/Sources/CMUXProjectModel/XcodeProjectAdapter.swift
725 Sources/Panels/BrowserPopupWindowController.swift
724 Sources/Panels/BrowserPopupWindowController.swift
722 Packages/Shared/CmuxAgentChat/Sources/CmuxAgentChat/Store/ChatConversationStore.swift
718 Packages/Shared/CmuxAuthRuntime/Sources/CmuxAuthRuntime/Coordinator/AuthCoordinator.swift
716 Sources/TaskManagerSnapshot.swift
Expand Down Expand Up @@ -163,9 +163,9 @@
621 cmuxUITests/RightSidebarChromeHeightUITests.swift
620 cmuxTests/FinderFileDropRegressionTests.swift
620 cmuxTests/TerminalNotificationQueueTests.swift
613 Sources/SettingsNavigation.swift
612 cmuxUITests/FeedSidebarUITests.swift
608 Packages/macOS/CmuxWorkspaces/Sources/CmuxWorkspaces/Coordinators/WorkspaceGroupCoordinator.swift
613 Sources/SettingsNavigation.swift
607 Sources/SleepyFaceView.swift
604 Packages/macOS/CmuxCommandPalette/Tests/CmuxCommandPaletteTests/CommandPaletteNucleoFFITests.swift
601 Packages/macOS/CMUXAgentLaunch/Sources/CMUXAgentLaunch/AgentLaunchSanitizerPrimaryPolicies.swift
Expand All @@ -186,7 +186,6 @@
572 Sources/Feed/FeedTextEditorDebugWindowController.swift
568 Packages/Shared/CMUXMobileCore/Sources/CMUXMobileCore/MobileTerminalRenderGrid.swift
567 Packages/macOS/CmuxTerminalCore/Sources/CmuxTerminalCore/ConfigDiscovery/GhosttyConfigDiscovery.swift
562 Packages/iOS/CmuxAgentChatUI/Sources/CmuxAgentChatUI/Transcript/ChatTranscriptTableView.swift
562 cmuxTests/AgentExecutableResolverTests.swift
561 cmuxTests/GhosttyConfigPathResolverTests.swift
560 cmuxTests/CLISSHPTYResizeInputTests.swift
Expand All @@ -201,10 +200,9 @@
538 Packages/macOS/CmuxRemoteWorkspace/Sources/CmuxRemoteWorkspace/PTYBridge/RemotePTYBridgeSession.swift
536 cmuxTests/CmuxConfigContextMenuTests.swift
534 Packages/macOS/CmuxControlSocket/Sources/CmuxControlSocket/Coordinator/Surface/ControlCommandCoordinator+Surface.swift
532 Packages/macOS/CmuxSettingsUI/Sources/CmuxSettingsUI/Scene/SettingsWindowScene.swift
531 Sources/App/WorkspaceRuntimeSettings.swift
530 Packages/iOS/CmuxMobileTerminal/Sources/CmuxMobileTerminal/GhosttyRuntime.swift
532 Packages/macOS/CmuxSettingsUI/Sources/CmuxSettingsUI/Scene/SettingsWindowScene.swift
528 cmuxTests/CLINotifyProcessTestSupport.swift
528 cmuxUITests/AutomationSocketUITests.swift
527 CLI/CLISocketPathResolver.swift
527 cmuxTests/BrowserHTTPBasicAuthPromptTests.swift
Expand All @@ -223,11 +221,11 @@
509 Packages/macOS/CMUXAgentLaunch/Sources/CMUXAgentLaunch/AgentLaunchSanitizerAdditionalPolicies.swift
507 Sources/TerminalControllerTopSupport.swift
506 Sources/App/MainWindowVisibilityController.swift
505 Packages/iOS/CmuxMobileShellUI/Sources/CmuxMobileShellUI/CMUXMobileRootView.swift
505 cmuxUITests/DisplayResolutionRegressionUITests.swift
504 cmuxTests/TerminalNotificationSocketActionTests.swift
503 Sources/Settings/ConfigSource.swift
502 Sources/CmuxEventPublishing.swift
502 Sources/RemoteTmuxSessionMirror.swift
501 Packages/macOS/CmuxControlSocket/Tests/CmuxControlSocketTests/ControlCommandContextTestStubs.swift
500 Packages/iOS/CmuxMobileShellUI/Sources/CmuxMobileShellUI/CMUXMobileRootView.swift
500 Packages/macOS/CmuxControlSocket/Tests/CmuxControlSocketTests/ControlCommandContextTestStubs.swift
500 Sources/KeyboardShortcutRecorder.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#if os(iOS)
import CmuxMobileTerminal

struct TerminalShortcutRowSection: Identifiable {
let id: String
let index: Int
let items: [ResolvedToolbarItem]
}
#endif
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,56 @@ struct TerminalShortcutsSettingsView: View {
var body: some View {
NavigationStack {
List {
Section {
ForEach(displayedItems) { item in
row(for: item)
if scope == .terminal {
Section {
Stepper(
value: rowCountBinding,
in: TerminalAccessoryConfiguration.minimumRowCount...TerminalAccessoryConfiguration.maximumRowCount
) {
HStack {
Text(L10n.string("mobile.shortcuts.rows.label", defaultValue: "Rows"))
Spacer()
Text("\(configuration.rowCount)")
.foregroundStyle(.secondary)
}
}
.accessibilityIdentifier("TerminalShortcutsRowCountStepper")
} header: {
Text(L10n.string("mobile.shortcuts.rows.header", defaultValue: "Toolbar Rows"))
} footer: {
Text(L10n.string(
"mobile.shortcuts.rows.footer",
defaultValue: "Add rows to keep more buttons visible above the keyboard."
))
}

ForEach(displayedRowSections) { rowSection in
Section {
ForEach(rowSection.items) { item in
row(for: item, rowIndex: rowSection.index)
}
.onMove { offsets, destination in
moveDisplayedItems(from: offsets, to: destination, inRow: rowSection.index)
}
} header: {
Text(rowTitle(rowSection.index))
} footer: {
if rowSection.index == displayedRowSections.count - 1 {
Text(scope.footer)
}
}
}
} else {
Section {
ForEach(displayedItems) { item in
row(for: item, rowIndex: nil)
}
.onMove(perform: moveDisplayedItems)
} header: {
Text(L10n.string("mobile.shortcuts.header", defaultValue: "Shortcut Buttons"))
} footer: {
Text(scope.footer)
}
.onMove(perform: moveDisplayedItems)
} header: {
Text(L10n.string("mobile.shortcuts.header", defaultValue: "Shortcut Buttons"))
} footer: {
Text(scope.footer)
}

Section {
Expand Down Expand Up @@ -84,12 +125,28 @@ struct TerminalShortcutsSettingsView: View {
}

@ViewBuilder
private func row(for item: ResolvedToolbarItem) -> some View {
Toggle(isOn: binding(for: item.id)) {
if item.isCustom {
Label(item.settingsDisplayName, systemImage: "character.cursor.ibeam")
} else {
Text(item.settingsDisplayName)
private func row(for item: ResolvedToolbarItem, rowIndex: Int?) -> some View {
HStack {
Toggle(isOn: binding(for: item.id)) {
if item.isCustom {
Label(item.settingsDisplayName, systemImage: "character.cursor.ibeam")
} else {
Text(item.settingsDisplayName)
}
}

if scope == .terminal, configuration.rowCount > 1 {
Picker(
L10n.string("mobile.shortcuts.rows.movePicker", defaultValue: "Move to Row"),
selection: rowBinding(for: item.id, fallback: rowIndex ?? 0)
) {
ForEach(0..<configuration.rowCount, id: \.self) { index in
Text(rowTitle(index)).tag(index)
}
}
.labelsHidden()
.pickerStyle(.menu)
.accessibilityIdentifier("TerminalShortcutRowPicker.\(item.id.storageKey)")
}
}
.accessibilityIdentifier("TerminalShortcutToggle.\(item.id.storageKey)")
Expand Down Expand Up @@ -120,26 +177,59 @@ struct TerminalShortcutsSettingsView: View {
)
}

private var rowCountBinding: Binding<Int> {
Binding(
get: { configuration.rowCount },
set: { configuration.setRowCount($0) }
)
}

private func rowBinding(for id: ToolbarItemID, fallback: Int) -> Binding<Int> {
Binding(
get: { rowIndex(for: id) ?? fallback },
set: { configuration.moveItem(id, toRow: $0) }
)
}

private var displayedItems: [ResolvedToolbarItem] {
configuration.displayItems.filter(scope.includes)
}

private func moveDisplayedItems(from offsets: IndexSet, to destination: Int) {
guard scope != .terminal else {
configuration.moveItems(from: offsets, to: destination)
return
private var displayedItemRows: [[ResolvedToolbarItem]] {
configuration.displayItemRows.map { row in row.filter(scope.includes) }
}

private var displayedRowSections: [TerminalShortcutRowSection] {
displayedItemRows.enumerated().map { index, items in
TerminalShortcutRowSection(
id: "terminal-shortcuts-row-\(index)",
index: index,
items: items
)
}
}

private func rowIndex(for id: ToolbarItemID) -> Int? {
configuration.displayRows.firstIndex { row in row.contains(id) }
}

private func rowTitle(_ rowIndex: Int) -> String {
String(
format: L10n.string("mobile.shortcuts.rows.rowTitleFormat", defaultValue: "Row %d"),
rowIndex + 1
)
}

private func moveDisplayedItems(from offsets: IndexSet, to destination: Int) {
let visibleIDs = displayedItems.map(\.id)
let visibleSet = Set(visibleIDs)
var reorderedVisibleIDs = visibleIDs
reorderedVisibleIDs.move(fromOffsets: offsets, toOffset: destination)
var visibleIterator = reorderedVisibleIDs.makeIterator()
let reorderedFullIDs = configuration.displayOrder.map { id in
guard visibleSet.contains(id) else { return id }
return visibleIterator.next() ?? id
}
configuration.reorderItems(reorderedFullIDs)
configuration.reorderItems(reorderedVisibleIDs, limitedTo: visibleSet)
}
Comment thread
austinywang marked this conversation as resolved.
Resolved

private func moveDisplayedItems(from offsets: IndexSet, to destination: Int, inRow rowIndex: Int) {
configuration.moveItems(from: offsets, to: destination, inRow: rowIndex)
}
}
#endif
Loading
Loading