fix(app): open Changes on the populated comparison (#3636)

* fix(app): restore smart Changes comparison selection

The tab migration persisted the selected comparison, pinning Changes to an empty view after checkout state changed. Keep comparison overrides ephemeral per surface and expire them when dirtiness changes, while preserving only presentation state in tabs.

* chore(app): date Changes compatibility cleanup
This commit is contained in:
Mohamed Boudra
2026-08-21 11:23:43 +02:00
committed by GitHub
parent 04624cb419
commit a7f3bf7abb
17 changed files with 228 additions and 45 deletions
+2 -1
View File
@@ -77,7 +77,7 @@ function PanelState({
function WorkingDiffPanel() {
const { t } = useTranslation();
const { serverId, workspaceId, target, openFileInWorkspace } = usePaneContext();
const { serverId, workspaceId, tabId, target, openFileInWorkspace } = usePaneContext();
const [changesState, setChangesState] = usePanelState(changesStateSchema, defaultChangesState);
const cwd = useWorkspaceDirectory(serverId, workspaceId);
const isActive = useRetainedPanelActive();
@@ -101,6 +101,7 @@ function WorkingDiffPanel() {
cwd={cwd}
enabled={isActive}
host="panel"
modeScope={tabId}
focusPath={target.focusPath}
focusRequestId={target.focusRequestId}
onOpenFile={handleOpenFile}