Skip to content

fix(android): sidebar threads open while Settings or New task is open - #21043

Closed
t3dotgg wants to merge 1 commit into
mainfrom
t3/692eea26
Closed

t3dotgg wants to merge 1 commit into
mainfrom
t3/692eea26

Conversation

@t3dotgg

@t3dotgg t3dotgg commented Oct 17, 2026

Copy link
Copy Markdown
Member

On 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

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@juliusmarminge juliusmarminge added the macroscope-review Opt PRs made by unvouched contributors in for Macroscope review. Vouched contributors auto-reviews label Oct 17, 2026
@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:M 30-99 changed lines (additions + deletions). labels Oct 17, 2026
@macroscopeapp

macroscopeapp Bot commented Oct 17, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved at c8e81fc

Macroscope'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.

@coderabbitai

coderabbitai Bot commented Oct 17, 2026

Copy link
Copy Markdown
Contributor

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: 7706148e-e169-40a7-b455-51acd5adc8ab
📥 Commits

Reviewing files that changed from the base of the PR and between 16918b5 and c8e81fc.

📒 Files selected for processing: 6
  • 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/lib/android-workspace-navigation.test.ts
  • apps/mobile/src/lib/android-workspace-navigation.ts
  • apps/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.ts
resetAndroidWorkspace follows 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 contains Home and Thread.
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.ts
Workspace tab selection, workspace navigation hooks, and Android pull-request navigation call resetAndroidWorkspace instead 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: Passed 4
Check name Status Explanation
Title check Passed The title clearly identifies the Android sidebar navigation fix and matches the primary change.
Description check Passed 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 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: 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

Comment @coderabbitai help to get the list of available commands.

@t3dotgg

t3dotgg commented Oct 18, 2026

Copy link
Copy Markdown
Member Author

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 up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

macroscope-review Opt PRs made by unvouched contributors in for Macroscope review. Vouched contributors auto-reviews size:M 30-99 changed lines (additions + deletions). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants