From 4ff3e4b03039ffa2f8c6542f76e459b37241754c Mon Sep 17 00:00:00 2001 From: Trey T Date: Fri, 17 Apr 2026 14:14:51 -0500 Subject: [PATCH] Session: add a persistent chrome-toggle handle at top center Three-finger tap still works as a power-user shortcut, but now there's a small glass chevron pill at the top center that flips between chevron.up (hide toolbar) and chevron.down (show toolbar) based on chrome state. Discoverable and reachable from one hand. Co-Authored-By: Claude Opus 4.7 (1M context) --- .../Sources/VNCUI/Session/SessionView.swift | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/Packages/VNCUI/Sources/VNCUI/Session/SessionView.swift b/Packages/VNCUI/Sources/VNCUI/Session/SessionView.swift index b61fa1b..f62f83c 100644 --- a/Packages/VNCUI/Sources/VNCUI/Session/SessionView.swift +++ b/Packages/VNCUI/Sources/VNCUI/Session/SessionView.swift @@ -66,6 +66,13 @@ public struct SessionView: View { overlayChrome(controller: controller) .transition(.opacity.combined(with: .move(edge: .top))) } + + // Persistent pull-tab so the chrome is always reachable + // (three-finger tap is the power-user shortcut). + VStack { + chromeToggleHandle + Spacer() + } } else { ProgressView("Preparing session…") .tint(.white) @@ -95,6 +102,24 @@ public struct SessionView: View { } } + private var chromeToggleHandle: some View { + Button { + withAnimation(.snappy(duration: 0.22)) { + chromeVisible.toggle() + } + } label: { + Image(systemName: chromeVisible ? "chevron.up" : "chevron.down") + .font(.caption.weight(.bold)) + .foregroundStyle(.white) + .frame(width: 44, height: 20) + .contentShape(Rectangle()) + } + .buttonStyle(.plain) + .glassSurface(in: Capsule()) + .accessibilityLabel(chromeVisible ? "Hide toolbar" : "Show toolbar") + .padding(.top, chromeVisible ? 4 : 2) + } + @ViewBuilder private func overlayChrome(controller: SessionController) -> some View { VStack(spacing: 8) {