Repository navigation
Conversation
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. No code changes detected at You can add or adjust custom eligibility rules. Learn more. |
|
Important Review skippedReview was skipped as selected files did not have any reviewable changes. ⚙️ Run configuration
📥 Commits
You can disable this status message by setting the Use the checkbox below for a quick retry:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to
|
d33882e to
627cdb3
Compare
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.
627cdb3 to
7ca0dcc
Compare
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