From 19ae2b029316c2544d70f523e16a8b7fd003b026 Mon Sep 17 00:00:00 2001 From: Andrew Blakeslee Moore Date: Mon, 6 Jul 2026 18:02:26 -0700 Subject: [PATCH] Session View Animation Nucleic-Session: A8FFA1A6-443F-444A-A735-C53958D7E570 Co-authored-by: Nucleic --- NucleicRemote/NucleicRemote/Views/SessionDetailView.swift | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/NucleicRemote/NucleicRemote/Views/SessionDetailView.swift b/NucleicRemote/NucleicRemote/Views/SessionDetailView.swift index f6ac216..e5f3b16 100644 --- a/NucleicRemote/NucleicRemote/Views/SessionDetailView.swift +++ b/NucleicRemote/NucleicRemote/Views/SessionDetailView.swift @@ -651,6 +651,12 @@ struct TranscriptList: View { // so it sits over the composer instead of behind the floating bar; a tap bumps this // same request, and following resumes once the geometry reader sees the bottom. .onChange(of: scrollToBottomRequest) { scrollToEnd(proxy) } + // Warm the Markdown parse caches off the main thread whenever the row set grows — + // `initial: true` fires it for the batch that lands on open (the expensive case), and + // each later new row tops it up. Keyed on the row *count*, so streaming deltas into an + // existing row (which don't change the count) never re-arm it. `items.count` is O(1). + .onChange(of: items.count, initial: true) { _, _ in prewarmMarkdown() } + .onDisappear { prewarmTask?.cancel() } } }