Skip to content

Commit 923db6c

Browse files
wojasclaude
andcommitted
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 <[email protected]>
1 parent d53873b commit 923db6c

1 file changed

Lines changed: 7 additions & 6 deletions

File tree

‎apps/mobile/modules/t3-native-controls/ios/T3SidebarTabBarView.swift‎

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,10 @@ private final class WorkspaceTabBar: UITabBar {
66

77
override func layoutSubviews() {
88
super.layoutSubviews()
9-
let row = tabButtons(in: self).reduce(CGRect.null) { $0.union(convert($1.bounds, from: $1)) }
9+
// iOS 26.6 doesn't copy item identifiers onto its tab buttons; the bar holds no other controls.
10+
let identified = tabButtons(in: self) { $0.accessibilityIdentifier?.hasPrefix("workspace-tab-") == true }
11+
let buttons = identified.isEmpty ? tabButtons(in: self) { _ in true } : identified
12+
let row = buttons.reduce(CGRect.null) { $0.union(convert($1.bounds, from: $1)) }
1013
if !row.isNull { onContentLayout?(row) }
1114
}
1215

@@ -15,12 +18,10 @@ private final class WorkspaceTabBar: UITabBar {
1518
invalidateIntrinsicContentSize()
1619
}
1720

18-
private func tabButtons(in view: UIView) -> [UIView] {
21+
private func tabButtons(in view: UIView, matching match: (UIView) -> Bool) -> [UIView] {
1922
view.subviews.filter { !$0.isHidden }.flatMap { subview in
20-
if subview is UIControl, subview.accessibilityIdentifier?.hasPrefix("workspace-tab-") == true {
21-
return [subview]
22-
}
23-
return tabButtons(in: subview)
23+
if subview is UIControl, match(subview) { return [subview] }
24+
return tabButtons(in: subview, matching: match)
2425
}
2526
}
2627
}

0 commit comments

Comments
 (0)