perf(workspace): gate side effects on stack route focus
Pass useIsFocused through as isRouteFocused rather than short-circuiting the whole tree. Terminals query/subscription, checkout diff, providers snapshot, keybindings, tab reconciliation, focused-agent writes, and sidebar rendering all no-op when the route is in the stack but not focused, so a hidden workspace screen no longer drives background work.
This commit is contained in:
@@ -30,13 +30,19 @@ interface UseProvidersSnapshotResult {
|
|||||||
refetchIfStale: () => void;
|
refetchIfStale: () => void;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
interface UseProvidersSnapshotOptions {
|
||||||
|
enabled?: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
export function useProvidersSnapshot(
|
export function useProvidersSnapshot(
|
||||||
serverId: string | null,
|
serverId: string | null,
|
||||||
cwd?: string | null,
|
cwd?: string | null,
|
||||||
|
options: UseProvidersSnapshotOptions = {},
|
||||||
): UseProvidersSnapshotResult {
|
): UseProvidersSnapshotResult {
|
||||||
const queryClient = useQueryClient();
|
const queryClient = useQueryClient();
|
||||||
const client = useHostRuntimeClient(serverId ?? "");
|
const client = useHostRuntimeClient(serverId ?? "");
|
||||||
const isConnected = useHostRuntimeIsConnected(serverId ?? "");
|
const isConnected = useHostRuntimeIsConnected(serverId ?? "");
|
||||||
|
const enabled = options.enabled ?? true;
|
||||||
const normalizedCwd = cwd?.trim() || undefined;
|
const normalizedCwd = cwd?.trim() || undefined;
|
||||||
const normalizedCwdKey = normalizeProvidersSnapshotCwdKey(normalizedCwd);
|
const normalizedCwdKey = normalizeProvidersSnapshotCwdKey(normalizedCwd);
|
||||||
const supportsSnapshot = useSessionStore(
|
const supportsSnapshot = useSessionStore(
|
||||||
@@ -50,7 +56,7 @@ export function useProvidersSnapshot(
|
|||||||
|
|
||||||
const snapshotQuery = useQuery({
|
const snapshotQuery = useQuery({
|
||||||
queryKey,
|
queryKey,
|
||||||
enabled: Boolean(supportsSnapshot && serverId && client && isConnected),
|
enabled: Boolean(enabled && supportsSnapshot && serverId && client && isConnected),
|
||||||
staleTime: 60_000,
|
staleTime: 60_000,
|
||||||
queryFn: async () => {
|
queryFn: async () => {
|
||||||
if (!client) {
|
if (!client) {
|
||||||
@@ -71,7 +77,7 @@ export function useProvidersSnapshot(
|
|||||||
const { mutateAsync: refreshSnapshot, isPending: isRefreshing } = refreshMutation;
|
const { mutateAsync: refreshSnapshot, isPending: isRefreshing } = refreshMutation;
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (!supportsSnapshot || !client || !isConnected || !serverId) {
|
if (!enabled || !supportsSnapshot || !client || !isConnected || !serverId) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -89,7 +95,16 @@ export function useProvidersSnapshot(
|
|||||||
requestId: "providers_snapshot_update",
|
requestId: "providers_snapshot_update",
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}, [client, isConnected, normalizedCwdKey, queryClient, queryKey, serverId, supportsSnapshot]);
|
}, [
|
||||||
|
client,
|
||||||
|
enabled,
|
||||||
|
isConnected,
|
||||||
|
normalizedCwdKey,
|
||||||
|
queryClient,
|
||||||
|
queryKey,
|
||||||
|
serverId,
|
||||||
|
supportsSnapshot,
|
||||||
|
]);
|
||||||
|
|
||||||
const refresh = useCallback(
|
const refresh = useCallback(
|
||||||
async (providers?: AgentProvider[]) => {
|
async (providers?: AgentProvider[]) => {
|
||||||
|
|||||||
@@ -131,6 +131,10 @@ type WorkspaceScreenProps = {
|
|||||||
workspaceId: string;
|
workspaceId: string;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
type WorkspaceScreenContentProps = WorkspaceScreenProps & {
|
||||||
|
isRouteFocused: boolean;
|
||||||
|
};
|
||||||
|
|
||||||
function trimNonEmpty(value: string | null | undefined): string | null {
|
function trimNonEmpty(value: string | null | undefined): string | null {
|
||||||
if (typeof value !== "string") {
|
if (typeof value !== "string") {
|
||||||
return null;
|
return null;
|
||||||
@@ -566,13 +570,13 @@ function useStableTabDescriptorMap(tabDescriptors: WorkspaceTabDescriptor[]) {
|
|||||||
export function WorkspaceScreen({ serverId, workspaceId }: WorkspaceScreenProps) {
|
export function WorkspaceScreen({ serverId, workspaceId }: WorkspaceScreenProps) {
|
||||||
const isFocused = useIsFocused();
|
const isFocused = useIsFocused();
|
||||||
|
|
||||||
if (!isFocused) {
|
|
||||||
return <View style={{ flex: 1 }} />;
|
|
||||||
}
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<ExplorerSidebarAnimationProvider>
|
<ExplorerSidebarAnimationProvider>
|
||||||
<WorkspaceScreenContent serverId={serverId} workspaceId={workspaceId} />
|
<WorkspaceScreenContent
|
||||||
|
serverId={serverId}
|
||||||
|
workspaceId={workspaceId}
|
||||||
|
isRouteFocused={isFocused}
|
||||||
|
/>
|
||||||
</ExplorerSidebarAnimationProvider>
|
</ExplorerSidebarAnimationProvider>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -604,7 +608,11 @@ function useCloseTabs(): UseCloseTabsResult {
|
|||||||
return { closingTabIds, closeTab };
|
return { closingTabIds, closeTab };
|
||||||
}
|
}
|
||||||
|
|
||||||
function WorkspaceScreenContent({ serverId, workspaceId }: WorkspaceScreenProps) {
|
function WorkspaceScreenContent({
|
||||||
|
serverId,
|
||||||
|
workspaceId,
|
||||||
|
isRouteFocused,
|
||||||
|
}: WorkspaceScreenContentProps) {
|
||||||
const { theme } = useUnistyles();
|
const { theme } = useUnistyles();
|
||||||
const insets = useSafeAreaInsets();
|
const insets = useSafeAreaInsets();
|
||||||
const mainBackgroundColor = theme.colors.surfaceWorkspace;
|
const mainBackgroundColor = theme.colors.surfaceWorkspace;
|
||||||
@@ -646,11 +654,15 @@ function WorkspaceScreenContent({ serverId, workspaceId }: WorkspaceScreenProps)
|
|||||||
|
|
||||||
// Warm the server-side provider snapshot for this workspace cwd so the model
|
// Warm the server-side provider snapshot for this workspace cwd so the model
|
||||||
// picker is ready when opened. Consumers share the same query cache key.
|
// picker is ready when opened. Consumers share the same query cache key.
|
||||||
useProvidersSnapshot(normalizedServerId, workspaceDirectory);
|
useProvidersSnapshot(normalizedServerId, workspaceDirectory, {
|
||||||
|
enabled: isRouteFocused,
|
||||||
|
});
|
||||||
const [pendingTerminalCreateInput, setPendingTerminalCreateInput] = useState<{
|
const [pendingTerminalCreateInput, setPendingTerminalCreateInput] = useState<{
|
||||||
paneId?: string;
|
paneId?: string;
|
||||||
} | null>(null);
|
} | null>(null);
|
||||||
const canCreateTerminalNow = Boolean(client && isConnected && workspaceDirectory);
|
const canCreateTerminalNow = Boolean(
|
||||||
|
isRouteFocused && client && isConnected && workspaceDirectory,
|
||||||
|
);
|
||||||
|
|
||||||
const workspaceAgentVisibility = useStoreWithEqualityFn(
|
const workspaceAgentVisibility = useStoreWithEqualityFn(
|
||||||
useSessionStore,
|
useSessionStore,
|
||||||
@@ -669,7 +681,7 @@ function WorkspaceScreenContent({ serverId, workspaceId }: WorkspaceScreenProps)
|
|||||||
type ListTerminalsPayload = ListTerminalsResponse["payload"];
|
type ListTerminalsPayload = ListTerminalsResponse["payload"];
|
||||||
const terminalsQuery = useQuery({
|
const terminalsQuery = useQuery({
|
||||||
queryKey: terminalsQueryKey,
|
queryKey: terminalsQueryKey,
|
||||||
enabled: Boolean(client && isConnected) && Boolean(workspaceDirectory),
|
enabled: Boolean(isRouteFocused && client && isConnected && workspaceDirectory),
|
||||||
queryFn: async () => {
|
queryFn: async () => {
|
||||||
if (!client || !workspaceDirectory) {
|
if (!client || !workspaceDirectory) {
|
||||||
throw new Error("Host is not connected");
|
throw new Error("Host is not connected");
|
||||||
@@ -736,7 +748,7 @@ function WorkspaceScreenContent({ serverId, workspaceId }: WorkspaceScreenProps)
|
|||||||
const { archiveAgent } = useArchiveAgent();
|
const { archiveAgent } = useArchiveAgent();
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (!client || !isConnected || !workspaceDirectory) {
|
if (!isRouteFocused || !client || !isConnected || !workspaceDirectory) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -758,9 +770,11 @@ function WorkspaceScreenContent({ serverId, workspaceId }: WorkspaceScreenProps)
|
|||||||
unsubscribeChanged();
|
unsubscribeChanged();
|
||||||
client.unsubscribeTerminals({ cwd: workspaceDirectory });
|
client.unsubscribeTerminals({ cwd: workspaceDirectory });
|
||||||
};
|
};
|
||||||
}, [client, isConnected, queryClient, terminalsQueryKey, workspaceDirectory]);
|
}, [client, isConnected, isRouteFocused, queryClient, terminalsQueryKey, workspaceDirectory]);
|
||||||
|
|
||||||
const isCheckoutQueryEnabled = Boolean(client && isConnected) && Boolean(workspaceDirectory);
|
const isCheckoutQueryEnabled = Boolean(
|
||||||
|
isRouteFocused && client && isConnected && workspaceDirectory,
|
||||||
|
);
|
||||||
const checkoutQuery = useQuery({
|
const checkoutQuery = useQuery({
|
||||||
queryKey: checkoutStatusQueryKey(
|
queryKey: checkoutStatusQueryKey(
|
||||||
normalizedServerId,
|
normalizedServerId,
|
||||||
@@ -851,8 +865,11 @@ function WorkspaceScreenContent({ serverId, workspaceId }: WorkspaceScreenProps)
|
|||||||
}, [isGitCheckout, normalizedServerId, workspaceDirectory]);
|
}, [isGitCheckout, normalizedServerId, workspaceDirectory]);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
if (!isRouteFocused) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
setActiveExplorerCheckout(activeExplorerCheckout);
|
setActiveExplorerCheckout(activeExplorerCheckout);
|
||||||
}, [activeExplorerCheckout, setActiveExplorerCheckout]);
|
}, [activeExplorerCheckout, isRouteFocused, setActiveExplorerCheckout]);
|
||||||
|
|
||||||
const openExplorerForWorkspace = useCallback(() => {
|
const openExplorerForWorkspace = useCallback(() => {
|
||||||
if (!activeExplorerCheckout) {
|
if (!activeExplorerCheckout) {
|
||||||
@@ -876,7 +893,7 @@ function WorkspaceScreenContent({ serverId, workspaceId }: WorkspaceScreenProps)
|
|||||||
});
|
});
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (isWeb || !isExplorerOpen) {
|
if (!isRouteFocused || isWeb || !isExplorerOpen) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -889,7 +906,7 @@ function WorkspaceScreenContent({ serverId, workspaceId }: WorkspaceScreenProps)
|
|||||||
});
|
});
|
||||||
|
|
||||||
return () => handler.remove();
|
return () => handler.remove();
|
||||||
}, [closeToAgent, isExplorerOpen]);
|
}, [closeToAgent, isExplorerOpen, isRouteFocused]);
|
||||||
|
|
||||||
const persistenceKey = useMemo(
|
const persistenceKey = useMemo(
|
||||||
() =>
|
() =>
|
||||||
@@ -979,14 +996,20 @@ function WorkspaceScreenContent({ serverId, workspaceId }: WorkspaceScreenProps)
|
|||||||
}, [focusedPaneTabState.activeTab]);
|
}, [focusedPaneTabState.activeTab]);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
if (!isRouteFocused) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
setFocusedAgentId(normalizedServerId, focusedPaneAgentId);
|
setFocusedAgentId(normalizedServerId, focusedPaneAgentId);
|
||||||
}, [focusedPaneAgentId, normalizedServerId, setFocusedAgentId]);
|
}, [focusedPaneAgentId, isRouteFocused, normalizedServerId, setFocusedAgentId]);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
if (!isRouteFocused) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
return () => {
|
return () => {
|
||||||
setFocusedAgentId(normalizedServerId, null);
|
setFocusedAgentId(normalizedServerId, null);
|
||||||
};
|
};
|
||||||
}, [normalizedServerId, setFocusedAgentId]);
|
}, [isRouteFocused, normalizedServerId, setFocusedAgentId]);
|
||||||
|
|
||||||
const ensureWorkspaceTab = useCallback(
|
const ensureWorkspaceTab = useCallback(
|
||||||
function ensureWorkspaceTab(target: WorkspaceTabTarget): string | null {
|
function ensureWorkspaceTab(target: WorkspaceTabTarget): string | null {
|
||||||
@@ -1018,6 +1041,9 @@ function WorkspaceScreenContent({ serverId, workspaceId }: WorkspaceScreenProps)
|
|||||||
);
|
);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
if (!isRouteFocused) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (!normalizedServerId || !normalizedWorkspaceId || !persistenceKey) {
|
if (!normalizedServerId || !normalizedWorkspaceId || !persistenceKey) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -1040,6 +1066,7 @@ function WorkspaceScreenContent({ serverId, workspaceId }: WorkspaceScreenProps)
|
|||||||
});
|
});
|
||||||
}, [
|
}, [
|
||||||
hasHydratedAgents,
|
hasHydratedAgents,
|
||||||
|
isRouteFocused,
|
||||||
pendingByDraftId,
|
pendingByDraftId,
|
||||||
persistenceKey,
|
persistenceKey,
|
||||||
reconcileWorkspaceTabs,
|
reconcileWorkspaceTabs,
|
||||||
@@ -1077,6 +1104,9 @@ function WorkspaceScreenContent({ serverId, workspaceId }: WorkspaceScreenProps)
|
|||||||
const emptyWorkspaceSeedRef = useRef<string | null>(null);
|
const emptyWorkspaceSeedRef = useRef<string | null>(null);
|
||||||
const autoOpenedSetupTabWorkspaceRef = useRef<string | null>(null);
|
const autoOpenedSetupTabWorkspaceRef = useRef<string | null>(null);
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
if (!isRouteFocused) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (!persistenceKey) {
|
if (!persistenceKey) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -1099,12 +1129,16 @@ function WorkspaceScreenContent({ serverId, workspaceId }: WorkspaceScreenProps)
|
|||||||
normalizedWorkspaceId,
|
normalizedWorkspaceId,
|
||||||
openWorkspaceDraftTab,
|
openWorkspaceDraftTab,
|
||||||
persistenceKey,
|
persistenceKey,
|
||||||
|
isRouteFocused,
|
||||||
terminals.length,
|
terminals.length,
|
||||||
tabs.length,
|
tabs.length,
|
||||||
workspaceAgentVisibility.activeAgentIds.size,
|
workspaceAgentVisibility.activeAgentIds.size,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
if (!isRouteFocused) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (!persistenceKey) {
|
if (!persistenceKey) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -1146,6 +1180,7 @@ function WorkspaceScreenContent({ serverId, workspaceId }: WorkspaceScreenProps)
|
|||||||
autoOpenedSetupTabWorkspaceRef.current = persistenceKey;
|
autoOpenedSetupTabWorkspaceRef.current = persistenceKey;
|
||||||
}, [
|
}, [
|
||||||
hasSetupTab,
|
hasSetupTab,
|
||||||
|
isRouteFocused,
|
||||||
normalizedWorkspaceId,
|
normalizedWorkspaceId,
|
||||||
openWorkspaceTabInBackground,
|
openWorkspaceTabInBackground,
|
||||||
persistenceKey,
|
persistenceKey,
|
||||||
@@ -1763,7 +1798,7 @@ function WorkspaceScreenContent({ serverId, workspaceId }: WorkspaceScreenProps)
|
|||||||
"workspace.tab.navigate-relative",
|
"workspace.tab.navigate-relative",
|
||||||
"workspace.terminal.new",
|
"workspace.terminal.new",
|
||||||
] as const,
|
] as const,
|
||||||
enabled: Boolean(normalizedServerId && normalizedWorkspaceId),
|
enabled: Boolean(isRouteFocused && normalizedServerId && normalizedWorkspaceId),
|
||||||
priority: 100,
|
priority: 100,
|
||||||
isActive: () => true,
|
isActive: () => true,
|
||||||
handle: handleWorkspaceTabAction,
|
handle: handleWorkspaceTabAction,
|
||||||
@@ -1784,7 +1819,7 @@ function WorkspaceScreenContent({ serverId, workspaceId }: WorkspaceScreenProps)
|
|||||||
"workspace.pane.move-tab.down",
|
"workspace.pane.move-tab.down",
|
||||||
"workspace.pane.close",
|
"workspace.pane.close",
|
||||||
] as const,
|
] as const,
|
||||||
enabled: Boolean(normalizedServerId && normalizedWorkspaceId),
|
enabled: Boolean(isRouteFocused && normalizedServerId && normalizedWorkspaceId),
|
||||||
priority: 100,
|
priority: 100,
|
||||||
isActive: () => true,
|
isActive: () => true,
|
||||||
handle: handleWorkspacePaneAction,
|
handle: handleWorkspacePaneAction,
|
||||||
@@ -1794,11 +1829,11 @@ function WorkspaceScreenContent({ serverId, workspaceId }: WorkspaceScreenProps)
|
|||||||
const canRenderDesktopPaneSplits = supportsDesktopPaneSplits();
|
const canRenderDesktopPaneSplits = supportsDesktopPaneSplits();
|
||||||
const shouldRenderDesktopPaneFallback = !isMobile && !canRenderDesktopPaneSplits;
|
const shouldRenderDesktopPaneFallback = !isMobile && !canRenderDesktopPaneSplits;
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (isNative || typeof document === "undefined" || activeTabDescriptor) {
|
if (!isRouteFocused || isNative || typeof document === "undefined" || activeTabDescriptor) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
document.title = "Workspace";
|
document.title = "Workspace";
|
||||||
}, [activeTabDescriptor]);
|
}, [activeTabDescriptor, isRouteFocused]);
|
||||||
const buildPaneContentModel = useCallback(
|
const buildPaneContentModel = useCallback(
|
||||||
(input: {
|
(input: {
|
||||||
tab: WorkspaceTabDescriptor;
|
tab: WorkspaceTabDescriptor;
|
||||||
@@ -1810,7 +1845,7 @@ function WorkspaceScreenContent({ serverId, workspaceId }: WorkspaceScreenProps)
|
|||||||
tab: input.tab,
|
tab: input.tab,
|
||||||
normalizedServerId,
|
normalizedServerId,
|
||||||
normalizedWorkspaceId,
|
normalizedWorkspaceId,
|
||||||
isPaneFocused: input.isPaneFocused,
|
isPaneFocused: isRouteFocused && input.isPaneFocused,
|
||||||
onOpenTab: (target) => {
|
onOpenTab: (target) => {
|
||||||
if (!persistenceKey) {
|
if (!persistenceKey) {
|
||||||
return;
|
return;
|
||||||
@@ -1846,6 +1881,7 @@ function WorkspaceScreenContent({ serverId, workspaceId }: WorkspaceScreenProps)
|
|||||||
[
|
[
|
||||||
handleCloseTabById,
|
handleCloseTabById,
|
||||||
handleOpenFileFromChat,
|
handleOpenFileFromChat,
|
||||||
|
isRouteFocused,
|
||||||
focusWorkspacePane,
|
focusWorkspacePane,
|
||||||
navigateToTabId,
|
navigateToTabId,
|
||||||
normalizedServerId,
|
normalizedServerId,
|
||||||
@@ -1919,8 +1955,8 @@ function WorkspaceScreenContent({ serverId, workspaceId }: WorkspaceScreenProps)
|
|||||||
<MobileMountedTabSlot
|
<MobileMountedTabSlot
|
||||||
key={tabId}
|
key={tabId}
|
||||||
tabDescriptor={tabDescriptor}
|
tabDescriptor={tabDescriptor}
|
||||||
isVisible={tabId === activeTabDescriptor.tabId}
|
isVisible={isRouteFocused && tabId === activeTabDescriptor.tabId}
|
||||||
isPaneFocused={tabId === activeTabDescriptor.tabId}
|
isPaneFocused={isRouteFocused && tabId === activeTabDescriptor.tabId}
|
||||||
paneId={focusedPaneId}
|
paneId={focusedPaneId}
|
||||||
buildPaneContentModel={buildMobilePaneContentModel}
|
buildPaneContentModel={buildMobilePaneContentModel}
|
||||||
/>
|
/>
|
||||||
@@ -2029,7 +2065,7 @@ function WorkspaceScreenContent({ serverId, workspaceId }: WorkspaceScreenProps)
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<View style={[styles.container, { backgroundColor: mainBackgroundColor }]}>
|
<View style={[styles.container, { backgroundColor: mainBackgroundColor }]}>
|
||||||
{isWeb && activeTabDescriptor ? (
|
{isRouteFocused && isWeb && activeTabDescriptor ? (
|
||||||
<WorkspaceTabPresentationResolver
|
<WorkspaceTabPresentationResolver
|
||||||
tab={activeTabDescriptor}
|
tab={activeTabDescriptor}
|
||||||
serverId={normalizedServerId}
|
serverId={normalizedServerId}
|
||||||
@@ -2303,7 +2339,7 @@ function WorkspaceScreenContent({ serverId, workspaceId }: WorkspaceScreenProps)
|
|||||||
{shouldRenderDesktopPaneFallback ? (
|
{shouldRenderDesktopPaneFallback ? (
|
||||||
<WorkspaceDesktopTabsRow
|
<WorkspaceDesktopTabsRow
|
||||||
paneId={focusedPaneId ?? undefined}
|
paneId={focusedPaneId ?? undefined}
|
||||||
isFocused
|
isFocused={isRouteFocused}
|
||||||
tabs={desktopTabRowItems}
|
tabs={desktopTabRowItems}
|
||||||
normalizedServerId={normalizedServerId}
|
normalizedServerId={normalizedServerId}
|
||||||
normalizedWorkspaceId={normalizedWorkspaceId}
|
normalizedWorkspaceId={normalizedWorkspaceId}
|
||||||
@@ -2374,7 +2410,8 @@ function WorkspaceScreenContent({ serverId, workspaceId }: WorkspaceScreenProps)
|
|||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
|
|
||||||
{(!isFocusModeEnabled || isMobile) &&
|
{isRouteFocused &&
|
||||||
|
(!isFocusModeEnabled || isMobile) &&
|
||||||
(workspaceDirectory ? (
|
(workspaceDirectory ? (
|
||||||
<ExplorerSidebar
|
<ExplorerSidebar
|
||||||
serverId={normalizedServerId}
|
serverId={normalizedServerId}
|
||||||
|
|||||||
Reference in New Issue
Block a user