fix(android): foldable sidebar and layout fixes #21071
main fromrefs/pull/21071/head·merged by t3dotgg(GitHub profile, opens in a new tab) View on GitHubThe Android foldable fixes were spread over four small PRs. A test build with all four found three more problems:
- Sidebar taps did nothing after launch. They started to work only after a trip to Settings and back.
- The Nightly badge sat under the new PR button in the sidebar header.
- Wide layouts did not have the reading width from #19424.
This PR combines the four PRs and fixes the three problems.
From the original PRs
- #21049: the split-view rail is gone. One header button switches the sidebar between threads and PRs. Rows from read-only or reconnecting environments line up with the others.
- #21044: in split view, a thread or PR opens with no slide-in, because it replaces the detail pane.
- #21043: sidebar threads open while Settings or New task is open.
- #21041: environment switches toggle instead of opening the row.
New in this PR
- Sidebar taps before the first navigation. The sidebar's
useNavigation()returns the navigation container. The container's owngetState()stays empty until the first navigation action, because React Navigation does not report the root navigator's first state up to the container. So the reset from #21043 found no state and stopped early. It now readsgetRootState(), the same as React Navigation'sresetRoot. A new test fails without this change. - Badge fit. A 280dp sidebar does not have space for the full brand and three buttons.
CompactBrandTitle fitmeasures the available space and hides the stage badge when the badge does not fit. The badge shows again when there is space. Only the two Android list headers usefit. - Reading width. On Android, the thread feed, the composer, and the full-width thread list stop at 640dp and stay centered. This part comes from #19424 without the other layout changes in that PR.
| Before | After | |
|---|---|---|
| Rail | ![]() | ![]() |
| Rows | ![]() | ![]() |
Thread open in split view, before (left) and after (right):

The images come from the original PRs. The three new fixes do not have screenshots yet. The three problems were found on a device with an earlier build. This build includes the fixes: arm64 release APK (preview variant, OTA updates off).
Checks: mobile typecheck passes. android-workspace-navigation, layout, and android-workspace-navigation-colors tests pass (72). Lint on the changed files has no errors. The arm64 release build succeeds.
Created with Claude Opus 5.5 in Claude Code.
🤖 Generated with Claude Code
- 1
github-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:trusted
juliusmarminge added labelsmacroscope-review
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:L
github-actions[bot](GitHub profile, opens in a new tab) added labels📱 Native Change
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:
81e1bc9f-542e-4d55-b927-5d1f51344586
📥 Commits
-
Reviewing files that changed from the base of the PR and between 16918b57d6754d6f145e9b6367c825aa31a740da and 77a2e69107159c77e44c507c9ed046bbfaa3b8ed.
📒 Files selected for processing: 22
-
apps/mobile/modules/t3-native-controls/android/src/main/java/expo/modules/t3nativecontrols/T3WorkspaceNavigationModule.ktapps/mobile/src/Stack.tsxapps/mobile/src/components/CompactBrandTitle.tsxapps/mobile/src/components/ui/NativeSwitch.android.tsxapps/mobile/src/features/home/HomeScreen.tsxapps/mobile/src/features/home/ThreadListToolbar.tsxapps/mobile/src/features/layout/AdaptiveWorkspaceLayout.tsxapps/mobile/src/features/pull-requests/PullRequestToolbar.android.tsxapps/mobile/src/features/threads/ThreadDetailScreen.tsxapps/mobile/src/features/threads/thread-list-v2-items.tsxapps/mobile/src/features/workspace/AndroidWorkspaceNavigation.android.tsxapps/mobile/src/features/workspace/AndroidWorkspaceNavigation.tsxapps/mobile/src/features/workspace/AndroidWorkspaceSidebar.android.tsxapps/mobile/src/features/workspace/android-workspace-navigation-colors.test.tsapps/mobile/src/features/workspace/android-workspace-navigation-colors.tsapps/mobile/src/features/workspace/useAndroidWorkspaceNavigation.tsapps/mobile/src/features/workspace/useAndroidWorkspaceSelection.tsapps/mobile/src/lib/android-workspace-navigation.test.tsapps/mobile/src/lib/android-workspace-navigation.tsapps/mobile/src/lib/layout.test.tsapps/mobile/src/lib/layout.tsapps/mobile/src/native/useOpenPullRequest.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
-
📝 Walkthrough
-
This change removes Android workspace navigation-rail rendering and keeps bottom navigation. It updates workspace resets, split-view animation, hinge sizing, and reading widths. It also changes Android toolbar navigation and title fitting, switch touch handling, and non-operable thread-row rendering.
Changes: Workspace navigation and layout
Layer / File(s) Summary Bottom navigation replaces the rail
apps/mobile/modules/t3-native-controls/android/src/main/java/expo/modules/t3nativecontrols/T3WorkspaceNavigationModule.kt,apps/mobile/src/features/workspace/AndroidWorkspaceNavigation*,apps/mobile/src/features/workspace/android-workspace-navigation-colors*The native view and Android workspace navigation no longer support a rail. They render bottom navigation, and navigation colors and tests use the bottom-navigation configuration. Workspace resets and route animation
apps/mobile/src/lib/android-workspace-navigation*,apps/mobile/src/features/workspace/useAndroidWorkspaceNavigation.ts,apps/mobile/src/features/workspace/useAndroidWorkspaceSelection.ts,apps/mobile/src/native/useOpenPullRequest.ts,apps/mobile/src/features/workspace/AndroidWorkspaceNavigation.android.tsx,apps/mobile/src/Stack.tsxAndroid reset callers use resetAndroidWorkspace, which targets the root navigation state when available. In split view, Thread and PullRequest routes use"none"for animation.Hinge alignment and viewport sizing
apps/mobile/src/features/layout/AdaptiveWorkspaceLayout.tsx,apps/mobile/src/lib/layout*Pane and inspector sizing no longer subtracts rail width. Hinge alignment uses the hinge position directly, and layout tests use the revised pane dimensions. Reading widths and workspace toolbars
apps/mobile/src/lib/layout.ts,apps/mobile/src/features/home/HomeScreen.tsx,apps/mobile/src/features/threads/ThreadDetailScreen.tsx,apps/mobile/src/components/CompactBrandTitle.tsx,apps/mobile/src/features/home/ThreadListToolbar.tsx,apps/mobile/src/features/pull-requests/PullRequestToolbar.android.tsx,apps/mobile/src/features/workspace/AndroidWorkspaceSidebar.android.tsxHome and thread content use the Android reading-width limit. Workspace toolbars add conditional navigation actions, and compact brand titles can hide the stage badge when the title does not fit. Android switch touch handling
Layer / File(s) Summary Pressable switch control
apps/mobile/src/components/ui/NativeSwitch.android.tsxA React Native Pressablehandles switch touch input and disabled state. The nested Compose view does not handle pointer events or accessibility descendants.Non-operable thread row rendering
Layer / File(s) Summary Apply swipe-container style
apps/mobile/src/features/threads/thread-list-v2-items.tsxThe non-operable thread row is wrapped in a Viewthat appliesrowAppearance.swipeContainerStyle.Priority: ➖ Normal
Estimated code review effort: 3 (Moderate) | ~25 minutes
Change: Bug fix
Possibly related PRs
- pingdotgg/t3code#19424: Both PRs change Android foldable workspace layout, rail sizing, and the 640dp reading width; this PR retains bottom navigation.
- pingdotgg/t3code#18372: This PR revises Android workspace navigation and reset behavior introduced by that PR.
- pingdotgg/t3code#19987: Both PRs change Android workspace navigation, rail sizing, and adaptive layout behavior.
Suggested reviewers:
pixpmusic,juliusmarminge
Merge Risk: ⚪ Minimal · up to
77a2e-
The Android foldable sidebar and layout changes show no remaining concrete merge-blocking risk. The reported concern about padding hiding sidebar thread rows does not apply to the code.
Pre-merge checks:
4-
Check name Status Explanation Title check The title clearly identifies the Android foldable sidebar and layout fixes, which are the main changes in the pull request. Description check The description explains the problems, changes, scope, verification results, and visual evidence. It also identifies the related earlier pull requests and states the remaining screenshot limitation fo… 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 explains the problems, changes, scope, verification results, and visual evidence. It also identifies the related earlier pull requests and states the remaining screenshot limitation for the three new fixes.
-
✨ 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
-
t3dotgg(GitHub profile, opens in a new tab) closed this
Sign in to join this conversation.




Approvability#
Verdict: Needs Human Approval
Macroscope's review found this PR requires human approval — This PR changes the default Android workspace navigation model and native switch interaction, while also altering foldable pane sizing, route animations, and reading widths across multiple production paths. The breadth of these user-visible Android behavior changes warrants human review.
You can add or adjust custom eligibility rules. [Learn more](https://docs.macroscope.com/approvability#example-custom-eligibility-rules).