Skip to content
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down Expand Up @@ -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
Expand All @@ -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,
Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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
}

Expand Down Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,16 +115,16 @@ struct QuickTextRowView<SuggestionsView: View>: 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)")
}
}

Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down
Loading