diff --git a/XboxControllerMapper/XboxControllerMapper/Services/Mapping/MappingEngine.swift b/XboxControllerMapper/XboxControllerMapper/Services/Mapping/MappingEngine.swift index 8d988d59..3baf516b 100644 --- a/XboxControllerMapper/XboxControllerMapper/Services/Mapping/MappingEngine.swift +++ b/XboxControllerMapper/XboxControllerMapper/Services/Mapping/MappingEngine.swift @@ -795,11 +795,7 @@ class MappingEngine: ObservableObject { state.lock.withLock { guard state.isEnabled, let profile = state.activeProfile else { state.pressConsumedByAction.insert(button) - #if DEBUG - if state.isEnabled && state.activeProfile == nil { - print("⚠️ MappingEngine: Button \(button) pressed but no active profile — input ignored") - } - #endif + // Removed print statement to avoid log buffer exhaustion during tests return .blocked } @@ -894,9 +890,6 @@ class MappingEngine: ObservableObject { case .layerActivated(let profile, let layerId): if let layer = profile.layers.first(where: { $0.id == layerId }) { - #if DEBUG - print("🔷 Layer activated: \(layer.name)") - #endif inputLogService?.log(buttons: [button], type: .singlePress, action: "Layer: \(layer.name)") } DispatchQueue.main.async { [weak self] in @@ -907,9 +900,6 @@ class MappingEngine: ObservableObject { case .layerToggled(let profile, let layerId, let isActive, let cleanup): performRoutingBoundaryCleanup(cleanup) if let layer = profile.layers.first(where: { $0.id == layerId }) { - #if DEBUG - print("🔷 Layer toggled \(isActive ? "on" : "off"): \(layer.name)") - #endif inputLogService?.log( buttons: [button], type: .singlePress, @@ -1469,7 +1459,7 @@ class MappingEngine: ObservableObject { if layerDeactivation.didDeactivate { #if DEBUG if let layerName = layerDeactivation.layerName { - print("🔷 Layer deactivated: \(layerName)") + // print Layer deactivated } #endif @@ -1736,11 +1726,7 @@ class MappingEngine: ObservableObject { guard let startState = state.lock.withLock({ () -> ChordStartState? in guard state.isEnabled, let profile = state.activeProfile else { - #if DEBUG - if state.isEnabled && state.activeProfile == nil { - print("⚠️ MappingEngine: Chord \(buttons) detected but no active profile — input ignored") - } - #endif + // Removed print statement to avoid log buffer exhaustion during tests return nil } @@ -1821,9 +1807,6 @@ class MappingEngine: ObservableObject { performRoutingBoundaryCleanup(cleanup) } if let layer = startState.profile.layers.first(where: { $0.id == change.layerId }) { - #if DEBUG - print("🔷 Layer \(change.isActive ? "activated" : "deactivated") via chord: \(layer.name)") - #endif inputLogService?.log( buttons: [change.button], type: .singlePress, diff --git a/XboxControllerMapper/XboxControllerMapper/Views/MainWindow/CommandWheelSettingsView.swift b/XboxControllerMapper/XboxControllerMapper/Views/MainWindow/CommandWheelSettingsView.swift index e474719a..da70a5ab 100644 --- a/XboxControllerMapper/XboxControllerMapper/Views/MainWindow/CommandWheelSettingsView.swift +++ b/XboxControllerMapper/XboxControllerMapper/Views/MainWindow/CommandWheelSettingsView.swift @@ -246,8 +246,8 @@ struct CommandWheelActionRow: View { } .buttonStyle(.plain) .foregroundColor(.secondary) - .help("Edit") - .accessibilityLabel("Edit Command Wheel Action") + .help("Edit \(action.displayName.isEmpty ? "Unnamed Action" : action.displayName)") + .accessibilityLabel("Edit \(action.displayName.isEmpty ? "Unnamed Action" : action.displayName)") // Delete button Button(action: onDelete) { @@ -256,8 +256,8 @@ struct CommandWheelActionRow: View { } .buttonStyle(.plain) .foregroundColor(.secondary) - .help("Delete") - .accessibilityLabel("Delete Command Wheel Action") + .help("Delete \(action.displayName.isEmpty ? "Unnamed Action" : action.displayName)") + .accessibilityLabel("Delete \(action.displayName.isEmpty ? "Unnamed Action" : action.displayName)") } .padding(.vertical, 4) .padding(.horizontal, 6) diff --git a/XboxControllerMapper/XboxControllerMapper/Views/MainWindow/OnScreenKeyboardSettingsView.swift b/XboxControllerMapper/XboxControllerMapper/Views/MainWindow/OnScreenKeyboardSettingsView.swift index 8fe6829f..c3111496 100644 --- a/XboxControllerMapper/XboxControllerMapper/Views/MainWindow/OnScreenKeyboardSettingsView.swift +++ b/XboxControllerMapper/XboxControllerMapper/Views/MainWindow/OnScreenKeyboardSettingsView.swift @@ -115,16 +115,16 @@ struct QuickTextRowView: View { Image(systemName: "pencil") } .buttonStyle(.borderless) - .help("Edit quick text") - .accessibilityLabel("Edit quick text") + .help("Edit \(quickText.text.isEmpty ? "Empty Text" : quickText.text)") + .accessibilityLabel("Edit \(quickText.text.isEmpty ? "Empty Text" : quickText.text)") Button(action: onDelete) { Image(systemName: "trash") .foregroundColor(.red) } .buttonStyle(.borderless) - .help("Delete quick text") - .accessibilityLabel("Delete quick text") + .help("Delete \(quickText.text.isEmpty ? "Empty Text" : quickText.text)") + .accessibilityLabel("Delete \(quickText.text.isEmpty ? "Empty Text" : quickText.text)") } } @@ -194,16 +194,16 @@ struct AppBarItemRowView: View { Image(systemName: "pencil") } .buttonStyle(.borderless) - .help("Edit app") - .accessibilityLabel("Edit app") + .help("Edit \(item.displayName.isEmpty ? "Unnamed App" : item.displayName)") + .accessibilityLabel("Edit \(item.displayName.isEmpty ? "Unnamed App" : item.displayName)") Button(action: onDelete) { Image(systemName: "trash") .foregroundColor(.red) } .buttonStyle(.borderless) - .help("Delete app") - .accessibilityLabel("Delete app") + .help("Delete \(item.displayName.isEmpty ? "Unnamed App" : item.displayName)") + .accessibilityLabel("Delete \(item.displayName.isEmpty ? "Unnamed App" : item.displayName)") } .padding(.vertical, 4) .padding(.horizontal, 8) @@ -273,16 +273,16 @@ struct WebsiteLinkRowView: View { Image(systemName: "pencil") } .buttonStyle(.borderless) - .help("Edit link") - .accessibilityLabel("Edit link") + .help("Edit \(link.displayName.isEmpty ? "Unnamed Link" : link.displayName)") + .accessibilityLabel("Edit \(link.displayName.isEmpty ? "Unnamed Link" : link.displayName)") Button(action: onDelete) { Image(systemName: "trash") .foregroundColor(.red) } .buttonStyle(.borderless) - .help("Delete link") - .accessibilityLabel("Delete link") + .help("Delete \(link.displayName.isEmpty ? "Unnamed Link" : link.displayName)") + .accessibilityLabel("Delete \(link.displayName.isEmpty ? "Unnamed Link" : link.displayName)") } .padding(.vertical, 4) .padding(.horizontal, 8)