From b1a0cfb47da2cee84b5272b6e9975c47628730a4 Mon Sep 17 00:00:00 2001 From: Jeremy Date: Mon, 2 Nov 2026 00:31:31 +0100 Subject: [PATCH] fix(mobile): keep iOS compose button size while a tab is pressed Pressing a tab on the iOS 26+ glass tab bar adds a magnified copy of the tab buttons for the lens, without the workspace-tab identifiers. The fallback then measured those scaled copies, so compose was sized ~1.16x until the bar happened to lay out again. Skip controls drawn under a scaling transform. Co-Authored-By: Claude Opus 5.5 --- .../modules/t3-native-controls/ios/T3SidebarTabBarView.swift | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/apps/mobile/modules/t3-native-controls/ios/T3SidebarTabBarView.swift b/apps/mobile/modules/t3-native-controls/ios/T3SidebarTabBarView.swift index f96c00962682..0f56662ec00e 100644 --- a/apps/mobile/modules/t3-native-controls/ios/T3SidebarTabBarView.swift +++ b/apps/mobile/modules/t3-native-controls/ios/T3SidebarTabBarView.swift @@ -8,7 +8,10 @@ private final class WorkspaceTabBar: UITabBar { super.layoutSubviews() // 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 candidates = identified.isEmpty ? tabButtons(in: self) { _ in true } : identified + // Pressing a tab adds a magnified copy of the row for the glass lens, without identifiers. + // Sizing compose from it leaves compose enlarged until the bar lays out again. + let buttons = candidates.filter { convert($0.bounds, from: $0).size == $0.bounds.size } let row = buttons.reduce(CGRect.null) { $0.union(convert($1.bounds, from: $1)) } if !row.isNull { onContentLayout?(row) } }