fix(mobile): feature screens use the components/ui menu, dialog and search primitives#33193

merged3
main
t3code/mobile-primitive-sweep
opened19h agobyJJulius Marminge
View on GitHubTwo-way sync enabledPR last imported 14h ago

Following #33173, I checked feature screens for UI they build themselves when components/ui already provides it. Where that copy behaved differently on one platform, I changed the screen to use the primitive:

  • Menu icons missing on Android. The pull-request row menu and the queued-message menu passed Material icon names on Android (open_in_new, edit, …). The shared Android menu only draws SF Symbol names, so every row except "Copy link" had no icon. Both menus now pass SF Symbol names on both platforms, like every other menu.
  • Android menu code running on iOS. The device preview built its Menu actions with a helper from headerMenu.android, so iOS ran Android code and showed the inline device list as a nested "Devices ›" submenu. The converter moved to the shared menuActionItems (beside its inverse, appBarMenuItemsFromActions) and keeps inline groups inline (displayInline). The Android menu ignores that flag, so Android is unchanged. The menu's trigger is now a ControlPill, matching the Home button beside it.
  • Unthemed dialogs on Android. GitHub app sign-in and the post-clone access prompt called react-native's Alert directly. They now use Dialog.alert, which shows the themed dialog on Android and keeps the destructive "Sign out" style.
  • Hand-built search in the scheduled-task thread picker. On iOS it wrote raw native-stack search options and added its own bottom search toolbar. On Android it put a search field above the list. It now passes search to its AppBar like the other pickers, so search sits in the bar on Android and where AppBar puts it on iPad and the iPhone Duo.
  • Platform fallbacks that never render. WorkspaceToolbar.tsx (a hand-built dock, with WorkspaceDock and WorkspaceSearchField) and CustomSnoozeSheet.tsx (a react-native Modal sheet) were base files beside .ios.tsx overrides. The toolbar's only importer is iOS-only, and the snooze sheet also has an Android file, so neither base ever ran. The iOS files are now the base files, as in components/ui, and the dead code is deleted.

Verification

  • vp run check:changed passes on main. menuActionItems.test.ts now also asserts that a titled inline group keeps displayInline. The dependency-graph and React Compiler coverage tests pass (1045 tests).
  • Android 17 emulator: the pull-request row menu shows all seven icons. The before shot was taken after reloading the app with the old file in place. The Destination picker's search is in the bar and filters the list.
  • iPhone 18 Pro Max simulator: the Destination picker searches from the bottom toolbar and filters. The workspace toolbar renders from its new base file, and the custom snooze sheet opens from its new base file.
  • I didn't open the device preview menu on a device: that needs a live device session in a thread. The converter change is covered by the unit test. I didn't trigger the two Dialog.alert call sites on a device either. Dialog.alert takes the same arguments as Alert.alert.

Done with Claude Opus 5.5 in Claude Code.

🤖 Generated with Claude Code

Checks

1 failing · 23 successful · 14 skipped
Some checks failed

Failing1

38c1b47

Added 3 commits

  • refactor(mobile): remove platform fallbacks that never render38c1b47
  • fix(mobile): feature menus and alerts go through the components/ui primitives9e029f2
  • fix(mobile): scheduled task thread picker searches from its AppBarc69a4e9
Synced from GitHub

Approvability

Verdict: Approved at 38c1b47

Macroscope's review found this PR approvable — The change consolidates mobile menus, dialogs and search around shared UI primitives while retaining existing action handlers. Its effects are limited to presentation and interaction, with no evident material change to permissions or data handling.

You can add or adjust custom eligibility rules. Learn more.