@@ -52,6 +52,7 @@ import {
5252 type GitQuickAction ,
5353 type DefaultBranchConfirmableAction ,
5454 requiresDefaultBranchConfirmation ,
55+ resolveChangesTotals ,
5556 resolveDefaultBranchActionDialogCopy ,
5657 resolveFeatureBranchUnavailableReason ,
5758 resolveGitActionProgressPresentation ,
@@ -1048,7 +1049,10 @@ export default function GitActionsControl({
10481049 const isRepo = gitStatus ?. isRepo ?? true ;
10491050 const hasPrimaryRemote = gitStatus ?. hasPrimaryRemote ?? false ;
10501051 const gitStatusForActions = gitStatus ;
1051- const changesTotals = gitStatusForActions ?. branchChanges ?? gitStatusForActions ?. workingTree ;
1052+ const changesTotals = resolveChangesTotals ( gitStatusForActions ) ?? {
1053+ insertions : 0 ,
1054+ deletions : 0 ,
1055+ } ;
10521056
10531057 const allFiles = gitStatusForActions ?. workingTree . files ?? [ ] ;
10541058 // Changed-file paths are repository-relative, so they must resolve against
@@ -1118,8 +1122,8 @@ export default function GitActionsControl({
11181122 gitActionProgress === null &&
11191123 ! gitStatusError &&
11201124 quickAction . disabled &&
1121- ! changesTotals ? .insertions &&
1122- ! changesTotals ? .deletions ;
1125+ ! changesTotals . insertions &&
1126+ ! changesTotals . deletions ;
11231127 const pendingDefaultBranchActionCopy = pendingDefaultBranchAction
11241128 ? resolveDefaultBranchActionDialogCopy ( {
11251129 action : pendingDefaultBranchAction . action ,
@@ -1636,19 +1640,17 @@ export default function GitActionsControl({
16361640 < span className = "flex items-center gap-1.5 font-mono text-xs tabular-nums" >
16371641 < span
16381642 className = {
1639- changesTotals ?. insertions
1640- ? "text-diff-addition-foreground"
1641- : "text-muted-foreground"
1643+ changesTotals . insertions ? "text-diff-addition-foreground" : "text-muted-foreground"
16421644 }
16431645 >
1644- +{ formatDiffCount ( changesTotals ? .insertions ?? 0 ) }
1646+ +{ formatDiffCount ( changesTotals . insertions ) }
16451647 </ span >
16461648 < span
16471649 className = {
1648- changesTotals ? .deletions ? "text-diff-deletion-foreground" : "text-muted-foreground"
1650+ changesTotals . deletions ? "text-diff-deletion-foreground" : "text-muted-foreground"
16491651 }
16501652 >
1651- -{ formatDiffCount ( changesTotals ? .deletions ?? 0 ) }
1653+ -{ formatDiffCount ( changesTotals . deletions ) }
16521654 </ span >
16531655 </ span >
16541656 </ ThreadDetailsControl >
0 commit comments