fix(ui): split builder presentation chain to satisfy the type-checker
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 <noreply@anthropic.com>
This commit is contained in:
@@ -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
|
layoutChrome
|
||||||
.background(boardsSheetAnchor)
|
.background(boardsSheetAnchor)
|
||||||
.background(rigExportAnchor)
|
.background(rigExportAnchor)
|
||||||
@@ -342,6 +345,10 @@ public struct ShoeGazeBuilderView: View {
|
|||||||
Text("“\(request.entry.name)” is a built-in starter rig. Overwriting replaces it in "
|
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.")
|
+ "your library. Save as a new rig to keep the original.")
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private var presentationChrome: some View {
|
||||||
|
chromeWithPrompts
|
||||||
.confirmationDialog(
|
.confirmationDialog(
|
||||||
"Erase all rigs?",
|
"Erase all rigs?",
|
||||||
isPresented: $showEraseAllDialog,
|
isPresented: $showEraseAllDialog,
|
||||||
|
|||||||
Reference in New Issue
Block a user