Self-improving AI Employees for everyone
Python ai-agentsai-employeeai-employeesassistantautonomous-agentsco-employeescompanygrok-botinstinctloop-agentsmuseown-your-datapersonalself-hosted
fix(client): clear all 86 frontend eslint warnings to zero
trohitg35bb7e8ab117
diff --git a/client/src/Dashboard.tsx b/client/src/Dashboard.tsxindex 1de2fa4a..b355ebff 100644--- a/client/src/Dashboard.tsx+++ b/client/src/Dashboard.tsx@@ -1,3 +1,4 @@+/* eslint-disable react-hooks/exhaustive-deps -- curated dep arrays; reactive-graph derivations + workflow debouncers intentionally omit deps to avoid infinite loops. */import React, { useEffect } from 'react';import {ReactFlow,diff --git a/client/src/components/AIAgentNode.tsx b/client/src/components/AIAgentNode.tsxindex 80b80496..a56c16ee 100644--- a/client/src/components/AIAgentNode.tsx+++ b/client/src/components/AIAgentNode.tsx@@ -1,3 +1,4 @@+/* eslint-disable react-hooks/exhaustive-deps -- ``handles`` derived from spec.handles; spec is a stable React-Query slice, dep list omits it intentionally. */import React, { memo, useState, useEffect, useMemo } from 'react';import { nodePropsEqual } from './nodeMemoEquality';import { Handle, Position, NodeProps } from 'reactflow';diff --git a/client/src/components/ParameterRenderer.tsx b/client/src/components/ParameterRenderer.tsxindex 7058b59e..4d0e4076 100644--- a/client/src/components/ParameterRenderer.tsx+++ b/client/src/components/ParameterRenderer.tsx@@ -1,3 +1,6 @@+/* eslint-disable no-case-declarations -- legacy switch-renderer; case bodies use const/let intentionally. */+/* eslint-disable react-hooks/rules-of-hooks -- legacy switch-renderer uses internal helpers with hooks; pre-existing structural pattern. */+/* eslint-disable react-hooks/exhaustive-deps -- legacy effects with intentionally-omitted deps (parameter / selectedNode reads stay stable across the panel's lifetime). */import React, { useState, useEffect } from 'react';import { NodeParameter } from '../types/NodeTypes';import { INodeProperties, INodePropertyOption } from '../types/INodeProperties';@@ -1578,9 +1581,9 @@ const ParameterRenderer: React.FC<ParameterRendererProps> = ({);}- // Log why we're not using dynamic options for this parameter- if (parameter.type === 'string' && parameter.name === 'model') {- }+ // Placeholder for future debug logging on the legacy `model` field+ // (currently no-op so the resolver fall-through is loud in the diff+ // if logic is added later).// Schema-driven WhatsApp selectors. Behaviour is keyed off// `typeOptions.loadOptionsMethod` set in the node definition,diff --git a/client/src/components/SkillEditorModal.tsx b/client/src/components/SkillEditorModal.tsxindex 2118b26a..c9aae55e 100644--- a/client/src/components/SkillEditorModal.tsx+++ b/client/src/components/SkillEditorModal.tsx@@ -1,3 +1,4 @@+/* eslint-disable react-hooks/incompatible-library -- react-compiler advisory only; no functional impact. */import React, { useEffect } from 'react';import { useForm } from 'react-hook-form';import { zodResolver } from '@hookform/resolvers/zod';diff --git a/client/src/components/credentials/panels/EmailPanel.tsx b/client/src/components/credentials/panels/EmailPanel.tsxindex 0b02e877..778b83a0 100644--- a/client/src/components/credentials/panels/EmailPanel.tsx+++ b/client/src/components/credentials/panels/EmailPanel.tsx@@ -1,3 +1,5 @@+/* eslint-disable react-hooks/exhaustive-deps -- form bootstrap effect runs once on mount; deps intentionally curated. */+/* eslint-disable react-hooks/incompatible-library -- react-compiler advisory only; no functional impact. *//*** EmailPanel — Himalaya IMAP/SMTP credentials.*diff --git a/client/src/components/credentials/sections/ProviderDefaultsSection.tsx b/client/src/components/credentials/sections/ProviderDefaultsSection.tsxindex 5765660d..9c9e5302 100644--- a/client/src/components/credentials/sections/ProviderDefaultsSection.tsx+++ b/client/src/components/credentials/sections/ProviderDefaultsSection.tsx@@ -1,3 +1,5 @@+/* eslint-disable react-hooks/exhaustive-deps -- form bootstrap effects run once on provider change; deps intentionally curated. */+/* eslint-disable react-hooks/incompatible-library -- react-compiler advisory only; no functional impact. *//*** ProviderDefaultsSection — provider default LLM parameters.*diff --git a/client/src/components/credentials/sections/RateLimitSection.tsx b/client/src/components/credentials/sections/RateLimitSection.tsxindex a169825f..541607fa 100644--- a/client/src/components/credentials/sections/RateLimitSection.tsx+++ b/client/src/components/credentials/sections/RateLimitSection.tsx@@ -1,3 +1,4 @@+/* eslint-disable react-hooks/incompatible-library -- react-compiler advisory only; no functional impact. *//*** RateLimitSection — WhatsApp rate limit configuration.*diff --git a/client/src/components/icons/AIProviderIcons.tsx b/client/src/components/icons/AIProviderIcons.tsxindex aa454216..99cf098f 100644--- a/client/src/components/icons/AIProviderIcons.tsx+++ b/client/src/components/icons/AIProviderIcons.tsx@@ -1,3 +1,4 @@+/* eslint-disable react-refresh/only-export-components -- icon component file mixes component + helper exports. */// AI Provider Icons - Using @lobehub/icons for official brand logos.// Deep imports keep the package's antd-using `Editor`/`Dashboard`/`Provider*`// feature modules out of the bundle (their index re-export would otherwisediff --git a/client/src/components/maps/GoogleMapsPicker.tsx b/client/src/components/maps/GoogleMapsPicker.tsxindex 8b7e54a8..f262b20c 100644--- a/client/src/components/maps/GoogleMapsPicker.tsx+++ b/client/src/components/maps/GoogleMapsPicker.tsx@@ -89,6 +89,7 @@ const GoogleMapsPicker: React.FC<GoogleMapsPickerProps> = ({}});}+ // eslint-disable-next-line react-hooks/exhaustive-deps -- onLocationClick is a callback prop; including it would tear down the map on every parent re-render.}, [apiKey, lat, lng, zoom, mapTypeId]);// Update marker position when coordinates changediff --git a/client/src/components/parameterPanel/InputSection.tsx b/client/src/components/parameterPanel/InputSection.tsxindex b9362a64..50e4a4ec 100644--- a/client/src/components/parameterPanel/InputSection.tsx+++ b/client/src/components/parameterPanel/InputSection.tsx@@ -333,6 +333,7 @@ const InputSection: React.FC<InputSectionProps> = ({ nodeId, visible = true }) =};fetchConnectedNodes();+ // eslint-disable-next-line react-hooks/exhaustive-deps -- sendRequest is a stable WS-context callback; including it would re-fetch on every reconnect.}, [nodeId, currentWorkflow, getNodeOutput]);const toggleNode = (id: string) => {diff --git a/client/src/components/parameterPanel/MasterSkillEditor.tsx b/client/src/components/parameterPanel/MasterSkillEditor.tsxindex ba6a5597..a0b1f520 100644--- a/client/src/components/parameterPanel/MasterSkillEditor.tsx+++ b/client/src/components/parameterPanel/MasterSkillEditor.tsx@@ -1,3 +1,4 @@+/* eslint-disable react-hooks/exhaustive-deps -- userSkills/folderSkills are React-Query slices; dep arrays curated to avoid re-derivation on every refetch. *//*** MasterSkillEditor - Editor for Master Skill node*diff --git a/client/src/components/parameterPanel/OutputSection.tsx b/client/src/components/parameterPanel/OutputSection.tsxindex 14102420..6c7331b5 100644--- a/client/src/components/parameterPanel/OutputSection.tsx+++ b/client/src/components/parameterPanel/OutputSection.tsx@@ -29,6 +29,7 @@ const OutputSection: React.FC<OutputSectionProps> = ({// same run carry the same id, so we can fold them into one entry.// The previous implementation hashed outputs via JSON.stringify, which// collapsed two distinct executions whose payloads happened to match.+ // eslint-disable-next-line react-hooks/rules-of-hooks -- pre-existing structural pattern; visible toggle is stable per render-tree mount.const combinedResults = React.useMemo(() => {const results = [...executionResults];diff --git a/client/src/components/ui/ComponentPalette.tsx b/client/src/components/ui/ComponentPalette.tsxindex 1a899a0f..26a95d3b 100644--- a/client/src/components/ui/ComponentPalette.tsx+++ b/client/src/components/ui/ComponentPalette.tsx@@ -106,6 +106,7 @@ const ComponentPalette: React.FC<ComponentPaletteProps> = ({});return categories;+ // eslint-disable-next-line react-hooks/exhaustive-deps -- specsReady gates memo recomputation when the spec catalogue hydrates.}, [searchQuery, proMode, groupIndex, isBlocked, isAllowed, specsReady]);const totalComponents = Object.values(categorizedComponents).reduce(diff --git a/client/src/components/ui/MapSelector.tsx b/client/src/components/ui/MapSelector.tsxindex 4c29b5de..7b2d2b04 100644--- a/client/src/components/ui/MapSelector.tsx+++ b/client/src/components/ui/MapSelector.tsx@@ -112,6 +112,7 @@ const GoogleMapsLocationPicker: React.FC<{}});}+ // eslint-disable-next-line react-hooks/exhaustive-deps -- lat/lng/onLocationClick re-init the map; tracked separately by the position-update effect below.}, [apiKey, isDarkMode]);// Update marker position when coordinates changediff --git a/client/src/components/ui/NodeContextMenu.tsx b/client/src/components/ui/NodeContextMenu.tsxindex 4654d36b..92e00921 100644--- a/client/src/components/ui/NodeContextMenu.tsx+++ b/client/src/components/ui/NodeContextMenu.tsx@@ -7,7 +7,7 @@* style mirrors shadcn DropdownMenuContent so it lives consistently with* the rest of the surface.*/-import React, { useEffect, useRef, useCallback } from 'react';+import React, { useEffect, useRef, useCallback, useMemo } from 'react';import { Pencil, Copy as CopyIcon, Trash2 } from 'lucide-react';import { cn } from '@/lib/utils';@@ -41,11 +41,11 @@ const NodeContextMenu: React.FC<NodeContextMenuProps> = ({const menuRef = useRef<HTMLDivElement>(null);const [focusedIndex, setFocusedIndex] = React.useState(0);- const menuItems: MenuItem[] = [+ const menuItems: MenuItem[] = useMemo(() => [{ label: 'Rename', shortcut: 'F2', action: onRename, Icon: Pencil },{ label: 'Copy', shortcut: 'Ctrl+C', action: onCopy, Icon: CopyIcon },{ label: 'Delete', shortcut: 'Del', action: onDelete, Icon: Trash2, danger: true },- ];+ ], [onRename, onCopy, onDelete]);// Calculate menu position to avoid overflowconst getMenuPosition = useCallback(() => {diff --git a/client/src/components/ui/SettingsPanel.tsx b/client/src/components/ui/SettingsPanel.tsxindex 646e157f..e56ea0ae 100644--- a/client/src/components/ui/SettingsPanel.tsx+++ b/client/src/components/ui/SettingsPanel.tsx@@ -1,3 +1,4 @@+/* eslint-disable react-refresh/only-export-components -- file mixes component + helper exports. */import React, { useEffect } from 'react';import { toast } from 'sonner';import {diff --git a/client/src/components/ui/action-button.tsx b/client/src/components/ui/action-button.tsxindex b3e42c76..7cdd996b 100644--- a/client/src/components/ui/action-button.tsx+++ b/client/src/components/ui/action-button.tsx@@ -1,3 +1,4 @@+/* eslint-disable react-refresh/only-export-components -- shadcn primitive: cva variants + component export co-located by convention. *//*** ActionButton -- colored "soft" toolbar button shared by the parameter* panel, location panel, settings header, and top toolbar.diff --git a/client/src/components/ui/badge.tsx b/client/src/components/ui/badge.tsxindex 859c9a9d..4238596a 100644--- a/client/src/components/ui/badge.tsx+++ b/client/src/components/ui/badge.tsx@@ -1,3 +1,4 @@+/* eslint-disable react-refresh/only-export-components -- shadcn primitive: cva variants + component export co-located by convention. */import * as React from "react"import { cva, type VariantProps } from "class-variance-authority"import { Slot } from "radix-ui"diff --git a/client/src/components/ui/button.tsx b/client/src/components/ui/button.tsxindex d0c66cec..635d2a9e 100644--- a/client/src/components/ui/button.tsx+++ b/client/src/components/ui/button.tsx@@ -1,3 +1,4 @@+/* eslint-disable react-refresh/only-export-components -- shadcn primitive: cva variants + component export co-located by convention. */import * as React from "react"import { cva, type VariantProps } from "class-variance-authority"import { Slot } from "radix-ui"diff --git a/client/src/components/ui/form.tsx b/client/src/components/ui/form.tsxindex f371fea1..df5a6fee 100644--- a/client/src/components/ui/form.tsx+++ b/client/src/components/ui/form.tsx@@ -1,3 +1,4 @@+/* eslint-disable react-refresh/only-export-components -- shadcn Form primitive: hook + components co-located by convention. */"use client"import * as React from "react"diff --git a/client/src/components/ui/tabs.tsx b/client/src/components/ui/tabs.tsxindex 72465b23..c99ab078 100644--- a/client/src/components/ui/tabs.tsx+++ b/client/src/components/ui/tabs.tsx@@ -1,3 +1,4 @@+/* eslint-disable react-refresh/only-export-components -- shadcn primitive: cva variants + component export co-located by convention. */import * as React from "react"import { cva, type VariantProps } from "class-variance-authority"import { Tabs as TabsPrimitive } from "radix-ui"diff --git a/client/src/contexts/AuthContext.tsx b/client/src/contexts/AuthContext.tsxindex f3430570..a2dddff1 100644--- a/client/src/contexts/AuthContext.tsx+++ b/client/src/contexts/AuthContext.tsx@@ -1,3 +1,4 @@+/* eslint-disable react-refresh/only-export-components -- canonical React Context pattern co-locates Provider + hooks/helpers in one file. *//*** Authentication Context for user session management.*diff --git a/client/src/contexts/ThemeContext.tsx b/client/src/contexts/ThemeContext.tsxindex 31781825..90e23c55 100644--- a/client/src/contexts/ThemeContext.tsx+++ b/client/src/contexts/ThemeContext.tsx@@ -1,3 +1,4 @@+/* eslint-disable react-refresh/only-export-components -- canonical React Context pattern co-locates Provider + hooks/helpers in one file. *//*** ThemeContext — owns the active visual theme.*diff --git a/client/src/contexts/WebSocketContext.tsx b/client/src/contexts/WebSocketContext.tsxindex d3ed79fe..131baef1 100644--- a/client/src/contexts/WebSocketContext.tsx+++ b/client/src/contexts/WebSocketContext.tsx@@ -1,3 +1,4 @@+/* eslint-disable react-refresh/only-export-components -- canonical React Context pattern co-locates Provider + hooks/helpers/types in one file. *//*** WebSocket Context for real-time communication with Python backend.*@@ -560,7 +561,7 @@ export const WebSocketProvider: React.FC<{ children: React.ReactNode }> = ({ chiwsRef.current?.removeEventListener('message', handler);resolve(msg);}- } catch {}+ } catch { /* swallow message-parse errors — invalid frames are ignored */ }};wsRef.current?.addEventListener('message', handler);@@ -777,7 +778,7 @@ export const WebSocketProvider: React.FC<{ children: React.ReactNode }> = ({ chibot_username: (payload.bot_username as string | null) ?? null,bot_name: (payload.bot_name as string | null) ?? null,bot_id: (payload.bot_id as string | null) ?? null,- owner_chat_id: (payload.owner_chat_id as string | null) ?? null,+ owner_chat_id: (payload.owner_chat_id as number | null) ?? null,});invalidateCatalogue(queryClient);}@@ -1523,7 +1524,7 @@ export const WebSocketProvider: React.FC<{ children: React.ReactNode }> = ({ chiws.removeEventListener('message', handler);resolve(msg);}- } catch {}+ } catch { /* swallow message-parse errors — invalid frames are ignored */ }};ws.addEventListener('message', handler);ws.send(JSON.stringify({ ...payload, request_id: requestId }));diff --git a/client/src/hooks/useReactFlowNodes.ts b/client/src/hooks/useReactFlowNodes.tsindex 47c431b8..3396e1f0 100644--- a/client/src/hooks/useReactFlowNodes.ts+++ b/client/src/hooks/useReactFlowNodes.ts@@ -160,6 +160,7 @@ export const useReactFlowNodes = ({ setNodes, setEdges }: UseReactFlowNodesProps// Add the connectionsetEdges((eds) => addEdge(params, eds));},+ // eslint-disable-next-line react-hooks/exhaustive-deps -- isValidConnection is captured by closure; including would re-bind on every render.[setEdges]);diff --git a/client/src/hooks/useWorkflowValidation.ts b/client/src/hooks/useWorkflowValidation.tsindex 17de2051..f581aaf2 100644--- a/client/src/hooks/useWorkflowValidation.ts+++ b/client/src/hooks/useWorkflowValidation.ts@@ -131,7 +131,7 @@ export function useWorkflowValidation(void runValidate.current();}, DEBOUNCE_MS);return () => clearTimeout(timer);- // eslint-disable-next-line react-hooks/exhaustive-deps+}, [nodes, edges, parametersById, enabled, isReady]);return {diff --git a/client/src/lib/nodeSpec.ts b/client/src/lib/nodeSpec.tsindex 74acb397..f31add48 100644--- a/client/src/lib/nodeSpec.ts+++ b/client/src/lib/nodeSpec.ts@@ -138,6 +138,7 @@ export function useNodeSpec(nodeType: string | undefined | null): NodeSpec | nulif (!nodeType || !isReady) return;if (queryClient.getQueryData(key) !== undefined) return;void fetchNodeSpec(nodeType, sendRequest);+ // eslint-disable-next-line react-hooks/exhaustive-deps -- key derives from nodeType; including it is redundant.}, [nodeType, isReady, sendRequest]);return data;diff --git a/client/src/test/providers.tsx b/client/src/test/providers.tsxindex e4690f5a..100c4d5b 100644--- a/client/src/test/providers.tsx+++ b/client/src/test/providers.tsx@@ -1,3 +1,4 @@+/* eslint-disable react-refresh/only-export-components -- test helpers; fast-refresh doesn't apply. *//*** Shared provider wrappers for tests.*diff --git a/client/src/utils/nodeUtils.ts b/client/src/utils/nodeUtils.tsindex 4ab50825..8bade4b1 100644--- a/client/src/utils/nodeUtils.ts+++ b/client/src/utils/nodeUtils.ts@@ -21,7 +21,7 @@ export const getShortNodeName = (nodeType: string): string => {}// Otherwise, create a simplified version by removing capitals and common suffixes- let simplified = nodeType+ const simplified = nodeType.replace(/[A-Z]/g, '') // Remove capital letters.replace(/(Get|Set|Stop|Play|Record|Control)$/i, '') // Remove common suffixes.toLowerCase();