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:
@@ -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}
|
||||
|
||||
Reference in New Issue
Block a user