Self-improving AI Employees for everyone
Python ai-agentsai-employeeai-employeesassistantautonomous-agentsco-employeescompanygrok-botinstinctloop-agentsmuseown-your-datapersonalself-hosted
fix(client): drop Node-only types from browser code -- unbreaks CI typecheck
trohitg24237f644c8b
diff --git a/client/src/components/SquareNode.tsx b/client/src/components/SquareNode.tsxindex e38ef9c0..582dd0b5 100644--- a/client/src/components/SquareNode.tsx+++ b/client/src/components/SquareNode.tsx@@ -52,7 +52,7 @@ const SquareNode: React.FC<NodeProps<NodeData>> = ({ id, type, data, isConnectab// Minimum glow duration state - keeps glow visible for at least 500msconst [isGlowing, setIsGlowing] = useState(false);- const glowTimeoutRef = useRef<NodeJS.Timeout | null>(null);+ const glowTimeoutRef = useRef<ReturnType<typeof setTimeout> | null>(null);// Track when execution starts to ensure minimum glow durationuseEffect(() => {diff --git a/client/src/components/ui/ErrorBoundary.tsx b/client/src/components/ui/ErrorBoundary.tsxindex 55e43018..803e3dcf 100644--- a/client/src/components/ui/ErrorBoundary.tsx+++ b/client/src/components/ui/ErrorBoundary.tsx@@ -63,7 +63,7 @@ class ErrorBoundary extends Component<Props, State> {</Button></div>- {process.env.NODE_ENV === 'development' && this.state.error && (+ {import.meta.env.DEV && this.state.error && (<details className="rounded-sm border border-border bg-muted p-3 text-left"><summary className="mb-2 flex cursor-pointer items-center gap-2 font-medium text-foreground"><Bug className="h-3.5 w-3.5" />diff --git a/client/src/contexts/WebSocketContext.tsx b/client/src/contexts/WebSocketContext.tsxindex 33de8185..7810fc49 100644--- a/client/src/contexts/WebSocketContext.tsx+++ b/client/src/contexts/WebSocketContext.tsx@@ -38,7 +38,7 @@ const generateRequestId = (): string => {interface PendingRequest {resolve: (value: any) => void;reject: (reason: any) => void;- timeout: NodeJS.Timeout | null; // null for no timeout (trigger nodes)+ timeout: ReturnType<typeof setTimeout> | null; // null for no timeout (trigger nodes)}// Queued send tracking (for replay after reconnect)@@ -517,7 +517,7 @@ export const WebSocketProvider: React.FC<{ children: React.ReactNode }> = ({ chi// type tightens to the library's class so any feature-specific calls// (`shouldReconnect`, `reconnect()`) type-check.const wsRef = useRef<ReconnectingWebSocket | null>(null);- const pingIntervalRef = useRef<NodeJS.Timeout | null>(null);+ const pingIntervalRef = useRef<ReturnType<typeof setTimeout> | null>(null);const pendingRequestsRef = useRef<Map<string, PendingRequest>>(new Map());// Generic broadcast subscribers ({type -> Set<handler>}) for events// surfaced via send_custom_event on the backend. Lets new features@@ -1395,7 +1395,7 @@ export const WebSocketProvider: React.FC<{ children: React.ReactNode }> = ({ chicontinue;}const requestId = generateRequestId();- let timeout: NodeJS.Timeout | null = null;+ let timeout: ReturnType<typeof setTimeout> | null = null;if (queued.timeoutMs > 0) {// Reset the timeout budget on replay so caller's perspective// remains "now"; queue-side timer was already aborted above.@@ -1880,7 +1880,7 @@ export const WebSocketProvider: React.FC<{ children: React.ReactNode }> = ({ chi// FAST PATH: socket open — send immediately.if (wsRef.current?.readyState === ReconnectingWebSocket.OPEN) {const requestId = generateRequestId();- let timeout: NodeJS.Timeout | null = null;+ let timeout: ReturnType<typeof setTimeout> | null = null;if (effectiveTimeout > 0) {timeout = setTimeout(() => {pendingRequestsRef.current.delete(requestId);