Repository navigation
Conversation
Contributor
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — This is a four-line, iOS-only fix that remounts the existing sidebar picker on workspace tab switches so its native selection cannot remain stale. The change is isolated to the iPad/sidebar UI and introduces no new capability, schema, default, or static-analysis override. You can add or adjust custom eligibility rules. Learn more. |
Each workspace tab retains its own copy of the sidebar, including the Threads / Pull requests picker. Tapping a segment moves that SwiftUI picker before the tab switch freezes its tree. When the tab comes back, React renders the same selection as before, so the picker keeps the stale segment. Every other round trip the highlight disagreed with the list, and tapping the highlighted segment did nothing. Remount the picker on each tab switch so the visible copy always starts from the current selection.
PixPMusic
force-pushed
the
pixpmusic/ipad-sidebar-tabs
branch
from
October 17, 2026 05:34
d33882e to
627cdb3
Compare
This branch has not been deployed
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
On iPad, the Threads / Pull requests picker at the top of the sidebar drifts out of sync. After switching to Pull requests and back to Threads, the thread list shows but "Pull requests" stays highlighted. On the next trip the reverse happens: the list stays on pull requests, and tapping Threads does nothing, because SwiftUI thinks that segment is already selected. It alternates on every round trip, so it looks intermittent.
Cause
WorkspaceNativeTabsretains a separate copy of the workspace tree for each tab, and each copy has its own picker. Tapping a segment moves that SwiftUI picker immediately, then the tab switch freezes the tree it lives in. When that tab comes back, React renders the sameselectionthe frozen copy last had, so nothing reaches the native picker and it keeps showing the segment tapped before. Instrumenting the flow showed the stuck tap never reachesonSelect.Fix
Key the picker on
selectionRevision, which the workspace state already bumps on every tab switch, and which the root header already uses to refresh the retained trees. Whichever copy becomes visible mounts a fresh picker from the current selection. The copy that was tapped is frozen and hidden at that point, so the remount isn't visible.Why this qualifies as a small focused fix
It's one obvious defect: the sidebar picker shows the wrong tab and ignores taps. The fix is one
keyin one component and changes no behavior beyond keeping the picker in sync. It affects only the wide iPad layout, where this picker appears.Verification
vp lintandvp fmt --checkon the changed file are clean, andvp run typecheckinapps/mobilepasses.Before / After
iPad, after one Pull requests → Threads round trip from a fresh launch.
#20133 also touches this file (it moves the selection handler into a shared hook) and will need a one-line rebase after either one merges.
Model: Claude Opus 5.5 | Harness: Claude Code in T3 Code