Files
PaperClipAI/ui/src
Devin Foley 7362ecda02 fix(ui): stop New Agent infinite render loop in AgentConfigForm
Creating an agent rendered a blank page (now a "Maximum update depth
exceeded" error card). `triggerTestEnvironment` was rebuilt every render
because `runEnvironmentTest` depends on the `useMutation` result object,
which gets a fresh identity each render. The `onTestActionChange` effect
then fired every render and pushed a new function into the parent's
state (setTestAgentAction), forcing another render — an infinite loop.

Hold the latest trigger behavior in a ref and hand the parent a stable
callback so the effect runs once. The Test Agent button still invokes the
current logic via the ref.
2026-06-19 09:43:21 -07:00
..
2026-05-06 06:30:44 -05:00