From 923db6c0b6d8c98bbf2a6999a7b8dd0e93c07b0a Mon Sep 17 00:00:00 2001 From: Konrad Wojas Date: Sun, 25 Oct 2026 00:40:13 +0800 Subject: [PATCH] fix(mobile): the iPhone new-chat button sits beside the tab bar on iOS 26.6 iOS 26.6 does not copy UITabBarItem identifiers onto its tab buttons, so the lookup that positions the compose button found nothing and left it at a zero-size frame in the corner. Fall back to every visible control in the bar, which there are only the tab buttons. Co-Authored-By: Claude Opus 5.5 --- .../ios/T3SidebarTabBarView.swift | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/apps/mobile/modules/t3-native-controls/ios/T3SidebarTabBarView.swift b/apps/mobile/modules/t3-native-controls/ios/T3SidebarTabBarView.swift index 2f9fa98f0d5a..b7afac0b4b98 100644 --- a/apps/mobile/modules/t3-native-controls/ios/T3SidebarTabBarView.swift +++ b/apps/mobile/modules/t3-native-controls/ios/T3SidebarTabBarView.swift @@ -6,7 +6,10 @@ private final class WorkspaceTabBar: UITabBar { override func layoutSubviews() { super.layoutSubviews() - let row = tabButtons(in: self).reduce(CGRect.null) { $0.union(convert($1.bounds, from: $1)) } + // iOS 26.6 doesn't copy item identifiers onto its tab buttons; the bar holds no other controls. + let identified = tabButtons(in: self) { $0.accessibilityIdentifier?.hasPrefix("workspace-tab-") == true } + let buttons = identified.isEmpty ? tabButtons(in: self) { _ in true } : identified + let row = buttons.reduce(CGRect.null) { $0.union(convert($1.bounds, from: $1)) } if !row.isNull { onContentLayout?(row) } } @@ -15,12 +18,10 @@ private final class WorkspaceTabBar: UITabBar { invalidateIntrinsicContentSize() } - private func tabButtons(in view: UIView) -> [UIView] { + private func tabButtons(in view: UIView, matching match: (UIView) -> Bool) -> [UIView] { view.subviews.filter { !$0.isHidden }.flatMap { subview in - if subview is UIControl, subview.accessibilityIdentifier?.hasPrefix("workspace-tab-") == true { - return [subview] - } - return tabButtons(in: subview) + if subview is UIControl, match(subview) { return [subview] } + return tabButtons(in: subview, matching: match) } } }