Improve Android foldable/tablet split-view sidebar UX - #6063
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (16)
💤 Files with no reviewable changes (1)
📝 WalkthroughWalkthroughAndroid routes now use in-flow headers instead of native headers where required. Split layouts now support sidebar toggles, edge swipes, floating new-task actions, and updated sidebar rendering. Layout and gesture tests cover the new behavior. ChangesAndroid header foundation
Workspace sidebar interaction
Route headers and actions
Thread sidebar presentation
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant User
participant WorkspaceSidebarSwipeSurface
participant SwipeDecisionHelpers
participant AdaptiveWorkspaceLayout
User->>WorkspaceSidebarSwipeSurface: Start an edge swipe
WorkspaceSidebarSwipeSurface->>SwipeDecisionHelpers: Validate position and direction
SwipeDecisionHelpers-->>WorkspaceSidebarSwipeSurface: Return toggle decision
WorkspaceSidebarSwipeSurface->>AdaptiveWorkspaceLayout: Toggle primary sidebar
Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
| // it disabled statically avoids a stale native header surviving a | ||
| // fold/unfold layout change (runtime headerShown toggling cannot | ||
| // reliably unmount an already-shown native header). | ||
| headerShown: Platform.OS !== "android", |
There was a problem hiding this comment.
🟡 Medium src/Stack.tsx:431
ThreadRouteScreen's early-return branches (OpeningThreadLoadingScreen and ThreadUnavailableScreen) render no AndroidScreenHeader, but the Thread route now statically sets headerShown: Platform.OS !== "android", so on Android those screens have no header at all — no visible back button or navigation chrome while a thread is hydrating or when it can't be opened. The same gap exists for the loading/unavailable early returns in ThreadTerminalRouteScreen and ThreadFilesTreeScreen. Consider rendering a fallback AndroidScreenHeader in those branches, or only suppressing the native header once the replacement in-flow header is actually mounted.
🤖 Copy this AI Prompt to have your agent fix this:
In file @apps/mobile/src/Stack.tsx around line 431:
`ThreadRouteScreen`'s early-return branches (`OpeningThreadLoadingScreen` and `ThreadUnavailableScreen`) render no `AndroidScreenHeader`, but the `Thread` route now statically sets `headerShown: Platform.OS !== "android"`, so on Android those screens have no header at all — no visible back button or navigation chrome while a thread is hydrating or when it can't be opened. The same gap exists for the loading/unavailable early returns in `ThreadTerminalRouteScreen` and `ThreadFilesTreeScreen`. Consider rendering a fallback `AndroidScreenHeader` in those branches, or only suppressing the native header once the replacement in-flow header is actually mounted.
There was a problem hiding this comment.
Fixed in 0a5f5950b: Thread/Terminal/Files early loading and unavailable states now render an in-flow AndroidScreenHeader (via a new AndroidHeaderScreen wrapper) so Android keeps navigation chrome when the native stack header is statically disabled. iOS behavior unchanged.
There was a problem hiding this comment.
Sorry, I'm unable to act on this request because you do not have permissions within this repository.
ApprovabilityVerdict: Needs human review 1 blocking correctness issue found. This PR introduces new Android foldable/tablet UX features including swipe-to-toggle sidebar gestures, new header rendering logic, and FAB integration across multiple screens. The scope constitutes new user-facing capability rather than a simple fix, and there are unresolved Medium-severity findings about header chrome gaps and gesture conflicts. You can customize Macroscope's approvability policy. Learn more. |
8b26f90 to
f295f6c
Compare
| return; | ||
| } | ||
| runOnJS(props.onToggleSidebar)(); | ||
| }), |
There was a problem hiding this comment.
Edge swipe fights system back
Medium Severity
The new content-pane sidebar swipe only accepts starts in the left 72px band. When the primary sidebar is hidden that band is the screen’s left edge, which Android gesture navigation already uses for Back. There is no systemGestureExclusionRects (or equivalent) opt-out, so a restore swipe can be claimed by the system and pop the current route instead of showing the sidebar.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit f295f6ce8bcfb7986f627f40d03bb661ef7a1787. Configure here.
There was a problem hiding this comment.
Assessed and not changed: RNGH 2.31.2 exposes no systemGestureExclusionRects API (verified against its type definitions), so applying this fix would require a native change or a gesture-system redesign. Swipe-in was verified working on-device and is intentionally 'functional and learnable' per the PR scope. Left as-is.
f295f6c to
b137719
Compare
b137719 to
0a5f595
Compare
0a5f595 to
776b867
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.
There are 2 total unresolved issues (including 1 from previous review).
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 776b8671daa174913fed4531880b47e65548492c. Configure here.
Restores split view for near-square foldable windows and adds Android sidebar controls so the thread list can be hidden, shown, and swiped on devices like the Galaxy Z Fold 7. - Sidebar visibility and animation drive hide/show across fold changes. - Android split headers draw in-flow instead of relying on the native stack header, fixing duplicate brand/back headers that lingered across fold/unfold. - Left-edge-gated pan swipes the sidebar away and back in, with header buttons as the accessible fallback. - New-task FAB sits in the persistent Android split sidebar. - Split-detection and pane-visibility behavior are covered by layout and swipe unit tests. Verified on a Galaxy Z Fold 7.
776b867 to
41efc71
Compare
|
@coderabbitai review |
✅ Action performedReview finished.
|
|
@cursor[bot] review |


Summary
Improves the Android foldable/tablet experience by making split view usable on near-square foldable layouts and adding controls for hiding and restoring the thread sidebar.
Changes
Tested
Note
Medium Risk
Touches navigation chrome, gesture handling, and adaptive layout across core Android routes; behavior is platform-scoped but fold/unfold and split-view edge cases are easy to regress.
Overview
Android split-view on foldables/tablets is easier to use: the thread sidebar can be hidden and restored via header actions, the empty Home detail pane, and a left-edge pan gesture (only when split view is active, so horizontal scrolling in terminal/diffs is not stolen).
Headers: Native stack headers are disabled statically on Android for Home, Thread, Terminal, Review, and Files so fold/unfold does not leave duplicate native + in-flow chrome. A new
AndroidHeaderScreenwraps loading/unavailable routes with the same in-flow header;LoadingScreengainsincludeTopInsetwhen a header already owns the top safe area.Sidebar chrome: Split sidebar uses
CompactBrandTitleinstead of a plain “Threads” title (scroll-fade wash removed),AndroidHomeFabLayoutkeeps new-task FAB in the persistent sidebar, and list padding avoids the FAB.Tests cover sidebar swipe thresholds and foldable-friendly layout cases (e.g. re-evaluating compact ↔ split as window size changes).
Reviewed by Cursor Bugbot for commit 41efc71. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Improve Android foldable/tablet split-view sidebar UX with swipe gestures and in-flow headers
AndroidScreenHeaderthat renders consistently across loading, error, and ready states.WorkspaceSidebarSwipeSurface) to show/hide the thread sidebar, with distance and velocity thresholds defined inworkspace-sidebar-swipe.ts.CompactBrandTitle(font scaling disabled) and removes the scroll-based gradient wash effect.AndroidHomeFabLayout.Macroscope summarized 41efc71.
Summary by CodeRabbit
New Features
Bug Fixes
Tests