fix(android): sidebar threads open while Settings or New task is open #21043
main fromt3/692eea26·opened View on GitHubOn Android foldables, the sidebar stays visible while Settings or New task is open, but tapping a thread there did nothing. The same was true for PRs in the sidebar and the navigation rail. The sidebar felt broken.
The sidebar renders in the root stack's layout, so its useNavigation() is the navigation container. A container dispatch(state => ...) runs on the deepest focused navigator. With Settings or New task open, that is their nested stack. The workspace reset was built from the nested state, and both stacks rejected it.
The new resetAndroidWorkspace reads the root stack state and sends the RESET with target set to the root key. This is the same approach React Navigation uses for resetRoot. All workspace reset call sites now use it. A focused test covers the nested-Settings case and fails without the fix.
Not verified on a device: T3 device support was unavailable during this work.
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
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:M
Approvability#
Verdict: Approved at
c8e81fcMacroscope's review found this PR approvable — This is a focused Android navigation bug fix that redirects existing workspace resets to the root navigator when nested Settings or New task stacks are focused. The implementation is small, localized, and covered by a targeted regression test.
You can add or adjust custom eligibility rules. [Learn more](https://docs.macroscope.com/approvability#example-custom-eligibility-rules).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:
7706148e-e169-40a7-b455-51acd5adc8ab
📥 Commits
-
Reviewing files that changed from the base of the PR and between 16918b57d6754d6f145e9b6367c825aa31a740da and c8e81fc639d054ad4156e34f0b4f6c0df5d87570.
📒 Files selected for processing: 6
-
apps/mobile/src/features/workspace/AndroidWorkspaceNavigation.android.tsxapps/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/native/useOpenPullRequest.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.
-
📝 Walkthrough
-
Android workspace navigation resets now use a shared helper. The helper targets the root navigator and skips dispatch when the root has no state. Workspace navigation and Android pull-request entry points call the helper.
Changes: Android workspace navigation reset
Layer / File(s) Summary Root-targeted reset helper
apps/mobile/src/lib/android-workspace-navigation.ts,apps/mobile/src/lib/android-workspace-navigation.test.tsresetAndroidWorkspacefollows parent navigators to the root and dispatches a reset targeted at its state key. It returns without dispatching if the root has no state. A test checks a reset from a nested Settings navigator and verifies the root stack containsHomeandThread.Workspace reset call sites
apps/mobile/src/features/workspace/AndroidWorkspaceNavigation.android.tsx,apps/mobile/src/features/workspace/useAndroidWorkspaceNavigation.ts,apps/mobile/src/features/workspace/useAndroidWorkspaceSelection.ts,apps/mobile/src/native/useOpenPullRequest.tsWorkspace tab selection, workspace navigation hooks, and Android pull-request navigation call resetAndroidWorkspaceinstead of dispatching resets directly.Priority: ⬇️ Low
Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Bug fix
Suggested reviewers:
pixpmusic
Merge Risk: ⚪ Minimal · up to
c8e81-
The Android sidebar navigation change is ready to merge after normal checks. No actionable issue was established.
Pre-merge checks:
4-
Check name Status Explanation Title check The title clearly identifies the Android sidebar navigation fix and matches the primary change. Description check The description explains the problem, root cause, implementation, focused test coverage, and unavailable device verification. It does not include explicit template headings, a bug or approval link, or… 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 problem, root cause, implementation, focused test coverage, and unavailable device verification. It does not include explicit template headings, a bug or approval link, or UI screenshots, but it provides sufficient context for this focused fix.
-
✨ 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
-
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.
t3dotgg(GitHub profile, opens in a new tab) closed this
Sign in to join this conversation.
macroscopeapp[bot](GitHub profile, opens in a new tab) approved these changes