From 4390a42e0eee332e4639353a769650b0e975ee23 Mon Sep 17 00:00:00 2001 From: Andrew Blakeslee Moore Date: Sun, 5 Jul 2026 19:45:15 -0700 Subject: [PATCH] Composer Launch Delay Nucleic-Session: EDE6C55C-8E3E-41BF-9DA0-A148C554C984 Co-authored-by: Nucleic --- NucleicRemote/NucleicRemote/Views/Composer.swift | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/NucleicRemote/NucleicRemote/Views/Composer.swift b/NucleicRemote/NucleicRemote/Views/Composer.swift index fae1237..38d6e13 100644 --- a/NucleicRemote/NucleicRemote/Views/Composer.swift +++ b/NucleicRemote/NucleicRemote/Views/Composer.swift @@ -237,12 +237,11 @@ struct NewChatAffordance: ViewModifier { .onChange(of: isPresented) { _, open in if open { draft = "" - // Focus once the bar has sprung into place, so the keyboard rises against a - // settled layout — otherwise its avoidance inset is computed mid-animation and - // the keyboard lands overlapping the bar until the next re-layout. - DispatchQueue.main.asyncAfter(deadline: .now() + 0.35) { - if isPresented { draftFocused = true } - } + // Focus in the same turn the bar is presented so the keyboard rises immediately, + // riding up together with the bar (both animate from the bottom edge at t=0) + // instead of waiting for the spring to settle first — no perceptible delay + // between the composer appearing and the keyboard opening. + draftFocused = true } else { draftFocused = false draft = ""