The best way to control Claude Code, Codex and more from any computer or phone
Mirrored from https://github.com/Camo67/t3code.git
Synced Nov 22, 02:00 UTC
fix(mobile): iOS filter menus close back into their pill without clipping or garbling (#31168)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Julius Marminge committed
Nov 6, 2026 at 18:43 UTC
0bba3684b83ed359b465cd39c53ff2fb797841ad
6 files changed
+75
-9
apps/mobile/src/features/home/HomeScreen.tsx
+2
@@ -809,6 +809,8 @@ export function HomeScreen(props: HomeScreenProps) {
809
recycleItems
810
extraData={v2ExtraData}
811
ListHeaderComponent={v2ListHeader}
812
+ // Lifted above the rows so an iOS filter menu's dismissal morph is not covered.
813
+ ListHeaderComponentStyle={{ zIndex: 1 }}
814
ListFooterComponent={
815
settledShelfExpanded && threadListV2Layout.hiddenSettledCount > 0 ? (
816
<ThreadListV2ShowMoreRow
apps/mobile/src/features/home/ThreadListFilters.tsx
+1
-1
@@ -27,7 +27,7 @@ export function ThreadListFilters(props: {
27
<ScrollView
28
horizontal
29
showsHorizontalScrollIndicator={false}
30
- style={{ marginHorizontal: -props.gutter }}
30
+ style={{ marginHorizontal: -props.gutter, overflow: "visible" }}
31
contentContainerStyle={{ paddingHorizontal: 20, paddingTop: 2, paddingBottom: 10, gap: 8 }}
32
>
33
<ListFilterMenu
apps/mobile/src/features/pull-requests/PullRequestListFilters.tsx
+1
@@ -357,6 +357,7 @@ export function PullRequestListFilters(props: {
357
<ScrollView
358
horizontal
359
showsHorizontalScrollIndicator={false}
360
+ style={{ overflow: "visible" }}
361
// In the Android sidebar the first pill lines up with the rows' content instead
362
// (8dp row margin + 12dp padding).
363
contentContainerStyle={
apps/mobile/src/features/pull-requests/PullRequestsScreen.tsx
+2
@@ -318,6 +318,8 @@ export function PullRequestsScreen(
318
keyboardDismissMode="on-drag"
319
keyboardShouldPersistTaps="handled"
320
renderItem={renderPullRequest}
321
+ // Lifted above the rows so an iOS filter menu's dismissal morph is not covered.
322
+ ListHeaderComponentStyle={{ zIndex: 1 }}
323
ListHeaderComponent={
324
<>
325
<PullRequestListFilters sidebar={sidebar} filters={filters} />
patches/@react-native-menu__menu@2.0.0.patch
+66
-5
@@ -1,5 +1,5 @@
1
diff --git a/ios/MenuViewManager.mm b/ios/MenuViewManager.mm
2
-index 3d149b3e7426b8f7c999603ddf1e15e12331c33a..e80fe2caae86e339fcb03408419a7d64b3e5b04f 100644
2
+index 3d149b3e7426b8f7c999603ddf1e15e12331c33a..73b9e8bbe30e6647b03cc1890806e8d48a1cbd8c 100644
3
--- a/ios/MenuViewManager.mm
4
+++ b/ios/MenuViewManager.mm
5
@@ -1,6 +1,6 @@
@@ -178,10 +178,19 @@ index 6a2a205f95c1001f3fdf6fb835815fa7c4c02c16..4f42b64349966fb1438f72439cec8256
178
+
179
}
180
diff --git a/ios/Shared/MenuViewImplementation.swift b/ios/Shared/MenuViewImplementation.swift
181
-index 5c4e0da4292b15d3a27b5ea1555f11452a470815..475a99b2a3b1800c9d3e3e5f77a64f552fa35828 100644
181
+index 5c4e0da4292b15d3a27b5ea1555f11452a470815..381aa8e2900aeb0d2453dba514360304a79e95f1 100644
182
--- a/ios/Shared/MenuViewImplementation.swift
183
+++ b/ios/Shared/MenuViewImplementation.swift
184
-@@ -60,17 +60,46 @@ public class MenuViewImplementation: UIButton {
184
+@@ -17,7 +17,7 @@ public class MenuViewImplementation: UIButton {
185
+ }
186
+ _actions.removeAll()
187
+ actions.forEach { menuAction in
188
+- _actions.append(RCTMenuAction(details: menuAction).createUIMenuElement({action in self.sendButtonAction(action)}))
189
++ _actions.append(RCTMenuAction(details: menuAction).createUIMenuElement({action in self.didSelectAction = true; self.sendButtonAction(action)}))
190
+ }
191
+ self.setup()
192
+ }
193
+@@ -60,17 +60,98 @@ public class MenuViewImplementation: UIButton {
194
}
195
196
public override func contextMenuInteraction(_ interaction: UIContextMenuInteraction, configurationForMenuAtLocation location: CGPoint) -> UIContextMenuConfiguration? {
@@ -195,6 +204,7 @@ index 5c4e0da4292b15d3a27b5ea1555f11452a470815..475a99b2a3b1800c9d3e3e5f77a64f55
204
+ self.setup()
205
+ }
206
+ isMenuPresented = true
207
++ didSelectAction = false
208
+ sendMenuInteractionStart()
209
return UIContextMenuConfiguration(identifier: nil, previewProvider: nil) { [weak self] _ in
210
guard let self = self else { return nil }
@@ -222,15 +232,66 @@ index 5c4e0da4292b15d3a27b5ea1555f11452a470815..475a99b2a3b1800c9d3e3e5f77a64f55
232
+ pendingMenu = nil
233
+ self.setup()
234
+ }
235
++ }
236
++
237
++ public override func contextMenuInteraction(_ interaction: UIContextMenuInteraction, previewForHighlightingMenuWithConfiguration configuration: UIContextMenuConfiguration) -> UITargetedPreview? {
238
++ return contentPreview() ?? super.contextMenuInteraction(interaction, previewForHighlightingMenuWithConfiguration: configuration)
239
++ }
240
++
241
++ public override func contextMenuInteraction(_ interaction: UIContextMenuInteraction, previewForDismissingMenuWithConfiguration configuration: UIContextMenuConfiguration) -> UITargetedPreview? {
242
++ guard let preview = contentPreview() else {
243
++ return super.contextMenuInteraction(interaction, previewForDismissingMenuWithConfiguration: configuration)
244
++ }
245
++ // A selection usually re-renders the trigger, so fade instead of landing on its old look.
246
++ return didSelectAction ? nil : preview
247
}
248
249
++ // The button is a transparent overlay: morph from the React content so UIKit hides and restores it.
250
++ // iOS 26 only, and only for content with its own corner radius; otherwise keep UIButton's default.
251
++ private func contentPreview() -> UITargetedPreview? {
252
++ guard #available(iOS 26.0, *) else {
253
++ return nil
254
++ }
255
++ guard !shouldOpenOnLongPress, let siblings = self.superview?.subviews.filter({ $0 !== self }), siblings.count == 1, let content = siblings.first, content.window != nil, let (target, radius) = previewTarget(content) else {
256
++ return nil
257
++ }
258
++ let bounds = target.bounds
259
++ let parameters = UIPreviewParameters()
260
++ parameters.backgroundColor = .clear
261
++ parameters.visiblePath = UIBezierPath(roundedRect: bounds, cornerRadius: min(radius, bounds.height / 2, bounds.width / 2))
262
++ return UITargetedPreview(view: target, parameters: parameters)
263
++ }
264
++
265
++ // Walks the content's full-size single-child chain for its corner radius. A preview of a view
266
++ // above a glass effect view drops the glass until UIKit restores the source, so target the glass view.
267
++ private func previewTarget(_ content: UIView) -> (UIView, CGFloat)? {
268
++ var radius: CGFloat?
269
++ var view = content
270
++ for depth in 0...4 {
271
++ if radius == nil, view.layer.cornerRadius > 0 {
272
++ radius = view.layer.cornerRadius
273
++ }
274
++ if let radius, view is UIVisualEffectView {
275
++ return (view, radius)
276
++ }
277
++ guard depth < 4, view.subviews.count == 1, let child = view.subviews.first,
278
++ abs(child.frame.size.width - view.bounds.size.width) <= 0.5,
279
++ abs(child.frame.size.height - view.bounds.size.height) <= 0.5 else {
280
++ break
281
++ }
282
++ view = child
283
++ }
284
++ return radius.map { (content, $0) }
285
++ }
286
++
287
++ private var didSelectAction = false
288
+ private var isMenuPresented = false
289
+ private var pendingMenu: UIMenu?
290
+
291
func setup () {
292
let menu = UIMenu(title: _title,
293
identifier: nil,
233
-@@ -86,8 +115,102 @@ public class MenuViewImplementation: UIButton {
294
+@@ -86,8 +167,102 @@ public class MenuViewImplementation: UIButton {
295
}
296
}
297
@@ -333,7 +394,7 @@ index 5c4e0da4292b15d3a27b5ea1555f11452a470815..475a99b2a3b1800c9d3e3e5f77a64f55
394
}
395
396
public override func reactSetFrame(_ frame: CGRect) {
336
-@@ -124,4 +247,8 @@ public class MenuViewImplementation: UIButton {
397
+@@ -124,4 +299,8 @@ public class MenuViewImplementation: UIButton {
398
@objc func sendMenuOpen() {
399
// NO-OP (should be overriden by parent)
400
}
pnpm-lock.yaml
+3
-3
@@ -365,7 +365,7 @@ patchedDependencies:
365
'@muse-code/sdk@1.4.6': 7b495b607fc5d76b444c7c4d58821e839726a30e6f3c53564f0d59f2d5b42101
366
'@pierre/diffs@1.6.1': 322ac5f5db8b5715189c010802047f8235c3a45d8ed5ca0ba60fac266e2eba34
367
'@react-native-ai/apple@0.12.0': 2d09870c2848d185cb05b53ed823a46e12dba519324d8dd8e584e28731990f9d
368
- '@react-native-menu/menu@2.0.0': 910ec1bf22aa85a96fcf12299cd823bc30f702dd9b2d77b564d10b9ed709f7f6
368
+ '@react-native-menu/menu@2.0.0': 6872ba71b9847c5a0210b1b896923dadc3860faedfe28d9f062bcedfe786ef1d
369
'@react-navigation/native-stack@7.21.0': 990d575444c4af2ce8218b3b7a8280fe244c03abbdb32b822a2e862f791dbf42
370
alchemy@2.0.0-beta.85: 07cc8c7e14b3b9af143ddd40a059f117c27e55139fbf20bd5dde2eb30509cedd
371
app-builder-lib@26.16.1: 0fbe9ae51783f5768ebe197d12d1fdb7d477a08c92e5db2f6356bcce62613c53
@@ -565,7 +565,7 @@ importers:
565
version: 3.1.1(react-native@0.88.0(@babel/core@7.29.7(supports-color@8.1.1))(@react-native/metro-config@0.88.0(@babel/core@7.29.7(supports-color@8.1.1))(bufferutil@4.1.0)(supports-color@8.1.1)(utf-8-validate@6.0.6))(@types/react@19.3.0)(bufferutil@4.1.0)(react@19.3.0)(supports-color@8.1.1)(utf-8-validate@6.0.6))(react@19.3.0)
566
'@react-native-menu/menu':
567
specifier: 2.0.0
568
- version: 2.0.0(patch_hash=910ec1bf22aa85a96fcf12299cd823bc30f702dd9b2d77b564d10b9ed709f7f6)(react-native@0.88.0(@babel/core@7.29.7(supports-color@8.1.1))(@react-native/metro-config@0.88.0(@babel/core@7.29.7(supports-color@8.1.1))(bufferutil@4.1.0)(supports-color@8.1.1)(utf-8-validate@6.0.6))(@types/react@19.3.0)(bufferutil@4.1.0)(react@19.3.0)(supports-color@8.1.1)(utf-8-validate@6.0.6))(react@19.3.0)
568
+ version: 2.0.0(patch_hash=6872ba71b9847c5a0210b1b896923dadc3860faedfe28d9f062bcedfe786ef1d)(react-native@0.88.0(@babel/core@7.29.7(supports-color@8.1.1))(@react-native/metro-config@0.88.0(@babel/core@7.29.7(supports-color@8.1.1))(bufferutil@4.1.0)(supports-color@8.1.1)(utf-8-validate@6.0.6))(@types/react@19.3.0)(bufferutil@4.1.0)(react@19.3.0)(supports-color@8.1.1)(utf-8-validate@6.0.6))(react@19.3.0)
569
'@react-navigation/elements':
570
specifier: 2.9.45
571
version: 2.9.45(d8845bac868f4d8a58c8a8f12ad0d4a5)
@@ -15714,7 +15714,7 @@ snapshots:
15714
react-native: 0.88.0(@babel/core@7.29.7(supports-color@8.1.1))(@react-native/metro-config@0.88.0(@babel/core@7.29.7(supports-color@8.1.1))(bufferutil@4.1.0)(supports-color@8.1.1)(utf-8-validate@6.0.6))(@types/react@19.3.0)(bufferutil@4.1.0)(react@19.3.0)(supports-color@8.1.1)(utf-8-validate@6.0.6)
15715
optional: true
15716
15717
- '@react-native-menu/menu@2.0.0(patch_hash=910ec1bf22aa85a96fcf12299cd823bc30f702dd9b2d77b564d10b9ed709f7f6)(react-native@0.88.0(@babel/core@7.29.7(supports-color@8.1.1))(@react-native/metro-config@0.88.0(@babel/core@7.29.7(supports-color@8.1.1))(bufferutil@4.1.0)(supports-color@8.1.1)(utf-8-validate@6.0.6))(@types/react@19.3.0)(bufferutil@4.1.0)(react@19.3.0)(supports-color@8.1.1)(utf-8-validate@6.0.6))(react@19.3.0)':
15717
+ '@react-native-menu/menu@2.0.0(patch_hash=6872ba71b9847c5a0210b1b896923dadc3860faedfe28d9f062bcedfe786ef1d)(react-native@0.88.0(@babel/core@7.29.7(supports-color@8.1.1))(@react-native/metro-config@0.88.0(@babel/core@7.29.7(supports-color@8.1.1))(bufferutil@4.1.0)(supports-color@8.1.1)(utf-8-validate@6.0.6))(@types/react@19.3.0)(bufferutil@4.1.0)(react@19.3.0)(supports-color@8.1.1)(utf-8-validate@6.0.6))(react@19.3.0)':
15718
dependencies:
15719
react: 19.3.0
15720
react-native: 0.88.0(@babel/core@7.29.7(supports-color@8.1.1))(@react-native/metro-config@0.88.0(@babel/core@7.29.7(supports-color@8.1.1))(bufferutil@4.1.0)(supports-color@8.1.1)(utf-8-validate@6.0.6))(@types/react@19.3.0)(bufferutil@4.1.0)(react@19.3.0)(supports-color@8.1.1)(utf-8-validate@6.0.6)