Git panel: share checkout actions + fix push loading (#20)

* Update files

* Git panel: share checkout actions

Hoist checkout-scoped async git actions into a shared store and keep primary Push CTA loading in-place. Also stabilize e2e git flows.

* Stabilize git panel async actions and fix e2e flakes
This commit is contained in:
Mohamed Boudra
2026-02-06 13:18:30 +07:00
committed by GitHub
parent d724988542
commit cf9ff07be6
27 changed files with 858 additions and 433 deletions
@@ -222,6 +222,11 @@ export function DropdownSheet({
const bottomSheetRef = useRef<BottomSheetModal>(null);
const snapPoints = useMemo(() => ["60%", "90%"], []);
const handleClose = useCallback(() => {
bottomSheetRef.current?.dismiss();
onClose();
}, [onClose]);
useEffect(() => {
if (visible) {
bottomSheetRef.current?.present();
@@ -267,6 +272,15 @@ export function DropdownSheet({
>
<View style={styles.bottomSheetHeader}>
<Text style={styles.dropdownSheetTitle}>{title}</Text>
<Pressable
accessibilityRole="button"
accessibilityLabel="Close sheet"
onPress={handleClose}
hitSlop={10}
testID="dropdown-sheet-close"
>
<X size={18} color={defaultTheme.colors.foregroundMuted} />
</Pressable>
</View>
<BottomSheetScrollView
contentContainerStyle={styles.dropdownSheetScrollContent}
@@ -990,11 +1004,12 @@ export function GitOptionsSection({
visible={isWorktreeSheetOpen}
onClose={() => setIsWorktreeSheetOpen(false)}
>
{worktreeOptions.map((option) => (
{worktreeOptions.map((option, index) => (
<SelectOption
key={option.path}
label={option.label}
selected={option.path === selectedWorktreePath}
testID={`worktree-attach-option-${index}`}
onPress={() => {
onSelectWorktreePath(option.path);
setIsWorktreeSheetOpen(false);
@@ -1094,6 +1109,9 @@ const styles = StyleSheet.create((theme) => ({
backgroundColor: theme.colors.palette.zinc[600],
},
bottomSheetHeader: {
flexDirection: "row",
alignItems: "center",
justifyContent: "space-between",
paddingHorizontal: theme.spacing[6],
paddingBottom: theme.spacing[2],
},