Prevent auto-reloading diff views when status area shifts (#5951)

* Avoid auto-reloading single-file diff tabs if their status row has
  moved to a different area (e.g. from unstaged to staged).
* Prevent auto-reloading combined uncommitted diffs when they are
  backed by an uncommitted entries snapshot.
* This preserves the open tab's original diff context as staging and
  commit status changes, preventing useful context from being lost.
This commit is contained in:
Jinjing
2026-06-20 18:52:04 -07:00
committed by GitHub
parent 308da355bc
commit 954fa0a65e
8 changed files with 280 additions and 22 deletions
@@ -193,8 +193,7 @@ export function buildHeadlessTabGroupSplit(args: {
return {
...group,
tabOrder: sourceOrder,
activeTabId:
group.activeTabId === args.tabId ? (sourceOrder[0] ?? null) : group.activeTabId
activeTabId: group.activeTabId === args.tabId ? (sourceOrder[0] ?? null) : group.activeTabId
}
}
return group