Skip to content

fix(mobile): hide the Android new-task header before mount - #22740

Closed
colonelpanic8 wants to merge 1 commit into
pingdotgg:mainfrom
colonelpanic8:fix/android-fold-keyboard
Closed

colonelpanic8 wants to merge 1 commit into
pingdotgg:mainfrom
colonelpanic8:fix/android-fold-keyboard

Conversation

@colonelpanic8

@colonelpanic8 colonelpanic8 commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Problem

NewTaskDraft initially 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.headerShown to Platform.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:

Matched test APK Repeated cold-start Settings → Environments → New thread runs
Unmodified Assembly bundle 2 / 6 failed, hero y=530 instead of y=315
Same Assembly release source plus this one-line fix 0 / 6 failed, hero y=315 throughout

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 0849d4f97 plus 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 a93b03c8a5 in 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.
  • Android Expo production bundle exports: passed.
  • Physical Fold: fixed composer visibility and a device-state fold/unfold round trip passed.

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.

Unmodified control: persistent offset Fixed Assembly flow
Persistent offset Fixed layout

Fixed composer above keyboard

Control measurements · Fixed measurements · Persistence/restart measurements

Implemented and checked with GPT-6-Astra through Codex in T3 Code.

Closes #22737

@github-actions github-actions Bot added vouch:unvouched PR author is not yet trusted in the VOUCHED list. size:XS 0-9 changed lines (additions + deletions). labels Oct 21, 2026
@macroscopeapp

macroscopeapp Bot commented Oct 21, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: 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.

@coderabbitai

coderabbitai Bot commented Oct 21, 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: Advanced
  • Run ID: cb583196-d70e-4ad6-b4de-9d5ab7f7f933
📥 Commits

Reviewing files that changed from the base of the PR and between 618761a and 26658eb.

📒 Files selected for processing: 1
  • apps/mobile/src/Stack.tsx

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

NewTaskDraft now hides its native header on Android and keeps it visible on other platforms.

Changes: New Task Draft Header

Layer / File(s) Summary
Set platform-specific header visibility
apps/mobile/src/Stack.tsx
NewTaskDraft sets headerShown to Platform.OS !== "android".

Priority: ⬇️ Low

Estimated code review effort: 1 (Trivial) | ~3 minutes

Change: Bug fix

Possibly related issues

  • pingdotgg/t3code#22737 — Describes the same Android NewTaskDraft header timing issue addressed by the platform-specific headerShown setting.

Suggested reviewers: juliusmarminge

Merge Risk: ⚪ Minimal · up to 26658

The scoped Android header change has no established regression and is mergeable with normal checks.

Pre-merge checks: Passed 4
Check name Status Explanation
Title check Passed The title clearly and concisely describes the main change: hiding the Android new-task header before mount.
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.
Description check Passed The pull request description includes all required sections. It explains the problem, change, scope and approval rationale, detailed verification results, limitations, evidence links, and agent detail…
Full details: Description check

Explanation

The pull request description includes all required sections. It explains the problem, change, scope and approval rationale, detailed verification results, limitations, evidence links, and agent details.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • 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 22, 2026

Copy link
Copy Markdown
Member

Note

🤖 Claude Opus 5.5 responding on behalf of Theo

Thanks for this. Julius has #22742 open with the same fix to the Android draft header in Stack.tsx (#22737), so we are closing this one to keep one fix in review.

@t3dotgg t3dotgg closed this Oct 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XS 0-9 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Android NewTaskDraft initially reserves space for a native header it hides after mount

2 participants