/** * ContextSwitchOverlay - Full-screen loading overlay during context switches. * * Displayed when isContextSwitching is true, preventing stale data flash * during workspace transitions. */ import React from 'react'; import { useStore } from '@renderer/store'; export const ContextSwitchOverlay: React.FC = () => { const isContextSwitching = useStore((state) => state.isContextSwitching); const targetContextId = useStore((state) => state.targetContextId); if (!isContextSwitching) { return null; } // Format context label for display const contextLabel = targetContextId === 'local' ? 'Local' : (targetContextId?.replace(/^ssh-/, '') ?? 'Unknown'); return (
Switching to {contextLabel}...
Loading workspace