Skip to content

fix(android): foldable sidebar and layout fixes - #21071

Merged
t3dotgg merged 1 commit into
mainfrom
fix/android-foldable-bundle
Oct 18, 2026
Merged

t3dotgg merged 1 commit into
mainfrom
fix/android-foldable-bundle

Conversation

@t3dotgg

@t3dotgg t3dotgg commented Oct 18, 2026

Copy link
Copy Markdown
Member

The Android foldable fixes were spread over four small PRs. A test build with all four found three more problems:

This PR combines the four PRs and fixes the three problems.

From the original PRs

New in this PR

  • Sidebar taps before the first navigation. The sidebar's useNavigation() returns the navigation container. The container's own getState() stays empty until the first navigation action, because React Navigation does not report the root navigator's first state up to the container. So the reset from fix(android): sidebar threads open while Settings or New task is open #21043 found no state and stopped early. It now reads getRootState(), the same as React Navigation's resetRoot. A new test fails without this change.
  • Badge fit. A 280dp sidebar does not have space for the full brand and three buttons. CompactBrandTitle fit measures the available space and hides the stage badge when the badge does not fit. The badge shows again when there is space. Only the two Android list headers use fit.
  • Reading width. On Android, the thread feed, the composer, and the full-width thread list stop at 640dp and stay centered. This part comes from feat(mobile): Android drops the rail, bottom bar, and rounded sheets for a denser layout #19424 without the other layout changes in that PR.
Before After
Rail before: rail after: no rail, PR toggle in header
Rows before: rows misaligned after: rows aligned

Thread open in split view, before (left) and after (right):

Before and after: opening and switching threads in split view

The images come from the original PRs. The three new fixes do not have screenshots yet. The three problems were found on a device with an earlier build. This build includes the fixes: arm64 release APK (preview variant, OTA updates off).

Checks: mobile typecheck passes. android-workspace-navigation, layout, and android-workspace-navigation-colors tests pass (72). Lint on the changed files has no errors. The arm64 release build succeeds.

Created with Claude Opus 5.5 in Claude Code.

🤖 Generated with Claude Code

Combines #21049, #21044, #21043, and #21041, and adds:
- The sidebar opens threads before the first navigation action.
- The Nightly badge hides when the narrow sidebar header cannot fit it.
- The 640dp Android reading width from #19424.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot added the vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. label Oct 18, 2026
@juliusmarminge juliusmarminge added the macroscope-review Opt PRs made by unvouched contributors in for Macroscope review. Vouched contributors auto-reviews label Oct 18, 2026
@github-actions github-actions Bot added size:L 100-499 changed lines (additions + deletions). 📱 Native Change Changes the native fingerprint; merging blocks production OTAs until a new store build ships. labels Oct 18, 2026
@macroscopeapp

macroscopeapp Bot commented Oct 18, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Needs Human Approval

Macroscope's review found this PR requires human approval — This PR changes the default Android workspace navigation model and native switch interaction, while also altering foldable pane sizing, route animations, and reading widths across multiple production paths. The breadth of these user-visible Android behavior changes warrants human review.

You can add or adjust custom eligibility rules. Learn more.

@coderabbitai

coderabbitai Bot commented Oct 18, 2026

Copy link
Copy Markdown

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: 81e1bc9f-542e-4d55-b927-5d1f51344586
📥 Commits

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

📒 Files selected for processing: 22
  • apps/mobile/modules/t3-native-controls/android/src/main/java/expo/modules/t3nativecontrols/T3WorkspaceNavigationModule.kt
  • apps/mobile/src/Stack.tsx
  • apps/mobile/src/components/CompactBrandTitle.tsx
  • apps/mobile/src/components/ui/NativeSwitch.android.tsx
  • apps/mobile/src/features/home/HomeScreen.tsx
  • 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/ThreadDetailScreen.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/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/lib/layout.test.ts
  • apps/mobile/src/lib/layout.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; 9 remain after this review.

📝 Walkthrough

This change removes Android workspace navigation-rail rendering and keeps bottom navigation. It updates workspace resets, split-view animation, hinge sizing, and reading widths. It also changes Android toolbar navigation and title fitting, switch touch handling, and non-operable thread-row rendering.

Changes: Workspace navigation and layout

Layer / File(s) Summary
Bottom navigation replaces the rail
apps/mobile/modules/t3-native-controls/android/src/main/java/expo/modules/t3nativecontrols/T3WorkspaceNavigationModule.kt, apps/mobile/src/features/workspace/AndroidWorkspaceNavigation*, apps/mobile/src/features/workspace/android-workspace-navigation-colors*
The native view and Android workspace navigation no longer support a rail. They render bottom navigation, and navigation colors and tests use the bottom-navigation configuration.
Workspace resets and route animation
apps/mobile/src/lib/android-workspace-navigation*, apps/mobile/src/features/workspace/useAndroidWorkspaceNavigation.ts, apps/mobile/src/features/workspace/useAndroidWorkspaceSelection.ts, apps/mobile/src/native/useOpenPullRequest.ts, apps/mobile/src/features/workspace/AndroidWorkspaceNavigation.android.tsx, apps/mobile/src/Stack.tsx
Android reset callers use resetAndroidWorkspace, which targets the root navigation state when available. In split view, Thread and PullRequest routes use "none" for animation.
Hinge alignment and viewport sizing
apps/mobile/src/features/layout/AdaptiveWorkspaceLayout.tsx, apps/mobile/src/lib/layout*
Pane and inspector sizing no longer subtracts rail width. Hinge alignment uses the hinge position directly, and layout tests use the revised pane dimensions.
Reading widths and workspace toolbars
apps/mobile/src/lib/layout.ts, apps/mobile/src/features/home/HomeScreen.tsx, apps/mobile/src/features/threads/ThreadDetailScreen.tsx, apps/mobile/src/components/CompactBrandTitle.tsx, apps/mobile/src/features/home/ThreadListToolbar.tsx, apps/mobile/src/features/pull-requests/PullRequestToolbar.android.tsx, apps/mobile/src/features/workspace/AndroidWorkspaceSidebar.android.tsx
Home and thread content use the Android reading-width limit. Workspace toolbars add conditional navigation actions, and compact brand titles can hide the stage badge when the title does not fit.

Android switch touch handling

Layer / File(s) Summary
Pressable switch control
apps/mobile/src/components/ui/NativeSwitch.android.tsx
A React Native Pressable handles switch touch input and disabled state. The nested Compose view does not handle pointer events or accessibility descendants.

Non-operable thread row rendering

Layer / File(s) Summary
Apply swipe-container style
apps/mobile/src/features/threads/thread-list-v2-items.tsx
The non-operable thread row is wrapped in a View that applies rowAppearance.swipeContainerStyle.

Priority: ➖ Normal

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

Change: Bug fix

Possibly related PRs

  • pingdotgg/t3code#19424: Both PRs change Android foldable workspace layout, rail sizing, and the 640dp reading width; this PR retains bottom navigation.
  • pingdotgg/t3code#18372: This PR revises Android workspace navigation and reset behavior introduced by that PR.
  • pingdotgg/t3code#19987: Both PRs change Android workspace navigation, rail sizing, and adaptive layout behavior.

Suggested reviewers: pixpmusic, juliusmarminge

Merge Risk: ⚪ Minimal · up to 77a2e

The Android foldable sidebar and layout changes show no remaining concrete merge-blocking risk. The reported concern about padding hiding sidebar thread rows does not apply to the code.

Pre-merge checks: Passed 4
Check name Status Explanation
Title check Passed The title clearly identifies the Android foldable sidebar and layout fixes, which are the main changes in the pull request.
Description check Passed The description explains the problems, changes, scope, verification results, and visual evidence. It also identifies the related earlier pull requests and states the remaining screenshot limitation fo…
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 problems, changes, scope, verification results, and visual evidence. It also identifies the related earlier pull requests and states the remaining screenshot limitation for the three new fixes.

✨ 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 merged commit 6a6ebb2 into main Oct 18, 2026
33 checks passed
@t3dotgg
t3dotgg deleted the fix/android-foldable-bundle branch October 18, 2026 03:52
juliusmarminge added a commit that referenced this pull request Oct 18, 2026
#21071 removed the split-view rail and added threads/PRs toggle buttons to
the sidebar headers. This branch keeps the wide rail, so the merge keeps
the rail in the layout, native module, colors, and hinge alignment, and
drops the sidebar header toggles the rail replaces. Everything else from
#21071 is kept: the root-state reset, the fitted brand title, the reading
width, and the split-view destination animation.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
github-actions Bot added a commit to omarcresp/t3code-flake that referenced this pull request Oct 18, 2026
## What's Changed
* perf(mobile): Metro runs the React Compiler, with a coverage ratchet by @juliusmarminge in pingdotgg/t3code#20967
* perf(mobile): usage screens compile with the React Compiler by @juliusmarminge in pingdotgg/t3code#20969
* perf(mobile): Connect onboarding compiles with the React Compiler by @juliusmarminge in pingdotgg/t3code#20970
* perf(mobile): device preview compiles with the React Compiler by @juliusmarminge in pingdotgg/t3code#20971
* fix(android): foldable sidebar and layout fixes by @t3dotgg in pingdotgg/t3code#21071
* test(mobile): measure renders on a device by @juliusmarminge in pingdotgg/t3code#21001
* fix(web): Working threads can be dragged into chat as references again by @t3dotgg in pingdotgg/t3code#19697
* refactor(web): the command palette caches its derived lookups without "use memo" by @juliusmarminge in pingdotgg/t3code#21116
* feat(mobile): link, unlink and watch a thread's pull requests from its sheet by @flamboh in pingdotgg/t3code#20394
* test(web): the right panel Escape test advances fake frames until focus returns by @juliusmarminge in pingdotgg/t3code#21118
* test(web): ChatMarkdown thread find waits for highlights to settle by @juliusmarminge in pingdotgg/t3code#21121


**Full Changelog**: pingdotgg/t3code@v0.1.1-nightly.20261018.3285...v0.1.1-nightly.20261018.3302

Upstream release: https://github.com/pingdotgg/t3code/releases/tag/v0.1.1-nightly.20261018.3302
github-actions Bot added a commit to davidvanderklay/t3code-flake that referenced this pull request Oct 18, 2026
## What's Changed
* perf(mobile): Metro runs the React Compiler, with a coverage ratchet by @juliusmarminge in pingdotgg/t3code#20967
* perf(mobile): usage screens compile with the React Compiler by @juliusmarminge in pingdotgg/t3code#20969
* perf(mobile): Connect onboarding compiles with the React Compiler by @juliusmarminge in pingdotgg/t3code#20970
* perf(mobile): device preview compiles with the React Compiler by @juliusmarminge in pingdotgg/t3code#20971
* fix(android): foldable sidebar and layout fixes by @t3dotgg in pingdotgg/t3code#21071
* test(mobile): measure renders on a device by @juliusmarminge in pingdotgg/t3code#21001
* fix(web): Working threads can be dragged into chat as references again by @t3dotgg in pingdotgg/t3code#19697
* refactor(web): the command palette caches its derived lookups without "use memo" by @juliusmarminge in pingdotgg/t3code#21116
* feat(mobile): link, unlink and watch a thread's pull requests from its sheet by @flamboh in pingdotgg/t3code#20394
* test(web): the right panel Escape test advances fake frames until focus returns by @juliusmarminge in pingdotgg/t3code#21118
* test(web): ChatMarkdown thread find waits for highlights to settle by @juliusmarminge in pingdotgg/t3code#21121


**Full Changelog**: pingdotgg/t3code@v0.1.1-nightly.20261018.3285...v0.1.1-nightly.20261018.3302

Upstream release: https://github.com/pingdotgg/t3code/releases/tag/v0.1.1-nightly.20261018.3302
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 📱 Native Change Changes the native fingerprint; merging blocks production OTAs until a new store build ships. size:L 100-499 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