diff --git a/packages/app/src/components/diff-stat.tsx b/packages/app/src/components/diff-stat.tsx
index 969d7d9f8..04f41aa79 100644
--- a/packages/app/src/components/diff-stat.tsx
+++ b/packages/app/src/components/diff-stat.tsx
@@ -6,11 +6,20 @@ interface DiffStatProps {
deletions: number;
}
+const compactFormatter = new Intl.NumberFormat("en-US", {
+ notation: "compact",
+ maximumFractionDigits: 1,
+});
+
+export function formatDiffCount(value: number): string {
+ return compactFormatter.format(value).toLowerCase();
+}
+
export function DiffStat({ additions, deletions }: DiffStatProps) {
return (
- +{additions.toLocaleString()}
- -{deletions.toLocaleString()}
+ +{formatDiffCount(additions)}
+ -{formatDiffCount(deletions)}
);
}
@@ -25,11 +34,11 @@ const styles = StyleSheet.create((theme) => ({
additions: {
fontSize: theme.fontSize.xs,
fontWeight: theme.fontWeight.normal,
- color: theme.colors.palette.green[400],
+ color: theme.colors.diffAddition,
},
deletions: {
fontSize: theme.fontSize.xs,
fontWeight: theme.fontWeight.normal,
- color: theme.colors.palette.red[500],
+ color: theme.colors.diffDeletion,
},
}));
diff --git a/packages/app/src/components/sidebar-workspace-list.tsx b/packages/app/src/components/sidebar-workspace-list.tsx
index f25f6783c..e07b0d1c0 100644
--- a/packages/app/src/components/sidebar-workspace-list.tsx
+++ b/packages/app/src/components/sidebar-workspace-list.tsx
@@ -2494,22 +2494,6 @@ const styles = StyleSheet.create((theme) => ({
fontSize: theme.fontSize.xs,
flexShrink: 0,
},
- diffStatRow: {
- flexDirection: "row",
- alignItems: "center",
- gap: 6,
- flexShrink: 0,
- },
- diffStatAdditions: {
- fontSize: theme.fontSize.xs,
- fontWeight: theme.fontWeight.normal,
- color: theme.colors.diffAddition,
- },
- diffStatDeletions: {
- fontSize: theme.fontSize.xs,
- fontWeight: theme.fontWeight.normal,
- color: theme.colors.diffDeletion,
- },
kebabButton: {
padding: 2,
borderRadius: 4,
diff --git a/packages/app/src/screens/workspace/workspace-screen.tsx b/packages/app/src/screens/workspace/workspace-screen.tsx
index 087a99e38..a37667ef5 100644
--- a/packages/app/src/screens/workspace/workspace-screen.tsx
+++ b/packages/app/src/screens/workspace/workspace-screen.tsx
@@ -2192,14 +2192,10 @@ function WorkspaceScreenContent({ serverId, workspaceId }: WorkspaceScreenProps)
color={iconColor}
/>
{workspaceDescriptor?.diffStat ? (
-
-
- +{workspaceDescriptor.diffStat.additions}
-
-
- -{workspaceDescriptor.diffStat.deletions}
-
-
+
) : null}
>
);
@@ -2493,22 +2489,6 @@ const styles = StyleSheet.create((theme) => ({
sourceControlButtonHovered: {
backgroundColor: theme.colors.surface2,
},
- diffStatRow: {
- flexDirection: "row",
- alignItems: "center",
- gap: 6,
- flexShrink: 0,
- },
- diffStatAdditions: {
- fontSize: theme.fontSize.xs,
- fontWeight: theme.fontWeight.normal,
- color: theme.colors.diffAddition,
- },
- diffStatDeletions: {
- fontSize: theme.fontSize.xs,
- fontWeight: theme.fontWeight.normal,
- color: theme.colors.diffDeletion,
- },
newTabActions: {
flexDirection: "row",
alignItems: "center",