From 392ae1525a34c584e5000a7d40f3c219548ac25c Mon Sep 17 00:00:00 2001 From: Joshua Parmenter Date: Sun, 9 Aug 2026 14:20:04 -0700 Subject: [PATCH] fix(ui): split builder presentation chain to satisfy the type-checker MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The factory-overwrite confirmation dialog pushed ShoeGazeBuilderView's already-large presentation modifier chain past the Swift expression type-checker's budget — it compiled under `swift build` but failed the Xcode app build with "unable to type-check this expression in reasonable time". Extract the first half of the chain into a `chromeWithPrompts` computed property so each half type-checks quickly. Co-Authored-By: Claude Opus 4.8 --- Sources/LyrebirdShoeGazeUI/ShoeGazeBuilderView.swift | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Sources/LyrebirdShoeGazeUI/ShoeGazeBuilderView.swift b/Sources/LyrebirdShoeGazeUI/ShoeGazeBuilderView.swift index 5528452..29f7227 100644 --- a/Sources/LyrebirdShoeGazeUI/ShoeGazeBuilderView.swift +++ b/Sources/LyrebirdShoeGazeUI/ShoeGazeBuilderView.swift @@ -309,7 +309,10 @@ public struct ShoeGazeBuilderView: View { } } - private var presentationChrome: some View { + // Split off the first half of the presentation chain into its own computed property: the full + // modifier chain is long enough to blow the Swift expression type-checker's budget, so this + // boundary keeps each half small enough to type-check quickly. + private var chromeWithPrompts: some View { layoutChrome .background(boardsSheetAnchor) .background(rigExportAnchor) @@ -342,6 +345,10 @@ public struct ShoeGazeBuilderView: View { Text("“\(request.entry.name)” is a built-in starter rig. Overwriting replaces it in " + "your library. Save as a new rig to keep the original.") } + } + + private var presentationChrome: some View { + chromeWithPrompts .confirmationDialog( "Erase all rigs?", isPresented: $showEraseAllDialog,