From c95edd298a370fa85199cf1056be70f6892cf741 Mon Sep 17 00:00:00 2001 From: wSedlacek Date: Sat, 7 Nov 2026 00:30:51 -0800 Subject: [PATCH 1/8] feat(mobile): one-tap git pills on the thread bar Creating a PR from mobile took digging through the git menu. The next git step now sits on the thread bar as a short pill (Commit, Push, Pull, PR, or View), with the full label kept for accessibility. --- .../src/components/ui/AppBar.android.tsx | 22 +++- apps/mobile/src/components/ui/AppBar.tsx | 75 ++++++++---- apps/mobile/src/components/ui/AppBar.types.ts | 9 ++ .../features/threads/ThreadGitControls.tsx | 114 ++++++++++++++---- .../src/features/threads/ThreadHeader.tsx | 8 +- docs/user/source-control.md | 8 +- .../src/state/gitActions.test.ts | 7 ++ .../client-runtime/src/state/gitActions.ts | 11 ++ 8 files changed, 195 insertions(+), 59 deletions(-) diff --git a/apps/mobile/src/components/ui/AppBar.android.tsx b/apps/mobile/src/components/ui/AppBar.android.tsx index f647535a1d42c..a01f0f3b7c77e 100644 --- a/apps/mobile/src/components/ui/AppBar.android.tsx +++ b/apps/mobile/src/components/ui/AppBar.android.tsx @@ -155,15 +155,25 @@ function AppBarView(props: AppBarProps & { readonly searchState?: SearchState }) )); const confirmButton = props.confirm ? ( - - + ), Keyboard: { dismiss: () => {} }, BackHandler: { addEventListener: () => ({ remove: () => {} }) }, })); +vi.mock("./AppText", () => ({ + AppText: (props: { readonly children?: ReactNode }) => {props.children}, +})); +vi.mock("./AppSymbol", () => ({ SymbolView: () => null })); +vi.mock("./AppActivityIndicator", () => ({ AppActivityIndicator: () => null })); // React Navigation throws this outside a navigator, as for the Arrange threads sheet. vi.mock("@react-navigation/native", () => ({ useIsFocused: () => { diff --git a/apps/mobile/src/components/ui/AppBar.android.tsx b/apps/mobile/src/components/ui/AppBar.android.tsx index a01f0f3b7c77e..f9e022888eaf9 100644 --- a/apps/mobile/src/components/ui/AppBar.android.tsx +++ b/apps/mobile/src/components/ui/AppBar.android.tsx @@ -143,7 +143,11 @@ function AppBarView(props: AppBarProps & { readonly searchState?: SearchState }) ); } - const menuView = props.menus?.map((menu) => ( + const confirmMenuTitle = props.confirm?.menu?.title; + const menusWithoutConfirm = confirmMenuTitle + ? (props.menus?.filter((entry) => entry.title !== confirmMenuTitle) ?? []) + : (props.menus ?? []); + const menuView = menusWithoutConfirm.map((menu) => ( )); - const confirmButton = props.confirm ? ( - props.confirm.showLabel || !props.confirm.icon ? ( + const confirm = props.confirm; + const menuConfirm = confirm?.menu ? ( + selectMenuItem(confirm.menu!.items, nativeEvent.event)} + > + {confirm.showLabel || !confirm.icon ? ( + + + ) : null; + const labeledConfirm = + confirm && !confirm.menu && (confirm.showLabel || !confirm.icon) ? (