From b0294612f833a78e8e8a6d0f6e8fc6457245b228 Mon Sep 17 00:00:00 2001 From: Joshua Parmenter Date: Sat, 11 Jul 2026 15:38:22 -0700 Subject: [PATCH] Fix mapping-badge actor warnings; un-crowd the transport row - MappingBadge.pcFill/ccFill/keyFill are marked nonisolated so the nonisolated MappingBadgeKind.fill can read them (a SwiftUI View's statics are otherwise main-actor-isolated). Clears three "actor-isolated ... from a nonisolated context" warnings. - The input-mute button pushed the docked desktop transport cluster past the row width, clipping the Rate picker and I/O steppers. Render the three rig toggles (Bypass / Mute / Input) icon-only there via .labelStyle(.iconOnly); the .help tooltips remain and the compact layout still shows text labels. Co-Authored-By: Claude Opus 4.8 --- Sources/LyrebirdShoeGazeUI/ControlMappingStrip.swift | 8 +++++--- Sources/LyrebirdShoeGazeUI/ShoeGazeBuilderView.swift | 12 +++++++++--- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/Sources/LyrebirdShoeGazeUI/ControlMappingStrip.swift b/Sources/LyrebirdShoeGazeUI/ControlMappingStrip.swift index e2cb40f..2d300d1 100644 --- a/Sources/LyrebirdShoeGazeUI/ControlMappingStrip.swift +++ b/Sources/LyrebirdShoeGazeUI/ControlMappingStrip.swift @@ -42,9 +42,11 @@ enum MappingBadgeKind { /// One coloured pill — e.g. `CC11`, `PC3`, `⇧B` — marking a control's binding. struct MappingBadge: View { - static let pcFill: Color = Color(red: 0.11, green: 0.37, blue: 0.65) - static let ccFill: Color = Color(red: 0.33, green: 0.29, blue: 0.72) - static let keyFill: Color = Color(red: 0.73, green: 0.46, blue: 0.09) + // `nonisolated` so the nonisolated `MappingBadgeKind.fill` can read them — a SwiftUI `View`'s + // statics are otherwise main-actor-isolated. The values are immutable `Sendable` colours. + nonisolated static let pcFill: Color = Color(red: 0.11, green: 0.37, blue: 0.65) + nonisolated static let ccFill: Color = Color(red: 0.33, green: 0.29, blue: 0.72) + nonisolated static let keyFill: Color = Color(red: 0.73, green: 0.46, blue: 0.09) private static let fontSize: CGFloat = 9 private static let paddingH: CGFloat = 5 diff --git a/Sources/LyrebirdShoeGazeUI/ShoeGazeBuilderView.swift b/Sources/LyrebirdShoeGazeUI/ShoeGazeBuilderView.swift index 1438d72..45e17ed 100644 --- a/Sources/LyrebirdShoeGazeUI/ShoeGazeBuilderView.swift +++ b/Sources/LyrebirdShoeGazeUI/ShoeGazeBuilderView.swift @@ -1114,9 +1114,15 @@ public struct ShoeGazeBuilderView: View { MIDIIndicatorView(controller: midi) { showMIDISheet = true } } helpButton - rigBypassButton - rigMuteButton - inputMuteButton + // Icon-only in the docked desktop cluster so the four toggles + Rate picker + + // I/O steppers + Start never overrun the row and clip the pickers. Each button + // keeps its `.help` tooltip; the compact layout still shows the text labels. + Group { + rigBypassButton + rigMuteButton + inputMuteButton + } + .labelStyle(.iconOnly) EngineConfigView( shoeGaze: shoeGaze, hardwareSampleRate: hardwareSampleRate,