From 88bd9155a5ddec4da6bd80befd855fc77b14da06 Mon Sep 17 00:00:00 2001 From: Ladislau Szomoru <3372902+lszomoru@users.noreply.github.com> Date: Fri, 7 Nov 2025 12:53:32 +0000 Subject: [PATCH] SCM - fix rendering issue with incoming changes node (#276055) SCM - fix rendering issue with incoming/outgoing changes nodes --- .../contrib/scm/browser/scmHistoryViewPane.ts | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/vs/workbench/contrib/scm/browser/scmHistoryViewPane.ts b/src/vs/workbench/contrib/scm/browser/scmHistoryViewPane.ts index 4c03f38c193..7d6719bfcd4 100644 --- a/src/vs/workbench/contrib/scm/browser/scmHistoryViewPane.ts +++ b/src/vs/workbench/contrib/scm/browser/scmHistoryViewPane.ts @@ -1250,14 +1250,22 @@ class SCMHistoryViewModel extends Disposable { // Create the color map const colorMap = this._getGraphColorMap(historyItemRefs); + // Only show incoming changes node if the remote history item reference is part of the graph + const addIncomingChangesNode = this._scmViewService.graphShowIncomingChangesConfig.get() + && historyItemRefs.some(ref => ref.id === historyItemRemoteRef?.id); + + // Only show outgoing changes node if the history item reference is part of the graph + const addOutgoingChangesNode = this._scmViewService.graphShowOutgoingChangesConfig.get() + && historyItemRefs.some(ref => ref.id === historyItemRef?.id); + const viewModels = toISCMHistoryItemViewModelArray( historyItems, colorMap, historyProvider.historyItemRef.get(), historyProvider.historyItemRemoteRef.get(), historyProvider.historyItemBaseRef.get(), - this._scmViewService.graphShowIncomingChangesConfig.get(), - this._scmViewService.graphShowOutgoingChangesConfig.get(), + addIncomingChangesNode, + addOutgoingChangesNode, mergeBase) .map(historyItemViewModel => ({ repository,