diff --git a/packages/app/src/components/file-explorer-pane.tsx b/packages/app/src/components/file-explorer-pane.tsx index 5bead9868..a3683b8e6 100644 --- a/packages/app/src/components/file-explorer-pane.tsx +++ b/packages/app/src/components/file-explorer-pane.tsx @@ -11,11 +11,12 @@ import { NativeSyntheticEvent, Modal, Pressable, - ScrollView, + ScrollView as RNScrollView, Text, View, useWindowDimensions, } from "react-native"; +import { ScrollView } from "react-native-gesture-handler"; import { StyleSheet, UnistylesRuntime, useUnistyles } from "react-native-unistyles"; import { Fonts } from "@/constants/theme"; import * as Clipboard from "expo-clipboard"; @@ -737,16 +738,16 @@ export function FileExplorerPane({ No preview available yet ) : preview.kind === "text" ? ( - - + {preview.content} - - + + ) : preview.kind === "image" && preview.content ? ( - + - + ) : ( Binary preview unavailable diff --git a/packages/app/src/components/git-diff-pane.tsx b/packages/app/src/components/git-diff-pane.tsx index fe1109cfb..e945e2ce6 100644 --- a/packages/app/src/components/git-diff-pane.tsx +++ b/packages/app/src/components/git-diff-pane.tsx @@ -390,13 +390,11 @@ const DiffFileSection = memo(function DiffFileSection({ color={theme.colors.foregroundMuted} /> - - {file.path.split("/").pop()} - - {file.path.includes("/") - ? ` ${file.path.slice(0, file.path.lastIndexOf("/"))}` - : ""} - + {file.path.split("/").pop()} + + {file.path.includes("/") + ? ` ${file.path.slice(0, file.path.lastIndexOf("/"))}` + : ""} {file.isNew && ( @@ -1160,21 +1158,23 @@ export function GitDiffPane({ serverId, agentId, cwd }: GitDiffPaneProps) { {isGit && (hasUncommittedChanges || aheadCount > 0) ? ( [ + style={({ hovered, pressed }) => [ styles.diffStatusRow, - hovered && styles.diffStatusRowHovered, + (hovered || pressed) && styles.diffStatusRowHovered, ]} testID="changes-diff-status" onPress={() => setDiffModeOverride(diffMode === "uncommitted" ? "base" : "uncommitted")} > - {({ hovered }) => ( + {({ hovered, pressed }) => ( <> {diffMode === "uncommitted" ? "Uncommitted" : "Committed"} - {hovered ? ( - - ) : null} + )} @@ -1234,9 +1234,10 @@ const styles = StyleSheet.create((theme) => ({ alignItems: "center", alignSelf: "flex-start", gap: theme.spacing[1], - marginHorizontal: theme.spacing[3], + // Align text with chevron/branch icons (at spacing[2] from edge) marginVertical: theme.spacing[2], - paddingHorizontal: theme.spacing[2], + paddingLeft: theme.spacing[2], + paddingRight: theme.spacing[2], paddingVertical: theme.spacing[1], borderRadius: theme.borderRadius.base, }, @@ -1247,6 +1248,9 @@ const styles = StyleSheet.create((theme) => ({ fontSize: theme.fontSize.xs, color: theme.colors.foregroundMuted, }, + diffStatusIconHidden: { + opacity: 0, + }, splitButton: { flexDirection: "row", alignItems: "stretch", @@ -1429,18 +1433,17 @@ const styles = StyleSheet.create((theme) => ({ chevronExpanded: { transform: [{ rotate: "90deg" }], }, - filePath: { + fileName: { fontSize: theme.fontSize.sm, fontWeight: theme.fontWeight.normal, color: theme.colors.foreground, - flex: 1, - }, - fileName: { - color: theme.colors.foreground, + flexShrink: 0, }, fileDir: { - color: theme.colors.foregroundMuted, + fontSize: theme.fontSize.sm, fontWeight: theme.fontWeight.normal, + color: theme.colors.foregroundMuted, + flex: 1, }, newBadge: { backgroundColor: "rgba(46, 160, 67, 0.2)",