Repository navigation
Conversation
Contributor
ApprovabilityVerdict: Needs Human Approval Macroscope's review found this PR requires human approval — This is a small Android-only layout fix that hides the inherited native header before the draft route's first layout while preserving the custom Android header and iOS behavior. It also changes the route's default header presentation, so the product-default policy requires human review. You can add or adjust custom eligibility rules. Learn more. |
Contributor
Member
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
On Android, the new-thread draft screen sometimes renders pushed down by roughly a native header's height: an empty band sits below the status bar, the "New thread" header starts far too low, and the composer at the bottom is clipped under the gesture bar with its toolbar row off screen. Observed on a physical Android device before the fix, when the draft was opened for a branch that still had to be checked out (for example "New thread on " from a thread's long-press menu).
Expected: the sheet header sits directly under the status bar and the composer, including its toolbar row, is fully visible above the gesture bar.
Change
The
NewTaskDraftroute inNewTaskSheetStackinheritedheaderShown: truefrom the sheet header options. The screen itself hides the native header throughNativeStackScreenOptions, which callsnavigation.setOptionsfrom a layout effect once the screen has committed, so the native header is already part of the route's first native layout. On Android, react-native-screens lays out the content under the native AppBar using MaterialScrollingViewBehavior. Removing the toolbar after that initial layout is a suspected cause of the reported persistent offset and clipped composer; the emulator checks below demonstrate the delayed header removal, but do not confirm that persistent failure or its resolution. WhileNewTaskDraftRouteScreenshows its "Switching branch..." state,NewTaskDraftScreenis not mounted at all, so the native header stays visible until the draft mounts and hides it. That is why the thread-row "New thread on " action, the one entry that passes a branch needing a checkout, is the path that hits the late hide; the plain project-picker path mounts the draft immediately.This applies the same fix the repo already uses for
DETAIL_HEADER_OPTIONSand the Settings tab: the route hides the native header from the first layout on Android (headerShown: Platform.OS !== "android"), so the native header never takes part in layout. iOS is unchanged.One observable side effect on Android: the "Switching branch..." loading state no longer shows the transient native header above it, so its centered text now sits in the full screen height instead of below a header. No dismissal path is lost there, since that route already had
headerBackVisible: falseand the loading state blocks removal while a checkout is pending.Scope and approval
Very small, focused fix for an obvious visual bug: one option on one route in
apps/mobile/src/Stack.tsx, matching an existing documented pattern in the same file. Android also loses the transient native header during branch switching, as described above. iOS is unchanged.Verification
ScreenStackFragment.ktsets aScrollingViewBehavioron the screen under the AppBar;ScreenStackHeaderConfig.ktremoves the toolbar whenheaderShownflips to false after mount), and matched it to the two existing workarounds inStack.tsx(DETAIL_HEADER_OPTIONS, Settings tab).vp run check:changed: format, lint, knip and typecheck of@t3tools/mobilepass.mainand of this branch were run on an Android 16 x86_64 emulator (1080x2400) against a local server with seeded demo data, opening the draft through "New thread on " so a real checkout happens. Onmainthe native "New task" header is visible above "Switching branch..." until the draft mounts; on this branch it never appears. The final draft renders identically on both.main): loading statemain): draftClaude Fable 5.1 via Claude Code in T3 Code, with a GPT-6 Astra review round (reviewer only).