fix(mobile): keep iOS tab dock hidden over pushed detail screens #45003
main fromrefs/pull/45003/head·merged by juliusmarminge View on GitHubProblem#
On iOS phones, opening a thread directly on cold start (for example by tapping a push notification, or opening a thread right after launch before background tab prewarming runs) can cause the floating bottom tab dock (WorkspaceTabDock, with Chats/PRs/Issues/Settings) to reappear on top of the pushed thread's bottom composer and stay stuck there, blocking message input.
Expected behavior: when a detail screen (Thread, PullRequest, Issue, etc.) is pushed on compact iOS layouts, the bottom workspace tab dock stays hidden until the user navigates or swipes back to Home.
Change#
Both halves address one underlying bug: WorkspaceStackView's primaryVisible state can be flipped to true while a detail screen is on top.
- Ignore inactive and prewarmed tab slots (
createWorkspaceStackNavigator.ios.tsx,createV5StackNavigator.ios.tsx):WorkspaceNativeTabsmounts inactive tabs (headerOnly: true) viarequestIdleCallbackshortly after the first tab renders, andRNSTabBarController.prewarmScreenController:inserts each hidden tab's view into the window. Previously, every slot'sV5CardStackViewsharedonRootVisibilityChange={setPrimaryVisible}andonNativePopChange={setNativelyPoppingWorkspaceRoute}, so a prewarmed slot's index-0Homescreen firingonWillAppearsetprimaryVisible = trueand broughtWorkspaceTabDockback over the active tab's pushedThread.createWorkspaceStackNavigator.ios.tsxnow omitsonRootVisibilityChange/onNativePopChangeforheaderOnlyslots, andV5CardStackViewchecksNativeWorkspaceTabActivityContext(isActive() && !headerOnly) before reporting root visibility or native pop state so retained inactive slots cannot interfere either.
- Clear root visibility when a detail card appears on the active slot (
createV5StackNavigator.ios.tsx):- On
onWillAppearandonDidAppearforindex > 0on the active slot, callonRootVisibilityChange(false)so a delayed rootonWillAppearfrom cold launch or a cancelled back-swipe cannot leaveprimaryVisiblestucktrueonce the detail screen is shown.
- On
Scope#
Focused bug fix for a daily-user iOS regression where the floating tab dock overlays the thread composer. Small, self-contained fix for an obvious bug, so no separate issue was opened first (searched open issues and PRs for WorkspaceTabDock, onRootVisibilityChange, primaryVisible, and prewarm and found no duplicate).
Verification#
- Ran
pnpm --filter @t3tools/mobile exec vp test run --project react src/native/createV5StackNavigator.ios.test.tsx src/features/home/home-route-visibility.test.tsx: 2 test files, 6/6 tests passed, including 2 new regression tests covering prewarmed/inactive tab slots and active-slot detail card appearance. - Ran
pnpm --filter @t3tools/mobile exec vp test run --project unit src/native/workspace-stack-projection.test.ts src/features/layout/workspace/workspace-detail-selection.test.ts: 2 test files, 37/37 tests passed. - Ran
pnpm --filter @t3tools/mobile typecheck: 0 errors. - Ran
pnpm exec vp lint --report-unused-disable-directives,pnpm exec vp fmt --check, and pre-commitknip:check: all passed with 0 warnings and 0 errors. - Not checked: developed on a Linux host without an iOS Simulator, so runtime UIKit verification and before/after iOS screenshots were not captured on device yet.
Built with Gemini 4 Neon via Antigravity.
Evidence#
Cold relaunch a seeded thread through its deep link, select Metro, wait for the composer plus 20 seconds, then tap the same composer position. Environment: iPhone 17 Pro simulator, iOS 27.2, compact portrait, light theme. Stable screenshot pairs were identical. Base showed the dock over the composer and intercepted the tap; head kept it hidden and opened the keyboard.
Manual driver · Seed script · Attempted scenario
Not shown: