mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-10-30 13:20:54 +01:00
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.
@paperclipai/ui
Published static assets for the Paperclip board UI.
What gets published
The npm package contains the production build under dist/. It does not ship the UI source tree or workspace-only dependencies.
Storybook
Storybook config, stories, and fixtures live under ui/storybook/.
pnpm --filter @paperclipai/ui storybook
pnpm --filter @paperclipai/ui build-storybook
Typical use
Install the package, then serve or copy the built files from node_modules/@paperclipai/ui/dist.