fix(mobile): iPad sidebar shows new threads after switching tabs #27894
main fromrefs/pull/27894/head·merged by juliusmarminge View on GitHubProblem#
On iPad, the sidebar thread list stops updating after you switch the sidebar's tab bar away from Chats and back (PRs, Settings) while a thread is open beside it. Threads created after that, from the header's New task button or anywhere else, run and finish in the detail column but never appear in the sidebar until the app is relaunched. A finished thread also stays under Working.
Reproduced on current main (cb9629e689) in the T3 Code dev client on an iPad Pro 13-inch (M5) simulator, against a fresh dev server with Codex. Open a thread, tap PRs and then Chats, start a new thread with New task and send a message. The thread replies, but its row is missing from the sidebar even with Working expanded. Relaunching the app shows it.
Change#
Home stops reading the thread-shell atom while it is hidden, and decides that from one visibility value shared by every Home instance. On iPad each workspace tab slot has its own split primary column, and every one of those columns reports its appear/disappear events to the same Home route. A Chats → PRs → Chats switch ends with the PRs column's did-disappear arriving after the Chats column's will-appear. That leaves the shared value false while the Chats sidebar is on screen, and nothing sets it back.
useHomeRouteVisible now returns the enclosing split primary column's own presented state when there is one (NativePrimaryColumnContext). That state is per column, so another slot cannot overwrite it. Outside a native primary column (Android, iPhone without native columns) the existing shared value / isFocused() path is unchanged, and a hidden or covered column still freezes the list as before.
Scope and approval#
Fixes pingdotgg/t3code#27868
Verification#
vp test run --project react src/features/home/home-route-visibility.test.tsx(apps/mobile): the new testkeeps the sidebar thread list live after switching tabs beside a focused Threadfails on main withnew thread shells reach the sidebar list: expected 1 to be 2and passes with the fix. It replays the tab-switch event order (Chats will-appear, then the PRs column's did-disappear) with Home kept mounted.vp run check:changed: format, lint, knip, typecheck (2 packages), tests and the React compiler check all pass, on the merged head.- On device, with temporary logging (not committed), PRs → Chats on main logged
set trueand thenset falsewith no Home remount. A fallback-only variant that kept the shared value first still lost the new thread. This head kept the list live after PRs → Chats, after Settings → Chats, and after two PRs round trips in a row.
Evidence: real T3 Code Dev app on pool iOS simulators driven by agent-device, light theme, Dynamic Type Large, fresh dev DB per side (T3CODE_DEV_SEED=0), Codex GPT-6-Astra, same native fingerprint 953468b560e2 on both sides; each side's JS comes from its own checkout's Metro. GIFs are sampled step recordings with a UTC timestamp banner. The PRs-tab frames are left out on purpose, because that tab lists live pull requests; the taps are in the narrated steps.
R1: iPad Pro 13-inch (M5), portrait, light. With A open: PRs → Chats → New task → send "bravo". Before (UTC 22:51:07 A open, 22:51:20 PRs, 22:51:22 Chats, 22:51:30 New task, 22:51:43 Send, 22:52:03 replied): B replies in the detail but is missing from the sidebar. After (22:58:58 A open, 22:59:00 PRs, 22:59:02 Chats, 22:59:10 New task, 22:59:41 Send, 23:00:40 replied): B is the top, selected row.
| R1 | Before | After | Diff0 | DiffT (>16/255) |
|---|---|---|---|---|
| SHA | cb9629e689 | 76e47e7c6c | cb9629e689 → 76e47e7c6c | cb9629e689 → 76e47e7c6c |
| Recording | ||||
| Endpoint |
What else differs in the R1 pair: B's new row and selection, with the rows below it shifted down (intended). Also provider-generated titles ("Reply Alpha"/"Say Bravo" before, "Reply with Alpha"/"Reply with Bravo" after), the clock, message times and relative ages, and a few native toolbar glass pixels next to the differently sized title. Diff0 is 1.76% of pixels; DiffT is 0.41%. The titles come from the provider and differ on every run, which an independent rebuild of R1 also showed ("Bravo"), so the diffs are not clean.
After-only rows, head 76e47e7c6c:
| Row | Steps | Recording |
|---|---|---|
| R2 iPad portrait: Settings round trip | A open, Settings → Chats, New task, send "charlie": C appears | |
| R3 iPad landscape | thread open, PRs → Chats, New task, send "delta": D appears | |
| R4 iPad portrait: sidebar hidden, then shown | after PRs → Chats, hide the sidebar (Maximize content), send a new thread, show the sidebar: the new thread is listed | |
| R7 iPhone 17 Pro portrait (unchanged path) | Home, PRs → Chats, open A, follow-up, Back; New chat, send "foxtrot", Back: list current both times | |
| R6 iPad portrait: Undo notice after a tab round trip | A open, PRs → Chats, row menu → Settle: notice shows; Undo restores the row |
Not checked:
- No before captures for R2–R4 and R7.
- The recordings are sampled stills, not continuous video. R4 has no frame from the moment the sidebar starts appearing, so it shows that the list caught up, not exactly when.
- The empty-list case (first thread in a project) was not captured separately; it goes through the same path as R1.
- Physical iPad, narrow Split View or Stage Manager windows, Android tablets, and dark theme were not run. Android doesn't use the changed branch.
Driver used for the captures (scratch, not committed)
# Setup, each side from its own checkout (before: worktree at cb9629e689):
# T3CODE_DEV_SEED=0 vp run dev:server --host 0.0.0.0
# cd apps/mobile && REACT_NATIVE_PACKAGER_HOSTNAME=<tailnet host> vp run dev:client
# cd apps/server && T3CODE_PORT=<port> node src/bin.ts project add --base-dir <checkout>/.t3 --title Demo <scratch git repo>
# agent-device connect proxy --daemon-base-url "$SIMLOCK_AGENT_DEVICE_URL" --session <s>
# agent-device open --platform ios --device 'iPad Pro 13-inch (M5)' --session <s>
# vp run mobile:install ios --session <s>
# agent-device open com.t3tools.t3code.dev 't3code-dev://expo-development-client/?url=<metro url>&disableAutoLaunch=1&disableFab=1' --session <s>
# .agents/skills/test-t3-mobile/scripts/pair-client.sh <port> <checkout>/.t3 http://<tailnet host>:<port> agent-device --session <s>
# R1 (A was created with New thread → Demo → "Reply with the single word alpha." and opened):
act press 'role="button" label="PRs"' --settle
act press 51 1330 --settle # Chats
act press 'label="New task"' --settle
act fill 'role="text-view"' "Reply with the single word bravo." --settle
act press 'label="Send"' --settle
act wait absent 'label="Stop agent"' 60000
# R2 swaps PRs for 'role="button" label="Settings"'. R4 adds 'label="Maximize content"' before New task
# and 'label="Show thread sidebar"' after the reply. R6: longpress the row, press 'label="Settle"', then 'label="Undo"'.
Model and harness: Claude Opus 5.5 in Claude Code (via T3 Code), with step agents on Claude Opus 5.5 and GPT-6.1-Sol in Codex.
🤖 Generated with Claude Code
- 1
github-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:trusted
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:XS
macroscopeapp[bot](GitHub profile, opens in a new tab) approved these changes
juliusmarminge added labelsbugfix
juliusmarminge added labelspr:gate-failed
No actionable comments were generated in the recent review.
Walkthrough
-
The Home visibility hook now uses the native primary column’s
presentedstate when that context exists. A split-view test checks that the sidebar observes an updated atom value after tab-switch transition events.Changes: Home route visibility
Layer / File(s) Summary Primary-column visibility and validation
apps/mobile/src/features/home/home-route-visibility.ts,apps/mobile/src/features/home/home-route-visibility.test.tsx,apps/mobile/vite.config.tsThe hook uses NativePrimaryColumnContext.presentedwhen the context exists. Otherwise, it retains the visibility-store value and focus fallback. The split-view test checks sidebar atom updates after tab-switch events, and Vite includes the test in the React test project.Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Bug fix · Severity of issue fixed: Medium
Suggested reviewers:
maria-rcks,t3dotgg
Merge Risk:
Minimal · up tod5db4-
This change makes the iPad sidebar thread list keep updating after switching tabs. No actionable merge-blocking risk was identified in the reviewed change.
Pre-merge checks:
4-
Check name Status Explanation Title check The title clearly and concisely describes the primary fix: restoring new-thread visibility in the iPad sidebar after switching tabs. It uses a conventional commit format. Description check The description includes the required Problem, Change, Scope and approval, and Verification sections. It explains reproduction steps, implementation details, linked issue scope, automated tests, devic… Linked Issues check Issue #27868requires a newly created iPad thread to appear in the sidebar without an app restart.useHomeRouteVisiblenow uses the enclosingNativePrimaryColumnContext.presentedvalue for native …Out of Scope Changes check The changes stay within issue #27868. The source change corrects Home visibility for iPad native split columns. The test covers the reported tab-switch regression. The Vite configuration includes that…Full details: Description check
-
Explanation
The description includes the required Problem, Change, Scope and approval, and Verification sections. It explains reproduction steps, implementation details, linked issue scope, automated tests, device checks, observed results, and limitations.
Full details: Linked Issues check
-
Explanation
Issue
#27868requires a newly created iPad thread to appear in the sidebar without an app restart.useHomeRouteVisiblenow uses the enclosingNativePrimaryColumnContext.presentedvalue for native split columns, so visibility events from another workspace tab cannot hide the visible Chats sidebar. The added React test reproduces the tab event order and verifies that a new thread-shell update reaches the sidebar. The existing shared-value andisFocused()fallback remains for platforms without a native primary column.
Full details: Out of Scope Changes check
-
Explanation
The changes stay within issue
#27868. The source change corrects Home visibility for iPad native split columns. The test covers the reported tab-switch regression. The Vite configuration includes that focused test in the React test project. No unrelated product behavior is shown in the supplied evidence.
-
Finishing Touches
-
Generate docstrings
-
- Commit to this branch
- Create a new PR
Generate unit tests (beta)
-
- Commit to this branch
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Usage-based review receipt#
- Mode: Continue automatically
- Reviewed files: 1
- Charged: $0.25
- View usage details
Note
This review was completed with usage-based billing: files reviewed beyond your plan's included limits are billed at $0.25/file. View usage-based billing.
Recent review info-
Run configuration-
- Source mode: Auto
- Repository: pingdotgg/t3code
- Branch: fix/issue-27868
- File: .coderabbit.config.ts
- Commit: d5db46d
- Layers: Repository TS config
- Review profile: CHILL
- Plan: Team
- Run ID:
78130008-6d90-4602-83f3-475e66c86e41
Commits-
Reviewing files that changed from the base of the PR and between f49c25bc6d19bdd4739dc8168c66579e08b710d8 and d5db46d1b46ff518c6ef471cdc2834df5bdd6212.
Files selected for processing: 1-
apps/mobile/vite.config.ts
Limit details: You’ve used all 10 included reviews currently available.
-
-
The automated pipeline stopped on this pull request and will not merge it:
someone else pushed to fix/issue-27868 (head is now f42b17b8f6); the pipeline does not build on commits it did not review
It stays open for a person to finish or close.
Evidence#
Real native iOS app on iPad Pro 13-inch (M5), iOS 27.2, landscape, light appearance, 1376×1032 logical viewport. Separate base/head checkouts used fresh isolated databases, synthetic data, and the replay agent.
Open Earlier work beside Chats → Settings → Chats → New task → send Check the sidebar. Create New sidebar task through the server CLI while Chats stays visible, wait for the replay reply, and check the sidebar. Working is expanded by default.
Proven: scenarios:prove exited 0; base failed the sidebar check and head passed.
Evidence Before — c90b67859a After — f49c25bc6d Returned to Chats 

Working status 

Reply complete 

External thread update 

Recording Before interaction After interaction Scenario · iPad runner configuration · Proof summary
Videos omit installation/pairing, are rotated upright, and mask connection details and transient filesystem paths; the sidebar remains visible. External creation used the real server CLI rather than a second physical device.
AI-assisted; verified with the tests and tools listed above.
Not shown:
- A second physical device was not used; the externally created thread was generated through the real server CLI.
- The PRs tab variant was not exercised; the captured reproduction uses Settings.
tanstack-source added labelsbug
juliusmarminge merged this52f0988
juliusmarminge closed this
All clear
Posted via Macroscope — Effect Service Conventions
Sign in to join this conversation.
Approvability#
Verdict: Approved at
f42b17bMacroscope's review found this PR approvable — The sidebar now uses its own native column visibility so thread updates continue after switching tabs. The change is limited to UI subscription gating and preserves existing behavior outside native columns.
No code changes detected at
You can add or adjust custom eligibility rules. [Learn more](https://docs.macroscope.com/approvability#example-custom-eligibility-rules).378c709. Prior analysis still applies.