Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 3 additions & 0 deletions Packages/macOS/CmuxSettingsUI/Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ let package = Package(
"CMUXMobileCore",
.product(name: "CmuxFoundation", package: "CmuxFoundation"),
.product(name: "CmuxSettings", package: "CmuxSettings"),
],
resources: [
.process("Resources"),
]
),
.testTarget(
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
import Foundation

/// Presentation-only grouping for the Settings sidebar.
///
/// The leaves stay as the existing ``SettingsSectionID`` values so
/// persisted selection, settings-open targets, search entry IDs, scroll
/// anchors, and section implementations keep their current identities.
enum SettingsTaxonomyGroup: String, CaseIterable, Identifiable, Sendable {
case general
case terminal
case workspace
case sidebarAndDock
case agentsAndAutomation
case browserAndFiles
case remoteAndDevices
case keyboardAndAdvanced

/// Stable identity for SwiftUI section iteration.
var id: Self { self }

/// Localized heading shown above this group in the default browse sidebar.
var title: String {
switch self {
case .general:
return String(
localized: "settings.taxonomy.general",
defaultValue: "General",
bundle: .module
)
case .terminal:
// Reuse the existing app catalog entry for the shared label.
return SettingsSectionID.terminal.title
case .workspace:
return String(
localized: "settings.taxonomy.workspace",
defaultValue: "Workspace",
bundle: .module
)
case .sidebarAndDock:
return String(
localized: "settings.taxonomy.sidebarAndDock",
defaultValue: "Sidebar & Dock",
bundle: .module
)
case .agentsAndAutomation:
return String(
localized: "settings.taxonomy.agentsAndAutomation",
defaultValue: "Agents & Automation",
bundle: .module
)
case .browserAndFiles:
return String(
localized: "settings.taxonomy.browserAndFiles",
defaultValue: "Browser & Files",
bundle: .module
)
case .remoteAndDevices:
return String(
localized: "settings.taxonomy.remoteAndDevices",
defaultValue: "Remote & Devices",
bundle: .module
)
case .keyboardAndAdvanced:
return String(
localized: "settings.taxonomy.keyboardAndAdvanced",
defaultValue: "Keyboard & Advanced",
bundle: .module
)
}
}

/// Existing navigation leaves shown under this presentation category.
var sections: [SettingsSectionID] {
switch self {
case .general:
return [.account, .app, .sleepyMode]
case .terminal:
return [.terminal, .textBox]
case .workspace:
return [.workspaceColors]
case .sidebarAndDock:
return [.sidebarAppearance, .customSidebars]
case .agentsAndAutomation:
return [.automation, .computerUse]
case .browserAndFiles:
return [.browser, .browserImport]
case .remoteAndDevices:
return [.mobile, .cloudMachines, .networking]
case .keyboardAndAdvanced:
return [.globalHotkey, .keyboardShortcuts, .betaFeatures, .settingsJSON, .reset]
}
}

/// All existing navigation leaves in the order used by grouped browsing.
static var sectionsInDisplayOrder: [SettingsSectionID] {
allCases.flatMap(\.sections)
}
}
Loading
Loading