From 383e737959d2d3fa8ba1f4521708dd8eaa64d4b2 Mon Sep 17 00:00:00 2001 From: Andrew Blakeslee Moore Date: Sun, 5 Jul 2026 00:52:43 -0700 Subject: [PATCH] Chat View Refinement Nucleic-Session: 4E56990A-96AE-4597-9140-753CB82E769D Co-authored-by: Nucleic --- NucleicRemote/NucleicRemote/Views/Theme.swift | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/NucleicRemote/NucleicRemote/Views/Theme.swift b/NucleicRemote/NucleicRemote/Views/Theme.swift index e50b5fd..89799be 100644 --- a/NucleicRemote/NucleicRemote/Views/Theme.swift +++ b/NucleicRemote/NucleicRemote/Views/Theme.swift @@ -313,6 +313,25 @@ struct KeyboardDismissable: ViewModifier { } } +/// A floating Liquid Glass surface for bars that hover over scrolling content (the session +/// chat bar, approval card). Real `glassEffect` on iOS 26; an ultra-thin material with a +/// hairline edge on earlier systems so the bar still reads as a translucent layer. +struct GlassSurface: ViewModifier { + var cornerRadius: CGFloat = 24 + func body(content: Content) -> some View { + if #available(iOS 26.0, *) { + content.glassEffect(.regular, in: .rect(cornerRadius: cornerRadius, style: .continuous)) + } else { + content + .background(.ultraThinMaterial, + in: RoundedRectangle(cornerRadius: cornerRadius, style: .continuous)) + .overlay( + RoundedRectangle(cornerRadius: cornerRadius, style: .continuous) + .strokeBorder(Color.primary.opacity(0.08), lineWidth: 1)) + } + } +} + /// A lifted card surface with a hairline border — the mobile echo of `AppTheme.surface`. struct CardBackground: ViewModifier { var padding: CGFloat = 14