Skip to content

React hook exhaustive-deps lint warnings in canvas components #18

Description

@rishibaghel25

Describe the bug
npm run build / next build surfaces several pre-existing react-hooks/exhaustive-deps warnings (build still succeeds, these don't block anything, just noise on every build):

./components/agent/AgentOverview.tsx
73:9  Warning: The 'hostMeta' logical expression could make the dependencies of useMemo Hook (at line 82) change on every render.

./components/canvas/InfraCanvas.tsx
417:6  Warning: React Hook useEffect has missing dependencies: 'setEdges', 'setNodes', and 'spotlightKey'.
422:6  Warning: React Hook useEffect has a missing dependency: 'setNodes'.

./components/canvas/LogsPanel.tsx
94:6  Warning: React Hook useEffect has a missing dependency: 'targetNode'.

Also a no-img-element warning in components/Logo.tsx (two <img> tags suggested to become next/image, likely intentionally skipped there for the logo, worth a look either way).

Expected behavior
A clean npm run build with no lint warnings, or an explicit // eslint-disable-next-line with a comment explaining why, for any that are genuinely intentional (e.g. hostMeta and targetNode are probably safe to include in the deps array; setEdges/setNodes from a state-setter source might be legitimately stable and worth an inline suppress instead of adding them).

Additional context
Good first issue: small, scoped, one file at a time, verify with cd frontend && npm run build after each.

No activity

Activity on this issue will appear here.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions