diff --git a/Memory/ARCHITECTURE.md b/Memory/ARCHITECTURE.md index e67b605e..17b19c4f 100644 --- a/Memory/ARCHITECTURE.md +++ b/Memory/ARCHITECTURE.md @@ -697,7 +697,8 @@ remain. Metrics uses vertical labeled-icon menu or horizontal principal segmente coexist. iOS 27 uses `ToolbarOverflowMenu`, older OS labeled menus. Save stays labeled with form progress. Native minimized SSH/SFTP search stays in every placement; sidebar/pose changes never activate search or claim focus. -On iOS 27.1 content reads active division/occlusion ReservedRegions after safe-area/keyboard layout. Frames include +When built with the iOS 27.1 SDK, iOS 27.1 content reads active division/occlusion ReservedRegions after +safe-area/keyboard layout. Frames include margins and follow SwiftUI's leading-origin convention, including RTL. Terminal/shortcuts/notices occupy the largest continuous unobstructed rectangle, ties top then leading. Ghostty resizes the existing PTY and rejects invalid viewports; session ownership survives pose. Assistant keeps one transcript and one scrollable interaction surface diff --git a/TFI/DesignSystem/MobileContentRegions.swift b/TFI/DesignSystem/MobileContentRegions.swift index d80fbe52..04f39f71 100644 --- a/TFI/DesignSystem/MobileContentRegions.swift +++ b/TFI/DesignSystem/MobileContentRegions.swift @@ -122,15 +122,17 @@ struct MobileRegionReader: View { private func regions(in geometry: GeometryProxy) -> [MobileReservedRegion] { if let override { return override } - if #available(iOS 27.1, *) { - // The default mirrored query matches Layout placement in both LTR and RTL. - return geometry.reservedRegions(kind: .division).map { - MobileReservedRegion(kind: .division, frame: $0.frame, isActive: $0.isActive) - } - + geometry.reservedRegions(kind: .occlusion).map { - MobileReservedRegion(kind: .occlusion, frame: $0.frame, isActive: $0.isActive) + #if TERMIND_HAS_IOS_27_1_SDK + if #available(iOS 27.1, *) { + // The default mirrored query matches Layout placement in both LTR and RTL. + return geometry.reservedRegions(kind: .division).map { + MobileReservedRegion(kind: .division, frame: $0.frame, isActive: $0.isActive) } - } + + geometry.reservedRegions(kind: .occlusion).map { + MobileReservedRegion(kind: .occlusion, frame: $0.frame, isActive: $0.isActive) + } + } + #endif return [] } } diff --git a/TFI/DesignSystem/MobileToolbarEnvironment.swift b/TFI/DesignSystem/MobileToolbarEnvironment.swift index ef16fc5b..19f15224 100644 --- a/TFI/DesignSystem/MobileToolbarEnvironment.swift +++ b/TFI/DesignSystem/MobileToolbarEnvironment.swift @@ -18,27 +18,35 @@ private struct MobileToolbarEnvironment: ViewModifier { @Environment(\.tabBarPlacement) private var placement func body(content: Content) -> some View { - if #available(iOS 27.1, *) { - content.modifier(MobileVerticalToolbarEnvironment(isTopBar: placement == .topBar)) - } else { + #if TERMIND_HAS_IOS_27_1_SDK + if #available(iOS 27.1, *) { + content.modifier(MobileVerticalToolbarEnvironment(isTopBar: placement == .topBar)) + } else { + content.environment( + \.mobileToolbarLayout, + MobileToolbarLayout(isTopBar: placement == .topBar)) + } + #else content.environment( \.mobileToolbarLayout, MobileToolbarLayout(isTopBar: placement == .topBar)) + #endif + } +} + +#if TERMIND_HAS_IOS_27_1_SDK + @available(iOS 27.1, *) + private struct MobileVerticalToolbarEnvironment: ViewModifier { + let isTopBar: Bool + @Environment(\.toolbarVerticalEdge) private var edge + + func body(content: Content) -> some View { + content.environment( + \.mobileToolbarLayout, + MobileToolbarLayout(isTopBar: isTopBar, verticalEdge: edge)) } } -} - -@available(iOS 27.1, *) -private struct MobileVerticalToolbarEnvironment: ViewModifier { - let isTopBar: Bool - @Environment(\.toolbarVerticalEdge) private var edge - - func body(content: Content) -> some View { - content.environment( - \.mobileToolbarLayout, - MobileToolbarLayout(isTopBar: isTopBar, verticalEdge: edge)) - } -} +#endif extension View { func mobileToolbarEnvironment() -> some View { diff --git a/Termind.xcodeproj/project.pbxproj b/Termind.xcodeproj/project.pbxproj index 73b75b7c..ca295d4e 100644 --- a/Termind.xcodeproj/project.pbxproj +++ b/Termind.xcodeproj/project.pbxproj @@ -1786,7 +1786,7 @@ ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; CODE_SIGN_ENTITLEMENTS = TFI/TFI.entitlements; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 24; + CURRENT_PROJECT_VERSION = 25; GENERATE_INFOPLIST_FILE = YES; ICLOUD_CONTAINER_ENVIRONMENT = Development; INFOPLIST_FILE = TFI/Info.plist; @@ -2059,7 +2059,7 @@ ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; CODE_SIGN_ENTITLEMENTS = TFI/TFI.entitlements; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 24; + CURRENT_PROJECT_VERSION = 25; GENERATE_INFOPLIST_FILE = YES; ICLOUD_CONTAINER_ENVIRONMENT = Production; INFOPLIST_FILE = TFI/Info.plist; @@ -2220,6 +2220,8 @@ ONLY_ACTIVE_ARCH = YES; STRING_CATALOG_GENERATE_SYMBOLS = YES; SWIFT_ACTIVE_COMPILATION_CONDITIONS = "DEBUG $(inherited)"; + "SWIFT_ACTIVE_COMPILATION_CONDITIONS[sdk=iphoneos27.1*]" = "$(inherited) TERMIND_HAS_IOS_27_1_SDK"; + "SWIFT_ACTIVE_COMPILATION_CONDITIONS[sdk=iphonesimulator27.1*]" = "$(inherited) TERMIND_HAS_IOS_27_1_SDK"; SWIFT_APPROACHABLE_CONCURRENCY = YES; SWIFT_DEFAULT_ACTOR_ISOLATION = MainActor; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; @@ -2277,6 +2279,8 @@ MTL_ENABLE_DEBUG_INFO = NO; MTL_FAST_MATH = YES; STRING_CATALOG_GENERATE_SYMBOLS = YES; + "SWIFT_ACTIVE_COMPILATION_CONDITIONS[sdk=iphoneos27.1*]" = "$(inherited) TERMIND_HAS_IOS_27_1_SDK"; + "SWIFT_ACTIVE_COMPILATION_CONDITIONS[sdk=iphonesimulator27.1*]" = "$(inherited) TERMIND_HAS_IOS_27_1_SDK"; SWIFT_APPROACHABLE_CONCURRENCY = YES; SWIFT_COMPILATION_MODE = wholemodule; SWIFT_DEFAULT_ACTOR_ISOLATION = MainActor; @@ -2298,7 +2302,7 @@ CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; - CURRENT_PROJECT_VERSION = 31; + CURRENT_PROJECT_VERSION = 32; DEAD_CODE_STRIPPING = YES; DEVELOPMENT_ASSET_PATHS = ""; ENABLE_APP_SANDBOX = YES; @@ -2335,7 +2339,7 @@ CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; - CURRENT_PROJECT_VERSION = 31; + CURRENT_PROJECT_VERSION = 32; DEAD_CODE_STRIPPING = YES; DEVELOPMENT_ASSET_PATHS = ""; ENABLE_APP_SANDBOX = YES;