Repository navigation
fix(mobile): hide the Android new-task header before mount - #22740
Closed
colonelpanic8 wants to merge 1 commit into
Closed
colonelpanic8 wants to merge 1 commit into
colonelpanic8 wants to merge 1 commit into
Conversation
Contributor
ApprovabilityVerdict: Needs Human Approval Macroscope's review found this PR requires human approval — This one-line change hides the Android NewTaskDraft native header from the first layout, matching the screen's existing custom toolbar and leaving iOS unchanged. It changes the route's initial user-visible header default, so human review is appropriate despite the narrow scope. 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
NewTaskDraftinitially inherits a visible native header, then hides it after mount while rendering its own Android toolbar. The extra native-header space can remain in the draft's layout, clipping the composer at the window edge and behind the keyboard.Addresses #22737. An uninstrumented Assembly emulator reproduction now establishes persistent bad geometry: cold-start → Settings → Environments → New thread → environment → project. The failure is intermittent. The draft remains offset through keyboard use and background/resume; restarting and opening from Chats restores correct geometry. Leaving and recreating the draft can also recover it, so restart is not the only recovery.
Change
Set
NewTaskDraft.options.headerShowntoPlatform.OS !== "android"so the native header never participates in Android's first layout. This follows the existing Thread fix in #18963. iOS retains its existing visible native header. Keyboard offsets and responsive breakpoints are unchanged.Scope and approval
A focused correction to an existing option's initial value: the screen already requests the hidden header after mount. It adds no feature or navigation flow. The option is shared with upstream; the natural persistent reproduction so far is in Assembly's longer environment/project flow, not clean upstream. The proposed shared fix was also applied to the exact Assembly release source to verify the failing path.
Verification
Uninstrumented emulator, Android API 35, 2076×2152 at density 390:
The 215-pixel bad offset survived keyboard focus and Home → resume. After force-stop/relaunch and entry from Chats it was gone. The fixed keyboard-open action row ends at y=1259, above the keyboard. The original published APK also reproduced independently of the repackaged control.
Both matched test APKs use the Assembly native shell, with ARM translation on an x86_64 emulator. Fixed JS was exported from release source
0849d4f97plus only this option; no timing instrumentation or application-source changes beyond this line. The real Fold previously showed a 317-pixel offset, with different system insets. The native shell uses screens.29.Upstream JS at
a93b03c8a5in the same shell remained correct in three Settings-root and three Settings/Environments runs (its picker flow omits the additional environment selection). This does not establish a natural persistent reproduction on pristine upstream. Earlier controlled delayed-hide testing established that the shared initial header produces the corresponding offset and that this option prevents it; the new Assembly tests verify the actual persistent failure path. Six passing fixed runs are not an exhaustive timing proof.Checks on the committed upstream change:
vp fmt --check apps/mobile/src/Stack.tsx: passed.vp lint apps/mobile/src/Stack.tsx: passed with one pre-existing nested-component warning outside the change.vp run --filter @t3tools/mobile typecheck: passed.vp run lint:mobile: passed; unavailable native-language linters skipped by the task. No native-language changes.No prop-wiring unit test was added; native geometry is the relevant behavior. iOS was not run; its effective option is unchanged. Web/Electron, providers, contracts, and backend behavior are outside this native route change.
Recording: broken draft → keyboard → background/resume → restart and healthy draft. Recording begins after the failure, so it demonstrates persistence/recovery rather than the triggering navigation.
Control measurements · Fixed measurements · Persistence/restart measurements
Implemented and checked with GPT-6-Astra through Codex in T3 Code.
Closes #22737