I am seeing an asymmetric horizontal inset around the system-provided buttons in App Intents snippets on macOS. The left edge of the button row is almost flush with the snippet card, while the right edge is inset by approximately 16 points.
Environment: macOS 27.0 (26A428), Xcode 27.0 (27A266a). My system UI language is Polish, so the system buttons in the screenshots read “Gotowe” (Done), “Anuluj” (Cancel), and “Dalej” (Continue).
Steps to reproduce:
- Create a new macOS App project in Xcode, select a valid signing team, and add the Swift file below to the app target. Keep the generated
@mainApp file. - Build and run the app once to register its intents.
- Run Result Snippet Test from Spotlight Actions. The result view is only a bare
Textwith no layout modifiers. - Run Confirmation Snippet Test from Spotlight Actions. Its confirmation view is also only a bare
Text. - Repeat both actions in the Shortcuts app.
Expected: The system-provided Done button, and the Cancel/Continue row, have balanced left and right insets within the snippet card.
Actual: In both Spotlight and Shortcuts, the system button row begins about 1 point from the card's left edge and ends about 16 points before its right edge. The same behavior occurs with one system button and with two. Removing all padding and frame modifiers from the custom view does not change it.
import AppIntents
import SwiftUI
struct ResultSnippetTestIntent: SnippetIntent {
static var title: LocalizedStringResource = "Result Snippet Test"
static var isDiscoverable = true
static var supportedModes: IntentModes = .background
func perform() async throws -> some IntentResult & ShowsSnippetView {
.result(view: Text("Result snippet"))
}
}
struct ConfirmationContentIntent: SnippetIntent {
static var title: LocalizedStringResource = "Confirmation Content"
static var isDiscoverable = false
static var supportedModes: IntentModes = .background
func perform() async throws -> some IntentResult & ShowsSnippetView {
.result(view: Text("Confirmation snippet"))
}
}
struct ConfirmationSnippetTestIntent: AppIntent {
static var title: LocalizedStringResource = "Confirmation Snippet Test"
static var supportedModes: IntentModes = .background
func perform() async throws -> some IntentResult {
try await requestConfirmation(
actionName: .continue,
snippetIntent: ConfirmationContentIntent()
)
return .result()
}
}
struct SnippetButtonInsetShortcuts: AppShortcutsProvider {
static var appShortcuts: [AppShortcut] {
AppShortcut(
intent: ResultSnippetTestIntent(),
phrases: ["Show result snippet in \(.applicationName)"],
shortTitle: "Result Snippet Test",
systemImageName: "rectangle.dashed"
)
AppShortcut(
intent: ConfirmationSnippetTestIntent(),
phrases: ["Show confirmation snippet in \(.applicationName)"],
shortTitle: "Confirmation Snippet Test",
systemImageName: "rectangle.on.rectangle"
)
}
}
Is this a known layout issue in the macOS snippet presenter? Is there a supported way to control the insets of the system-provided button row, or a workaround that keeps the snippet in Spotlight and Shortcuts?