Fastest and only macOS Dictation app with on-device STT and custom trained AI enhancement model. Windows, iOS testflight! Android, Linux waitlist open! A local Wispr Flow alternative. Follow https://x.com/fluidvoiceapp for more
feat(overlay): streamline dictation controls
altic-dev5ca2f841261c
diff --git a/Sources/Fluid/UI/SettingsView.swift b/Sources/Fluid/UI/SettingsView.swiftindex 7b73c31c..bf6eead2 100644--- a/Sources/Fluid/UI/SettingsView.swift+++ b/Sources/Fluid/UI/SettingsView.swift@@ -183,20 +183,24 @@ struct SettingsView: View {.padding(.leading, 30)Spacer()Picker("", selection: self.dictationPromptSelectionBinding(for: slot)) {- Text("Off").tag("__OFF__")- Text("Default").tag("__DEFAULT__").disabled(privateAILocked)- if PrivateFeatures.privateAIProvider {- Text(PrivateAIProviderFeature.displayName)- .tag(PrivateAIProviderPromptFormat.promptSelectionID)- .disabled(!privateAILocked)+ Section("ON-DEVICE") {+ Text("Fast — No cleanup").tag("__OFF__")+ if PrivateFeatures.privateAIProvider {+ Text("Cleanup — Fluid-1")+ .tag(PrivateAIProviderPromptFormat.promptSelectionID)+ .disabled(!privateAILocked)+ }}- ForEach(profiles) { profile in- Text(profile.name.isEmpty ? "Untitled" : profile.name)- .tag(profile.id)- .disabled(privateAILocked)+ Section("EXTERNAL") {+ Text("Cleanup").tag("__DEFAULT__").disabled(privateAILocked)+ ForEach(profiles) { profile in+ Text(profile.name.isEmpty ? "Untitled" : profile.name)+ .tag(profile.id)+ .disabled(privateAILocked)+ }}}- .frame(width: 190)+ .frame(width: 220)}.padding(.bottom, 4)}diff --git a/Sources/Fluid/Views/BottomOverlayView.swift b/Sources/Fluid/Views/BottomOverlayView.swiftindex 607b9f0e..fbd299e7 100644--- a/Sources/Fluid/Views/BottomOverlayView.swift+++ b/Sources/Fluid/Views/BottomOverlayView.swift@@ -1477,6 +1477,51 @@ private struct BottomOverlayPromptMenuView: View {)}+ private func shortcutDisplay(for selection: SettingsStore.DictationPromptSelection) -> String? {+ guard self.promptMode.normalized == .dictate else { return nil }++ var displays: [String] = []+ if self.settings.dictationPromptSelection(for: .primary) == selection {+ displays.append(self.settings.primaryDictationShortcutDisplayString)+ }+ if self.settings.promptModeShortcutEnabled,+ self.settings.dictationPromptSelection(for: .secondary) == selection+ {+ displays.append(self.settings.promptModeHotkeyShortcut.displayString)+ }+ if let shortcut = self.settings.dictationPromptConfiguration(for: selection).shortcut {+ displays.append(shortcut.displayString)+ }++ let uniqueDisplays = displays.reduce(into: [String]()) { result, display in+ let trimmed = display.trimmingCharacters(in: .whitespacesAndNewlines)+ if !trimmed.isEmpty, !result.contains(trimmed) {+ result.append(trimmed)+ }+ }+ return uniqueDisplays.isEmpty ? nil : uniqueDisplays.joined(separator: " · ")+ }++ @ViewBuilder+ private func shortcutBadge(for selection: SettingsStore.DictationPromptSelection) -> some View {+ if let shortcut = self.shortcutDisplay(for: selection) {+ Text(shortcut)+ .font(.system(size: 9, weight: .semibold))+ .foregroundStyle(.white.opacity(0.58))+ .padding(.horizontal, 5)+ .padding(.vertical, 2)+ .background(+ RoundedRectangle(cornerRadius: 5, style: .continuous)+ .fill(Color.white.opacity(0.08))+ )+ .overlay(+ RoundedRectangle(cornerRadius: 5, style: .continuous)+ .stroke(Color.white.opacity(0.12), lineWidth: 1)+ )+ .fixedSize()+ }+ }+@ViewBuilderprivate func offRow() -> some View {let activeSlot = self.contentState.activeDictationShortcutSlot ?? .primary@@ -1490,13 +1535,17 @@ private struct BottomOverlayPromptMenuView: View {self.restoreTypingTargetApp()self.onDismissRequested()}) {- HStack {- Text("Off")- Spacer()+ HStack(alignment: .firstTextBaseline, spacing: 8) {+ Text("Fast")+ Spacer(minLength: 12)+ Text("No cleanup")+ .font(.system(size: 10, weight: .medium))+ .foregroundStyle(.white.opacity(0.45))if isSelected {Image(systemName: "checkmark").font(.system(size: 10, weight: .semibold))}+ self.shortcutBadge(for: .off)}.padding(.horizontal, 8).padding(.vertical, 6)@@ -1527,12 +1576,13 @@ private struct BottomOverlayPromptMenuView: View {self.onDismissRequested()}) {HStack {- Text("Default")+ Text("Cleanup")Spacer()if isSelected {Image(systemName: "checkmark").font(.system(size: 10, weight: .semibold))}+ self.shortcutBadge(for: .default)}.padding(.horizontal, 8).padding(.vertical, 6)@@ -1557,13 +1607,17 @@ private struct BottomOverlayPromptMenuView: View {self.restoreTypingTargetApp()self.onDismissRequested()}) {- HStack {- Text(PrivateAIProviderFeature.displayName)- Spacer()+ HStack(alignment: .firstTextBaseline, spacing: 8) {+ Text("Cleanup")+ Spacer(minLength: 12)+ Text("Fluid-1")+ .font(.system(size: 10, weight: .medium))+ .foregroundStyle(.white.opacity(0.45))if isSelected {Image(systemName: "checkmark").font(.system(size: 10, weight: .semibold))}+ self.shortcutBadge(for: .privateAI)}.padding(.horizontal, 8).padding(.vertical, 6)@@ -1603,6 +1657,7 @@ private struct BottomOverlayPromptMenuView: View {Image(systemName: "checkmark").font(.system(size: 10, weight: .semibold))}+ self.shortcutBadge(for: .profile(profile.id))}.padding(.horizontal, 8).padding(.vertical, 6)@@ -1622,24 +1677,37 @@ private struct BottomOverlayPromptMenuView: View {VStack(alignment: .leading, spacing: 0) {if self.promptMode.normalized == .dictate {+ Text("ON-DEVICE")+ .font(.system(size: 10, weight: .semibold))+ .foregroundStyle(.white.opacity(0.4))+ .padding(.horizontal, 8)+ .padding(.top, 4)+ .padding(.bottom, 3)+self.offRow()- Divider()- .padding(.vertical, 4)+ if PrivateFeatures.privateAIProvider {+ self.privateAIRow()+ }}if !self.privateAILocked {- self.defaultRow(selectedID: selectedID)- }+ if self.promptMode.normalized == .dictate {+ Divider()+ .padding(.vertical, 4)+ }++ Text("EXTERNAL")+ .font(.system(size: 10, weight: .semibold))+ .foregroundStyle(.white.opacity(0.4))+ .padding(.horizontal, 8)+ .padding(.top, self.promptMode.normalized == .dictate ? 0 : 4)+ .padding(.bottom, 3)- if self.promptMode.normalized == .dictate && PrivateFeatures.privateAIProvider {- self.privateAIRow()+ self.defaultRow(selectedID: selectedID)}if !self.privateAILocked && !profiles.isEmpty {- Divider()- .padding(.vertical, 4)-ForEach(profiles) { profile inself.profileRow(profile, selectedID: selectedID)}@@ -1653,7 +1721,7 @@ private struct BottomOverlayPromptMenuView: View {RoundedRectangle(cornerRadius: 8).stroke(Color.white.opacity(0.12), lineWidth: 1))- .frame(maxWidth: self.maxWidth)+ .frame(width: min(self.maxWidth, 250), alignment: .leading).preferredColorScheme(.dark).onHover { hovering inself.onHoverChanged(hovering)@@ -1671,6 +1739,7 @@ private struct BottomOverlayPromptMenuView: View {private struct BottomOverlayActionsMenuView: View {@ObservedObject private var contentState = NotchContentState.shared@ObservedObject private var historyStore = TranscriptionHistoryStore.shared+ @ObservedObject private var settings = SettingsStore.sharedlet maxWidth: CGFloatlet onHoverChanged: (Bool) -> Void@@ -1678,6 +1747,17 @@ private struct BottomOverlayActionsMenuView: View {@State private var hoveredRowID: String?+ private var normalizedOverlayMode: OverlayMode {+ switch self.contentState.mode {+ case .dictation:+ return .dictation+ case .edit, .write, .rewrite:+ return .edit+ case .command:+ return .command+ }+ }+private var canReprocessLast: Bool {!self.historyStore.entries.isEmpty && !self.contentState.isProcessing}@@ -1765,10 +1845,62 @@ private struct BottomOverlayActionsMenuView: View {}}+ private func modeRow(_ title: String, mode: OverlayMode, rowID: String) -> some View {+ let isSelected = self.normalizedOverlayMode == mode+ let shortcut = OverlayShortcutResolver.shortcutDisplay(for: mode, settings: self.settings)+ return Button(action: {+ guard !self.contentState.isProcessing else { return }+ self.contentState.onOverlayModeSwitchRequested?(mode)+ self.onDismissRequested()+ }) {+ HStack(spacing: 8) {+ Text(title)+ .font(.system(size: 14, weight: .semibold))+ Spacer()+ if !shortcut.isEmpty {+ Text(shortcut)+ .font(.system(size: 11, weight: .semibold))+ .foregroundStyle(.white.opacity(0.7))+ }+ if isSelected {+ Image(systemName: "checkmark")+ .font(.system(size: 10, weight: .semibold))+ }+ }+ .padding(.horizontal, 8)+ .padding(.vertical, 6)+ .background(self.rowBackground(isSelected: isSelected, rowID: rowID))+ }+ .buttonStyle(.plain)+ .onHover { hovering in+ self.hoveredRowID = hovering ? rowID : nil+ }+ }+var body: some View {VStack(alignment: .leading, spacing: 0) {+ Text("MODE")+ .font(.system(size: 10, weight: .semibold))+ .foregroundStyle(.white.opacity(0.4))+ .padding(.horizontal, 8)+ .padding(.top, 4)+ .padding(.bottom, 3)++ self.modeRow("Dictate", mode: .dictation, rowID: "mode_dictate")+ self.modeRow("Edit", mode: .edit, rowID: "mode_edit")+ self.modeRow("Command", mode: .command, rowID: "mode_command")++ Divider()+ .padding(.vertical, 4)++ Text("ACTIONS")+ .font(.system(size: 10, weight: .semibold))+ .foregroundStyle(.white.opacity(0.4))+ .padding(.horizontal, 8)+ .padding(.bottom, 3)+self.actionRow(- title: "Reprocess Last Dictation",+ title: "Process Again",icon: "arrow.clockwise",rowID: "reprocess_last",enabled: self.canReprocessLast@@ -1777,7 +1909,7 @@ private struct BottomOverlayActionsMenuView: View {}self.actionRow(- title: "Copy Last Transcription",+ title: "Copy Last",icon: "doc.on.doc",rowID: "copy_last",enabled: self.canCopyLast@@ -1786,7 +1918,7 @@ private struct BottomOverlayActionsMenuView: View {}self.actionRow(- title: "Paste Last Transcription",+ title: "Insert Last",icon: "arrow.down.doc",rowID: "paste_last",enabled: self.canPasteLast@@ -1794,11 +1926,8 @@ private struct BottomOverlayActionsMenuView: View {self.contentState.onPasteLastRequested?()}- Divider()- .padding(.vertical, 4)-self.actionRow(- title: "Undo AI on Last",+ title: "Use Raw Text",icon: "arrow.uturn.backward",rowID: "undo_ai_last",enabled: self.canUndoLastAI@@ -2060,7 +2189,7 @@ struct BottomOverlayView: View {transFontSize: 13,modeFontSize: 12,cornerRadius: 18,- barCount: 9,+ barCount: 8,barWidth: 3.5,barSpacing: 4.5,minBarHeight: 6,@@ -2110,6 +2239,10 @@ struct BottomOverlayView: View {self.settings.overlaySize == .medium}+ private var waveformHorizontalOffset: CGFloat {+ self.settings.overlaySize == .medium ? -28 : 0+ }+private var isPillSize: Bool {self.settings.overlaySize == .pill}@@ -2238,7 +2371,17 @@ struct BottomOverlayView: View {}private var promptSelectorDisplayLabel: String {- let label = self.selectedPromptLabel.trimmingCharacters(in: .whitespacesAndNewlines)+ let selectedLabel = self.selectedPromptLabel.trimmingCharacters(in: .whitespacesAndNewlines)+ let label: String+ if selectedLabel.caseInsensitiveCompare("Off") == .orderedSame {+ label = "Fast"+ } else if selectedLabel.caseInsensitiveCompare("Default") == .orderedSame {+ label = "Cleanup"+ } else if selectedLabel.caseInsensitiveCompare(PrivateAIProviderFeature.displayName) == .orderedSame {+ label = "Cleanup"+ } else {+ label = selectedLabel+ }guard !label.isEmpty else { return "Default" }let maxLength: Int@@ -2253,8 +2396,20 @@ struct BottomOverlayView: View {return "\(label.prefix(prefixLength))..."}+ private var promptSelectorIconName: String {+ switch self.promptSelectorDisplayLabel {+ case "Fast":+ return "bolt.fill"+ case "Cleanup":+ return "sparkles"+ default:+ return "wand.and.stars"+ }+ }+private var promptSelectorFontSize: CGFloat {- max(self.layout.modeFontSize - 1, 9)+ if self.isCompactControls { return 10 }+ return max(self.layout.modeFontSize - 1, 9)}private var promptSelectorLabelFontSize: CGFloat {@@ -2538,7 +2693,7 @@ struct BottomOverlayView: View {}private func handleActionsSelectorHover(_ hovering: Bool) {- let actionsDisabled = self.historyStore.entries.isEmpty || self.contentState.isProcessing+ let actionsDisabled = self.contentState.isProcessingguard !actionsDisabled else {self.closeActionsMenu()return@@ -2549,7 +2704,7 @@ struct BottomOverlayView: View {private func handleActionsSelectorFrameChange(_ frameInScreen: CGRect, window: NSWindow?) {self.actionsSelectorFrameInScreen = frameInScreenself.actionsSelectorWindow = window- let actionsDisabled = self.historyStore.entries.isEmpty || self.contentState.isProcessing+ let actionsDisabled = self.contentState.isProcessingguard self.layout.showsTopControls, !actionsDisabled else {BottomOverlayActionsMenuController.shared.hide()return@@ -2616,17 +2771,14 @@ struct BottomOverlayView: View {private var promptSelectorTrigger: some View {HStack(spacing: 5) {- Text("AI Prompt:")- .font(.system(size: self.promptSelectorFontSize, weight: .medium))- .foregroundStyle(.white.opacity(0.5))- .lineLimit(1)- .fixedSize(horizontal: true, vertical: false)+ Image(systemName: self.promptSelectorIconName)+ .font(.system(size: max(self.promptSelectorFontSize - 1, 9), weight: .semibold))+ .foregroundStyle(.white.opacity(0.72))Text(self.promptSelectorDisplayLabel)- .font(.system(size: self.promptSelectorLabelFontSize, weight: .semibold))- .foregroundStyle(.white.opacity(0.75))+ .font(.system(size: self.promptSelectorFontSize, weight: .semibold))+ .foregroundStyle(.white.opacity(0.82)).lineLimit(1).truncationMode(.tail)- .frame(maxWidth: .infinity, alignment: .leading)if self.isAppPromptOverrideActive {Text("App").font(.system(size: max(self.promptSelectorFontSize - 2, 8), weight: .semibold))@@ -2638,19 +2790,41 @@ struct BottomOverlayView: View {.fill(Color.white.opacity(0.15)))}- Image(systemName: "chevron.up")+ Image(systemName: "chevron.down").font(.system(size: max(self.promptSelectorFontSize - 1, 8), weight: .semibold)).foregroundStyle(.white.opacity(0.45))}- .frame(width: self.promptSelectorChipWidth, alignment: .leading)- .padding(.horizontal, 8)+ .fixedSize(horizontal: true, vertical: false)+ .padding(.horizontal, 7).padding(.vertical, self.promptSelectorVerticalPadding).background(- self.chipBackground(- isHovered: self.isHoveringPromptChip,- disabled: !self.isPromptSelectableMode || self.contentState.isProcessing- )+ RoundedRectangle(cornerRadius: self.promptSelectorCornerRadius, style: .continuous)+ .fill(+ self.isHoveringPromptChip && self.isPromptSelectableMode && !self.contentState.isProcessing+ ? Color.white.opacity(0.10)+ : Color.clear+ ))+ .overlay(alignment: .top) {+ if self.isHoveringPromptChip, self.isPromptSelectableMode, !self.contentState.isProcessing {+ Text("Select cleanup mode")+ .font(.system(size: 11, weight: .semibold))+ .foregroundStyle(.white.opacity(0.9))+ .padding(.horizontal, 8)+ .padding(.vertical, 4)+ .background(Color.black.opacity(0.94))+ .clipShape(Capsule())+ .overlay(+ Capsule()+ .stroke(Color.white.opacity(0.16), lineWidth: 1)+ )+ .fixedSize()+ .offset(y: -30)+ .allowsHitTesting(false)+ }+ }+ .accessibilityElement(children: .combine)+ .accessibilityLabel("Select cleanup mode")}private var promptSelectorView: some View {@@ -2690,29 +2864,41 @@ struct BottomOverlayView: View {}private var actionsSelectorTrigger: some View {- let actionsDisabled = self.historyStore.entries.isEmpty || self.contentState.isProcessing- return HStack(spacing: 5) {- Text("Actions")- .font(.system(size: self.promptSelectorFontSize, weight: .medium))- .foregroundStyle(.white.opacity(0.75))- .lineLimit(1)- Image(systemName: "chevron.up")- .font(.system(size: max(self.promptSelectorFontSize - 1, 8), weight: .semibold))- .foregroundStyle(.white.opacity(0.45))+ let actionsDisabled = self.contentState.isProcessing+ return HStack(spacing: 0) {+ Image(systemName: "ellipsis")+ .font(.system(size: 16, weight: .bold))+ .foregroundStyle(.white.opacity(actionsDisabled ? 0.3 : 0.78))}- .fixedSize(horizontal: true, vertical: false)- .padding(.horizontal, 8)- .padding(.vertical, self.promptSelectorVerticalPadding)+ .frame(width: 32, height: 32).background(- self.chipBackground(- isHovered: self.isHoveringActionsChip,- disabled: actionsDisabled- )+ RoundedRectangle(cornerRadius: 9, style: .continuous)+ .fill(self.isHoveringActionsChip && !actionsDisabled ? Color.white.opacity(0.1) : Color.clear))+ .overlay(alignment: .top) {+ if self.isHoveringActionsChip, !actionsDisabled {+ Text("Actions")+ .font(.system(size: 11, weight: .semibold))+ .foregroundStyle(.white.opacity(0.9))+ .padding(.horizontal, 8)+ .padding(.vertical, 4)+ .background(Color.black.opacity(0.94))+ .clipShape(Capsule())+ .overlay(+ Capsule()+ .stroke(Color.white.opacity(0.16), lineWidth: 1)+ )+ .fixedSize()+ .offset(y: -30)+ .allowsHitTesting(false)+ }+ }+ .accessibilityElement(children: .ignore)+ .accessibilityLabel("Actions")}private var actionsSelectorView: some View {- let actionsDisabled = self.historyStore.entries.isEmpty || self.contentState.isProcessing+ let actionsDisabled = self.contentState.isProcessingreturn self.actionsSelectorTrigger.background(PromptSelectorAnchorReader { frameInScreen, window in@@ -2727,6 +2913,7 @@ struct BottomOverlayView: View {}.onTapGesture {guard self.layout.showsTopControls, !actionsDisabled else { return }+ self.isHoveringActionsChip = falseself.closePromptMenu()self.closeModeMenu()BottomOverlayActionsMenuController.shared.updateAnchor(@@ -2737,11 +2924,6 @@ struct BottomOverlayView: View {)BottomOverlayActionsMenuController.shared.toggleFromTap()}- .help(- self.historyStore.entries.isEmpty- ? "No saved dictation history available"- : "Reprocess the latest dictation using current AI settings"- )}private var settingsChip: some View {@@ -2816,6 +2998,31 @@ struct BottomOverlayView: View {.frame(maxWidth: self.previewMaxWidth, alignment: .leading)}+ private var targetAppIconView: some View {+ let appIcon = self.displayedAppIcon+ let showModelLoading = self.layout.showsModeLabel && !self.appServices.asr.isAsrReady &&+ (self.appServices.asr.isLoadingModel || self.appServices.asr.isDownloadingModel)+ return VStack(spacing: 2) {+ if showModelLoading {+ ProgressView()+ .controlSize(.mini)+ }+ if let appIcon = appIcon {+ Image(nsImage: appIcon)+ .resizable()+ .aspectRatio(contentMode: .fit)+ .frame(width: self.layout.iconSize, height: self.layout.iconSize)+ .clipShape(RoundedRectangle(cornerRadius: self.layout.iconSize / 4))+ } else if !self.layout.showsModeLabel {+ Circle()+ .fill(self.modeColor.opacity(0.9))+ .frame(width: max(self.layout.iconSize * 0.45, 7), height: max(self.layout.iconSize * 0.45, 7))+ }+ }+ .frame(width: self.layout.iconSize, height: self.layout.iconSize)+ .opacity((appIcon != nil || showModelLoading || !self.layout.showsModeLabel) ? 1 : 0)+ }+private func scrollablePreviewText(_ previewText: String) -> some View {ScrollViewReader { proxy inScrollView(.vertical, showsIndicators: false) {@@ -2861,17 +3068,11 @@ struct BottomOverlayView: View {var body: some View {VStack(spacing: max(4, self.layout.vPadding / 2)) {- if self.layout.showsTopControls {- HStack(spacing: self.isCompactControls ? 6 : 8) {- self.modeSelectorView- self.promptSelectorView+ if self.layout.showsTopControls, !self.isCompactControls {+ HStack {Spacer(minLength: 4)- self.actionsSelectorView- if !self.isCompactControls {- self.settingsChip- }+ self.settingsChip}- .frame(maxWidth: .infinity, alignment: self.isCompactControls ? .center : .leading).padding(.horizontal, self.layout.hPadding)}@@ -3001,29 +3202,9 @@ struct BottomOverlayView: View {// Waveform + Mode label rowHStack(spacing: self.isPillSize ? 4 : self.layout.hPadding / 1.5) {- // Target app icon (the app where text will be typed)- let appIcon = self.displayedAppIcon- let showModelLoading = self.layout.showsModeLabel && !self.appServices.asr.isAsrReady &&- (self.appServices.asr.isLoadingModel || self.appServices.asr.isDownloadingModel)- VStack(spacing: 2) {- if showModelLoading {- ProgressView()- .controlSize(.mini)- }- if let appIcon = appIcon {- Image(nsImage: appIcon)- .resizable()- .aspectRatio(contentMode: .fit)- .frame(width: self.layout.iconSize, height: self.layout.iconSize)- .clipShape(RoundedRectangle(cornerRadius: self.layout.iconSize / 4))- } else if !self.layout.showsModeLabel {- Circle()- .fill(self.modeColor.opacity(0.9))- .frame(width: max(self.layout.iconSize * 0.45, 7), height: max(self.layout.iconSize * 0.45, 7))- }+ if !self.layout.showsTopControls {+ self.targetAppIconView}- .frame(width: self.layout.iconSize, height: self.layout.iconSize)- .opacity((appIcon != nil || showModelLoading || !self.layout.showsModeLabel) ? 1 : 0)// Waveform visualizationBottomWaveformView(@@ -3048,8 +3229,19 @@ struct BottomOverlayView: View {.transition(.scale(scale: 0.8).combined(with: .opacity))}- // Mode label + model load hint- if self.layout.showsModeLabel {+ // Larger overlays already identify the mode in the selector above.+ if self.layout.showsTopControls, self.showsSpokenSendIndicator {+ SpokenSendIndicatorView(+ state: self.contentState.spokenSendIndicatorState,+ color: self.modeColor,+ size: self.spokenSendIndicatorSize+ )+ .id(self.contentState.spokenSendCountdownID)+ .transition(.scale(scale: 0.8).combined(with: .opacity))+ }++ // Compact overlays still need a visible mode because they have no selector.+ if self.layout.showsModeLabel, !self.layout.showsTopControls {VStack(alignment: .leading, spacing: 2) {HStack(spacing: 5) {Text(self.modeLabel)@@ -3085,6 +3277,21 @@ struct BottomOverlayView: View {)}}+ .offset(x: self.waveformHorizontalOffset)+ .frame(maxWidth: .infinity, alignment: .center)+ .overlay(alignment: .leading) {+ if self.layout.showsTopControls {+ self.targetAppIconView+ }+ }+ .overlay(alignment: .trailing) {+ if self.layout.showsTopControls {+ HStack(spacing: 8) {+ self.promptSelectorView+ self.actionsSelectorView+ }+ }+ }}.padding(.horizontal, self.layout.hPadding).padding(.vertical, self.layout.vPadding)