The best way to control Claude Code, Codex and more from any computer or phone
fix(android): navigation chrome takes less of the screen (#20813)
Co-authored-by: Pixel Perfect <me@pixp.cc> Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
Julius Marminge committed
Oct 19, 2026 at 19:55 UTC
832dc8fd73ce7f927714b0841e2d7557cff0ec28
40 files changed
+1210
-414
apps/mobile/deps/react-native-screens-5.0.0-t3.27.tgz
Binary files a/apps/mobile/deps/react-native-screens-5.0.0-t3.27.tgz and /dev/null differ
apps/mobile/deps/react-native-screens-5.0.0-t3.29.tgz
Binary files /dev/null and b/apps/mobile/deps/react-native-screens-5.0.0-t3.29.tgz differ
apps/mobile/modules/t3-native-controls/android/build.gradle
+1
@@ -26,6 +26,7 @@ android {
26
dependencies {
27
implementation project(':expo-modules-core')
28
implementation 'androidx.compose.ui:ui-android:1.10.6'
29
+ implementation 'androidx.activity:activity:1.8.2'
30
implementation 'androidx.compose.material3:material3-android:1.5.0-alpha17'
31
implementation 'androidx.window:window:1.5.1'
32
}
apps/mobile/modules/t3-native-controls/android/src/main/java/expo/modules/t3nativecontrols/T3WorkspaceNavigationModule.kt
+277
-35
@@ -2,25 +2,60 @@ package expo.modules.t3nativecontrols
2
3
import android.content.Context
4
import android.view.ViewGroup
5
+import androidx.activity.ComponentActivity
6
+import androidx.activity.OnBackPressedCallback
7
+import androidx.compose.animation.core.animateFloatAsState
8
+import androidx.compose.foundation.background
9
+import androidx.compose.foundation.layout.Box
10
+import androidx.compose.foundation.layout.Column
11
+import androidx.compose.foundation.layout.Row
12
+import androidx.compose.foundation.layout.Spacer
13
import androidx.compose.foundation.layout.WindowInsets
14
+import androidx.compose.foundation.layout.fillMaxHeight
15
import androidx.compose.foundation.layout.fillMaxSize
16
+import androidx.compose.foundation.layout.height
17
+import androidx.compose.foundation.layout.padding
18
+import androidx.compose.foundation.layout.width
19
+import androidx.compose.foundation.selection.selectable
20
+import androidx.compose.foundation.selection.selectableGroup
21
+import androidx.compose.foundation.shape.CircleShape
22
+import androidx.compose.foundation.shape.RoundedCornerShape
23
import androidx.compose.material3.Icon
24
+import androidx.compose.material3.IconButton
25
import androidx.compose.material3.MaterialTheme
26
import androidx.compose.material3.NavigationBar
27
import androidx.compose.material3.NavigationBarItem
28
import androidx.compose.material3.NavigationBarItemDefaults
29
+import androidx.compose.material3.Scrim
30
+import androidx.compose.material3.Surface
31
import androidx.compose.material3.Text
32
import androidx.compose.material3.darkColorScheme
33
import androidx.compose.material3.lightColorScheme
34
import androidx.compose.runtime.Composable
35
+import androidx.compose.runtime.DisposableEffect
36
+import androidx.compose.runtime.LaunchedEffect
37
import androidx.compose.runtime.getValue
38
import androidx.compose.runtime.mutableStateOf
39
+import androidx.compose.runtime.remember
40
import androidx.compose.runtime.setValue
41
+import androidx.compose.ui.Alignment
42
import androidx.compose.ui.Modifier
43
+import androidx.compose.ui.draw.alpha
44
+import androidx.compose.ui.draw.clip
45
+import androidx.compose.ui.draw.clipToBounds
46
+import androidx.compose.ui.draw.shadow
47
import androidx.compose.ui.graphics.Color
48
+import androidx.compose.ui.layout.onSizeChanged
49
import androidx.compose.ui.platform.ComposeView
50
+import androidx.compose.ui.platform.LocalDensity
51
import androidx.compose.ui.platform.ViewCompositionStrategy
52
import androidx.compose.ui.res.painterResource
53
+import androidx.compose.ui.semantics.Role
54
+import androidx.compose.ui.semantics.clearAndSetSemantics
55
+import androidx.compose.ui.semantics.contentDescription
56
+import androidx.compose.ui.semantics.semantics
57
+import androidx.compose.ui.unit.dp
58
+import androidx.compose.ui.unit.lerp
59
import androidx.compose.ui.unit.sp
60
import expo.modules.kotlin.AppContext
61
import expo.modules.kotlin.modules.Module
@@ -28,6 +63,8 @@ import expo.modules.kotlin.modules.ModuleDefinition
63
import expo.modules.kotlin.viewevent.EventDispatcher
64
import expo.modules.kotlin.views.ExpoView
65
66
+private val TABS = listOf("threads", "pullRequests", "settings")
67
+
68
class T3WorkspaceNavigationModule : Module() {
69
override fun definition() = ModuleDefinition {
70
Name("T3WorkspaceNavigation")
@@ -35,8 +72,21 @@ class T3WorkspaceNavigationModule : Module() {
72
Prop("selectedTab") { view: T3WorkspaceNavigationView, value: String ->
73
view.selectedTab = value
74
}
75
+ Prop("rail") { view: T3WorkspaceNavigationView, value: Boolean -> view.rail = value }
76
Prop("dark") { view: T3WorkspaceNavigationView, value: Boolean -> view.dark = value }
77
Prop("textScale") { view: T3WorkspaceNavigationView, value: Float -> view.textScale = value }
78
+ Prop("newEnabled") { view: T3WorkspaceNavigationView, value: Boolean ->
79
+ view.newEnabled = value
80
+ }
81
+ Prop("safeAreaTop") { view: T3WorkspaceNavigationView, value: Float ->
82
+ view.safeAreaTop = value
83
+ }
84
+ Prop("safeAreaBottom") { view: T3WorkspaceNavigationView, value: Float ->
85
+ view.safeAreaBottom = value
86
+ }
87
+ Prop("headerHeight") { view: T3WorkspaceNavigationView, value: Float ->
88
+ view.headerHeight = value
89
+ }
90
Prop("containerColor") { view: T3WorkspaceNavigationView, value: Int ->
91
view.containerColor = value
92
}
@@ -49,12 +99,18 @@ class T3WorkspaceNavigationModule : Module() {
99
Prop("unselectedColor") { view: T3WorkspaceNavigationView, value: Int ->
100
view.unselectedColor = value
101
}
52
- Events("onTabSelected")
102
+ Prop("actionColor") { view: T3WorkspaceNavigationView, value: Int ->
103
+ view.actionColor = value
104
+ }
105
+ Prop("actionContentColor") { view: T3WorkspaceNavigationView, value: Int ->
106
+ view.actionContentColor = value
107
+ }
108
+ Events("onTabSelected", "onNewThread", "onOverlayChange")
109
}
110
}
111
}
112
57
-/** Material3 bottom navigation for the compact workspace. */
113
+/** One Material3 selection surface moves from below the list to its leading edge. */
114
class T3WorkspaceNavigationView(
115
context: Context,
116
appContext: AppContext
@@ -63,13 +119,22 @@ class T3WorkspaceNavigationView(
119
override val shouldUseAndroidLayout = true
120
121
private val onTabSelected by EventDispatcher()
122
+ private val onNewThread by EventDispatcher()
123
+ private val onOverlayChange by EventDispatcher()
124
var selectedTab by mutableStateOf("threads")
125
+ var rail by mutableStateOf(false)
126
var dark by mutableStateOf(false)
127
var textScale by mutableStateOf(1f)
128
+ var newEnabled by mutableStateOf(false)
129
+ var safeAreaTop by mutableStateOf(0f)
130
+ var safeAreaBottom by mutableStateOf(0f)
131
+ var headerHeight by mutableStateOf(56f)
132
var containerColor by mutableStateOf(0)
133
var selectedColor by mutableStateOf(0)
134
var indicatorColor by mutableStateOf(0)
135
var unselectedColor by mutableStateOf(0)
136
+ var actionColor by mutableStateOf(0)
137
+ var actionContentColor by mutableStateOf(0)
138
139
override fun onMeasure(widthMeasureSpec: Int, heightMeasureSpec: Int) {
140
// Fabric measures the replacement bar before attaching it on a fold.
@@ -101,30 +166,30 @@ class T3WorkspaceNavigationView(
166
)
167
setContent {
168
MaterialTheme(colorScheme = if (dark) darkColorScheme() else lightColorScheme()) {
104
- val tabs = listOf("threads", "pullRequests")
105
- NavigationBar(
106
- modifier = Modifier.fillMaxSize(),
107
- containerColor = Color(containerColor),
108
- tonalElevation = androidx.compose.ui.unit.Dp(0f),
109
- windowInsets = WindowInsets(0),
110
- ) {
111
- tabs.forEach { tab ->
112
- NavigationBarItem(
113
- selected = selectedTab == tab,
114
- onClick = { onTabSelected(mapOf("tab" to tab)) },
115
- icon = { tabIcon(tab) },
116
- label = {
117
- val title = if (tab == "threads") "Chats" else "Pull requests"
118
- Text(title, fontSize = (12 * textScale).sp)
119
- },
120
- colors = NavigationBarItemDefaults.colors(
121
- selectedIconColor = Color(selectedColor),
122
- selectedTextColor = Color(selectedColor),
123
- indicatorColor = Color(indicatorColor),
124
- unselectedIconColor = Color(unselectedColor),
125
- unselectedTextColor = Color(unselectedColor),
126
- ),
127
- )
169
+ if (rail) {
170
+ rail()
171
+ } else {
172
+ NavigationBar(
173
+ modifier = Modifier.fillMaxSize(),
174
+ containerColor = Color(containerColor),
175
+ tonalElevation = androidx.compose.ui.unit.Dp(0f),
176
+ windowInsets = WindowInsets(0),
177
+ ) {
178
+ TABS.forEach { tab ->
179
+ NavigationBarItem(
180
+ selected = selectedTab == tab,
181
+ onClick = { onTabSelected(mapOf("tab" to tab)) },
182
+ icon = { Icon(tabIconPainter(tab), contentDescription = null) },
183
+ label = { Text(tabTitle(tab), fontSize = (12 * textScale).sp) },
184
+ colors = NavigationBarItemDefaults.colors(
185
+ selectedIconColor = Color(selectedColor),
186
+ selectedTextColor = Color(selectedColor),
187
+ indicatorColor = Color(indicatorColor),
188
+ unselectedIconColor = Color(unselectedColor),
189
+ unselectedTextColor = Color(unselectedColor),
190
+ ),
191
+ )
192
+ }
193
}
194
}
195
}
@@ -135,15 +200,192 @@ class T3WorkspaceNavigationView(
200
}
201
202
@Composable
138
- private fun tabIcon(tab: String) {
139
- val drawable = if (tab == "threads") {
140
- R.drawable.t3_chats
141
- } else {
142
- R.drawable.t3_pull_requests
143
- }
144
- Icon(
145
- painter = painterResource(drawable),
146
- contentDescription = if (tab == "threads") "Chats" else "Pull requests",
203
+ private fun rail() {
204
+ // One rail surface widens in place over the list. Material's ModalWideNavigationRail
205
+ // instead moves its destinations into a dialog window copy, which blanks them for a few
206
+ // frames while the window attaches and lays them out at a different height.
207
+ var expanded by remember { mutableStateOf(false) }
208
+ // React Native sizes this view to the rail. While the rail is open it spans the workspace,
209
+ // and it only widens once the host has made room, so the surface is never clipped.
210
+ var roomy by remember { mutableStateOf(false) }
211
+ val progress by animateFloatAsState(
212
+ targetValue = if (expanded && roomy) 1f else 0f,
213
+ animationSpec = MaterialTheme.motionScheme.defaultSpatialSpec(),
214
)
215
+ val overlay = expanded || progress != 0f
216
+ LaunchedEffect(overlay) { onOverlayChange(mapOf("overlay" to overlay)) }
217
+ // The activity handles Back before React Native, so an open rail closes first.
218
+ val backDispatcher = (appContext.currentActivity as? ComponentActivity)?.onBackPressedDispatcher
219
+ DisposableEffect(backDispatcher, expanded) {
220
+ val callback = object : OnBackPressedCallback(expanded) {
221
+ override fun handleOnBackPressed() {
222
+ expanded = false
223
+ }
224
+ }
225
+ backDispatcher?.addCallback(callback)
226
+ onDispose { callback.remove() }
227
+ }
228
+ val density = LocalDensity.current
229
+ Box(
230
+ Modifier.fillMaxSize().onSizeChanged {
231
+ roomy = with(density) { it.width.toDp() } >= EXPANDED_RAIL_WIDTH
232
+ },
233
+ ) {
234
+ val fraction = progress.coerceIn(0f, 1f)
235
+ if (fraction > 0f) {
236
+ Scrim(
237
+ contentDescription = "Close navigation rail",
238
+ onClick = { expanded = false },
239
+ alpha = { fraction },
240
+ )
241
+ }
242
+ Column(
243
+ Modifier
244
+ .fillMaxHeight()
245
+ .width(lerp(RAIL_WIDTH, EXPANDED_RAIL_WIDTH, progress.coerceAtLeast(0f)))
246
+ .shadow(RAIL_SHADOW * fraction, RAIL_EXPANDED_SHAPE, clip = false)
247
+ .background(Color(containerColor), RAIL_EXPANDED_SHAPE)
248
+ .padding(top = safeAreaTop.dp, bottom = safeAreaBottom.dp + 12.dp)
249
+ .selectableGroup(),
250
+ ) {
251
+ // As tall as the list toolbar so the menu lines up with the toolbar's actions.
252
+ Box(
253
+ Modifier.height(headerHeight.dp).padding(start = RAIL_INSET),
254
+ contentAlignment = Alignment.CenterStart,
255
+ ) {
256
+ IconButton(
257
+ onClick = { expanded = !expanded },
258
+ modifier = Modifier.semantics {
259
+ contentDescription =
260
+ if (expanded) "Collapse navigation rail" else "Expand navigation rail"
261
+ },
262
+ ) {
263
+ Icon(
264
+ painterResource(R.drawable.t3_menu),
265
+ contentDescription = null,
266
+ tint = Color(unselectedColor),
267
+ )
268
+ }
269
+ }
270
+ newThreadButton(fraction) {
271
+ expanded = false
272
+ onNewThread(emptyMap<String, Any>())
273
+ }
274
+ Spacer(Modifier.weight(1f))
275
+ TABS.forEach { tab ->
276
+ railItem(tab, fraction) {
277
+ expanded = false
278
+ onTabSelected(mapOf("tab" to tab))
279
+ }
280
+ }
281
+ Spacer(Modifier.weight(1f))
282
+ }
283
+ }
284
+ }
285
+
286
+ /** The collapsed FAB widens with the rail and reveals its label as it goes. */
287
+ @Composable
288
+ private fun newThreadButton(fraction: Float, onClick: () -> Unit) {
289
+ Surface(
290
+ onClick = onClick,
291
+ enabled = newEnabled,
292
+ shape = MaterialTheme.shapes.large,
293
+ color = Color(actionColor),
294
+ contentColor = Color(actionContentColor),
295
+ shadowElevation = 3.dp,
296
+ modifier = Modifier
297
+ .padding(start = RAIL_INSET, top = 12.dp)
298
+ .height(FAB_SIZE)
299
+ .width(lerp(FAB_SIZE, EXPANDED_RAIL_WIDTH - RAIL_INSET * 2, fraction))
300
+ .alpha(if (newEnabled) 1f else DISABLED_ALPHA)
301
+ .semantics { contentDescription = "New thread" },
302
+ ) {
303
+ Row(
304
+ Modifier.padding(start = (FAB_SIZE - ICON_SIZE) / 2).clipToBounds(),
305
+ verticalAlignment = Alignment.CenterVertically,
306
+ ) {
307
+ Icon(painterResource(R.drawable.t3_new_thread), contentDescription = null)
308
+ Text(
309
+ "New thread",
310
+ Modifier.padding(start = 12.dp).alpha(labelAlpha(fraction)).clearAndSetSemantics {},
311
+ style = MaterialTheme.typography.labelLarge,
312
+ fontSize = (14 * textScale).sp,
313
+ maxLines = 1,
314
+ softWrap = false,
315
+ )
316
+ }
317
+ }
318
+ }
319
+
320
+ /**
321
+ * A destination whose indicator stretches from a circle around the icon into a pill around
322
+ * the icon and label. The icon never moves, so the collapsed and expanded rails share it.
323
+ */
324
+ @Composable
325
+ private fun railItem(tab: String, fraction: Float, onClick: () -> Unit) {
326
+ val selected = selectedTab == tab
327
+ val title = expandedTabTitle(tab)
328
+ val tint = Color(if (selected) selectedColor else unselectedColor)
329
+ Box(
330
+ Modifier
331
+ .padding(start = RAIL_INSET, bottom = 4.dp)
332
+ .height(ITEM_HEIGHT)
333
+ .width(lerp(ITEM_HEIGHT, EXPANDED_RAIL_WIDTH - RAIL_INSET * 2, fraction))
334
+ .clip(CircleShape)
335
+ .background(if (selected) Color(indicatorColor) else Color.Transparent)
336
+ .selectable(selected = selected, role = Role.Tab, onClick = onClick)
337
+ .semantics { contentDescription = title },
338
+ ) {
339
+ Row(
340
+ Modifier.fillMaxHeight().padding(start = (ITEM_HEIGHT - ICON_SIZE) / 2).clipToBounds(),
341
+ verticalAlignment = Alignment.CenterVertically,
342
+ ) {
343
+ Icon(tabIconPainter(tab), contentDescription = null, tint = tint)
344
+ Text(
345
+ title,
346
+ Modifier.padding(start = 12.dp).alpha(labelAlpha(fraction)).clearAndSetSemantics {},
347
+ color = tint,
348
+ style = MaterialTheme.typography.labelLarge,
349
+ fontSize = (14 * textScale).sp,
350
+ maxLines = 1,
351
+ softWrap = false,
352
+ )
353
+ }
354
+ }
355
+ }
356
+
357
+ private fun tabTitle(tab: String) = when (tab) {
358
+ "threads" -> "Chats"
359
+ "pullRequests" -> "PRs"
360
+ else -> "Settings"
361
+ }
362
+
363
+ private fun expandedTabTitle(tab: String) =
364
+ if (tab == "pullRequests") "Pull Requests" else tabTitle(tab)
365
+
366
+ @Composable
367
+ private fun tabIconPainter(tab: String) = painterResource(
368
+ when (tab) {
369
+ "threads" -> R.drawable.t3_chats
370
+ "pullRequests" -> R.drawable.t3_pull_requests
371
+ else -> R.drawable.t3_settings
372
+ }
373
+ )
374
+
375
+ private companion object {
376
+ // Material's 80dp compact rail, minus 8dp: still a 48dp touch target with 12dp margins.
377
+ val RAIL_WIDTH = 72.dp
378
+ val EXPANDED_RAIL_WIDTH = 240.dp
379
+ val RAIL_INSET = 12.dp
380
+ val ITEM_HEIGHT = 48.dp
381
+ val FAB_SIZE = 48.dp
382
+ val ICON_SIZE = 24.dp
383
+ val RAIL_SHADOW = 6.dp
384
+ val RAIL_EXPANDED_SHAPE = RoundedCornerShape(topEnd = 16.dp, bottomEnd = 16.dp)
385
+ const val DISABLED_ALPHA = 0.4f
386
+
387
+ // Labels fade in over the second half of the widening, once there is room for them, and
388
+ // fade out over the first half of the narrowing, before the surface clips them.
389
+ fun labelAlpha(fraction: Float) = ((fraction - 0.5f) / 0.5f).coerceIn(0f, 1f)
390
}
391
}
apps/mobile/modules/t3-native-controls/android/src/main/res/drawable/t3_menu.xml
new
+3
@@ -0,0 +1,3 @@
1
+<vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="24dp" android:height="24dp" android:viewportWidth="24" android:viewportHeight="24">
2
+ <path android:fillColor="#000000" android:pathData="M3,6H21V8H3ZM3,11H21V13H3ZM3,16H21V18H3Z" />
3
+</vector>
apps/mobile/modules/t3-native-controls/android/src/main/res/drawable/t3_new_thread.xml
new
+4
@@ -0,0 +1,4 @@
1
+<!-- Tabler Icons edit (MIT), the same glyph as the phone's New thread button (assets/icons/compose.xml). -->
2
+<vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="24dp" android:height="24dp" android:viewportWidth="24" android:viewportHeight="24">
3
+ <path android:fillColor="#000000" android:pathData="M7,6 L6,6 C4.3431,6 3,7.3431 3,9 L3,18 C3,19.6569 4.3431,21 6,21 L15,21 C16.6569,21 18,19.6569 18,18 L18,17 C18,16.4477 17.5523,16 17,16 C16.4477,16 16,16.4477 16,17 L16,18 C16,18.5523 15.5523,19 15,19 L6,19 C5.4477,19 5,18.5523 5,18 L5,9 C5,8.4477 5.4477,8 6,8 L7,8 C7.5523,8 8,7.5523 8,7 C8,6.4477 7.5523,6 7,6 Z M21.0921,5.8779 L21.092,5.8778 L20.3849,6.5849 L21.092,7.292 C22.3027,6.0814 22.3027,4.1186 21.092,2.908 C19.8814,1.6973 17.9186,1.6973 16.708,2.908 L8.2942,11.2916 C8.1059,11.4793 8,11.7342 8,12 L8,15 C8,15.5523 8.4477,16 9,16 L12,16 C12.2658,16 12.5207,15.8942 12.7084,15.7058 L21.0934,7.2908 C21.4832,6.8996 21.4821,6.2665 21.0908,5.8766 C20.6996,5.4868 20.0665,5.4879 19.6766,5.8792 L11.2916,14.2942 L12,14 L9,14 L10,15 L10,12 L9.7058,12.7084 L18.1209,4.3235 C18.5518,3.8926 19.2482,3.8926 19.6778,4.3222 C20.1074,4.7518 20.1074,5.4482 19.6778,5.8778 C19.2873,6.2683 19.2873,6.9015 19.6778,7.292 L19.6779,7.2921 C20.0684,7.6826 20.7016,7.6826 21.0921,7.2921 C21.4826,6.9016 21.4826,6.2684 21.0921,5.8779 Z M15.2929,5.7071 L18.2929,8.7071 C18.6834,9.0976 19.3166,9.0976 19.7071,8.7071 C20.0976,8.3166 20.0976,7.6834 19.7071,7.2929 L16.7071,4.2929 C16.3166,3.9024 15.6834,3.9024 15.2929,4.2929 C14.9024,4.6834 14.9024,5.3166 15.2929,5.7071 Z" />
4
+</vector>
apps/mobile/modules/t3-native-controls/android/src/main/res/drawable/t3_settings.xml
new
+3
@@ -0,0 +1,3 @@
1
+<vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="24dp" android:height="24dp" android:viewportWidth="24" android:viewportHeight="24">
2
+ <path android:fillColor="#000000" android:pathData="M19.43,12.98C19.47,12.66 19.5,12.34 19.5,12C19.5,11.66 19.47,11.34 19.43,11.02L21.54,9.37C21.73,9.22 21.78,8.95 21.66,8.73L19.66,5.27C19.54,5.05 19.27,4.97 19.05,5.05L16.56,6.05C16.04,5.65 15.48,5.32 14.87,5.07L14.49,2.42C14.46,2.18 14.25,2 14,2H10C9.75,2 9.54,2.18 9.51,2.42L9.13,5.07C8.52,5.32 7.96,5.66 7.44,6.05L4.95,5.05C4.72,4.96 4.46,5.05 4.34,5.27L2.34,8.73C2.21,8.95 2.27,9.22 2.46,9.37L4.57,11.02C4.53,11.34 4.5,11.67 4.5,12C4.5,12.33 4.53,12.66 4.57,12.98L2.46,14.63C2.27,14.78 2.22,15.05 2.34,15.27L4.34,18.73C4.46,18.95 4.73,19.03 4.95,18.95L7.44,17.95C7.96,18.35 8.52,18.68 9.13,18.93L9.51,21.58C9.54,21.82 9.75,22 10,22H14C14.25,22 14.46,21.82 14.49,21.58L14.87,18.93C15.48,18.68 16.04,18.34 16.56,17.95L19.05,18.95C19.28,19.04 19.54,18.95 19.66,18.73L21.66,15.27C21.79,15.05 21.73,14.78 21.54,14.63L19.43,12.98ZM12,15.5C10.07,15.5 8.5,13.93 8.5,12C8.5,10.07 10.07,8.5 12,8.5C13.93,8.5 15.5,10.07 15.5,12C15.5,13.93 13.93,15.5 12,15.5Z" />
3
+</vector>
apps/mobile/package.json
+1
-1
@@ -133,7 +133,7 @@
133
"react-native-pdf-jsi": "5.0.0",
134
"react-native-reanimated": "4.7.1",
135
"react-native-safe-area-context": "~5.10.1",
136
- "react-native-screens": "file:deps/react-native-screens-5.0.0-t3.27.tgz",
136
+ "react-native-screens": "file:deps/react-native-screens-5.0.0-t3.29.tgz",
137
"react-native-shiki-engine": "^0.3.12",
138
"react-native-svg": "15.16.0",
139
"react-native-webview": "14.0.1",
apps/mobile/src/Stack.tsx
+26
-11
@@ -32,7 +32,9 @@ import { useResolveClassNames } from "uniwind";
32
import { AppText as Text } from "./components/ui/AppText";
33
import { androidWorkspaceDestinationAnimation } from "./lib/android-workspace-navigation";
34
import { getCompactBrandHeaderOptions } from "./components/CompactBrandTitle";
35
+import { WorkspaceConnectionStatusProvider } from "./features/home/WorkspaceConnectionTitle";
36
import { WorkspaceRootScreen } from "./features/workspace/WorkspaceRootScreen";
37
+import { AndroidWorkspaceSettings } from "./features/workspace/AndroidWorkspaceSettings";
38
import { AndroidWorkspaceTabsProvider } from "./features/workspace/AndroidWorkspaceTabsProvider";
39
import {
40
PullRequestRouteScreen,
@@ -219,6 +221,9 @@ const SettingsContentStack = createV5SheetStackNavigator({
221
linking: "",
222
options: {
223
title: "Settings",
224
+ // Android draws its own app bar here. Hidden only from inside the screen, the native one
225
+ // showed for the first frame of the Settings tab and pushed the page down.
226
+ headerShown: Platform.OS !== "android",
227
},
228
}),
229
SettingsEnvironments: createNativeStackScreen({
@@ -562,7 +567,12 @@ const WORKSPACE_OVERLAY_ROUTES = new Set([
567
]);
568
569
function workspaceLocationFromState(state: NavigationState) {
565
- const routes = state.routes.filter((route) => !WORKSPACE_OVERLAY_ROUTES.has(route.name));
570
+ // Android opens Settings as a workspace page rather than an overlay, so the layout sees it.
571
+ const routes = state.routes.filter(
572
+ (route) =>
573
+ !WORKSPACE_OVERLAY_ROUTES.has(route.name) ||
574
+ (Platform.OS === "android" && route.name === "SettingsSheet"),
575
+ );
576
const effectiveState =
577
routes.length > 0 && routes.length !== state.routes.length
578
? ({ ...state, routes, index: routes.length - 1 } as NavigationState)
@@ -618,16 +628,18 @@ function RootStackLayout(props: {
628
<ThreadOutboxDrainWorker />
629
<ShowcaseCaptureCoordinator pathname={pathname} />
630
<ExistingThreadSettingsRouteProvider>
621
- <AndroidWorkspaceTabsProvider>
622
- <AdaptiveWorkspaceLayout
623
- pathname={workspaceLocation.pathname}
624
- workspaceRouteKey={workspaceLocation.routeKey}
625
- selectedPullRequestKey={selectedPullRequestKey(props.state)}
626
- >
627
- {props.children}
628
- <HardwareKeyboardCommandOverlay />
629
- </AdaptiveWorkspaceLayout>
630
- </AndroidWorkspaceTabsProvider>
631
+ <WorkspaceConnectionStatusProvider>
632
+ <AndroidWorkspaceTabsProvider state={props.state}>
633
+ <AdaptiveWorkspaceLayout
634
+ pathname={workspaceLocation.pathname}
635
+ workspaceRouteKey={workspaceLocation.routeKey}
636
+ selectedPullRequestKey={selectedPullRequestKey(props.state)}
637
+ >
638
+ {props.children}
639
+ <HardwareKeyboardCommandOverlay />
640
+ </AdaptiveWorkspaceLayout>
641
+ </AndroidWorkspaceTabsProvider>
642
+ </WorkspaceConnectionStatusProvider>
643
</ExistingThreadSettingsRouteProvider>
644
</HardwareKeyboardCommandProvider>
645
);
@@ -913,11 +925,14 @@ const RootStackConfig = createWorkspaceStackNavigator({
925
}),
926
SettingsSheet: createNativeStackScreen({
927
screen: SettingsSheetStack,
928
+ layout: ({ children }) => <AndroidWorkspaceSettings>{children}</AndroidWorkspaceSettings>,
929
linking: "settings",
930
options: {
931
...NESTED_NAVIGATOR_OPTIONS,
932
gestureEnabled: true,
933
headerShown: false,
934
+ // Android opens Settings as a top-level tab, so it swaps like the other tabs.
935
+ ...(Platform.OS === "android" ? { animation: "none" as const } : null),
936
},
937
}),
938
SettingsLegal: createNativeStackScreen({
apps/mobile/src/components/ui/NativeAppBar.android.tsx
+5
-2
@@ -14,10 +14,13 @@ export function NativeAppBar(props: {
14
const { colors } = useControlTheme();
15
const layout = useToolbarLayout();
16
return (
17
- <NativeThemeHost matchContents={{ vertical: true }} style={{ width: "100%" }}>
17
+ // The bar's height is fixed, so React Native lays out the screen below it from the first frame
18
+ // instead of at zero height until Compose has measured and reported the bar.
19
+ <NativeThemeHost style={{ width: "100%", height: layout.height }}>
20
<TopAppBar
21
applyWindowInsets={false}
20
- modifiers={[fillMaxWidth(), height(Math.max(64, layout.height))]}
22
+ // Every header shares the list toolbar's height, so titles line up across panes.
23
+ modifiers={[fillMaxWidth(), height(layout.height)]}
24
colors={{
25
containerColor: colors["--color-header"],
26
titleContentColor: colors["--color-header-foreground"],
apps/mobile/src/features/home/AndroidHomeFab.android.tsx
+3
-1
@@ -36,10 +36,12 @@ export function AndroidHomeFabLayout(props: ComponentProps<typeof SharedAndroidH
36
}, []);
37
38
// Remount only the FAB when its font or pane changes to clear the cached expanded width.
39
+ // The split-view sidebar has no FAB: the navigation rail carries New thread. On phones it
40
+ // keeps Material's 16dp corner margin; the bottom bar already consumes the gesture inset.
41
return (
42
<View className="flex-1" onLayout={(event) => setLayoutWidth(event.nativeEvent.layout.width)}>
43
<FabScrollContext value={onScroll}>{props.children}</FabScrollContext>
42
- {!props.disabled && state.hasConnections && layoutWidth !== null ? (
44
+ {!props.disabled && !props.sidebar && state.hasConnections && layoutWidth !== null ? (
45
<NewThreadButton
46
key={`${appearance.baseFontSize}:${fontScale}:${layoutWidth}`}
47
extended
apps/mobile/src/features/home/HomeHeader.android.tsx
-1
@@ -98,7 +98,6 @@ export function HomeHeader(props: HomeHeaderProps) {
98
filterActions={menuActions}
99
filterCustomized={hasCustomListOptions}
100
onFilterAction={handleMenuAction}
101
- onOpenSettings={props.onOpenSettings}
101
onOpenEnvironments={props.onOpenEnvironments}
102
/>
103
</>
apps/mobile/src/features/home/ThreadListToolbar.tsx
+31
-77
@@ -1,7 +1,6 @@
1
import { useCallback, useEffect, useRef, useState, type ComponentProps } from "react";
2
import { useNavigation, useNavigationState } from "@react-navigation/native";
3
import { useWorkspaceTabs } from "../workspace/WorkspaceTabsContext";
4
-import { useWorkspaceListNavigation } from "../workspace/useAndroidWorkspaceNavigation";
4
import {
5
BackHandler,
6
Keyboard,
@@ -9,22 +8,16 @@ import {
8
View,
9
type LayoutChangeEvent,
10
} from "react-native";
12
-import { useSafeAreaInsets } from "react-native-safe-area-context";
11
import type { MenuAction } from "@react-native-menu/menu";
12
13
import { AndroidHeaderIconButton } from "../../components/ui/AndroidScreenHeader";
16
-import { CompactBrandTitle } from "../../components/CompactBrandTitle";
17
-import { FloatingActionButton } from "../../components/ui/FloatingActionButton";
14
import { AndroidAnchoredMenu } from "../../components/ui/AndroidAnchoredMenu";
15
import { Menu } from "../../components/ui/Menu";
16
import { SearchField } from "../../components/ui/SearchField";
17
import { useHardwareKeyboardCommand } from "../keyboard/hardwareKeyboardCommands";
22
-import { WorkspaceConnectionTitle } from "./WorkspaceConnectionTitle";
23
-import { useWorkspaceState } from "../../state/workspace";
24
-import { useAndroidControlSizing } from "../../components/ui/useAndroidControlSizing";
18
+import { WorkspaceListToolbarRow } from "../workspace/WorkspaceListToolbarRow";
19
+import { useWorkspaceConnectionState } from "../../state/workspace";
20
import { useToolbarLayout } from "../../components/ui/useToolbarLayout";
26
-import { PullRequestGlyph } from "../pull-requests/pullRequestGlyphs";
27
-import { androidHomeFabPosition } from "./AndroidHomeFab.shared";
21
22
/** One toolbar height for the compact list and expanded sidebar, including search. */
23
export function ThreadListToolbar(props: {
@@ -33,25 +26,20 @@ export function ThreadListToolbar(props: {
26
readonly filterActions: MenuAction[];
27
readonly filterCustomized: boolean;
28
readonly onFilterAction: NonNullable<ComponentProps<typeof Menu>["onPressAction"]>;
36
- readonly onOpenSettings: () => void;
29
readonly onOpenEnvironments: () => void;
30
readonly sidebar?: boolean;
31
readonly onLayout?: (event: LayoutChangeEvent) => void;
32
readonly onRequestVisibility?: () => void;
33
}) {
42
- const insets = useSafeAreaInsets();
34
const navigation = useNavigation();
35
const workspace = useWorkspaceTabs();
36
const isTabActive = workspace?.isTabActive;
37
const homeFocused = useNavigationState((state) => state.routes[state.index]?.name === "Home");
38
const listFocused =
39
homeFocused && (workspace === null || workspace.state.selectedTab === "threads");
49
- const { fabSize } = useAndroidControlSizing();
50
- const fab = androidHomeFabPosition(insets.bottom, props.sidebar);
51
- const { height: toolbarHeight, ...headerPadding } = useToolbarLayout();
52
- const { state } = useWorkspaceState();
40
+ const { paddingTop, paddingBottom } = useToolbarLayout();
41
+ const connectionState = useWorkspaceConnectionState();
42
const { onRequestVisibility, onSearchQueryChange } = props;
54
- const showPullRequests = useWorkspaceListNavigation("pullRequests");
43
const searchRef = useRef<TextInputInstance>(null);
44
const [searchOpen, setSearchOpen] = useState(false);
45
const searching = searchOpen || props.searchQuery.length > 0;
@@ -100,68 +88,34 @@ export function ThreadListToolbar(props: {
88
onChangeText={onSearchQueryChange}
89
/>
90
);
91
+ const filterButton = connectionState.hasConnections ? (
92
+ <AndroidAnchoredMenu actions={props.filterActions} onPressAction={props.onFilterAction}>
93
+ {(open) => (
94
+ <AndroidHeaderIconButton
95
+ accessibilityLabel="Filter threads"
96
+ icon={filterIcon}
97
+ onPress={open}
98
+ />
99
+ )}
100
+ </AndroidAnchoredMenu>
101
+ ) : null;
102
103
return (
105
- <>
106
- <View
107
- onLayout={props.onLayout}
108
- className={
109
- props.sidebar ? "absolute inset-x-0 top-0 z-[4] bg-header px-2" : "bg-header px-2"
110
- }
111
- style={headerPadding}
112
- >
113
- <View className="flex-row items-center gap-1" style={{ minHeight: toolbarHeight }}>
114
- {searching ? (
115
- <>
116
- <AndroidHeaderIconButton
117
- accessibilityLabel="Close search"
118
- icon="arrow.left"
119
- onPress={closeSearch}
120
- />
121
- {searchField}
122
- </>
123
- ) : (
124
- <>
125
- <View className="min-w-0 flex-1 pl-4">
126
- <WorkspaceConnectionTitle
127
- grow
128
- onPress={props.onOpenEnvironments}
129
- brand={<CompactBrandTitle allowFontScaling={false} fit />}
130
- />
131
- </View>
132
- {props.sidebar && workspace ? (
133
- <AndroidHeaderIconButton
134
- accessibilityLabel="Show pull requests"
135
- icon={PullRequestGlyph.pullRequest}
136
- onPress={showPullRequests}
137
- />
138
- ) : null}
139
- <AndroidHeaderIconButton
140
- accessibilityLabel="Search threads"
141
- icon="magnifyingglass"
142
- onPress={openSearch}
143
- />
144
- <AndroidHeaderIconButton
145
- accessibilityLabel="Open settings"
146
- icon="gearshape"
147
- onPress={props.onOpenSettings}
148
- />
149
- </>
150
- )}
151
- </View>
152
- </View>
153
- {state.hasConnections ? (
154
- <View
155
- className="absolute z-[5]"
156
- style={{ right: fab.right, bottom: fab.bottom + fabSize + 8 }}
157
- >
158
- <AndroidAnchoredMenu actions={props.filterActions} onPressAction={props.onFilterAction}>
159
- {(open) => (
160
- <FloatingActionButton label="Filter threads" icon={filterIcon} onPress={open} />
161
- )}
162
- </AndroidAnchoredMenu>
163
- </View>
164
- ) : null}
165
- </>
104
+ <View
105
+ onLayout={props.onLayout}
106
+ className={props.sidebar ? "absolute inset-x-0 top-0 z-[4] bg-header px-2" : "bg-header px-2"}
107
+ style={{ paddingTop, paddingBottom }}
108
+ >
109
+ <WorkspaceListToolbarRow
110
+ searching={searching}
111
+ searchField={searchField}
112
+ onCloseSearch={closeSearch}
113
+ onOpenSearch={openSearch}
114
+ searchAccessibilityLabel="Search threads"
115
+ titleAccessibilityLabel="T3 Code, Threads"
116
+ onOpenEnvironments={props.onOpenEnvironments}
117
+ filter={filterButton}
118
+ />
119
+ </View>
120
);
121
}
apps/mobile/src/features/home/WorkspaceConnectionTitle.tsx
+48
-14
@@ -1,5 +1,5 @@
1
import type { NativeStackNavigationOptions } from "@react-navigation/native-stack";
2
-import { useEffect, useState, type ReactNode } from "react";
2
+import { createContext, use, useEffect, useMemo, useState, type ReactNode } from "react";
3
import { Animated, Platform, Pressable, View } from "react-native";
4
5
import { AppActivityIndicator } from "../../components/ui/AppActivityIndicator";
@@ -20,22 +20,47 @@ import {
20
const STATUS_SHOW_DELAY_MS = 800;
21
const FADE_IN_MS = 250;
22
23
-function useDelayedConnectionStatus(): WorkspaceConnectionStatusPresentation | null {
23
+type ConnectionStatus = WorkspaceConnectionStatusPresentation & {
24
+ /** Only while the status first appears. A header that shows it later shows it at once. */
25
+ readonly fadeIn: boolean;
26
+};
27
+
28
+const ConnectionStatusContext = createContext<ConnectionStatus | null>(null);
29
+
30
+/**
31
+ * The delay hides brief reconnects, so it is the workspace's, not each header's: every header
32
+ * shows the status from the same moment. Headers read it from context instead of subscribing
33
+ * themselves, because a hidden Android tab drops its subscriptions and showed a stale status for
34
+ * a moment when it came back, while context still reaches it.
35
+ */
36
+export function WorkspaceConnectionStatusProvider(props: { readonly children: ReactNode }) {
37
const { state } = useWorkspaceState();
38
const presentation = workspaceConnectionStatusPresentation(state);
39
const hasStatus = presentation !== null;
27
- const [visible, setVisible] = useState(false);
40
+ const [phase, setPhase] = useState<"waiting" | "fading" | "shown">("waiting");
41
42
useEffect(() => {
30
- if (!hasStatus) {
31
- setVisible(false);
32
- return;
33
- }
34
- const timer = setTimeout(() => setVisible(true), STATUS_SHOW_DELAY_MS);
35
- return () => clearTimeout(timer);
43
+ if (!hasStatus) return;
44
+ const timers = [
45
+ setTimeout(() => setPhase("fading"), STATUS_SHOW_DELAY_MS),
46
+ setTimeout(() => setPhase("shown"), STATUS_SHOW_DELAY_MS + FADE_IN_MS),
47
+ ];
48
+ return () => {
49
+ for (const timer of timers) clearTimeout(timer);
50
+ setPhase("waiting");
51
+ };
52
}, [hasStatus]);
53
38
- return visible ? presentation : null;
54
+ const label = presentation?.label;
55
+ const showsProgress = presentation?.showsProgress ?? false;
56
+ const status = useMemo(
57
+ () =>
58
+ label === undefined || phase === "waiting"
59
+ ? null
60
+ : { label, showsProgress, fadeIn: phase === "fading" },
61
+ [label, showsProgress, phase],
62
+ );
63
+ return <ConnectionStatusContext value={status}>{props.children}</ConnectionStatusContext>;
64
}
65
66
/**
@@ -46,12 +71,15 @@ function useDelayedConnectionStatus(): WorkspaceConnectionStatusPresentation | n
71
*/
72
function StatusFadeIn(props: {
73
readonly children: ReactNode;
74
+ readonly animate: boolean;
75
readonly grow?: boolean;
76
readonly maxWidth?: number;
77
}) {
78
+ const { animate } = props;
79
const [opacity] = useState(() => new Animated.Value(0));
80
81
useEffect(() => {
82
+ if (!animate) return;
83
const animation = Animated.timing(opacity, {
84
duration: FADE_IN_MS,
85
toValue: 1,
@@ -59,12 +87,18 @@ function StatusFadeIn(props: {
87
});
88
animation.start();
89
return () => animation.stop();
62
- }, [opacity]);
90
+ }, [animate, opacity]);
91
92
return (
93
<Animated.View
94
style={[
67
- { alignItems: "center", flexDirection: "row", maxWidth: props.maxWidth, opacity },
95
+ {
96
+ alignItems: "center",
97
+ flexDirection: "row",
98
+ maxWidth: props.maxWidth,
99
+ // A hidden tab never runs the fade, so its value would still be 0 when the tab returns.
100
+ opacity: animate ? opacity : 1,
101
+ },
102
props.grow ? { flex: 1, minWidth: 0 } : null,
103
]}
104
>
@@ -81,7 +115,7 @@ export function WorkspaceConnectionTitle(props: {
115
readonly statusOffset?: number;
116
readonly maxWidth?: number;
117
}) {
84
- const status = useDelayedConnectionStatus();
118
+ const status = use(ConnectionStatusContext);
119
const size = props.size ?? "navbar";
120
const { scale } = useAndroidControlSizing();
121
@@ -96,7 +130,7 @@ export function WorkspaceConnectionTitle(props: {
130
}
131
132
return (
99
- <StatusFadeIn grow={props.grow} maxWidth={props.maxWidth}>
133
+ <StatusFadeIn animate={status.fadeIn} grow={props.grow} maxWidth={props.maxWidth}>
134
<Pressable
135
accessibilityHint="Opens environment settings"
136
accessibilityLabel={status.label}
apps/mobile/src/features/layout/AdaptiveWorkspaceLayout.tsx
+91
-21
@@ -60,6 +60,10 @@ import {
60
useHardwareKeyboardCommand,
61
} from "../keyboard/hardwareKeyboardCommands";
62
import { AndroidHomeFabLayout } from "../home/AndroidHomeFab";
63
+import {
64
+ AndroidWorkspaceNavigation,
65
+ ANDROID_WORKSPACE_RAIL_WIDTH,
66
+} from "../workspace/AndroidWorkspaceNavigation";
67
import { AndroidWorkspaceSidebar } from "../workspace/AndroidWorkspaceSidebar";
68
import { useAndroidWorkspaceSelection } from "../workspace/useAndroidWorkspaceSelection";
69
import { HomeListOptionsProvider } from "../home/home-list-options";
@@ -235,6 +239,9 @@ function AdaptiveWorkspaceLayoutContent(
239
const nativeMetrics = useNativeLayoutMetrics();
240
const { width: viewportWidth, height } = nativeMetrics ?? windowDimensions;
241
const pathname = props.pathname;
242
+ // Android's Settings tab is a full workspace page: the rail stays, the sidebar and
243
+ // auxiliary panes hide.
244
+ const workspacePage = Platform.OS === "android" && pathname.startsWith("/settings");
245
const navigation = useNavigation();
246
const activeRoleOwner = useRef<symbol | null>(null);
247
const [primarySidebarPreferredVisible, setPrimarySidebarPreferredVisible] = useState(true);
@@ -247,6 +254,7 @@ function AdaptiveWorkspaceLayoutContent(
254
null,
255
);
256
const [primarySidebarSearchQuery, setPrimarySidebarSearchQuery] = useState("");
257
+ const [railOverlay, setRailOverlay] = useState(false);
258
const [focusedAuxiliaryPaneRole, setFocusedAuxiliaryPaneRole] =
259
useState<WorkspaceAuxiliaryPaneRole | null>(null);
260
// The compiler can't memoize these derivations: they stay live across later hook calls. Fresh
@@ -262,7 +270,13 @@ function AdaptiveWorkspaceLayoutContent(
270
nativeWorkspace,
271
usesSplitView: baseLayout.usesSplitView,
272
});
265
- const showPrimarySidebar = primarySidebarPinned || primarySidebarPreferredVisible;
273
+ const showPrimarySidebar =
274
+ !workspacePage && (primarySidebarPinned || primarySidebarPreferredVisible);
275
+ const shouldRenderNavigationRail = Platform.OS === "android" && baseLayout.usesSplitView;
276
+ const navigationRailWidth =
277
+ shouldRenderNavigationRail && (showPrimarySidebar || workspacePage)
278
+ ? ANDROID_WORKSPACE_RAIL_WIDTH
279
+ : 0;
280
const [hinge, setHinge] = useState<VerticalHinge | null>(null);
281
const [windowHinge, setWindowHinge] = useState<VerticalHinge | null>(null);
282
const handleHingeChange = (next: VerticalHinge | null, nextWindow: VerticalHinge | null) => {
@@ -270,35 +284,38 @@ function AdaptiveWorkspaceLayoutContent(
284
setWindowHinge(nextWindow);
285
};
286
const layout = useMemo(
273
- () => alignListPaneToHinge({ layout: baseLayout, hinge, viewportWidth }),
274
- [baseLayout, hinge, viewportWidth],
287
+ () =>
288
+ alignListPaneToHinge({
289
+ layout: baseLayout,
290
+ hinge,
291
+ viewportWidth,
292
+ leadingWidth: navigationRailWidth,
293
+ }),
294
+ [baseLayout, hinge, navigationRailWidth, viewportWidth],
295
);
296
+ const width = viewportWidth - navigationRailWidth;
297
+ // The sidebar stays mounted under a workspace page, so its list is ready on the way back.
298
const shouldRenderPrimarySidebar = layout.usesSplitView;
299
const fileInspector = useMemo(
300
() =>
301
deriveFileInspectorPaneLayout({
302
layout,
281
- viewportWidth,
303
+ viewportWidth: width,
304
preferredWidth: fileInspectorPreferredWidth ?? undefined,
305
reservedLeadingWidth:
306
shouldRenderPrimarySidebar && showPrimarySidebar
307
? (layout.listPaneWidth ?? 0) + (layout.listPaneGap ?? 0)
308
: 0,
309
}),
288
- [
289
- fileInspectorPreferredWidth,
290
- layout,
291
- showPrimarySidebar,
292
- shouldRenderPrimarySidebar,
293
- viewportWidth,
294
- ],
310
+ [fileInspectorPreferredWidth, layout, showPrimarySidebar, shouldRenderPrimarySidebar, width],
311
);
312
const auxiliaryPaneRole: WorkspaceAuxiliaryPaneRole =
313
focusedAuxiliaryPaneRole ?? (/\/files(?:\/|$)/.test(pathname) ? "inspector" : "supplementary");
314
const auxiliaryPanePreferredVisible =
299
- auxiliaryPaneRole === "inspector"
315
+ !workspacePage &&
316
+ (auxiliaryPaneRole === "inspector"
317
? fileInspectorPreferredVisible
301
- : supplementaryPanePreferredVisible;
318
+ : supplementaryPanePreferredVisible);
319
const auxiliaryPanePreferredWidth =
320
auxiliaryPaneRole === "inspector"
321
? fileInspectorPreferredWidth
@@ -307,7 +324,7 @@ function AdaptiveWorkspaceLayoutContent(
324
() =>
325
deriveWorkspacePaneLayout({
326
layout,
310
- viewportWidth,
327
+ viewportWidth: width,
328
primarySidebarPreferredVisible: showPrimarySidebar,
329
auxiliaryPanePreferredVisible,
330
auxiliaryPaneRole,
@@ -319,7 +336,7 @@ function AdaptiveWorkspaceLayoutContent(
336
auxiliaryPanePreferredWidth,
337
layout,
338
showPrimarySidebar,
322
- viewportWidth,
339
+ width,
340
],
341
);
342
const activeThread = parseActiveThreadPath(pathname);
@@ -484,6 +501,7 @@ function AdaptiveWorkspaceLayoutContent(
501
: null;
502
const [contentSizing, setContentSizing] = useState({
503
viewportWidth,
504
+ workspacePage,
505
target: contentTargetWidth,
506
sidebarVisible: panes.primarySidebarVisible,
507
width: contentTargetWidth,
@@ -495,11 +513,15 @@ function AdaptiveWorkspaceLayoutContent(
513
if (
514
Platform.OS === "android" &&
515
(contentSizing.viewportWidth !== viewportWidth ||
516
+ contentSizing.workspacePage !== workspacePage ||
517
contentSizing.target !== contentTargetWidth ||
518
contentSizing.sidebarVisible !== panes.primarySidebarVisible ||
519
contentSizing.listPaneTarget !== layout.listPaneWidth)
520
) {
502
- const sameViewport = contentSizing.viewportWidth === viewportWidth;
521
+ // A workspace page swaps the sidebar in the same frame, so nothing animates to wait for.
522
+ const sameViewport =
523
+ contentSizing.viewportWidth === viewportWidth &&
524
+ contentSizing.workspacePage === workspacePage;
525
const openingSidebar =
526
sameViewport && !contentSizing.sidebarVisible && panes.primarySidebarVisible;
527
// A book-posture hinge resizes the visible list pane instead of revealing it.
@@ -514,6 +536,7 @@ function AdaptiveWorkspaceLayoutContent(
536
contentTargetWidth !== null;
537
setContentSizing({
538
viewportWidth,
539
+ workspacePage,
540
target: contentTargetWidth,
541
sidebarVisible: panes.primarySidebarVisible,
542
// Clip the wide navigator while the sidebar opens or widens, then reflow once at the
@@ -556,23 +579,41 @@ function AdaptiveWorkspaceLayoutContent(
579
const renderedSidebarWidth = useSharedValue(
580
panes.primarySidebarVisible ? (layout.listPaneWidth ?? 0) + (layout.listPaneGap ?? 0) : 0,
581
);
582
+ const renderedRailWidth = useSharedValue(navigationRailWidth);
583
+ const leavingWorkspacePage = useRef(false);
584
useEffect(() => {
585
if (nativeWorkspace) return;
586
+ renderedRailWidth.set(withTiming(navigationRailWidth, WORKSPACE_PANE_TIMING));
587
+ // A workspace page hides the sidebar through React instead, in the same commit that mounts
588
+ // the page. Animating it here would hide it a few frames before the page appears.
589
+ if (workspacePage) {
590
+ leavingWorkspacePage.current = true;
591
+ return;
592
+ }
593
+ const snap = leavingWorkspacePage.current;
594
+ leavingWorkspacePage.current = false;
595
const targetWidth = panes.primarySidebarVisible
596
? (layout.listPaneWidth ?? 0) + (layout.listPaneGap ?? 0)
597
: 0;
564
- renderedSidebarWidth.value = withTiming(targetWidth, WORKSPACE_PANE_TIMING, (finished) => {
565
- if (finished && Platform.OS === "android") runOnJS(settleContentWidth)(contentRevision);
566
- });
598
+ // The content beside it already took its final width when the page closed.
599
+ renderedSidebarWidth.set(
600
+ withTiming(targetWidth, snap ? { duration: 0 } : WORKSPACE_PANE_TIMING, (finished) => {
601
+ if (finished && Platform.OS === "android") runOnJS(settleContentWidth)(contentRevision);
602
+ }),
603
+ );
604
}, [
605
nativeWorkspace,
606
+ navigationRailWidth,
607
layout.listPaneWidth,
608
layout.listPaneGap,
609
panes.primarySidebarVisible,
610
renderedSidebarWidth,
611
+ renderedRailWidth,
612
settleContentWidth,
613
contentRevision,
614
+ workspacePage,
615
]);
616
+ const railAnimatedStyle = useAnimatedStyle(() => ({ width: renderedRailWidth.value }));
617
// Showing or hiding the sidebar clips a fixed-width list. A hinge resize instead tracks the
618
// animated edge, so the header actions slide with it rather than jumping or being covered.
619
const listPaneGap = layout.listPaneGap ?? 0;
@@ -593,7 +634,13 @@ function AdaptiveWorkspaceLayoutContent(
634
// merely clip/reveal it over a matching background.
635
const renderedInspectorWidth = useSharedValue(inspectorColumnTargetWidth);
636
const renderedContentWidth = useDerivedValue(() =>
596
- Math.max(0, viewportWidth - renderedSidebarWidth.value - renderedInspectorWidth.value),
637
+ Math.max(
638
+ 0,
639
+ viewportWidth -
640
+ renderedRailWidth.value -
641
+ renderedSidebarWidth.value -
642
+ renderedInspectorWidth.value,
643
+ ),
644
);
645
646
const selectAndroidWorkspace = useAndroidWorkspaceSelection();
@@ -682,6 +729,9 @@ function AdaptiveWorkspaceLayoutContent(
729
className={Platform.OS === "android" ? "flex-1 flex-row bg-header" : "flex-1 flex-row"}
730
>
731
<AndroidHingeObserver onChange={handleHingeChange} />
732
+ {shouldRenderNavigationRail ? (
733
+ <Animated.View className="self-stretch" style={railAnimatedStyle} />
734
+ ) : null}
735
{shouldRenderPrimarySidebar && layout.listPaneWidth !== null ? (
736
<Animated.View
737
className="self-stretch overflow-hidden"
@@ -691,7 +741,13 @@ function AdaptiveWorkspaceLayoutContent(
741
panes.primarySidebarVisible ? "auto" : "no-hide-descendants"
742
}
743
pointerEvents={panes.primarySidebarVisible ? "auto" : "none"}
694
- style={sidebarAnimatedStyle}
744
+ // Under a workspace page the sidebar leaves the row but keeps its size, so its
745
+ // lists never lay out at zero size and are ready, unchanged, on the way back. The
746
+ // content pane, laid out after it, covers it, in the same mount as the page.
747
+ style={[
748
+ workspacePage ? { position: "absolute", top: 0, bottom: 0, left: 0 } : null,
749
+ sidebarAnimatedStyle,
750
+ ]}
751
>
752
<Animated.View className="flex-1" style={listPaneAnimatedStyle}>
753
<RenderErrorBoundary
@@ -764,6 +820,20 @@ function AdaptiveWorkspaceLayoutContent(
820
setAuxiliaryPaneWidth={setAuxiliaryPaneWidth}
821
onClosed={handleWorkspaceInspectorClosed}
822
/>
823
+ {shouldRenderNavigationRail && navigationRailWidth > 0 ? (
824
+ // The rail reserves its slot above and draws over the panes, so it can widen over
825
+ // the list in place. It takes the whole workspace only while it is open.
826
+ <View
827
+ className="absolute inset-y-0 left-0"
828
+ style={railOverlay ? { right: 0 } : { width: navigationRailWidth }}
829
+ >
830
+ <AndroidWorkspaceNavigation
831
+ rail
832
+ onSelect={revealPrimarySidebar}
833
+ onOverlayChange={setRailOverlay}
834
+ />
835
+ </View>
836
+ ) : null}
837
</View>
838
</WindowHingeContext>
839
</AdaptiveWorkspaceContext.Provider>
apps/mobile/src/features/pull-requests/PullRequestFilterMenuContext.tsx
new
+50
@@ -0,0 +1,50 @@
1
+import type { MenuAction } from "@react-native-menu/menu";
2
+import {
3
+ createContext,
4
+ use,
5
+ useLayoutEffect,
6
+ useState,
7
+ type Dispatch,
8
+ type ReactNode,
9
+ type SetStateAction,
10
+} from "react";
11
+
12
+export interface PullRequestFilterMenu {
13
+ readonly actions: readonly MenuAction[];
14
+ readonly onSelect: (id: string) => void;
15
+ /** Whether any filter, the environment, or a non-default sort is active. */
16
+ readonly customized: boolean;
17
+}
18
+
19
+const MenuContext = createContext<PullRequestFilterMenu | null>(null);
20
+const PublishContext = createContext<Dispatch<SetStateAction<PullRequestFilterMenu | null>> | null>(
21
+ null,
22
+);
23
+
24
+/**
25
+ * The Android PR header opens the full filter menu, but the facets (authors, labels) and the
26
+ * controls live in the list below it. The list publishes its menu here; only the header reads
27
+ * it, so the list's own renders don't fan out.
28
+ */
29
+export function PullRequestFilterMenuProvider(props: { readonly children: ReactNode }) {
30
+ const [menu, setMenu] = useState<PullRequestFilterMenu | null>(null);
31
+ return (
32
+ <PublishContext value={setMenu}>
33
+ <MenuContext value={menu}>{props.children}</MenuContext>
34
+ </PublishContext>
35
+ );
36
+}
37
+
38
+export function usePullRequestFilterMenu() {
39
+ return use(MenuContext);
40
+}
41
+
42
+export function usePublishPullRequestFilterMenu(menu: PullRequestFilterMenu | null) {
43
+ const publish = use(PublishContext);
44
+ // A layout effect, so the header's filter button lands in the same frame as the list. There is
45
+ // no cleanup: the list lives exactly as long as this provider, and a hidden tab runs its
46
+ // cleanups, which would drop the button for a few frames every time the tab came back.
47
+ useLayoutEffect(() => {
48
+ if (publish && menu) publish(menu);
49
+ }, [publish, menu]);
50
+}
apps/mobile/src/features/pull-requests/PullRequestListFilters.tsx
+87
-45
@@ -3,6 +3,7 @@ import { useMemo } from "react";
3
import { Platform, ScrollView } from "react-native";
4
import type { MenuProps } from "../../components/ui/Menu.types";
5
import { ListFilterMenu } from "../workspace/ListFilterMenu";
6
+import { usePublishPullRequestFilterMenu } from "./PullRequestFilterMenuContext";
7
import { useProjects, useThreadShells } from "../../state/entities";
8
import { useMobileProjectGroupingSettings } from "../../state/project-grouping";
9
import { buildHomeProjectScopes, sortHomeProjectScopes } from "../home/homeThreadList";
@@ -63,6 +64,8 @@ function useProjectsInSidebarOrder<Project extends { id: string; environmentId:
64
}
65
66
export function PullRequestListFilters(props: {
67
+ /** Android sidebar rows sit further in than full-width rows; the pills follow them. */
68
+ readonly sidebar?: boolean;
69
readonly environments: readonly { id: string; label: string }[];
70
readonly environmentId: string | null;
71
readonly onEnvironmentChange: (id: string | null) => void;
@@ -100,6 +103,8 @@ export function PullRequestListFilters(props: {
103
break;
104
case "reset":
105
props.onChange(DEFAULT_PR_LIST_CONTROLS);
106
+ // The Android header menu also holds the environment, so its reset clears that too.
107
+ if (next === "environment") props.onEnvironmentChange(null);
108
break;
109
case "state":
110
props.onChange({ ...value, state: next as PullRequestListControls["state"] });
@@ -217,26 +222,89 @@ export function PullRequestListFilters(props: {
222
),
223
},
224
{ id: "sort", title: SORTS[value.sort], subactions: choices("sort", SORTS, value.sort) },
220
- {
221
- id: id("reset", ""),
222
- title: "Reset filters",
223
- attributes: { disabled: count === 0 && value.sort === "updated" },
224
- },
225
];
226
+ const reset = (withEnvironment: boolean): MenuProps["actions"][number] => ({
227
+ id: id("reset", withEnvironment ? "environment" : ""),
228
+ title: "Reset filters",
229
+ attributes: {
230
+ disabled:
231
+ count === 0 &&
232
+ value.sort === "updated" &&
233
+ (!withEnvironment || props.environmentId === null),
234
+ },
235
+ });
236
const labels = [...new Set([...selectedLabels, ...props.labels])].slice(0, 60);
237
const authors = [
238
...new Set([...(author && author !== "me" ? [author] : []), ...props.authors]),
239
].slice(0, 60);
240
+ const environmentActions = choices(
241
+ "environment",
242
+ Object.fromEntries([
243
+ ["", "All environments"],
244
+ ...props.environments.map((environment) => [environment.id, environment.label]),
245
+ ]),
246
+ props.environmentId ?? "",
247
+ );
248
+ const stateActions = choices("state", STATES, value.state);
249
+ const involvementActions = choices("involvement", INVOLVEMENT, value.involvement);
250
+ const labelActions: MenuProps["actions"] = [
251
+ { id: id("labels", ""), title: "All labels", state: selectedLabels.length ? "off" : "on" },
252
+ ...labels.map((label) => ({
253
+ id: id("label", label),
254
+ title: label,
255
+ state: selectedLabelSet.has(label) ? ("on" as const) : ("off" as const),
256
+ })),
257
+ ];
258
+ const authorActions = choices(
259
+ "author",
260
+ Object.fromEntries([
261
+ ["", "All authors"],
262
+ ["me", "Me"],
263
+ ...authors.map((login) => [login, login]),
264
+ ]),
265
+ author ?? "",
266
+ );
267
+ const customized = count > 0 || value.sort !== "updated" || props.environmentId !== null;
268
+ // The Android header's filter button opens every filter.
269
+ const headerMenu =
270
+ Platform.OS === "android"
271
+ ? {
272
+ actions: [
273
+ { id: "environment", title: "Environment", subactions: environmentActions },
274
+ { id: "state", title: "State", subactions: stateActions },
275
+ { id: "involvement", title: "Involvement", subactions: involvementActions },
276
+ { id: "labels", title: "Labels", subactions: labelActions },
277
+ { id: "author", title: "Author", subactions: authorActions },
278
+ ...more,
279
+ reset(true),
280
+ ],
281
+ onSelect: select,
282
+ customized,
283
+ }
284
+ : null;
285
+ usePublishPullRequestFilterMenu(headerMenu);
286
return (
231
- <ScrollView horizontal showsHorizontalScrollIndicator={false} contentContainerStyle={ROW_STYLE}>
232
- <ListFilterMenu
233
- label={count ? String(count) : "Filters"}
234
- icon
235
- active={count > 0}
236
- accessibilityLabel={count ? `Filters, ${count} active` : "More filters"}
237
- actions={more}
238
- onSelect={select}
239
- />
287
+ <ScrollView
288
+ horizontal
289
+ showsHorizontalScrollIndicator={false}
290
+ // In the Android sidebar the first pill lines up with the rows' content instead
291
+ // (8dp row margin + 12dp padding).
292
+ contentContainerStyle={
293
+ props.sidebar && Platform.OS === "android"
294
+ ? { ...ROW_STYLE, paddingHorizontal: 20 }
295
+ : ROW_STYLE
296
+ }
297
+ >
298
+ {Platform.OS === "android" ? null : (
299
+ <ListFilterMenu
300
+ label={count ? String(count) : "Filters"}
301
+ icon
302
+ active={count > 0}
303
+ accessibilityLabel={count ? `Filters, ${count} active` : "More filters"}
304
+ actions={[...more, reset(false)]}
305
+ onSelect={select}
306
+ />
307
+ )}
308
{props.environments.length > 1 ? (
309
<ListFilterMenu
310
label={
@@ -244,14 +312,7 @@ export function PullRequestListFilters(props: {
312
?.label ?? "All environments"
313
}
314
accessibilityLabel="Choose pull request environment"
247
- actions={choices(
248
- "environment",
249
- Object.fromEntries([
250
- ["", "All environments"],
251
- ...props.environments.map((environment) => [environment.id, environment.label]),
252
- ]),
253
- props.environmentId ?? "",
254
- )}
315
+ actions={environmentActions}
316
onSelect={select}
317
/>
318
) : null}
@@ -259,47 +320,28 @@ export function PullRequestListFilters(props: {
320
label={STATES[value.state]}
321
active={value.state !== "open"}
322
accessibilityLabel="Filter by state"
262
- actions={choices("state", STATES, value.state)}
323
+ actions={stateActions}
324
onSelect={select}
325
/>
326
<ListFilterMenu
327
label={INVOLVEMENT[value.involvement]}
328
active={value.involvement !== "all"}
329
accessibilityLabel="Filter by involvement"
269
- actions={choices("involvement", INVOLVEMENT, value.involvement)}
330
+ actions={involvementActions}
331
onSelect={select}
332
/>
333
<ListFilterMenu
334
label={selectedLabels.length ? `Labels ${selectedLabels.length}` : "Labels"}
335
active={selectedLabels.length > 0}
336
accessibilityLabel="Filter by label"
276
- actions={[
277
- {
278
- id: id("labels", ""),
279
- title: "All labels",
280
- state: selectedLabels.length ? "off" : "on",
281
- },
282
- ...labels.map((label) => ({
283
- id: id("label", label),
284
- title: label,
285
- state: selectedLabelSet.has(label) ? ("on" as const) : ("off" as const),
286
- })),
287
- ]}
337
+ actions={labelActions}
338
onSelect={select}
339
/>
340
<ListFilterMenu
341
label={author === "me" ? "By you" : (author ?? "Author")}
342
active={Boolean(author)}
343
accessibilityLabel="Filter by author"
294
- actions={choices(
295
- "author",
296
- Object.fromEntries([
297
- ["", "All authors"],
298
- ["me", "Me"],
299
- ...authors.map((login) => [login, login]),
300
- ]),
301
- author ?? "",
302
- )}
344
+ actions={authorActions}
345
onSelect={select}
346
/>
347
</ScrollView>
apps/mobile/src/features/pull-requests/PullRequestToolbar.android.tsx
+45
-76
@@ -1,29 +1,24 @@
1
import { useNavigation, useNavigationState } from "@react-navigation/native";
2
import { useCallback, useEffect, useRef } from "react";
3
import { BackHandler, Keyboard, View, type TextInputInstance } from "react-native";
4
-import {
5
- AndroidHeaderIconButton,
6
- AndroidScreenHeader,
7
-} from "../../components/ui/AndroidScreenHeader";
8
-import { CompactBrandTitle } from "../../components/CompactBrandTitle";
4
+import { AndroidHeaderIconButton } from "../../components/ui/AndroidScreenHeader";
5
+import { AndroidAnchoredMenu } from "../../components/ui/AndroidAnchoredMenu";
6
import { SearchField } from "../../components/ui/SearchField";
10
-import { WorkspaceConnectionTitle } from "../home/WorkspaceConnectionTitle";
7
+import { useToolbarLayout } from "../../components/ui/useToolbarLayout";
8
import { useHardwareKeyboardCommand } from "../keyboard/hardwareKeyboardCommands";
9
+import { WorkspaceListToolbarRow } from "../workspace/WorkspaceListToolbarRow";
10
import { useWorkspaceTabs } from "../workspace/WorkspaceTabsContext";
13
-import { useWorkspaceListNavigation } from "../workspace/useAndroidWorkspaceNavigation";
11
+import { usePullRequestFilterMenu } from "./PullRequestFilterMenuContext";
12
15
-/** PR search shares the thread list's native Android header placement. */
16
-export function PullRequestToolbar(props: {
17
- readonly sidebar?: boolean;
18
- readonly onRequestVisibility?: () => void;
19
-}) {
13
+/** PR search shares the thread list's Android header row. */
14
+export function PullRequestToolbar(props: { readonly onRequestVisibility?: () => void }) {
15
const navigation = useNavigation();
16
+ const filters = usePullRequestFilterMenu();
17
const workspace = useWorkspaceTabs()!;
18
const { dispatch, getScrollOffset, recordScrollOffset, isTabActive } = workspace;
19
const homeFocused = useNavigationState((state) => state.routes[state.index]?.name === "Home");
20
const listFocused = homeFocused && workspace.state.selectedTab === "pullRequests";
21
const { onRequestVisibility } = props;
26
- const showThreads = useWorkspaceListNavigation("threads");
22
const tab = workspace.state.tabs.pullRequests;
23
const input = useRef<TextInputInstance>(null);
24
const searching = tab.searchMode !== "resting";
@@ -57,11 +52,12 @@ export function PullRequestToolbar(props: {
52
});
53
return () => subscription.remove();
54
}, [searching, closeSearch, listFocused, navigation, isTabActive]);
55
+ const { paddingTop, paddingBottom } = useToolbarLayout();
56
return (
61
- <AndroidScreenHeader
62
- title="Pull requests"
63
- titleContent={
64
- searching ? (
57
+ <View className="bg-header px-2" style={{ paddingTop, paddingBottom }}>
58
+ <WorkspaceListToolbarRow
59
+ searching={searching}
60
+ searchField={
61
<SearchField
62
inputRef={input}
63
accessibilityLabel="Search pull requests"
@@ -70,65 +66,38 @@ export function PullRequestToolbar(props: {
66
value={tab.query}
67
onChangeText={(query) => dispatch({ type: "query", tab: "pullRequests", query })}
68
/>
73
- ) : (
74
- <View className="min-w-0 flex-1 pl-3">
75
- <WorkspaceConnectionTitle
76
- grow
77
- brand={
78
- <CompactBrandTitle
79
- allowFontScaling={false}
80
- accessibilityLabel="T3 Code, Pull requests"
81
- fit
69
+ }
70
+ onCloseSearch={closeSearch}
71
+ onOpenSearch={openSearch}
72
+ searchAccessibilityLabel="Search pull requests"
73
+ titleAccessibilityLabel="T3 Code, Pull requests"
74
+ onOpenEnvironments={() =>
75
+ navigation.navigate("SettingsSheet", {
76
+ screen: "SettingsContent",
77
+ params: { screen: "SettingsEnvironments" },
78
+ })
79
+ }
80
+ filter={
81
+ filters ? (
82
+ <AndroidAnchoredMenu
83
+ actions={filters.actions}
84
+ onPressAction={({ nativeEvent }) => filters.onSelect(nativeEvent.event)}
85
+ >
86
+ {(open) => (
87
+ <AndroidHeaderIconButton
88
+ accessibilityLabel="Filter pull requests"
89
+ icon={
90
+ filters.customized
91
+ ? "line.3.horizontal.decrease.circle.fill"
92
+ : "line.3.horizontal.decrease.circle"
93
+ }
94
+ onPress={open}
95
/>
83
- }
84
- onPress={() =>
85
- navigation.navigate("SettingsSheet", {
86
- screen: "SettingsContent",
87
- params: { screen: "SettingsEnvironments" },
88
- })
89
- }
90
- />
91
- </View>
92
- )
93
- }
94
- leading={
95
- searching ? (
96
- <AndroidHeaderIconButton
97
- accessibilityLabel="Close search"
98
- icon="arrow.left"
99
- onPress={closeSearch}
100
- />
101
- ) : undefined
102
- }
103
- actions={
104
- searching
105
- ? []
106
- : [
107
- ...(props.sidebar
108
- ? [
109
- {
110
- accessibilityLabel: "Show threads",
111
- icon: "text.bubble",
112
- onPress: showThreads,
113
- } as const,
114
- ]
115
- : []),
116
- {
117
- accessibilityLabel: "Search pull requests",
118
- icon: "magnifyingglass",
119
- onPress: openSearch,
120
- },
121
- {
122
- accessibilityLabel: "Open settings",
123
- icon: "gearshape",
124
- onPress: () =>
125
- navigation.navigate("SettingsSheet", {
126
- screen: "SettingsContent",
127
- params: { screen: "Settings" },
128
- }),
129
- },
130
- ]
131
- }
132
- />
96
+ )}
97
+ </AndroidAnchoredMenu>
98
+ ) : null
99
+ }
100
+ />
101
+ </View>
102
);
103
}
apps/mobile/src/features/pull-requests/PullRequestsScreen.tsx
+7
-19
@@ -70,7 +70,6 @@ export function PullRequestsScreen(
70
const configs = useAtomValue(environmentServerConfigsAtom);
71
const insets = useSafeAreaInsets();
72
const [initialOffset] = useState(() => workspace.getScrollOffset("pullRequests"));
73
- const [initialAnchor] = useState(() => workspace.getScrollAnchor("pullRequests"));
73
const listRef = useRef<LegendListRef>(null);
74
const tab = workspace.state.tabs.pullRequests;
75
const maintainVisiblePosition = useMemo(
@@ -206,9 +205,6 @@ export function PullRequestsScreen(
205
animated: false,
206
});
207
}, [tab.searchMode, tab.scrollOffset, insets.top]);
209
- const initialIndex = initialAnchor
210
- ? entries.findIndex((entry) => pullRequestKey(entry) === initialAnchor.key)
211
- : -1;
208
209
return (
210
<View className={sidebar ? "flex-1 bg-drawer" : "flex-1 bg-screen"}>
@@ -233,19 +229,17 @@ export function PullRequestsScreen(
229
/>
230
}
231
alwaysBounceVertical
232
+ // Android flashes a list's scrollbar whenever it becomes visible, which was every return
233
+ // to this tab. The thread list shows none either.
234
+ showsVerticalScrollIndicator={Platform.OS !== "android"}
235
recycleItems
236
renderScrollComponent={Platform.OS === "ios" ? PullRequestScrollView : undefined}
237
contentInsetAdjustmentBehavior="never"
238
contentInset={Platform.OS === "ios" ? { top: insets.top } : undefined}
239
+ // A plain offset: LegendList adds the list header to an index-based restore, which
240
+ // landed every return one header lower.
241
initialScrollOffset={
241
- !initialAnchor && initialOffset > 0
242
- ? initialOffset - (Platform.OS === "ios" ? insets.top : 0)
243
- : undefined
244
- }
245
- initialScrollIndex={
246
- initialIndex >= 0 && initialAnchor
247
- ? { index: initialIndex, viewOffset: initialAnchor.viewOffset, viewPosition: 0 }
248
- : undefined
242
+ initialOffset > 0 ? initialOffset - (Platform.OS === "ios" ? insets.top : 0) : undefined
243
}
244
contentInsetStartAdjustment={Platform.OS === "ios" ? insets.top : 0}
245
contentContainerStyle={{
@@ -259,13 +253,6 @@ export function PullRequestsScreen(
253
event.nativeEvent.contentOffset.y + (Platform.OS === "ios" ? insets.top : 0),
254
),
255
);
262
- const list = listRef.current?.getState();
263
- const item = list ? entries[list.start] : undefined;
264
- if (list && item)
265
- workspace.recordScrollAnchor("pullRequests", {
266
- key: pullRequestKey(item),
267
- viewOffset: list.positionAtIndex(list.start) - event.nativeEvent.contentOffset.y,
268
- });
256
}}
257
keyboardDismissMode="on-drag"
258
keyboardShouldPersistTaps="handled"
@@ -273,6 +260,7 @@ export function PullRequestsScreen(
260
ListHeaderComponent={
261
<>
262
<PullRequestListFilters
263
+ sidebar={sidebar}
264
environments={environments.map((item) => ({
265
id: String(item.environmentId),
266
label: item.environmentLabel,
apps/mobile/src/features/settings/components/SettingsScreen.tsx
+9
-2
@@ -1,10 +1,11 @@
1
-import { useNavigation } from "@react-navigation/native";
1
+import { useNavigation, useNavigationState, useRoute } from "@react-navigation/native";
2
import type { ReactNode } from "react";
3
import { Platform, View } from "react-native";
4
5
import type { AppBarProps } from "../../../components/ui/AppBar.types";
6
import { AppBar } from "../../../components/ui/AppBar";
7
import { ScreenContent as SettingsScreenContent } from "../../../components/ui/ScreenContent";
8
+import { useWorkspaceTabs } from "../../workspace/WorkspaceTabsContext";
9
10
export { SettingsScreenContent };
11
@@ -15,6 +16,12 @@ export function SettingsScreen(
16
},
17
) {
18
const navigation = useNavigation();
19
+ const route = useRoute();
20
+ const index = useNavigationState((state) => state.index);
21
+ const workspace = useWorkspaceTabs();
22
+ // Android opens Settings as a workspace tab; its root page has nothing to go back to.
23
+ const workspaceRoot =
24
+ Platform.OS === "android" && workspace !== null && index === 0 && route.name === "Settings";
25
26
return (
27
<View collapsable={false} className="flex-1 bg-sheet">
@@ -23,7 +30,7 @@ export function SettingsScreen(
30
actions={props.actions}
31
trailing={Platform.OS === "android" ? props.trailing : undefined}
32
sidebar={false}
26
- onBack={() => navigation.goBack()}
33
+ onBack={workspaceRoot ? undefined : () => navigation.goBack()}
34
hideBottomBorder={!props.formSheet}
35
/>
36
{props.formSheet ? (
apps/mobile/src/features/threads/ThreadNavigationSidebar.tsx
-1
@@ -875,7 +875,6 @@ function ThreadNavigationSidebarPane(
875
filterActions={listMenuActions}
876
filterCustomized={filterCustomized}
877
onFilterAction={handleListMenuAction}
878
- onOpenSettings={props.onOpenSettings}
878
onOpenEnvironments={props.onOpenEnvironmentSettings}
879
onRequestVisibility={props.onRequestVisibility}
880
/>
apps/mobile/src/features/workspace/AndroidWorkspaceNavigation.android.tsx
+70
-14
@@ -1,6 +1,5 @@
1
import { requireNativeView } from "expo";
2
-import { useNavigation } from "@react-navigation/native";
3
-import { resetAndroidWorkspace } from "../../lib/android-workspace-navigation";
2
+import { CommonActions, useNavigation } from "@react-navigation/native";
3
import {
4
Keyboard,
5
processColor,
@@ -12,20 +11,40 @@ import { useSafeAreaInsets } from "react-native-safe-area-context";
11
import { useKeyboardState } from "react-native-keyboard-controller";
12
13
import { useAndroidControlSizing } from "../../components/ui/useAndroidControlSizing";
14
+import { useToolbarLayout } from "../../components/ui/useToolbarLayout";
15
+import { useWorkspaceConnectionState } from "../../state/workspace";
16
import { androidWorkspaceNavigationColors } from "./android-workspace-navigation-colors";
17
+import {
18
+ androidWorkspaceTabNavigationState,
19
+ type AndroidWorkspaceNavigationTab,
20
+} from "./android-workspace-tabs";
21
import { useAppearancePreferences } from "../settings/appearance/AppearancePreferencesProvider";
22
+import { useAndroidWorkspaceRoot } from "./AndroidWorkspaceTabsProvider";
23
import { useWorkspaceTabs } from "./WorkspaceTabsContext";
18
-import type { WorkspaceTab } from "./workspace-tabs-state";
24
+
25
+// Matches RAIL_WIDTH in the native rail.
26
+export const ANDROID_WORKSPACE_RAIL_WIDTH = 72;
27
28
interface NativeNavigationProps extends ViewProps {
21
- readonly selectedTab: WorkspaceTab;
29
+ readonly rail: boolean;
30
+ readonly selectedTab: AndroidWorkspaceNavigationTab;
31
readonly dark: boolean;
32
readonly textScale: number;
33
+ readonly newEnabled: boolean;
34
+ readonly safeAreaTop: number;
35
+ readonly safeAreaBottom: number;
36
+ readonly headerHeight: number;
37
readonly containerColor: number;
38
readonly selectedColor: number;
39
readonly indicatorColor: number;
40
readonly unselectedColor: number;
28
- readonly onTabSelected: (event: NativeSyntheticEvent<{ readonly tab: WorkspaceTab }>) => void;
41
+ readonly actionColor: number;
42
+ readonly actionContentColor: number;
43
+ readonly onTabSelected: (
44
+ event: NativeSyntheticEvent<{ readonly tab: AndroidWorkspaceNavigationTab }>,
45
+ ) => void;
46
+ readonly onNewThread: () => void;
47
+ readonly onOverlayChange: (event: NativeSyntheticEvent<{ readonly overlay: boolean }>) => void;
48
}
49
50
const NativeNavigation = requireNativeView<NativeNavigationProps>("T3WorkspaceNavigation");
@@ -35,36 +54,73 @@ function nativeColor(value: string) {
54
return typeof color === "number" ? color : 0;
55
}
56
38
-export function AndroidWorkspaceNavigation() {
57
+export function AndroidWorkspaceNavigation(props: {
58
+ readonly rail?: boolean;
59
+ readonly onSelect?: () => void;
60
+ /** The rail needs the whole workspace while it widens over the list. */
61
+ readonly onOverlayChange?: (overlay: boolean) => void;
62
+}) {
63
const workspace = useWorkspaceTabs()!;
64
+ const root = useAndroidWorkspaceRoot();
65
const navigation = useNavigation();
66
const insets = useSafeAreaInsets();
67
+ const toolbar = useToolbarLayout();
68
+ const connectionState = useWorkspaceConnectionState();
69
const keyboardVisible = useKeyboardState((state) => state.isVisible);
70
const { themeAppearance, themeVariables: colors } = useAppearancePreferences();
71
const { scale } = useAndroidControlSizing();
72
+ const rail = Boolean(props.rail);
73
const { containerColor, indicatorColor, selectedColor, unselectedColor } =
46
- androidWorkspaceNavigationColors(colors);
47
- if (keyboardVisible) return null;
74
+ androidWorkspaceNavigationColors(colors, rail);
75
+ const selectedTab: AndroidWorkspaceNavigationTab = root?.settingsOpen
76
+ ? "settings"
77
+ : workspace.state.selectedTab;
78
+ if (!rail && keyboardVisible) return null;
79
80
return (
50
- <View style={{ backgroundColor: containerColor, paddingBottom: insets.bottom }}>
81
+ <View
82
+ style={
83
+ // The rail draws its own surface and pads the system bars; while open it spans the
84
+ // workspace, so the rest of it must stay transparent.
85
+ rail ? { flex: 1 } : { backgroundColor: containerColor, paddingBottom: insets.bottom }
86
+ }
87
+ >
88
<NativeNavigation
52
- selectedTab={workspace.state.selectedTab}
89
+ rail={rail}
90
+ selectedTab={selectedTab}
91
dark={themeAppearance === "dark"}
92
textScale={scale}
93
+ newEnabled={connectionState.hasConnections}
94
+ safeAreaTop={toolbar.paddingTop}
95
+ safeAreaBottom={insets.bottom}
96
+ headerHeight={toolbar.height}
97
containerColor={nativeColor(containerColor)}
98
selectedColor={nativeColor(selectedColor)}
99
indicatorColor={nativeColor(indicatorColor)}
100
unselectedColor={nativeColor(unselectedColor)}
101
+ actionColor={nativeColor(colors["--color-primary"])}
102
+ actionContentColor={nativeColor(colors["--color-primary-foreground"])}
103
onTabSelected={(event) => {
104
Keyboard.dismiss();
105
const tab = event.nativeEvent.tab;
62
- if (tab !== workspace.state.selectedTab) {
63
- workspace.dispatch({ type: "select", tab });
64
- resetAndroidWorkspace(navigation);
106
+ if (tab !== selectedTab) {
107
+ if (tab !== "settings") workspace.dispatch({ type: "select", tab });
108
+ // Reset the root stack even when a nested settings navigator has focus.
109
+ if (root) {
110
+ navigation.dispatch({
111
+ ...CommonActions.reset(androidWorkspaceTabNavigationState(root.getState(), tab)),
112
+ target: root.key,
113
+ });
114
+ }
115
}
116
+ props.onSelect?.();
117
+ }}
118
+ onNewThread={() => {
119
+ Keyboard.dismiss();
120
+ navigation.navigate("NewTaskSheet", { screen: "NewTask" });
121
}}
67
- style={{ height: 80 * Math.max(1, scale) }}
122
+ onOverlayChange={(event) => props.onOverlayChange?.(event.nativeEvent.overlay)}
123
+ style={rail ? { flex: 1 } : { height: 80 * Math.max(1, scale) }}
124
/>
125
</View>
126
);
apps/mobile/src/features/workspace/AndroidWorkspaceNavigation.tsx
+7
-1
@@ -1,3 +1,9 @@
1
-export function AndroidWorkspaceNavigation() {
1
+export function AndroidWorkspaceNavigation(_props: {
2
+ readonly rail?: boolean;
3
+ readonly onSelect?: () => void;
4
+ readonly onOverlayChange?: (overlay: boolean) => void;
5
+}) {
6
return null;
7
}
8
+
9
+export const ANDROID_WORKSPACE_RAIL_WIDTH = 72;
apps/mobile/src/features/workspace/AndroidWorkspaceSettings.tsx
new
+20
@@ -0,0 +1,20 @@
1
+import type { ReactNode } from "react";
2
+import { Platform, View } from "react-native";
3
+import { SafeAreaInsetsContext, useSafeAreaInsets } from "react-native-safe-area-context";
4
+import { useAdaptiveWorkspaceLayout } from "../layout/AdaptiveWorkspaceLayout";
5
+import { AndroidWorkspaceNavigation } from "./AndroidWorkspaceNavigation";
6
+
7
+/** Settings keeps its existing stack inside the full workspace, above compact navigation. */
8
+export function AndroidWorkspaceSettings(props: { readonly children: ReactNode }) {
9
+ const { layout } = useAdaptiveWorkspaceLayout();
10
+ const insets = useSafeAreaInsets();
11
+ if (Platform.OS !== "android") return props.children;
12
+ return (
13
+ <View className="flex-1 bg-header">
14
+ <SafeAreaInsetsContext value={layout.usesSplitView ? insets : { ...insets, bottom: 0 }}>
15
+ <View className="flex-1">{props.children}</View>
16
+ </SafeAreaInsetsContext>
17
+ {layout.usesSplitView ? null : <AndroidWorkspaceNavigation />}
18
+ </View>
19
+ );
20
+}
apps/mobile/src/features/workspace/AndroidWorkspaceSidebar.android.tsx
+26
-11
@@ -1,9 +1,11 @@
1
import { useMemo, type ReactNode } from "react";
2
import { View } from "react-native";
3
import { ScreenContent } from "../../components/ui/ScreenContent";
4
+import { PullRequestFilterMenuProvider } from "../pull-requests/PullRequestFilterMenuContext";
5
import { PullRequestsScreen } from "../pull-requests/PullRequestsScreen";
6
import { PullRequestToolbar } from "../pull-requests/PullRequestToolbar.android";
7
import { WorkspaceTabsContext, useWorkspaceTabs } from "./WorkspaceTabsContext";
8
+import { WorkspaceTabPanes } from "./WorkspaceTabPanes";
9
10
export function AndroidWorkspaceSidebar(props: {
11
readonly children: ReactNode;
@@ -12,16 +14,29 @@ export function AndroidWorkspaceSidebar(props: {
14
}) {
15
const workspace = useWorkspaceTabs()!;
16
const context = useMemo(() => ({ ...workspace, bottomClearance: 16 }), [workspace]);
15
- return workspace.state.selectedTab === "threads" ? (
16
- props.children
17
- ) : (
18
- <WorkspaceTabsContext value={context}>
19
- <View className="flex-1 bg-header">
20
- <PullRequestToolbar sidebar onRequestVisibility={props.onRequestVisibility} />
21
- <ScreenContent insetHorizontal>
22
- <PullRequestsScreen sidebar selectedPullRequestKey={props.selectedPullRequestKey} />
23
- </ScreenContent>
24
- </View>
25
- </WorkspaceTabsContext>
17
+ return (
18
+ <WorkspaceTabPanes
19
+ tabs={["threads", "pullRequests"]}
20
+ selected={workspace.state.selectedTab}
21
+ renderTab={(tab) =>
22
+ tab === "threads" ? (
23
+ props.children
24
+ ) : (
25
+ <WorkspaceTabsContext value={context}>
26
+ <PullRequestFilterMenuProvider>
27
+ <View className="flex-1 bg-header">
28
+ <PullRequestToolbar onRequestVisibility={props.onRequestVisibility} />
29
+ <ScreenContent insetHorizontal>
30
+ <PullRequestsScreen
31
+ sidebar
32
+ selectedPullRequestKey={props.selectedPullRequestKey}
33
+ />
34
+ </ScreenContent>
35
+ </View>
36
+ </PullRequestFilterMenuProvider>
37
+ </WorkspaceTabsContext>
38
+ )
39
+ }
40
+ />
41
);
42
}
apps/mobile/src/features/workspace/AndroidWorkspaceTabsProvider.tsx
+47
-3
@@ -1,10 +1,54 @@
1
-import type { ReactNode } from "react";
1
+import type { NavigationState } from "@react-navigation/native";
2
+import {
3
+ createContext,
4
+ use,
5
+ useCallback,
6
+ useLayoutEffect,
7
+ useMemo,
8
+ useRef,
9
+ type ReactNode,
10
+} from "react";
11
import { Platform } from "react-native";
12
+import { androidWorkspaceSettingsOpen } from "./android-workspace-tabs";
13
import { WorkspaceTabsProvider } from "./WorkspaceTabsContext";
14
5
-export function AndroidWorkspaceTabsProvider(props: { readonly children: ReactNode }) {
15
+interface AndroidWorkspaceRoot {
16
+ /**
17
+ * The root stack's key and state. The rail renders in the root navigator's layout, where
18
+ * `useNavigation()` resolves to the container ref: its dispatch goes to the focused
19
+ * navigator and hands that navigator's state to a callback. A tab press from inside nested
20
+ * Settings must reset the root stack, so the rail reads the root state here and targets
21
+ * the root key.
22
+ */
23
+ readonly key: string;
24
+ readonly getState: () => NavigationState;
25
+ /** Settings is derived from navigation rather than kept in the tab reducer. */
26
+ readonly settingsOpen: boolean;
27
+}
28
+
29
+const AndroidWorkspaceRootContext = createContext<AndroidWorkspaceRoot | null>(null);
30
+
31
+export function useAndroidWorkspaceRoot() {
32
+ return use(AndroidWorkspaceRootContext);
33
+}
34
+
35
+/** Android keeps one tab controller above the root navigator and split sidebar. */
36
+export function AndroidWorkspaceTabsProvider(props: {
37
+ readonly state: NavigationState;
38
+ readonly children: ReactNode;
39
+}) {
40
+ const stateRef = useRef(props.state);
41
+ useLayoutEffect(() => {
42
+ stateRef.current = props.state;
43
+ }, [props.state]);
44
+ const getState = useCallback(() => stateRef.current, []);
45
+ const key = props.state.key;
46
+ const settingsOpen = Platform.OS === "android" && androidWorkspaceSettingsOpen(props.state);
47
+ const root = useMemo(() => ({ key, getState, settingsOpen }), [key, getState, settingsOpen]);
48
return Platform.OS === "android" ? (
7
- <WorkspaceTabsProvider>{props.children}</WorkspaceTabsProvider>
49
+ <WorkspaceTabsProvider>
50
+ <AndroidWorkspaceRootContext value={root}>{props.children}</AndroidWorkspaceRootContext>
51
+ </WorkspaceTabsProvider>
52
) : (
53
props.children
54
);
apps/mobile/src/features/workspace/WorkspaceListToolbarRow.tsx
new
+63
@@ -0,0 +1,63 @@
1
+import type { ReactNode } from "react";
2
+import { View } from "react-native";
3
+import { AndroidHeaderIconButton } from "../../components/ui/AndroidScreenHeader";
4
+import { CompactBrandTitle } from "../../components/CompactBrandTitle";
5
+import { useToolbarLayout } from "../../components/ui/useToolbarLayout";
6
+import { WorkspaceConnectionTitle } from "../home/WorkspaceConnectionTitle";
7
+
8
+/**
9
+ * The Android header row above each workspace tab's list. Both tabs draw this same row, so
10
+ * switching tabs leaves the title and buttons where they were. It is plain React Native rather
11
+ * than the Compose app bar: a hidden tab lays out at zero size, and Compose-hosted content takes
12
+ * several frames to measure again when the tab comes back.
13
+ */
14
+export function WorkspaceListToolbarRow(props: {
15
+ readonly searching: boolean;
16
+ readonly searchField: ReactNode;
17
+ readonly onCloseSearch: () => void;
18
+ readonly onOpenSearch: () => void;
19
+ readonly searchAccessibilityLabel: string;
20
+ readonly titleAccessibilityLabel: string;
21
+ readonly onOpenEnvironments: () => void;
22
+ /** Stays trailing while searching, so it never moves and still narrows the results. */
23
+ readonly filter: ReactNode;
24
+}) {
25
+ const { height } = useToolbarLayout();
26
+ return (
27
+ <View className="flex-row items-center gap-1" style={{ minHeight: height }}>
28
+ {props.searching ? (
29
+ <>
30
+ <AndroidHeaderIconButton
31
+ accessibilityLabel="Close search"
32
+ icon="arrow.left"
33
+ onPress={props.onCloseSearch}
34
+ />
35
+ {props.searchField}
36
+ {props.filter}
37
+ </>
38
+ ) : (
39
+ <>
40
+ <View className="min-w-0 flex-1 pl-4">
41
+ <WorkspaceConnectionTitle
42
+ grow
43
+ onPress={props.onOpenEnvironments}
44
+ brand={
45
+ <CompactBrandTitle
46
+ allowFontScaling={false}
47
+ accessibilityLabel={props.titleAccessibilityLabel}
48
+ fit
49
+ />
50
+ }
51
+ />
52
+ </View>
53
+ <AndroidHeaderIconButton
54
+ accessibilityLabel={props.searchAccessibilityLabel}
55
+ icon="magnifyingglass"
56
+ onPress={props.onOpenSearch}
57
+ />
58
+ {props.filter}
59
+ </>
60
+ )}
61
+ </View>
62
+ );
63
+}
apps/mobile/src/features/workspace/WorkspaceRootScreen.android.tsx
+44
-26
@@ -7,11 +7,16 @@ import { EmptyState } from "../../components/ui/EmptyState";
7
import { ScreenContent } from "../../components/ui/ScreenContent";
8
import { useAndroidControlSizing } from "../../components/ui/useAndroidControlSizing";
9
import { HomeRouteScreen } from "../home/HomeRouteScreen";
10
+import { PullRequestFilterMenuProvider } from "../pull-requests/PullRequestFilterMenuContext";
11
import { PullRequestsScreen } from "../pull-requests/PullRequestsScreen";
12
import { PullRequestToolbar } from "../pull-requests/PullRequestToolbar.android";
13
import { useAdaptiveWorkspaceLayout } from "../layout/AdaptiveWorkspaceLayout";
14
import { AndroidWorkspaceNavigation } from "./AndroidWorkspaceNavigation";
15
import { WorkspaceTabsContext, useWorkspaceTabs } from "./WorkspaceTabsContext";
16
+import { WorkspaceTabPanes } from "./WorkspaceTabPanes";
17
+import type { WorkspaceTab } from "./workspace-tabs-state";
18
+
19
+const TABS: readonly WorkspaceTab[] = ["threads", "pullRequests"];
20
21
export function WorkspaceRootScreen() {
22
const { layout } = useAdaptiveWorkspaceLayout();
@@ -25,22 +30,31 @@ export function WorkspaceRootScreen() {
30
}),
31
[workspace, fabClearance],
32
);
33
+ const tab = workspace.state.selectedTab;
34
35
if (layout.usesSplitView) {
30
- return workspace.state.selectedTab === "threads" ? (
31
- <HomeRouteScreen />
32
- ) : (
33
- <>
34
- <NativeStackScreenOptions options={{ headerShown: false }} />
35
- <AndroidScreenHeader title="Pull requests" />
36
- <View className="flex-1 items-center justify-center px-10">
37
- <EmptyState
38
- title="Select a pull request"
39
- detail="Choose a pull request from the sidebar to review it."
40
- variant="plain"
41
- />
42
- </View>
43
- </>
36
+ return (
37
+ <WorkspaceTabPanes
38
+ tabs={TABS}
39
+ selected={tab}
40
+ renderTab={(tab) =>
41
+ tab === "threads" ? (
42
+ <HomeRouteScreen />
43
+ ) : (
44
+ <>
45
+ <NativeStackScreenOptions options={{ headerShown: false }} />
46
+ <AndroidScreenHeader title="Pull requests" />
47
+ <View className="flex-1 items-center justify-center px-10">
48
+ <EmptyState
49
+ title="Select a pull request"
50
+ detail="Choose a pull request from the sidebar to review it."
51
+ variant="plain"
52
+ />
53
+ </View>
54
+ </>
55
+ )
56
+ }
57
+ />
58
);
59
}
60
@@ -49,18 +63,22 @@ export function WorkspaceRootScreen() {
63
<View className="flex-1 bg-header">
64
<NativeStackScreenOptions options={{ headerShown: false }} />
65
<SafeAreaInsetsContext value={{ ...insets, bottom: 0 }}>
52
- <View className="flex-1">
53
- {workspace.state.selectedTab === "threads" ? (
54
- <HomeRouteScreen />
55
- ) : (
56
- <>
57
- <PullRequestToolbar />
58
- <ScreenContent>
59
- <PullRequestsScreen />
60
- </ScreenContent>
61
- </>
62
- )}
63
- </View>
66
+ <WorkspaceTabPanes
67
+ tabs={TABS}
68
+ selected={tab}
69
+ renderTab={(tab) =>
70
+ tab === "threads" ? (
71
+ <HomeRouteScreen />
72
+ ) : (
73
+ <PullRequestFilterMenuProvider>
74
+ <PullRequestToolbar />
75
+ <ScreenContent>
76
+ <PullRequestsScreen />
77
+ </ScreenContent>
78
+ </PullRequestFilterMenuProvider>
79
+ )
80
+ }
81
+ />
82
</SafeAreaInsetsContext>
83
<AndroidWorkspaceNavigation />
84
</View>
apps/mobile/src/features/workspace/WorkspaceTabPanes.tsx
new
+26
@@ -0,0 +1,26 @@
1
+import { Activity, useState, type ReactNode } from "react";
2
+import { View } from "react-native";
3
+
4
+/**
5
+ * Top-level tabs swap in a single frame. A tab mounts on its first visit and then stays mounted
6
+ * while hidden, so returning to it shows its list as it was left instead of an empty one that
7
+ * fills in. Hidden tabs keep their state but run no effects, so they register no keyboard
8
+ * commands, back handlers, or header options.
9
+ */
10
+export function WorkspaceTabPanes<Tab extends string>(props: {
11
+ readonly tabs: readonly Tab[];
12
+ readonly selected: Tab;
13
+ readonly renderTab: (tab: Tab) => ReactNode;
14
+}) {
15
+ const [visited, setVisited] = useState<readonly Tab[]>(() => [props.selected]);
16
+ if (!visited.includes(props.selected)) {
17
+ setVisited([...visited, props.selected]);
18
+ }
19
+ return props.tabs.map((tab) =>
20
+ visited.includes(tab) ? (
21
+ <Activity key={tab} mode={tab === props.selected ? "visible" : "hidden"}>
22
+ <View className="flex-1">{props.renderTab(tab)}</View>
23
+ </Activity>
24
+ ) : null,
25
+ );
26
+}
apps/mobile/src/features/workspace/WorkspaceTabsContext.tsx
+1
-15
@@ -17,11 +17,6 @@ import {
17
type WorkspaceTabsState,
18
} from "./workspace-tabs-state";
19
20
-export interface WorkspaceScrollAnchor {
21
- readonly key: string;
22
- readonly viewOffset: number;
23
-}
24
-
20
export const WorkspaceTabsContext = createContext<{
21
readonly state: WorkspaceTabsState;
22
readonly dispatch: Dispatch<WorkspaceTabsAction>;
@@ -29,8 +24,6 @@ export const WorkspaceTabsContext = createContext<{
24
readonly bottomClearance: number;
25
readonly getScrollOffset: (tab: WorkspaceTab) => number;
26
readonly recordScrollOffset: (tab: WorkspaceTab, offset: number) => void;
32
- readonly getScrollAnchor: (tab: WorkspaceTab) => WorkspaceScrollAnchor | undefined;
33
- readonly recordScrollAnchor: (tab: WorkspaceTab, anchor: WorkspaceScrollAnchor) => void;
27
} | null>(null);
28
29
export function useWorkspaceTabs() {
@@ -45,15 +38,10 @@ export function WorkspaceTabsProvider(props: { readonly children: ReactNode }) {
38
}, [state.selectedTab]);
39
const isTabActive = useCallback((tab: WorkspaceTab) => activeTab.current === tab, []);
40
const scrollOffsets = useRef({ threads: 0, pullRequests: 0 });
48
- const scrollAnchors = useRef<Partial<Record<WorkspaceTab, WorkspaceScrollAnchor>>>({});
41
const getScrollOffset = useCallback((tab: WorkspaceTab) => scrollOffsets.current[tab], []);
42
const recordScrollOffset = useCallback((tab: WorkspaceTab, offset: number) => {
43
scrollOffsets.current[tab] = offset;
44
}, []);
53
- const getScrollAnchor = useCallback((tab: WorkspaceTab) => scrollAnchors.current[tab], []);
54
- const recordScrollAnchor = useCallback((tab: WorkspaceTab, anchor: WorkspaceScrollAnchor) => {
55
- scrollAnchors.current[tab] = anchor;
56
- }, []);
45
const context = useMemo(
46
() => ({
47
state,
@@ -62,10 +50,8 @@ export function WorkspaceTabsProvider(props: { readonly children: ReactNode }) {
50
bottomClearance: 0,
51
getScrollOffset,
52
recordScrollOffset,
65
- getScrollAnchor,
66
- recordScrollAnchor,
53
}),
68
- [state, isTabActive, getScrollOffset, recordScrollOffset, getScrollAnchor, recordScrollAnchor],
54
+ [state, isTabActive, getScrollOffset, recordScrollOffset],
55
);
56
return <WorkspaceTabsContext value={context}>{props.children}</WorkspaceTabsContext>;
57
}
apps/mobile/src/features/workspace/android-workspace-navigation-colors.test.ts
+20
-13
@@ -34,14 +34,19 @@ function expectVisibleSelection(colors: ReturnType<typeof androidWorkspaceNaviga
34
}
35
36
describe("Android workspace navigation colors", () => {
37
- it.each(MOBILE_THEME_IDS)("keeps %s selection visible", (themeId) => {
38
- for (const appearance of ["light", "dark"] as const) {
39
- const variables = getMobileThemeRuntimeVariables(themeId, appearance, "android");
40
- const snapshot = { ...variables };
41
- expectVisibleSelection(androidWorkspaceNavigationColors(variables));
42
- expect(variables).toEqual(snapshot);
43
- }
44
- });
37
+ it.each(MOBILE_THEME_IDS)(
38
+ "keeps %s selection visible in both navigation positions",
39
+ (themeId) => {
40
+ for (const appearance of ["light", "dark"] as const) {
41
+ const variables = getMobileThemeRuntimeVariables(themeId, appearance, "android");
42
+ const snapshot = { ...variables };
43
+ for (const rail of [false, true]) {
44
+ expectVisibleSelection(androidWorkspaceNavigationColors(variables, rail));
45
+ }
46
+ expect(variables).toEqual(snapshot);
47
+ }
48
+ },
49
+ );
50
51
it.each(["#6750a4", "#006a6a", "#9c4146"])(
52
"keeps Material You selection visible for system seed %s",
@@ -85,17 +90,19 @@ describe("Android workspace navigation colors", () => {
90
appearance,
91
getMobileThemeRuntimeVariables("material-you", appearance, "android"),
92
);
88
- expectVisibleSelection(androidWorkspaceNavigationColors(variables));
93
+ for (const rail of [false, true]) {
94
+ expectVisibleSelection(androidWorkspaceNavigationColors(variables, rail));
95
+ }
96
}
97
},
98
);
99
100
it("preserves an already visible tonal fill", () => {
101
const variables = getMobileThemeRuntimeVariables("t3-chat", "light", "android");
95
- const colors = androidWorkspaceNavigationColors({
96
- ...variables,
97
- "--color-secondary": "#e091cf",
98
- });
102
+ const colors = androidWorkspaceNavigationColors(
103
+ { ...variables, "--color-secondary": "#e091cf" },
104
+ true,
105
+ );
106
expect(colors.indicatorColor).toBe("#e091cf");
107
expectVisibleSelection(colors);
108
});
apps/mobile/src/features/workspace/android-workspace-navigation-colors.ts
+4
-5
@@ -5,12 +5,11 @@ import {
5
type MobileThemeVariables,
6
} from "../../lib/mobileTheme";
7
8
-export function androidWorkspaceNavigationColors(colors: MobileThemeVariables) {
8
+export function androidWorkspaceNavigationColors(colors: MobileThemeVariables, rail: boolean) {
9
const header = flattenThemeColor(colors["--color-header"], colors["--color-screen"]);
10
- const containerColor = flattenThemeColor(
11
- themeColorWithAlpha(colors["--color-header-foreground"], 0.05),
12
- header,
13
- );
10
+ const containerColor = rail
11
+ ? header
12
+ : flattenThemeColor(themeColorWithAlpha(colors["--color-header-foreground"], 0.05), header);
13
const indicatorColor = themeColorWithContrast(
14
flattenThemeColor(colors["--color-secondary"], containerColor),
15
containerColor,
apps/mobile/src/features/workspace/android-workspace-tabs.ts
new
+47
@@ -0,0 +1,47 @@
1
+import type { NavigationState } from "@react-navigation/native";
2
+import { androidWorkspaceNavigationState } from "../../lib/android-workspace-navigation";
3
+import type { WorkspaceTab } from "./workspace-tabs-state";
4
+
5
+/** Settings joins the two list tabs as a top-level Android destination. */
6
+export type AndroidWorkspaceNavigationTab = WorkspaceTab | "settings";
7
+
8
+const WORKSPACE_ROUTES = new Set(["Home", "Thread", "PullRequest", "SettingsSheet"]);
9
+
10
+/**
11
+ * The Settings tab reuses the settings navigator, reset over Home alone so stale chat and
12
+ * PR history is dropped while nested settings pages keep an ordinary Back.
13
+ */
14
+export function androidWorkspaceTabNavigationState(
15
+ state: NavigationState,
16
+ tab: AndroidWorkspaceNavigationTab,
17
+) {
18
+ const home = androidWorkspaceNavigationState(state);
19
+ if (tab !== "settings") return home;
20
+ return {
21
+ ...home,
22
+ index: 1,
23
+ routes: [
24
+ ...home.routes,
25
+ {
26
+ name: "SettingsSheet",
27
+ params: { screen: "SettingsContent", params: { screen: "Settings" } },
28
+ },
29
+ ],
30
+ };
31
+}
32
+
33
+/** Settings stays selected while its navigator is the topmost workspace route. */
34
+export function androidWorkspaceSettingsOpen(state: NavigationState): boolean {
35
+ const top = state.routes
36
+ .slice(0, state.index + 1)
37
+ .findLast((route) => WORKSPACE_ROUTES.has(route.name));
38
+ return top?.name === "SettingsSheet";
39
+}
40
+
41
+export function androidWorkspaceTabFromNavigationState(
42
+ state: NavigationState,
43
+ selected: AndroidWorkspaceNavigationTab,
44
+): AndroidWorkspaceNavigationTab {
45
+ if (androidWorkspaceSettingsOpen(state)) return "settings";
46
+ return selected === "settings" ? "threads" : selected;
47
+}
apps/mobile/src/lib/android-workspace-navigation.test.ts
+55
@@ -1,5 +1,10 @@
1
import * as NodeModule from "node:module";
2
import { describe, expect, it } from "vite-plus/test";
3
+import {
4
+ androidWorkspaceTabFromNavigationState,
5
+ androidWorkspaceTabNavigationState,
6
+ type AndroidWorkspaceNavigationTab,
7
+} from "../features/workspace/android-workspace-tabs";
8
import {
9
androidWorkspaceNavigationState,
10
resetAndroidWorkspace,
@@ -229,3 +234,53 @@ describe("Android workspace navigation", () => {
234
expect(names(apply(root, action!))).toEqual(["Home", "Thread"]);
235
});
236
});
237
+
238
+describe("Android Settings tab", () => {
239
+ type State = ReturnType<typeof router.getInitialState>;
240
+ type Tab = AndroidWorkspaceNavigationTab;
241
+ const openTab = (state: State, tab: Tab) =>
242
+ apply(state, CommonActions.reset(androidWorkspaceTabNavigationState(state, tab)));
243
+ const selectedTab = (state: State, previous: Tab) =>
244
+ androidWorkspaceTabFromNavigationState(state, previous);
245
+
246
+ it("opens over Home alone, dropping chat and PR history, and Back returns to Home", () => {
247
+ const previous = legacyHistory();
248
+ const settings = openTab(previous, "settings");
249
+ expect(names(settings)).toEqual(["Home", "SettingsSheet"]);
250
+ expect(settings.routes[0]?.key).toBe(previous.routes[0]?.key);
251
+ expect(selectedTab(settings, "threads")).toBe("settings");
252
+ const back = apply(settings, StackActions.pop());
253
+ expect(names(back)).toEqual(["Home"]);
254
+ expect(back.routes[0]?.key).toBe(previous.routes[0]?.key);
255
+ expect(selectedTab(back, "settings")).not.toBe("settings");
256
+ });
257
+
258
+ it("stays selected under a nested settings page until a list tab returns to Home", () => {
259
+ const previous = legacyHistory();
260
+ const settings = openTab(previous, "settings");
261
+ // Usage pushes inside the nested settings navigator, which the root router never sees.
262
+ const usage: State = {
263
+ ...settings,
264
+ routes: settings.routes.map((route) =>
265
+ route.name === "SettingsSheet"
266
+ ? {
267
+ ...route,
268
+ state: {
269
+ routes: [
270
+ {
271
+ name: "SettingsContent",
272
+ state: { index: 1, routes: [{ name: "Settings" }, { name: "SettingsUsage" }] },
273
+ },
274
+ ],
275
+ },
276
+ }
277
+ : route,
278
+ ),
279
+ };
280
+ expect(selectedTab(usage, "threads")).toBe("settings");
281
+ const list = openTab(usage, "pullRequests");
282
+ expect(names(list)).toEqual(["Home"]);
283
+ expect(list.routes[0]?.key).toBe(previous.routes[0]?.key);
284
+ expect(selectedTab(list, "pullRequests")).toBe("pullRequests");
285
+ });
286
+});
apps/mobile/src/lib/layout.test.ts
+20
-5
@@ -420,15 +420,30 @@ describe("deriveWorkspacePaneLayout", () => {
420
describe("alignListPaneToHinge", () => {
421
const layout = deriveLayout({ width: 852, height: 880 });
422
423
- it("ends the list pane at a book-posture hinge", () => {
423
+ it("ends the list pane at a book-posture hinge after the rail", () => {
424
expect(
425
- alignListPaneToHinge({ layout, hinge: { x: 426, width: 0 }, viewportWidth: 852 }),
426
- ).toMatchObject({ listPaneWidth: 426, listPaneGap: 0 });
425
+ alignListPaneToHinge({
426
+ layout,
427
+ hinge: { x: 426, width: 0 },
428
+ viewportWidth: 852,
429
+ leadingWidth: 96,
430
+ }),
431
+ ).toMatchObject({ listPaneWidth: 330, listPaneGap: 0 });
432
});
433
434
it("keeps the default split when either side of the hinge would be too narrow", () => {
430
- const narrowList = { layout, hinge: { x: 250, width: 0 }, viewportWidth: 852 };
431
- const narrowDetail = { layout, hinge: { x: 600, width: 0 }, viewportWidth: 852 };
435
+ const narrowList = {
436
+ layout,
437
+ hinge: { x: 300, width: 0 },
438
+ viewportWidth: 852,
439
+ leadingWidth: 96,
440
+ };
441
+ const narrowDetail = {
442
+ layout,
443
+ hinge: { x: 600, width: 0 },
444
+ viewportWidth: 852,
445
+ leadingWidth: 0,
446
+ };
447
expect(alignListPaneToHinge(narrowList)).toBe(layout);
448
expect(alignListPaneToHinge(narrowDetail)).toBe(layout);
449
});
apps/mobile/src/lib/layout.ts
+11
-3
@@ -139,18 +139,26 @@ export interface VerticalHinge {
139
readonly width: number;
140
}
141
142
-/** Moves the list/detail split onto a book-posture hinge so neither pane straddles the crease. */
142
+/**
143
+ * Moves the list/detail split onto a book-posture hinge so neither pane straddles the crease.
144
+ * `leadingWidth` is chrome left of the list pane, such as the Android navigation rail.
145
+ */
146
export function alignListPaneToHinge(input: {
147
readonly layout: Layout;
148
readonly hinge: VerticalHinge | null;
149
readonly viewportWidth: number;
150
+ readonly leadingWidth: number;
151
}): Layout {
152
const { layout, hinge } = input;
153
if (!hinge || !layout.usesSplitView) return layout;
150
- if (hinge.x < SPLIT_SIDEBAR_MIN_WIDTH || input.viewportWidth - hinge.x - hinge.width < 320) {
154
+ const listPaneWidth = hinge.x - input.leadingWidth;
155
+ if (
156
+ listPaneWidth < SPLIT_SIDEBAR_MIN_WIDTH ||
157
+ input.viewportWidth - hinge.x - hinge.width < 320
158
+ ) {
159
return layout;
160
}
153
- return { ...layout, listPaneWidth: hinge.x, listPaneGap: hinge.width };
161
+ return { ...layout, listPaneWidth, listPaneGap: hinge.width };
162
}
163
164
/**
docs/operations/mobile-screens-fork.md
+1
-1
@@ -1,7 +1,7 @@
1
# Building the mobile Screens dependency
2
3
The mobile v5 stack uses a committed tarball from the
4
-[T3 Screens fork](https://github.com/pingdotgg/react-native-screens/tree/t3-v5.0.0-t3.27).
4
+[T3 Screens fork](https://github.com/pingdotgg/react-native-screens/tree/t3-v5.0.0-t3.29).
5
The fork owns the integration changes; the app does not patch this package.
6
Each archive includes compiled JavaScript, declarations, native source and
7
`t3-fork.json` recording its version, source commit and upstream base.
patches/expo-modules-core@58.0.22.patch
new
+42
@@ -0,0 +1,42 @@
1
+diff --git a/android/src/main/java/expo/modules/kotlin/views/ExpoView.kt b/android/src/main/java/expo/modules/kotlin/views/ExpoView.kt
2
+index c732ab4..2e3f40e 100644
3
+--- a/android/src/main/java/expo/modules/kotlin/views/ExpoView.kt
4
++++ b/android/src/main/java/expo/modules/kotlin/views/ExpoView.kt
5
+@@ -3,6 +3,7 @@ package expo.modules.kotlin.views
6
+ import android.content.Context
7
+ import android.graphics.Canvas
8
+ import android.widget.LinearLayout
9
++import androidx.core.view.OneShotPreDrawListener
10
+ import androidx.annotation.UiThread
11
+ import com.facebook.react.uimanager.BackgroundStyleApplicator
12
+ import com.facebook.react.uimanager.StateWrapper
13
+@@ -47,12 +48,27 @@ abstract class ExpoView(
14
+ layout(left, top, right, bottom)
15
+ }
16
+
17
++ private var isLayoutScheduled = false
18
++
19
+ override fun requestLayout() {
20
+ super.requestLayout()
21
+- if (shouldUseAndroidLayout) {
22
++ if (shouldUseAndroidLayout && !isLayoutScheduled) {
23
+ // We need to force measure and layout, because React Native doesn't do it for us.
24
+- post { measureAndLayout() }
25
++ // A posted layout runs after the frame being prepared is drawn, so a view that changes in a
26
++ // mount would show unlaid-out content for a frame. The pre-draw listener lays it out before
27
++ // that frame instead; the post covers a request that no frame follows.
28
++ isLayoutScheduled = true
29
++ OneShotPreDrawListener.add(this) { runScheduledLayout() }
30
++ post { runScheduledLayout() }
31
++ }
32
++ }
33
++
34
++ private fun runScheduledLayout() {
35
++ if (!isLayoutScheduled) {
36
++ return
37
+ }
38
++ isLayoutScheduled = false
39
++ measureAndLayout()
40
+ }
41
+
42
+ override fun forceLayout() {
pnpm-lock.yaml
+12
-11
@@ -177,6 +177,7 @@ patchedDependencies:
177
alchemy@2.0.0-beta.80: bea1b6c0c0b23157fd5f439a1d7feff430f28ac1621ba135d8a13eeec60ccacd
178
dbus-next@0.10.2: cfff57561b0ee59b5addb3b2e6c6f20906e967507a530ab67e8db8108e520ba4
179
expo-audio@58.0.9: 2c2f8c73a23d48804c8b537b8cd73c25eb331aa47d82eaa481c6766cb81e5add
180
+ expo-modules-core@58.0.22: f0b0fd100550ed76e5c25b4d13eb7c9ff62825f8f197c53edf7bf447c50c9fb7
181
expo-network@58.0.3: cd09b6d1744dde4efa081b5619ebcff38877d98f7502a51cab121629dece8237
182
expo-sharing@58.0.19: ad248759641ddd71b8331c09dbb3b18c8a551785f2df507533805babd3c0c124
183
expo-widgets@58.0.20: 8623cb034b720c5ef2da8012c765805a7298909bd92eaf8381f64dbde41b77dd
@@ -375,7 +376,7 @@ importers:
376
version: 7.5.1(react-native@0.88.0(@babel/core@7.29.7)(@react-native/metro-config@0.88.0(@babel/core@7.29.7)(bufferutil@4.1.0)(utf-8-validate@6.0.6))(@types/react@19.3.0)(bufferutil@4.1.0)(react@19.3.0)(utf-8-validate@6.0.6))(react@19.3.0)
377
'@react-navigation/native-stack':
378
specifier: 7.21.0
378
- version: 7.21.0(patch_hash=caae6552051bce91a85f567f3a08f9c8d25ce4c53f65a9391a67f016bb1d798e)(f7bd434a41a50f5d33209f0baf5b709c)
379
+ version: 7.21.0(patch_hash=caae6552051bce91a85f567f3a08f9c8d25ce4c53f65a9391a67f016bb1d798e)(6f7595467acac269803072e24b2c2fee)
380
'@shikijs/core':
381
specifier: 4.2.0
382
version: 4.2.0
@@ -587,8 +588,8 @@ importers:
588
specifier: ~5.10.1
589
version: 5.10.1(react-native@0.88.0(@babel/core@7.29.7)(@react-native/metro-config@0.88.0(@babel/core@7.29.7)(bufferutil@4.1.0)(utf-8-validate@6.0.6))(@types/react@19.3.0)(bufferutil@4.1.0)(react@19.3.0)(utf-8-validate@6.0.6))(react@19.3.0)
590
react-native-screens:
590
- specifier: file:deps/react-native-screens-5.0.0-t3.27.tgz
591
- version: file:apps/mobile/deps/react-native-screens-5.0.0-t3.27.tgz(react-native@0.88.0(@babel/core@7.29.7)(@react-native/metro-config@0.88.0(@babel/core@7.29.7)(bufferutil@4.1.0)(utf-8-validate@6.0.6))(@types/react@19.3.0)(bufferutil@4.1.0)(react@19.3.0)(utf-8-validate@6.0.6))(react@19.3.0)
591
+ specifier: file:deps/react-native-screens-5.0.0-t3.29.tgz
592
+ version: file:apps/mobile/deps/react-native-screens-5.0.0-t3.29.tgz(react-native@0.88.0(@babel/core@7.29.7)(@react-native/metro-config@0.88.0(@babel/core@7.29.7)(bufferutil@4.1.0)(utf-8-validate@6.0.6))(@types/react@19.3.0)(bufferutil@4.1.0)(react@19.3.0)(utf-8-validate@6.0.6))(react@19.3.0)
593
react-native-shiki-engine:
594
specifier: ^0.3.12
595
version: 0.3.12(react-native@0.88.0(@babel/core@7.29.7)(@react-native/metro-config@0.88.0(@babel/core@7.29.7)(bufferutil@4.1.0)(utf-8-validate@6.0.6))(@types/react@19.3.0)(bufferutil@4.1.0)(react@19.3.0)(utf-8-validate@6.0.6))(react@19.3.0)
@@ -11258,9 +11259,9 @@ packages:
11259
react: '*'
11260
react-native: '*'
11261
11261
- react-native-screens@file:apps/mobile/deps/react-native-screens-5.0.0-t3.27.tgz:
11262
- resolution: {integrity: sha512-krNMVmduM2fXeJYveadSz6NkYI/AFN3hAAirjk42Z9wkBrPtuhmcp3E2+Me95Xdj5LBL3G3dgltUjo5vYeEtLw==, tarball: file:apps/mobile/deps/react-native-screens-5.0.0-t3.27.tgz}
11263
- version: 5.0.0-t3.27
11262
+ react-native-screens@file:apps/mobile/deps/react-native-screens-5.0.0-t3.29.tgz:
11263
+ resolution: {integrity: sha512-Y5gaQmd/p1SOeCh7Esyaj1DEycDJ7XFNUdXS1ZDOsuwF5yK1h8yu4H4tCw6mKDrSVV8bNPBYhf4qs5/AaNe3zQ==, tarball: file:apps/mobile/deps/react-native-screens-5.0.0-t3.29.tgz}
11264
+ version: 5.0.0-t3.29
11265
peerDependencies:
11266
react: '*'
11267
react-native: '*'
@@ -16464,7 +16465,7 @@ snapshots:
16465
optionalDependencies:
16466
'@react-native-masked-view/masked-view': 0.3.2(react-native@0.88.0(@babel/core@7.29.7)(@react-native/metro-config@0.88.0(@babel/core@7.29.7)(bufferutil@4.1.0)(utf-8-validate@6.0.6))(@types/react@19.3.0)(bufferutil@4.1.0)(react@19.3.0)(utf-8-validate@6.0.6))(react@19.3.0)
16467
16467
- '@react-navigation/native-stack@7.21.0(patch_hash=caae6552051bce91a85f567f3a08f9c8d25ce4c53f65a9391a67f016bb1d798e)(f7bd434a41a50f5d33209f0baf5b709c)':
16468
+ '@react-navigation/native-stack@7.21.0(patch_hash=caae6552051bce91a85f567f3a08f9c8d25ce4c53f65a9391a67f016bb1d798e)(6f7595467acac269803072e24b2c2fee)':
16469
dependencies:
16470
'@react-navigation/elements': 2.9.45(da16e244bd876bd7d4e1e8899c8eabfd)
16471
'@react-navigation/native': 7.5.1(react-native@0.88.0(@babel/core@7.29.7)(@react-native/metro-config@0.88.0(@babel/core@7.29.7)(bufferutil@4.1.0)(utf-8-validate@6.0.6))(@types/react@19.3.0)(bufferutil@4.1.0)(react@19.3.0)(utf-8-validate@6.0.6))(react@19.3.0)
@@ -16472,7 +16473,7 @@ snapshots:
16473
react: 19.3.0
16474
react-native: 0.88.0(@babel/core@7.29.7)(@react-native/metro-config@0.88.0(@babel/core@7.29.7)(bufferutil@4.1.0)(utf-8-validate@6.0.6))(@types/react@19.3.0)(bufferutil@4.1.0)(react@19.3.0)(utf-8-validate@6.0.6)
16475
react-native-safe-area-context: 5.10.1(react-native@0.88.0(@babel/core@7.29.7)(@react-native/metro-config@0.88.0(@babel/core@7.29.7)(bufferutil@4.1.0)(utf-8-validate@6.0.6))(@types/react@19.3.0)(bufferutil@4.1.0)(react@19.3.0)(utf-8-validate@6.0.6))(react@19.3.0)
16475
- react-native-screens: file:apps/mobile/deps/react-native-screens-5.0.0-t3.27.tgz(react-native@0.88.0(@babel/core@7.29.7)(@react-native/metro-config@0.88.0(@babel/core@7.29.7)(bufferutil@4.1.0)(utf-8-validate@6.0.6))(@types/react@19.3.0)(bufferutil@4.1.0)(react@19.3.0)(utf-8-validate@6.0.6))(react@19.3.0)
16476
+ react-native-screens: file:apps/mobile/deps/react-native-screens-5.0.0-t3.29.tgz(react-native@0.88.0(@babel/core@7.29.7)(@react-native/metro-config@0.88.0(@babel/core@7.29.7)(bufferutil@4.1.0)(utf-8-validate@6.0.6))(@types/react@19.3.0)(bufferutil@4.1.0)(react@19.3.0)(utf-8-validate@6.0.6))(react@19.3.0)
16477
sf-symbols-typescript: 2.2.0
16478
warn-once: 0.1.1
16479
transitivePeerDependencies:
@@ -19761,7 +19762,7 @@ snapshots:
19762
- supports-color
19763
- typescript
19764
19764
- expo-modules-core@58.0.22(react-native-worklets@0.13.0(@babel/core@7.29.7)(@react-native/metro-config@0.88.0(@babel/core@7.29.7)(bufferutil@4.1.0)(utf-8-validate@6.0.6))(react-native@0.88.0(@babel/core@7.29.7)(@react-native/metro-config@0.88.0(@babel/core@7.29.7)(bufferutil@4.1.0)(utf-8-validate@6.0.6))(@types/react@19.3.0)(bufferutil@4.1.0)(react@19.3.0)(utf-8-validate@6.0.6))(react@19.3.0))(react-native@0.88.0(@babel/core@7.29.7)(@react-native/metro-config@0.88.0(@babel/core@7.29.7)(bufferutil@4.1.0)(utf-8-validate@6.0.6))(@types/react@19.3.0)(bufferutil@4.1.0)(react@19.3.0)(utf-8-validate@6.0.6))(react@19.3.0):
19765
+ expo-modules-core@58.0.22(patch_hash=f0b0fd100550ed76e5c25b4d13eb7c9ff62825f8f197c53edf7bf447c50c9fb7)(react-native-worklets@0.13.0(@babel/core@7.29.7)(@react-native/metro-config@0.88.0(@babel/core@7.29.7)(bufferutil@4.1.0)(utf-8-validate@6.0.6))(react-native@0.88.0(@babel/core@7.29.7)(@react-native/metro-config@0.88.0(@babel/core@7.29.7)(bufferutil@4.1.0)(utf-8-validate@6.0.6))(@types/react@19.3.0)(bufferutil@4.1.0)(react@19.3.0)(utf-8-validate@6.0.6))(react@19.3.0))(react-native@0.88.0(@babel/core@7.29.7)(@react-native/metro-config@0.88.0(@babel/core@7.29.7)(bufferutil@4.1.0)(utf-8-validate@6.0.6))(@types/react@19.3.0)(bufferutil@4.1.0)(react@19.3.0)(utf-8-validate@6.0.6))(react@19.3.0):
19766
dependencies:
19767
expo-modules-jsi: 58.0.15(react-native@0.88.0(@babel/core@7.29.7)(@react-native/metro-config@0.88.0(@babel/core@7.29.7)(bufferutil@4.1.0)(utf-8-validate@6.0.6))(@types/react@19.3.0)(bufferutil@4.1.0)(react@19.3.0)(utf-8-validate@6.0.6))
19768
expo-modules-macros: 0.20.0
@@ -19942,7 +19943,7 @@ snapshots:
19943
expo-font: 58.0.8(expo@58.0.14)(react-native@0.88.0(@babel/core@7.29.7)(@react-native/metro-config@0.88.0(@babel/core@7.29.7)(bufferutil@4.1.0)(utf-8-validate@6.0.6))(@types/react@19.3.0)(bufferutil@4.1.0)(react@19.3.0)(utf-8-validate@6.0.6))(react@19.3.0)
19944
expo-keep-awake: 58.0.3(expo@58.0.14)(react@19.3.0)
19945
expo-modules-autolinking: 58.0.13(typescript@7.0.2)
19945
- expo-modules-core: 58.0.22(react-native-worklets@0.13.0(@babel/core@7.29.7)(@react-native/metro-config@0.88.0(@babel/core@7.29.7)(bufferutil@4.1.0)(utf-8-validate@6.0.6))(react-native@0.88.0(@babel/core@7.29.7)(@react-native/metro-config@0.88.0(@babel/core@7.29.7)(bufferutil@4.1.0)(utf-8-validate@6.0.6))(@types/react@19.3.0)(bufferutil@4.1.0)(react@19.3.0)(utf-8-validate@6.0.6))(react@19.3.0))(react-native@0.88.0(@babel/core@7.29.7)(@react-native/metro-config@0.88.0(@babel/core@7.29.7)(bufferutil@4.1.0)(utf-8-validate@6.0.6))(@types/react@19.3.0)(bufferutil@4.1.0)(react@19.3.0)(utf-8-validate@6.0.6))(react@19.3.0)
19946
+ expo-modules-core: 58.0.22(patch_hash=f0b0fd100550ed76e5c25b4d13eb7c9ff62825f8f197c53edf7bf447c50c9fb7)(react-native-worklets@0.13.0(@babel/core@7.29.7)(@react-native/metro-config@0.88.0(@babel/core@7.29.7)(bufferutil@4.1.0)(utf-8-validate@6.0.6))(react-native@0.88.0(@babel/core@7.29.7)(@react-native/metro-config@0.88.0(@babel/core@7.29.7)(bufferutil@4.1.0)(utf-8-validate@6.0.6))(@types/react@19.3.0)(bufferutil@4.1.0)(react@19.3.0)(utf-8-validate@6.0.6))(react@19.3.0))(react-native@0.88.0(@babel/core@7.29.7)(@react-native/metro-config@0.88.0(@babel/core@7.29.7)(bufferutil@4.1.0)(utf-8-validate@6.0.6))(@types/react@19.3.0)(bufferutil@4.1.0)(react@19.3.0)(utf-8-validate@6.0.6))(react@19.3.0)
19947
pretty-format: 29.7.0
19948
react: 19.3.0
19949
react-native: 0.88.0(@babel/core@7.29.7)(@react-native/metro-config@0.88.0(@babel/core@7.29.7)(bufferutil@4.1.0)(utf-8-validate@6.0.6))(@types/react@19.3.0)(bufferutil@4.1.0)(react@19.3.0)(utf-8-validate@6.0.6)
@@ -22639,7 +22640,7 @@ snapshots:
22640
react: 19.3.0
22641
react-native: 0.88.0(@babel/core@7.29.7)(@react-native/metro-config@0.88.0(@babel/core@7.29.7)(bufferutil@4.1.0)(utf-8-validate@6.0.6))(@types/react@19.3.0)(bufferutil@4.1.0)(react@19.3.0)(utf-8-validate@6.0.6)
22642
22642
- react-native-screens@file:apps/mobile/deps/react-native-screens-5.0.0-t3.27.tgz(react-native@0.88.0(@babel/core@7.29.7)(@react-native/metro-config@0.88.0(@babel/core@7.29.7)(bufferutil@4.1.0)(utf-8-validate@6.0.6))(@types/react@19.3.0)(bufferutil@4.1.0)(react@19.3.0)(utf-8-validate@6.0.6))(react@19.3.0):
22643
+ react-native-screens@file:apps/mobile/deps/react-native-screens-5.0.0-t3.29.tgz(react-native@0.88.0(@babel/core@7.29.7)(@react-native/metro-config@0.88.0(@babel/core@7.29.7)(bufferutil@4.1.0)(utf-8-validate@6.0.6))(@types/react@19.3.0)(bufferutil@4.1.0)(react@19.3.0)(utf-8-validate@6.0.6))(react@19.3.0):
22644
dependencies:
22645
react: 19.3.0
22646
react-freeze: 1.0.4(react@19.3.0)
pnpm-workspace.yaml
+3
@@ -345,6 +345,9 @@ patchedDependencies:
345
# Android: a nested WebView hands a vertical drag to its scrolling parent at the page's edge.
346
react-native-webview@14.0.1: patches/react-native-webview@14.0.1.patch
347
"@expo/ui@58.0.20": patches/@expo__ui@58.0.20.patch
348
+ # Android: a Compose host that requests layout in a mount (a new screen's app bar) is laid out
349
+ # before that frame is drawn, instead of a frame later.
350
+ expo-modules-core@58.0.22: patches/expo-modules-core@58.0.22.patch
351
# Android: Maven-resolved gradle plugins (expo-widgets) have no sourceDir; without this
352
# skip, the fingerprint silently drops every Expo native module and OTAs reach stale binaries.
353
"@expo/fingerprint@0.21.5": patches/@expo__fingerprint@0.21.5.patch