fix(android): navigation chrome takes less of the screen #20813
main fromrefs/pull/20813/head·merged by juliusmarminge View on GitHubAndroid's navigation chrome took a large share of the screen. On phones, a two-tab bottom bar sat under a floating Filter button stacked on a floating New thread button, all over the thread list. Settings was a header gear. In split view, #21071 replaced the old 80dp rail with threads/PRs toggle buttons in the sidebar header, which left one more button in a crowded 280dp header.
Phones: the bottom bar has three tabs: Chats, PRs, and Settings. Search and Filter sit in the list header, and Filter stays visible while searching. New thread is the only floating button, at Material's 16dp corner margin.
Split view: a 72dp navigation rail shows the same three tabs as icons, with a menu button and New thread at the top. It replaces #21071's sidebar header toggles, and the sidebar no longer has its own New thread button. The menu button widens the rail to 240dp over the list, with labels and a scrim, without reflowing the panes. Back or a tap outside closes it.
The rail is one Compose surface that widens in place. Material's ModalWideNavigationRail moves its destinations into a separate dialog window when it expands, which blanked them for a few frames and laid them out at a different height, so they jumped. Here the destination icons stay on the same pixels through the whole animation; the selection indicator and New thread button stretch from their collapsed shape into the expanded one, and the labels fade in once there is room. While a label is hidden, the item carries the destination's name for accessibility. The collapsed rail is 72dp rather than Material's 96dp, which leaves the thread list more room; items keep 48dp touch targets.
Every Android header uses the list toolbar's height, so the rail's menu button, the sidebar header, Settings, and the detail pane's title sit on one line. The detail pane and Settings used to be 64dp app bars and sat lower.
Before, at normal speed: the icons blank out while the rail opens, shift as it closes, and the New thread label clips.
After, at 5× animation scale:
| Collapsed | Open |
|---|---|
![]() | ![]() |
Settings tab: opens Settings as a full workspace page from either surface. It drops stale chat and PR history, so Home is the only route underneath. Nested settings pages keep normal Back and keep Settings selected. Choosing a list tab returns to the list.
Tab switches swap in one frame. Chats and PRs each mount on first visit and then stay mounted while hidden, behind React's Activity, so switching back shows the list as it was left instead of an empty list that fills in. Hidden tabs run no effects, so their search, Back, and keyboard handlers stay off. Settings swaps without an animation, also in one frame in split view (below). An earlier version used Material's fade-through here; with both the sidebar and the detail pane fading out to a blank screen and back, it read as a flash on every tap.
| Chats → PRs, consecutive frames | |
|---|---|
| Before | ![]() |
| After | ![]() |
Tab switches before, at normal speed:
After, at normal speed:
The PR header no longer shifts when its tab returns. It was the Compose app bar with React Native views hosted inside. A hidden tab lays out at zero size, so each time PRs came back Compose re-measured over several frames: the filter button was missing, Search jumped right, then the title ran over it, for about 330ms. Hiding the tab also ran the filter menu's cleanup, which dropped the button until the list republished it. The PR header now draws the same plain row as the Chats header, and the list publishes its menu in a layout effect without clearing it, so switching tabs leaves the sidebar header untouched.
The connection status's 800ms delay is now shared across headers. A header that mounts while the status already shows (a tab's first visit, or after folding) shows it at once, instead of the brand for 800ms and then a fade.
| Returning to PRs, sidebar header, consecutive frames | |
|---|---|
| Before | ![]() |
| After | ![]() |
| After, first visit after unfolding | ![]() |
PR header before, at normal speed:
After, at normal speed:
A returning tab shows the current connection status, with no scrollbar flash. Each header subscribed to the connection state itself, and a hidden tab drops its subscriptions. When the status changed while PRs was hidden (here, going offline), PRs came back showing the old status for 630ms. The status and its 800ms delay now come from one provider above the tabs, and headers read it from context, which still reaches a hidden tab. The PR list also flashed Android's scrollbar for about 1.7s on every return, because Android shows a scroll view's scrollbar whenever it becomes visible. It now hides the indicator on Android, like the thread list.
| Status changes while PRs is hidden, then PRs returns | |
|---|---|
| Before | ![]() |
| After | ![]() |
Before, at normal speed:
After, at normal speed:
Settings opens and closes in one frame in split view. Settings is a native screen over the workspace, so React and react-native-screens each did part of the switch, on different frames. Opening it, React hid the sidebar and widened the old detail pane; Screens attached Settings a frame or more later, kept the old screen drawn over it while its 20ms none tween ran, and the Compose header measured last. Closing it, the sidebar came back beside Settings, and then the old pane was laid out at the wide size for a frame.
This needs react-native-screens 5.0.0-t3.29 and a patch to expo-modules-core, both native, so it needs a new build rather than an OTA. The legacy stack now applies screen changes in the Fabric mount that made them (3c7c3b1), draws a screen leaving with none through an empty clip so it is gone at once while its tween still finishes (c719481), and, when a mount both resizes a container and changes its screens, lays the screens out after the change, so a screen it detaches is never re-laid out at a size it is not shown at (cd2a327, e99a726; t3.28 applied the change early instead, which attached the new screen mid-mount and drew its Compose header a frame late). The expo-modules-core patch lays out a Compose host from a pre-draw listener as well as its posted runnable, so a header in a new screen is laid out before the frame it first appears in. In the app, the sidebar leaves the row under Settings at its own size instead of going to display: none, so its lists never lay out at zero size; the Settings root hides the native header from its first layout; and the Compose app bar has a fixed height, so a page lays out under it at once instead of first at the top.
| Opening Settings, consecutive frames | |
|---|---|
| Before | ![]() |
| After | ![]() |
| Closing Settings, consecutive frames | |
|---|---|
| Before | ![]() |
| After | ![]() |
| Settings header, consecutive frames | |
|---|---|
| t3.28 | ![]() |
| After | ![]() |
PR filters: the PR header's filter button opens the full filter menu. The button is filled while any filter, a non-default sort, or a selected environment is active, and "Reset filters" clears the environment too. The quick pills stay under the header, minus the pill that duplicated the header button. The PR header draws the same row as the Chats header, so the title, Search, and Filter stay in place when switching tabs.
iOS is unchanged, apart from the shared connection status delay: an iOS header that mounts during an outage also shows the status at once.
Split out of #19987 by @PixPMusic, and rebuilt. The original added Settings to the tab reducer and synced it from navigation state in a layout effect. Here, Settings is derived from the root stack: it's selected when its screen is on top. The original also published the PR filter menu through an app-root context that re-registered on every PR list render. The menu now comes from a context scoped to the PR surfaces, and the React Compiler memoizes it on the filter values. The original's rail was Material's ModalWideNavigationRail plus glue to hide its dialog handoff; that is replaced by the single in-place surface described above.
Hide-on-scroll from #19987 is not in this PR; it will follow separately.
Merged with main after #21071. That PR removed the rail; this branch keeps it, so the merge restores the rail in the layout, native module, navigation colors, and hinge alignment, and drops the sidebar header toggles. Everything else from #21071 stays: the root-state reset for sidebar taps before the first navigation, the fitted brand title, the 640dp reading width, and the no-slide detail swap in split view.
Tests: two tests in android-workspace-navigation.test.ts cover the Settings tab's navigation outcome. They check that opening Settings drops stale history and keeps Home's route key, that Back returns to Home, that Settings stays selected under a nested page, and that choosing a list tab returns to Home. They replace the original's five tests (three Settings tests, a reducer test that couldn't fail, and a per-table string helper test). Each was spot-checked to fail when the behavior is broken.
Verification: these pass:
- the targeted tests (4 files, 37 tests; after the tab change, the workspace and navigation tests: 36; after the merge, the navigation, layout, and colors tests: 74),
- the mobile typecheck,
- lint and format on changed files,
- the dependency-graph check,
- native static checks (swiftlint, ktlint, detekt).
Checked on emulators (Pixel 10 Pro Fold folded as the phone, Pixel Tablet for split view, Android 17), against a backend seeded with real threads:
- Phone: three tabs; Search and Filter in the header, no gear; one FAB; Filter usable while searching.
- Settings tab: appears without an animation, has no Back arrow at its root, keeps Settings selected on nested pages, and choosing Chats from a nested page goes straight to Home.
- Split view: the rail widens over the list without reflowing the panes. Measured on a 5× slowed recording, the destination icons move 0px across all 315 frames of an open and close, and never disappear. The New thread label fades before the button narrows, so it is never clipped. Back, a tap on the scrim, and choosing a tab each close it.
- Headers: the rail's menu, the sidebar header, and the Threads, Pull requests, and Settings titles share one center line (within 1px) on the Fold.
- Split view: Settings is full width, the rail stays, and choosing Chats brings the sidebar back with no slide.
- Tab switches, measured frame by frame at normal speed on the unfolded Fold: Chats ↔ PRs changes in one frame with no blank frames, and the PR list is populated on the first frame after its first visit. Folded, the bottom bar's Chats, PRs, and Settings each switch in one frame.
- Split view Settings, frame by frame on the unfolded Fold: opening it from Chats, PRs, or an open thread, and closing it to Chats or PRs, each change in one frame. The old screen never shows over Settings, the sidebar is never blank or beside Settings, and the empty detail pane returns at its width.
- After the Screens change: folded, a thread push and Back, the Settings tab, and a nested Settings page push and Back all work; unfolded, the same nested push and Back, and unfolding while in Settings.
- Settings' header has its title and filter in the first frame it appears, opening from Chats, PRs, or an open thread, and on the folded phone from the bottom bar.
- The rail's and bottom bar's selection indicator moves to the new tab one frame after the page changes (the Compose bar recomposes on its next frame). Not changed here.
- PR header, measured frame by frame: across four returns to PRs on the unfolded Fold, the sidebar header's title, Search, and Filter never change; only the detail title does. The same holds folded across Chats ↔ PRs. With an environment reconnecting, the first PR visit (folded, and again after unfolding) shows the status at once with no brand frame. PR search opens with Filter still trailing, and the filter menu opens anchored to its button.
- Connection status: after it changes while PRs is hidden (going offline, then reconnecting), PRs shows the new status on its first frame back, unfolded and folded. No scrollbar shows when PRs returns.
- PR header: the filter icon fills for an environment or a non-default sort; Reset clears the environment and empties the icon. The Chats and PRs headers sit at the same height.
- After merging main on October 19 (with main's FAB spacing and sidebar memoization): on the unfolded Fold, Chats, PRs, and Settings switch from the rail, and Settings opens and closes in one frame with its header complete. Folded, the bottom bar has Chats, PRs, and Settings, and New thread sits 16dp from the edge above the bar.
- Collapsed rail shows icons only. Accessibility names (Chats, Pull Requests, Settings) and the selected state hold in both states. At Android's 2.0× font scale the open rail's labels fit and the collapsed rail is unchanged.
🤖 Generated with Claude Code
- 1
github-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:trusted
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:XL
github-actions[bot](GitHub profile, opens in a new tab) added labels📱 Native Change
juliusmarminge added labelsmacroscope-review
github-actions[bot](GitHub profile, opens in a new tab) removed labelssize:XL
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:XXL
Batch
sidebar-threads-17: assessed for maintainer takeover from headless Linux; no changes pushed.The current body still records the split-view Settings transition defect: approximately 200 ms with a blank sidebar strip on entry and approximately 130 ms with Settings beside the sidebar on exit. Completing this responsibly requires a current-main Android build and recordings on compact and split/foldable layouts: Settings root/nested Back and tab return; rail open/close, scrim and hardware Back; keyboard/safe-area/hinge behavior; Chats/PR tab preservation; Search plus Filter and Reset (including environment); accessibility and large font scale. Native Compose timing cannot be verified by TypeScript tests or a web preview. Blocked for an Android-capable maintainer; keep the draft until the transition and device evidence are complete.
- @@ -100,3 +103,5 @@100103 break;101104 case "reset":102105 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);
🟡 Medium
pull-requests/PullRequestListFilters.tsx:107Resetting while a specific environment is selected switches to All environments and immediately reapplies the previously saved All-environments controls, so old filters or sorting remain active.
onChange(DEFAULT_PR_LIST_CONTROLS)only resets the currently selected environment beforeonEnvironmentChange(null)switches destinations; reset the null-environment controls as well.🚀 Reply "fix it for me" or copy this AI Prompt for your agent:
In file @apps/mobile/src/features/pull-requests/PullRequestListFilters.tsx around line 107: Resetting while a specific environment is selected switches to All environments and immediately reapplies the previously saved All-environments controls, so old filters or sorting remain active. `onChange(DEFAULT_PR_LIST_CONTROLS)` only resets the currently selected environment before `onEnvironmentChange(null)` switches destinations; reset the null-environment controls as well. Approvability#
Verdict: Needs Human Approval
Macroscope's review found this PR requires human approval — This PR substantially changes default Android navigation and workspace behavior, adding an expandable rail, a Settings destination, persistent tab panes, and shared native layout/dependency changes. An unresolved Medium finding also reports that reset can preserve stale all-environment filters or sorting.
Needs human approval because:
- 1 blocking correctness issue found at or above your repo's Minimum Blocking Severity
No actionable comments were generated in the recent review. 🎉
ℹ️ Recent review info
-
⚙️ Run configuration
-
- Configuration used: Path: .coderabbit.config.ts
- Review profile: CHILL
- Plan: Team
- Run ID:
8f552794-4a98-4496-98c2-16360aeb90c2
📥 Commits
-
Reviewing files that changed from the base of the PR and between fb990765a49414a5bfbdc73365455fc8b5fbe691 and 11851374b3ca5cd47c1a949c4a058b26ae612cac.
⛔ Files ignored due to path filters: 1
-
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing: 39
-
apps/mobile/deps/react-native-screens-5.0.0-t3.27.tgzapps/mobile/deps/react-native-screens-5.0.0-t3.29.tgzapps/mobile/modules/t3-native-controls/android/build.gradleapps/mobile/modules/t3-native-controls/android/src/main/java/expo/modules/t3nativecontrols/T3WorkspaceNavigationModule.ktapps/mobile/modules/t3-native-controls/android/src/main/res/drawable/t3_menu.xmlapps/mobile/modules/t3-native-controls/android/src/main/res/drawable/t3_new_thread.xmlapps/mobile/modules/t3-native-controls/android/src/main/res/drawable/t3_settings.xmlapps/mobile/package.jsonapps/mobile/src/Stack.tsxapps/mobile/src/components/ui/NativeAppBar.android.tsxapps/mobile/src/features/home/AndroidHomeFab.android.tsxapps/mobile/src/features/home/HomeHeader.android.tsxapps/mobile/src/features/home/ThreadListToolbar.tsxapps/mobile/src/features/home/WorkspaceConnectionTitle.tsxapps/mobile/src/features/layout/AdaptiveWorkspaceLayout.tsxapps/mobile/src/features/pull-requests/PullRequestFilterMenuContext.tsxapps/mobile/src/features/pull-requests/PullRequestListFilters.tsxapps/mobile/src/features/pull-requests/PullRequestToolbar.android.tsxapps/mobile/src/features/pull-requests/PullRequestsScreen.tsxapps/mobile/src/features/settings/components/SettingsScreen.tsxapps/mobile/src/features/threads/ThreadNavigationSidebar.tsxapps/mobile/src/features/workspace/AndroidWorkspaceNavigation.android.tsxapps/mobile/src/features/workspace/AndroidWorkspaceNavigation.tsxapps/mobile/src/features/workspace/AndroidWorkspaceSettings.tsxapps/mobile/src/features/workspace/AndroidWorkspaceSidebar.android.tsxapps/mobile/src/features/workspace/AndroidWorkspaceTabsProvider.tsxapps/mobile/src/features/workspace/WorkspaceListToolbarRow.tsxapps/mobile/src/features/workspace/WorkspaceRootScreen.android.tsxapps/mobile/src/features/workspace/WorkspaceTabPanes.tsxapps/mobile/src/features/workspace/WorkspaceTabsContext.tsxapps/mobile/src/features/workspace/android-workspace-navigation-colors.test.tsapps/mobile/src/features/workspace/android-workspace-navigation-colors.tsapps/mobile/src/features/workspace/android-workspace-tabs.tsapps/mobile/src/lib/android-workspace-navigation.test.tsapps/mobile/src/lib/layout.test.tsapps/mobile/src/lib/layout.tsdocs/operations/mobile-screens-fork.mdpatches/expo-modules-core@58.0.22.patchpnpm-workspace.yaml
💤 Files with no reviewable changes: 2
-
- apps/mobile/src/features/threads/ThreadNavigationSidebar.tsx
- apps/mobile/src/features/home/HomeHeader.android.tsx
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 4 remain after this review.
-
📝 Walkthrough
-
This pull request adds an expandable Android workspace navigation rail and a top-level Settings destination. It updates split-view layout, workspace tabs, and thread and pull-request toolbars. It also changes Android layout scheduling and toolbar sizing.
Changes: Android workspace navigation
Layer / File(s) Summary Settings routing and root state
apps/mobile/src/features/workspace/android-workspace-tabs.ts,apps/mobile/src/features/workspace/AndroidWorkspaceTabsProvider.tsx,apps/mobile/src/Stack.tsx,apps/mobile/src/features/workspace/AndroidWorkspaceSettings.tsx,apps/mobile/src/features/settings/components/SettingsScreen.tsxAndroid workspace navigation now supports a top-level Settings destination. Root navigation state identifies when Settings is open, and Android Settings uses the workspace layout and root-aware back behavior. Rail navigation and adaptive layout
apps/mobile/modules/t3-native-controls/android/*,apps/mobile/src/features/workspace/AndroidWorkspaceNavigation*,apps/mobile/src/features/layout/AdaptiveWorkspaceLayout.tsx,apps/mobile/src/lib/layout.ts,apps/mobile/src/features/workspace/android-workspace-navigation-colors.ts,apps/mobile/src/components/ui/NativeAppBar.android.tsx,patches/expo-modules-core@58.0.22.patch,pnpm-workspace.yaml,apps/mobile/package.json,docs/operations/mobile-screens-fork.mdThe native navigation view adds an expandable rail, selectable destinations, overlay dismissal, and a New Thread action. Split-view sizing accounts for rail width. Android layout scheduling and toolbar sizing also change, and the T3 Screens fork reference is updated. Workspace panes, toolbars, and filters
apps/mobile/src/features/workspace/WorkspaceTabPanes.tsx,apps/mobile/src/features/workspace/WorkspaceRootScreen.android.tsx,apps/mobile/src/features/workspace/AndroidWorkspaceSidebar.android.tsx,apps/mobile/src/features/home/*,apps/mobile/src/features/pull-requests/*,apps/mobile/src/features/threads/ThreadNavigationSidebar.tsx,apps/mobile/src/features/workspace/WorkspaceTabsContext.tsxWorkspace panes mount on first selection and remain mounted after switching tabs. Thread and pull-request toolbars use shared toolbar and filter-menu components. Pull-request scroll restoration now uses saved offsets instead of anchors. Priority: ➖ Normal
Estimated code review effort: 4 (Complex) | ~60 minutes
Change: Bug fix
Sequence Diagram(s)#
sequenceDiagram actor User participant T3WorkspaceNavigation participant AndroidWorkspaceNavigation participant RootNavigator User->>T3WorkspaceNavigation: Select a rail destination T3WorkspaceNavigation->>AndroidWorkspaceNavigation: Dispatch onTabSelected AndroidWorkspaceNavigation->>RootNavigator: Reset root state for selected tab User->>T3WorkspaceNavigation: Select New Thread T3WorkspaceNavigation->>AndroidWorkspaceNavigation: Dispatch onNewThread AndroidWorkspaceNavigation->>RootNavigator: Navigate to NewTaskSheetPossibly related PRs
- pingdotgg/t3code#19987: Both changes update Android workspace navigation, including the rail, Settings destination, New Thread action, filters, and split-view layout.
Suggested reviewers:
pixpmusic,t3dotgg
Merge Risk: ⚪ Minimal · up to
11851-
This change reworks Android navigation into a bottom bar for phones and an expanding rail for split view. Settings becomes a full workspace page, and list tabs stay mounted between switches. No concrete defect was found in the reviewed changes. It requires a new native build rather than an over-the-air update, and on-device checks of the rail and Settings transitions remain advisable. One known cosmetic issue remains: the selection indicator moves one frame late.
Pre-merge checks:
4-
Check name Status Explanation Title check The title clearly and concisely describes the main Android navigation change: reducing navigation chrome screen usage. Description check The description provides detailed problem context, implementation changes, scope, native dependency impact, screenshots, recordings, tests, emulator verification, and known limitations. It does not us… Linked Issues check Check skipped because no linked issues were found for this pull request. Out of Scope Changes check Check skipped because no linked issues were found for this pull request. Full details: Description check
-
Explanation
The description provides detailed problem context, implementation changes, scope, native dependency impact, screenshots, recordings, tests, emulator verification, and known limitations. It does not use the template headings exactly or provide a distinct approval reference, but it is substantially complete and directly relevant.
-
✨ Finishing Touches
-
📝 Generate docstrings
-
- Commit to this branch
- Create a new PR
🧪 Generate unit tests (beta)
-
- Commit to this branch
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
-
juliusmarminge merged this832dc8f
juliusmarminge closed this
Device verification (Android emulator, EAS): PASS (phone layout, on main 8866e8f) — three bottom tabs Chats/PRs/Settings, Search and Filter in the list header, New thread as the only FAB at 16dp from the edge and tab bar (30px at density 300). Split-view rail not tested: EAS Android AVDs are phone-sized. Evidence:

Sign in to join this conversation.















Thread transfer impact#
✅ Thread transfer remains within every enforced ceiling.
Baseline:
fb99076· PR result:1185137· Source CI: successScenario and decoded snapshot size
10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.
Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed.