Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(mobile): keep iOS tab dock hidden over pushed detail screens #45003

Mergedzhang-zedong(GitHub profile, opens in a new tab)merged 3 commits intomain fromrefs/pull/45003/headmerged by juliusmarminge View on GitHub

Problem

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.

  1. Ignore inactive and prewarmed tab slots (createWorkspaceStackNavigator.ios.tsx, createV5StackNavigator.ios.tsx):
    • WorkspaceNativeTabs mounts inactive tabs (headerOnly: true) via requestIdleCallback shortly after the first tab renders, and RNSTabBarController.prewarmScreenController: inserts each hidden tab's view into the window. Previously, every slot's V5CardStackView shared onRootVisibilityChange={setPrimaryVisible} and onNativePopChange={setNativelyPoppingWorkspaceRoute}, so a prewarmed slot's index-0 Home screen firing onWillAppear set primaryVisible = true and brought WorkspaceTabDock back over the active tab's pushed Thread.
    • createWorkspaceStackNavigator.ios.tsx now omits onRootVisibilityChange / onNativePopChange for headerOnly slots, and V5CardStackView checks NativeWorkspaceTabActivityContext (isActive() && !headerOnly) before reporting root visibility or native pop state so retained inactive slots cannot interfere either.
  2. Clear root visibility when a detail card appears on the active slot (createV5StackNavigator.ios.tsx):
    • On onWillAppear and onDidAppear for index > 0 on the active slot, call onRootVisibilityChange(false) so a delayed root onWillAppear from cold launch or a cancelled back-swipe cannot leave primaryVisible stuck true once the detail screen is shown.

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-commit knip: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.

    1. Pushed242c790

    2. 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.

      BeforeAfter
      5df0356a02242c790fdb
      Before: dock covers composerAfter: composer remains clear
      Before recordingAfter recording

      Manual driver · Seed script · Attempted scenario

      Not shown:

      • Actual push-notification delivery was not exercised; the notification's thread deep link was used.
      • A cancelled interactive-back gesture was not confirmed; the simulated edge swipe completed navigation instead.
      • Other pushed detail screen types and noncompact layouts were not exercised.
    3. juliusmarminge added labelstakeover:ready

    4. juliusmarminge removed labelstakeover:in-progress

    5. juliusmarminge merged thisb08cfeb

    6. juliusmarminge closed this

    7. juliusmarminge removed labelstakeover:ready

Sign in to join this conversation.