Allow Android tablets to rotate - #5613
Conversation
- Add an Expo config plugin that enables all user-allowed orientations on tablets - Keep portrait locking for Android phones
📝 WalkthroughWalkthroughThe mobile app registers an Expo config plugin. The plugin modifies Kotlin ChangesAndroid tablet orientation
Estimated code review effort: 2 (Simple) | ~10 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Thread transfer impact✅ Thread transfer remains within every enforced ceiling.
Baseline: Scenario and decoded snapshot size10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.
Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed. |
ApprovabilityVerdict: Needs human review This PR enables new user-facing behavior (screen rotation) on Android tablets that were previously locked to portrait. While well-implemented and following existing plugin patterns, new runtime capabilities that change user experience warrant human review. You can customize Macroscope's approvability policy. Learn more. |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.
Bugbot Autofix is ON, but a cloud agent failed to start.
Reviewed by Cursor Bugbot for commit 1e430ec. Configure here.
- Reapply orientation policy when foldables cross the tablet breakpoint - Restore portrait locking when folding back to phone dimensions
Dismissing prior approval to re-evaluate 1f42088
## What's Changed * fix(ci): extend release publish timeout by @t3-code[bot] in pingdotgg/t3code#6034 * Allow Android tablets to rotate by @juliusmarminge in pingdotgg/t3code#5613 * fix(web): account for Windows window controls in PR page header by @UtkarshUsername in pingdotgg/t3code#6049 **Full Changelog**: pingdotgg/t3code@v0.0.34-nightly.20260810.1061...v0.0.34-nightly.20260810.1062 Upstream release: https://github.com/pingdotgg/t3code/releases/tag/v0.0.34-nightly.20260810.1062

What Changed
Added an Expo config plugin that enables Android tablets with a smallest width of at least 600dp to support all orientations while keeping phones locked to portrait.
Why
The app's top-level portrait orientation setting currently locks Android tablets to portrait. This mirrors iPad behavior by allowing tablet rotation while preserving the existing portrait-only behavior on phones.
Checklist
Note
Low Risk
Scoped Android native MainActivity orientation logic with idempotent plugin injection; no auth, data, or API changes.
Overview
Adds
withAndroidTabletOrientation, a new Expo config plugin registered inapp.config.ts, so Android behavior matches iOS: phones stay portrait-only while tablets can rotate.At build time the plugin patches
MainActivityto callapplyTabletOrientation()afteronCreateand again inonConfigurationChanged. WhensmallestScreenWidthDp >= 600, it setsrequestedOrientationtoSCREEN_ORIENTATION_FULL_USER(overriding the manifest portrait lock); otherwise it forces portrait. Fold/unfold on foldables re-applies the same rule without requiring an activity restart.Reviewed by Cursor Bugbot for commit 1f42088. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Allow Android tablets to rotate freely while keeping phones in portrait
withAndroidTabletOrientation.cjsthat patchesMainActivity.ktat build time to inject orientation logic.smallestScreenWidthDp >= 600(tablets) useSCREEN_ORIENTATION_FULL_USER, respecting the system auto-rotate setting; phones stay locked to portrait.onConfigurationChangedoverride re-evaluates orientation on each configuration change, covering foldable devices.app.config.tsand skips patching if already applied.Macroscope summarized 1f42088.
Summary by CodeRabbit