refactor(mobile): Android's sidebar is the Home route in the sidebar column#27087
The Android workspace hard-wired the thread list and the pull request list into the layout's sidebar slot, and their handlers lived in AdaptiveWorkspaceLayout. iOS already projects the Home route into its primary column.
The Android navigator now renders Home into the sidebar slot, and Home picks its content by its role in the layout: the sidebar's lists in the sidebar, and the empty detail or a workspace page in the content column. The thread list is one shared WorkspaceThreadSidebar. The JS columns use it by default, which keeps the sidebar on iPadOS 18–25, where native columns are unavailable (they need iOS 26). The layout now handles only placement, widths and animation. Hardware Back reaches menus in the sidebar while a page is open beside it.
Fold unfolded: Home in the sidebar column, empty detail in the content column Fold folded: Home is the root
Not verified on a device: iPadOS 18–25, because the device pool has no such iPad.
Part of the workspace split: router → shell → feature screens → design system → native. Stacked on #26741.
Opus 5.5 via Claude Code in T3 Code.
🤖 Generated with Claude Code
Checks
Approvability
Verdict: Approved at 032ad98
Macroscope's review found this PR approvable — This refactor renders Android’s Home route as the sidebar and shares thread-list navigation wiring. Its effects are limited to mobile presentation and navigation lifecycle handling, with existing pane interaction safeguards retained.
You can add or adjust custom eligibility rules. Learn more.
No actionable comments were generated in the recent review.
External image Recent review info
-
External image Run configuration
- Source mode: Auto
- Repository: pingdotgg/t3code
- Branch: t3/workspace-split-3
- File: .coderabbit.config.ts
- Commit: 032ad98
- Layers: Repository TS config
- Review profile: CHILL
- Plan: Team
- Run ID:
d5d499ea-7c59-4ffe-915a-3c9f0af20829
External image Commits
Reviewing files that changed from the base of the PR and between 96f21bd32629397b153ba62995fc7852551afae0 and 032ad98abc2c203b74eb2ce70899958e40e8b02a.
External image Files selected for processing: 4
apps/mobile/src/features/layout/AdaptiveWorkspaceLayout.tsxapps/mobile/src/features/workspace/AndroidWorkspaceSidebar.android.tsxapps/mobile/src/features/workspace/WorkspaceRootScreen.android.tsxapps/mobile/src/features/workspace/workspace-tabs-state.test.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 5 remain after this review.
Walkthrough
The mobile workspace now renders sidebar and content nodes separately. Android routes sidebar panes to dedicated sidebar components. Sidebar navigation, pull-request selection, hardware-back handling, and clock ticking use sidebar-pane state.
Changes: Mobile workspace sidebar
Layer / File(s) Summary Separate workspace content and sidebar columns
apps/mobile/src/features/layout/AdaptiveWorkspaceLayout.tsx,apps/mobile/src/features/layout/adaptive-workspace-context.ts,apps/mobile/src/features/layout/workspace-presentation-context.tsx,apps/mobile/src/features/layout/createWorkspaceStackNavigator.android.tsx,apps/mobile/src/Stack.tsxThe renderer accepts separate content and sidebar nodes. The Android navigator supplies the Home route as sidebar content. The layout context adds revealPrimarySidebar, and the Home route hides the native header on Android.Implement sidebar navigation and Android integration
apps/mobile/src/features/workspace/WorkspaceThreadSidebar.tsx,apps/mobile/src/features/layout/AdaptiveWorkspaceLayout.tsx,apps/mobile/src/features/workspace/AndroidWorkspaceSidebar.android.tsx,apps/mobile/src/features/workspace/AndroidWorkspaceSidebar.tsx,apps/mobile/src/features/workspace/WorkspaceRootScreen.android.tsx,apps/mobile/src/features/workspace/workspace-tabs-state.test.ts,apps/mobile/src/Stack.tsxWorkspaceThreadSidebarderives the selected thread from navigation state and handles sidebar actions.AdaptiveWorkspaceLayoutrenders the supplied sidebar or defaults toWorkspaceThreadSidebar. Android renders the sidebar for sidebar panes and reads pull-request selection from navigation state. The workspace screen test mocks pane role and the Android sidebar.Keep sidebar panes active
apps/mobile/src/lib/backHandler.ts,apps/mobile/src/features/threads/use-visible-second-clock.tsHardware-back handling and the visible-second clock treat sidebar panes as active even when they are not navigation-focused. Estimated code review effort: 3 (Moderate) | ~20 minutes
Change: Refactor
Sequence Diagram(s)
mermaid1 sequenceDiagram 2 actor User 3 participant ThreadNavigationSidebar 4 participant WorkspaceThreadSidebar 5 participant Navigation 6 User->>ThreadNavigationSidebar: Select a thread 7 ThreadNavigationSidebar->>WorkspaceThreadSidebar: Invoke thread-selection action 8 WorkspaceThreadSidebar->>Navigation: Route using environment and thread IDs Possibly related issues
- Issue 27297: The changes update Android workspace pane navigation and back handling, which overlaps with the issue’s Android Back behavior for the Pull Requests pane.
- Issue 22543: The changes add shared sidebar rendering and change its placement, which overlaps with the issue’s sidebar list visibility and layout concern.
Suggested reviewers:
t3dotgg,pixpmusic
Merge Risk: External image Minimal · up to 032ad
No merge-blocking issue was established in the sidebar integration.
Pre-merge checks: Passed 3 · Failed 1
Failed Failed checks: 1 warning
Check name Status Explanation Resolution Description check Warning The description covers the problem, the change, scope context, and verification. It explains that the Android workspace hard-wired lists into the sidebar slot and that Home now fills the sidebar slot.… Add a link to the triaged issue or the maintainer discussion that approves this direction and scope, including the approval comment. The PR is a broad refactor, so the template's approval rule applies. Add the focused tests or manual checks… Passed Passed checks: 3 passed
Check name Status Explanation Title check Passed The title names a refactor of the mobile app and states the central change: Android's sidebar is now the Home route in the sidebar column. The raw summary confirms this: Stack.tsx projects Home, Adapt… Linked Issues check Passed Check skipped because no linked issues were found for this pull request. Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request. Full details: Title check
Explanation
The title names a refactor of the mobile app and states the central change: Android's sidebar is now the Home route in the sidebar column. The raw summary confirms this: Stack.tsx projects Home, AdaptiveWorkspaceLayout drops its Android sidebar and thread handlers, and WorkspaceThreadSidebar is added. The title is specific and matches the changeset, and it follows the conventional commit format the template suggests.
Full details: Description check
Explanation
The description covers the problem, the change, scope context, and verification. It explains that the Android workspace hard-wired lists into the sidebar slot and that Home now fills the sidebar slot. It describes the shared WorkspaceThreadSidebar and the iPadOS 18–25 fallback. It states that iPadOS 18–25 was not verified on a device. It includes before and after screenshots, as the template requires for UI changes. Two template items are weak. The Scope and approval section does not link a triaged issue or maintainer approval, and the description does not list the focused tests that were run. The author also lists the model used in the agent line, which the template asks for.
Resolution
Add a link to the triaged issue or the maintainer discussion that approves this direction and scope, including the approval comment. The PR is a broad refactor, so the template's approval rule applies. Add the focused tests or manual checks that were run and their observed results for the Android sidebar and Back handling. State that the Problem section needs a sentence or two on the expected behavior and reproduction steps. Add the Problem section, which the description does not have as a labeled heading.
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
Thread transfer impact
⚠️ The latest CI run did not produce a thread transfer result for 795f889.
This comment will update automatically after the next completed run.
Added 1 commit
- refactor(mobile): Android's sidebar is the Home route in the sidebar column032ad98