Fix visible changes pane diff subscription

This commit is contained in:
Mohamed Boudra
2026-04-30 10:38:07 +07:00
parent bdb8f6f535
commit 0aa7c768ba
3 changed files with 14 additions and 12 deletions
@@ -483,6 +483,7 @@ function SidebarContent({
workspaceId={workspaceId}
cwd={workspaceRoot}
hideHeaderRow={!isMobile}
enabled={isOpen}
/>
)}
{resolvedTab === "files" && (
+13 -2
View File
@@ -746,6 +746,7 @@ interface GitDiffPaneProps {
workspaceId?: string | null;
cwd: string;
hideHeaderRow?: boolean;
enabled?: boolean;
}
type PressableStyleFn = (
@@ -1489,7 +1490,17 @@ function buildGitActionsForPane({
});
}
export function GitDiffPane({ serverId, workspaceId, cwd, hideHeaderRow }: GitDiffPaneProps) {
function shouldEnableCheckoutDiff(input: { paneEnabled: boolean; isGit: boolean }): boolean {
return input.paneEnabled && input.isGit;
}
export function GitDiffPane({
serverId,
workspaceId,
cwd,
hideHeaderRow,
enabled = true,
}: GitDiffPaneProps) {
const { theme } = useUnistyles();
const toast = useToast();
const isMobile = useIsCompactFormFactor();
@@ -1594,7 +1605,7 @@ export function GitDiffPane({ serverId, workspaceId, cwd, hideHeaderRow }: GitDi
mode: diffMode,
baseRef,
ignoreWhitespace: changesPreferences.hideWhitespace,
enabled: isGit,
enabled: shouldEnableCheckoutDiff({ paneEnabled: enabled, isGit }),
});
const {
status: prStatus,