Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(mobile): Android fold sidebar drops the nav rail and aligns every row #21049

Closedt3dotgg(GitHub profile, opens in a new tab)wants to merge 1 commit intomain fromfix/mobile-fold-rail-and-row-indentopened View on GitHub

On a Z Fold, the Android split view wasted space and looked off:

  1. A permanent Chats/PRs navigation rail sat to the left of the sidebar.
  2. Some sidebar rows sat 8dp further left than others.

Rail. The rail is gone. The split-view sidebar header now has one button that switches the list between threads and pull requests. It uses the same tab switch as the old rail. Phones keep the bottom bar. This also deletes the rail code from the native navigation view, the colors helper, and the hinge math.

Row indent. Rows for an environment where the client does not have operate scope (read-only, or still reconnecting) skip the swipe wrapper. That wrapper holds the row's 8dp side margin. Those rows now get the same margin.

BeforeAfter
Railbefore: railafter: no rail, PR toggle in header
Rowsbefore: rows misalignedafter: rows aligned

The "before" rail image is from a real Z Fold, with private content blurred. The other images are from a Pixel Fold emulator with three environments connected: one full, one read-only, one reconnecting. In the "before" rows image, one row was also forced to be non-operable for the capture.

Checks: mobile typecheck, src/lib/layout.test.ts, android-workspace-navigation-colors.test.ts, and a native Android build.

Reviewed with sol-loop: 1 round with GPT-6.1 Sol. Sol verdict: approved

Created with Claude Opus 5.5 in Claude Code.

🤖 Generated with Claude Code

    1. juliusmarminge added labelsmacroscope-review

    2. github-actions[bot](GitHub profile, opens in a new tab) added labels📱 Native Change

    3. Approvability

      Verdict: Needs Human Approval

      Macroscope's review found this PR requires human approval — This changes the default Android foldable navigation experience, native navigation code, and split-view hinge sizing across several production components. The focused row-alignment fix and updated tests do not offset the broader user-visible runtime change.

      You can add or adjust custom eligibility rules. [Learn more](https://docs.macroscope.com/approvability#example-custom-eligibility-rules).
    4. Review in Change Stack →

      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: 72e82ccf-5a7d-4675-b209-34c20d2c0bff
      📥 Commits

      Reviewing files that changed from the base of the PR and between 16918b57d6754d6f145e9b6367c825aa31a740da and 4ec00f223744423b2a561930915905dff8b3711d.

      📒 Files selected for processing: 12
      • apps/mobile/modules/t3-native-controls/android/src/main/java/expo/modules/t3nativecontrols/T3WorkspaceNavigationModule.kt
      • apps/mobile/src/features/home/ThreadListToolbar.tsx
      • apps/mobile/src/features/layout/AdaptiveWorkspaceLayout.tsx
      • apps/mobile/src/features/pull-requests/PullRequestToolbar.android.tsx
      • apps/mobile/src/features/threads/thread-list-v2-items.tsx
      • apps/mobile/src/features/workspace/AndroidWorkspaceNavigation.android.tsx
      • apps/mobile/src/features/workspace/AndroidWorkspaceNavigation.tsx
      • apps/mobile/src/features/workspace/AndroidWorkspaceSidebar.android.tsx
      • apps/mobile/src/features/workspace/android-workspace-navigation-colors.test.ts
      • apps/mobile/src/features/workspace/android-workspace-navigation-colors.ts
      • apps/mobile/src/lib/layout.test.ts
      • apps/mobile/src/lib/layout.ts

      Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 2 remain after this review.

      📝 Walkthrough

      Android workspace navigation now uses bottom navigation instead of a rail. Adaptive layout sizing and hinge alignment no longer account for rail width. Sidebar toolbars add actions to switch between pull requests and threads. Non-operable thread rows use swipe-container styling.

      Changes: Android workspace navigation and sidebar switching

      Layer / File(s)Summary
      Bottom navigation contract and rendering
      apps/mobile/modules/t3-native-controls/android/.../T3WorkspaceNavigationModule.kt, apps/mobile/src/features/workspace/AndroidWorkspaceNavigation*, apps/mobile/src/features/workspace/android-workspace-navigation-colors*
      The native navigation view now always renders bottom navigation. The Android wrapper and color function no longer use rail-related props or arguments. Color tests call the function without a rail argument.
      Full-width workspace and hinge alignment
      apps/mobile/src/features/layout/AdaptiveWorkspaceLayout.tsx, apps/mobile/src/lib/layout*
      Workspace sizing no longer reserves rail width. Hinge alignment uses the hinge position directly, with updated pane-width expectations in tests.
      Sidebar navigation actions
      apps/mobile/src/features/home/ThreadListToolbar.tsx, apps/mobile/src/features/pull-requests/PullRequestToolbar.android.tsx, apps/mobile/src/features/workspace/AndroidWorkspaceSidebar.android.tsx
      The thread-list toolbar adds a pull-request action, and the pull-request toolbar adds a thread action in sidebar mode. The workspace sidebar passes the sidebar prop to the pull-request toolbar.

      Thread row container

      Layer / File(s)Summary
      Non-operable thread row rendering
      apps/mobile/src/features/threads/thread-list-v2-items.tsx
      The non-operable thread row is now wrapped in a view styled with rowAppearance.swipeContainerStyle.

      Priority: ⬇️ Low

      Estimated code review effort: 3 (Moderate) | ~20 minutes

      Change: Bug fix

      Possibly related PRs

      • pingdotgg/t3code#18372: Added the Android workspace navigation rail and bottom tabs that this change updates.

      Suggested reviewers: pixpmusic, juliusmarminge

      Merge Risk: ⚪ Minimal · up to 4ec00

      The bottom bar remains limited to compact layouts, while foldable split view uses the sidebar switches. No issue identified here prevents merging after normal checks.

      Pre-merge checks: Passed 3 · Failed 1
      Failed Failed checks: 1 warning
      Check nameStatusExplanationResolution
      Description checkWarningThe description explains the problem and the implementation, includes before-and-after UI evidence, and lists focused checks. It does not provide the required Scope and approval section with a triaged…Add a Scope and approval section with the related issue or explicit maintainer approval and approval comment. Add a Verification section that states the result of mobile typecheck, src/lib/layout.test.ts, android-workspace-navigation-colors…
      Passed Passed checks: 3 passed
      Check nameStatusExplanation
      Title checkPassedThe title clearly identifies the main changes: removing the Android foldable navigation rail and aligning sidebar rows.
      Linked Issues checkPassedCheck skipped because no linked issues were found for this pull request.
      Out of Scope Changes checkPassedCheck skipped because no linked issues were found for this pull request.
      Full details: Description check

      Explanation

      The description explains the problem and the implementation, includes before-and-after UI evidence, and lists focused checks. It does not provide the required Scope and approval section with a triaged issue or explicit maintainer approval, and it does not state the observed results for each verification check.

      Resolution

      Add a Scope and approval section with the related issue or explicit maintainer approval and approval comment. Add a Verification section that states the result of mobile typecheck, src/lib/layout.test.ts, android-workspace-navigation-colors.test.ts, and the native Android build, including any checks not completed.

      • Fix all pre-merge checks with AI
      ✨ 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
      Comment `@coderabbitai help` to get the list of available commands.
    5. Note

      🤖 Claude Opus 5.5 responding on behalf of Theo

      Closing: this change shipped in #21071, which combined it with the other Android foldable fixes.

Sign in to join this conversation.