test(frontend/builder): add integration tests for builder stores, components, and hooks (part-1) - #12433
Conversation
This commit introduces comprehensive unit tests for the AutoGPT frontend build platform, covering: - **Component tests**: CustomNode, NewBlockMenu, NewSaveControl, RunGraph - **Store tests**: nodeStore, edgeStore, graphStore, historyStore, controlPanelStore, blockMenuStore, copyPasteStore - **Hook tests**: useCopyPaste, useFlow - **Test utilities**: Mocked child components, localStorage, clipboard, and API calls Tests follow Vitest conventions with proper setup/teardown and comprehensive edge case coverage.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (1)
📜 Recent review details⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (7)
🧰 Additional context used📓 Path-based instructions (12)autogpt_platform/frontend/**/*.{ts,tsx,js,jsx}📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Files:
autogpt_platform/frontend/**/*.{tsx,ts}📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Files:
autogpt_platform/frontend/**/*.{ts,tsx}📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Files:
autogpt_platform/frontend/**/*.{js,jsx,ts,tsx}📄 CodeRabbit inference engine (AGENTS.md)
Files:
autogpt_platform/frontend/src/**/*.{ts,tsx}📄 CodeRabbit inference engine (AGENTS.md)
Files:
autogpt_platform/frontend/**/*.{js,jsx,ts,tsx,css}📄 CodeRabbit inference engine (AGENTS.md)
Files:
autogpt_platform/frontend/src/**/*.ts📄 CodeRabbit inference engine (AGENTS.md)
Files:
autogpt_platform/**/*.{ts,tsx}📄 CodeRabbit inference engine (AGENTS.md)
Files:
autogpt_platform/frontend/**/*.{test,spec}.{ts,tsx}📄 CodeRabbit inference engine (AGENTS.md)
Files:
autogpt_platform/frontend/src/**/*.{ts,tsx,js,jsx}📄 CodeRabbit inference engine (autogpt_platform/frontend/CLAUDE.md)
Files:
autogpt_platform/frontend/**/*.{spec.ts,test.ts,stories.tsx}📄 CodeRabbit inference engine (autogpt_platform/frontend/CLAUDE.md)
Files:
autogpt_platform/frontend/**/*.{stories.tsx,spec.ts,test.ts}📄 CodeRabbit inference engine (autogpt_platform/frontend/CLAUDE.md)
Files:
🧠 Learnings (18)📓 Common learnings📚 Learning: 2026-01-28T18:29:34.362ZApplied to files:
📚 Learning: 2026-01-28T18:29:34.362ZApplied to files:
📚 Learning: 2026-02-26T21:29:44.105ZApplied to files:
📚 Learning: 2026-02-04T16:50:51.495ZApplied to files:
📚 Learning: 2026-01-28T18:29:34.362ZApplied to files:
📚 Learning: 2026-01-28T18:29:34.362ZApplied to files:
📚 Learning: 2026-01-28T18:29:34.362ZApplied to files:
📚 Learning: 2026-01-28T18:29:34.362ZApplied to files:
📚 Learning: 2026-02-26T21:29:44.105ZApplied to files:
📚 Learning: 2026-01-28T18:29:34.362ZApplied to files:
📚 Learning: 2026-01-28T18:29:34.362ZApplied to files:
📚 Learning: 2026-03-12T10:01:25.168ZApplied to files:
📚 Learning: 2026-02-04T16:50:51.495ZApplied to files:
📚 Learning: 2026-02-26T21:29:44.105ZApplied to files:
📚 Learning: 2026-02-26T21:29:44.105ZApplied to files:
📚 Learning: 2026-01-28T18:29:34.362ZApplied to files:
📚 Learning: 2026-01-28T18:29:34.362ZApplied to files:
🔇 Additional comments (6)
WalkthroughAdds comprehensive unit and integration tests across the frontend build area (components, stores, and hooks). No production API or exported signatures were changed. Changes
Estimated code review effort🎯 4 (Complex) | ⏱️ ~75 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
📝 Coding Plan
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 4
🧹 Nitpick comments (4)
autogpt_platform/frontend/src/app/(platform)/build/__tests__/historyStore.test.ts (1)
44-46: Optional: makeflushMicrotaskstruly microtask-based.Using
setTimeout(0)works but waits a full macrotask;queueMicrotask(or equivalent) keeps this helper tighter and faster for batching tests.🔧 Optional cleanup
async function flushMicrotasks() { - await new Promise((resolve) => setTimeout(resolve, 0)); + await new Promise<void>((resolve) => queueMicrotask(resolve)); }🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@autogpt_platform/frontend/src/app/`(platform)/build/__tests__/historyStore.test.ts around lines 44 - 46, The helper flushMicrotasks currently uses setTimeout(0) which schedules a macrotask; change the implementation of flushMicrotasks to schedule a true microtask instead (e.g., use queueMicrotask(() => resolve()) or await Promise.resolve()) so tests run faster and more tightly; update the async function flushMicrotasks to call queueMicrotask or return Promise.resolve() to await a microtask tick, keeping the function name flushMicrotasks unchanged.autogpt_platform/frontend/src/app/(platform)/build/__tests__/useCopyPaste.test.ts (1)
416-418: Avoid fixed sleeps in async tests.
setTimeout(50)introduces nondeterministic timing and slower tests. Prefer waiting on the expected stable state directly withwaitFor.⏱️ Suggested refactor
- // Wait a tick to ensure no state changes happen - await new Promise((r) => setTimeout(r, 50)); - - const { nodes } = useNodeStore.getState(); - expect(nodes).toHaveLength(1); - expect(nodes[0].id).toBe("1"); + await vi.waitFor(() => { + const { nodes } = useNodeStore.getState(); + expect(nodes).toHaveLength(1); + expect(nodes[0].id).toBe("1"); + }); ... - await new Promise((r) => setTimeout(r, 50)); - - const { nodes } = useNodeStore.getState(); - expect(nodes).toHaveLength(1); - expect(nodes[0].id).toBe("1"); + await vi.waitFor(() => { + const { nodes } = useNodeStore.getState(); + expect(nodes).toHaveLength(1); + expect(nodes[0].id).toBe("1"); + });Also applies to: 440-440
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@autogpt_platform/frontend/src/app/`(platform)/build/__tests__/useCopyPaste.test.ts around lines 416 - 418, Replace the fixed sleep (await new Promise((r) => setTimeout(r, 50))) in the tests in useCopyPaste.test.ts with a deterministic wait: import and use waitFor from your testing library and wait on the expected stable condition (e.g., an assertion that a piece of state/DOM does not change or a specific element is present/absent) instead of sleeping; update both occurrences (the one after the comment "// Wait a tick to ensure no state changes happen" and the similar instance around line 440) to use waitFor(() => /* assert stable condition */) so the test becomes deterministic and faster.autogpt_platform/frontend/src/app/(platform)/build/__tests__/nodeStore.test.ts (1)
10-31: TightencreateTestNodeoverride types to remove pervasive unsafe casts.The current helper typing forces repeated
as Partial<CustomNodeData> as CustomNodeData. Acceptdata?: Partial<CustomNodeData>in the helper signature and merge defaults there.Refactor direction
-function createTestNode( - overrides: Partial<CustomNode> & { id: string }, -): CustomNode { +type TestNodeOverrides = { + id: string; + position?: CustomNode["position"]; + data?: Partial<CustomNodeData>; +}; + +function createTestNode(overrides: TestNodeOverrides): CustomNode { const defaults: CustomNodeData = { @@ return { id: overrides.id, type: "custom", position: overrides.position ?? { x: 0, y: 0 }, - data: { ...defaults, ...overrides.data }, + data: { ...defaults, ...(overrides.data ?? {}) }, }; }🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@autogpt_platform/frontend/src/app/`(platform)/build/__tests__/nodeStore.test.ts around lines 10 - 31, The helper createTestNode currently forces unsafe casts when callers pass partial node data; change its signature to accept overrides: { id: string; position?: { x: number; y: number }; data?: Partial<CustomNodeData> } (or similar) so data is optional and partial, then inside createTestNode define const mergedData: CustomNodeData = { ...defaults, ...overrides.data } and return data: mergedData; update references to createTestNode to pass partial data without casts and remove any as Partial<CustomNodeData> as CustomNodeData conversions. Ensure you keep id required and preserve position defaulting to {x:0,y:0}.autogpt_platform/frontend/src/app/(platform)/build/__tests__/NewBlockMenu.test.tsx (1)
45-51: Drop redundantcleanup()inbeforeEach.You already call
cleanup()inafterEach, so running it again inbeforeEachis unnecessary noise.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@autogpt_platform/frontend/src/app/`(platform)/build/__tests__/NewBlockMenu.test.tsx around lines 45 - 51, Remove the redundant cleanup() call from the beforeEach block since cleanup() already runs in afterEach; keep the beforeEach to only reset the store by calling useBlockMenuStore.getState().reset() and remove the extra cleanup() invocation to avoid duplicate cleanup calls.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In
`@autogpt_platform/frontend/src/app/`(platform)/build/__tests__/CustomNode.test.tsx:
- Line 14: Several test mocks and helpers use `any`; replace them with concrete
or unknown types: change the mock component props (NodeContainer, the components
at the other mock locations) to accept typed interfaces (e.g., define interfaces
for their props instead of `any`) and update the schema function parameter to
use `unknown`; change helper functions that currently use `NodeProps<any>` to
`NodeProps<CustomNodeData>` and make their return types
`NodeProps<CustomNodeData>`; replace `as any` casts for execution results with
the proper `NodeExecutionResult` import and type; update all referenced symbols
(NodeContainer, the other mock component names, the helper functions that return
NodeProps, and places casting to any for execution results) accordingly so no
`any` remains.
In
`@autogpt_platform/frontend/src/app/`(platform)/build/__tests__/NewBlockMenu.test.tsx:
- Around line 327-341: The clear button lacks an accessible name and the test
uses a synchronous role query; update the component (BlockMenuSearchBar's clear
button) to include aria-label="Clear" (or equivalent accessible text) so it can
be found by name, and update the test (NewBlockMenu.test.tsx -> the "shows clear
button when input has text and clears on click" case) to use the async query
await screen.findByRole("button", { name: /clear/i }) before clicking and then
await the input value assertion with waitFor as needed.
In
`@autogpt_platform/frontend/src/app/`(platform)/build/__tests__/NewSaveControl.test.tsx:
- Around line 152-163: The test only asserts the isSaving: false case; update
the test in NewSaveControl.test.tsx to also assert the disabled state when
isSaving is true by: after the existing assertions toggle the mock to
setupMock({ isSaving: true }) (or set useControlPanelStore state appropriately),
re-render or query the same button (test id "save-control-save-agent-button")
and assert that (saveButton as HTMLButtonElement).disabled is true; ensure you
reference useControlPanelStore.setState, setupMock, and the NewSaveControl
component so both save-enabled and save-disabled paths are covered in the same
test.
In
`@autogpt_platform/frontend/src/app/`(platform)/build/__tests__/nodeStore.test.ts:
- Around line 734-754: The test exposes a data-integrity bug: addNode/addNodes
currently allow duplicate node IDs while other ID-keyed operations
(getNodeStatus, getNodeErrors, updateNodeData, etc. in useNodeStore) use .find()
and thus only affect the first match; fix by enforcing a unique-ID invariant in
addNode and addNodes (e.g., check existing nodes in useNodeStore before
inserting and skip or replace entries with the same id, or throw an error) so
duplicate IDs cannot be appended and ID-keyed operations remain deterministic;
update or remove the ambiguous test accordingly to reflect the chosen behavior.
---
Nitpick comments:
In
`@autogpt_platform/frontend/src/app/`(platform)/build/__tests__/historyStore.test.ts:
- Around line 44-46: The helper flushMicrotasks currently uses setTimeout(0)
which schedules a macrotask; change the implementation of flushMicrotasks to
schedule a true microtask instead (e.g., use queueMicrotask(() => resolve()) or
await Promise.resolve()) so tests run faster and more tightly; update the async
function flushMicrotasks to call queueMicrotask or return Promise.resolve() to
await a microtask tick, keeping the function name flushMicrotasks unchanged.
In
`@autogpt_platform/frontend/src/app/`(platform)/build/__tests__/NewBlockMenu.test.tsx:
- Around line 45-51: Remove the redundant cleanup() call from the beforeEach
block since cleanup() already runs in afterEach; keep the beforeEach to only
reset the store by calling useBlockMenuStore.getState().reset() and remove the
extra cleanup() invocation to avoid duplicate cleanup calls.
In
`@autogpt_platform/frontend/src/app/`(platform)/build/__tests__/nodeStore.test.ts:
- Around line 10-31: The helper createTestNode currently forces unsafe casts
when callers pass partial node data; change its signature to accept overrides: {
id: string; position?: { x: number; y: number }; data?: Partial<CustomNodeData>
} (or similar) so data is optional and partial, then inside createTestNode
define const mergedData: CustomNodeData = { ...defaults, ...overrides.data } and
return data: mergedData; update references to createTestNode to pass partial
data without casts and remove any as Partial<CustomNodeData> as CustomNodeData
conversions. Ensure you keep id required and preserve position defaulting to
{x:0,y:0}.
In
`@autogpt_platform/frontend/src/app/`(platform)/build/__tests__/useCopyPaste.test.ts:
- Around line 416-418: Replace the fixed sleep (await new Promise((r) =>
setTimeout(r, 50))) in the tests in useCopyPaste.test.ts with a deterministic
wait: import and use waitFor from your testing library and wait on the expected
stable condition (e.g., an assertion that a piece of state/DOM does not change
or a specific element is present/absent) instead of sleeping; update both
occurrences (the one after the comment "// Wait a tick to ensure no state
changes happen" and the similar instance around line 440) to use waitFor(() =>
/* assert stable condition */) so the test becomes deterministic and faster.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 9ac3697b-fe67-44eb-8ea2-f160e5477c7b
📒 Files selected for processing (11)
autogpt_platform/frontend/src/app/(platform)/build/__tests__/CustomNode.test.tsxautogpt_platform/frontend/src/app/(platform)/build/__tests__/NewBlockMenu.test.tsxautogpt_platform/frontend/src/app/(platform)/build/__tests__/NewSaveControl.test.tsxautogpt_platform/frontend/src/app/(platform)/build/__tests__/RunGraph.test.tsxautogpt_platform/frontend/src/app/(platform)/build/__tests__/copyPasteStore.test.tsautogpt_platform/frontend/src/app/(platform)/build/__tests__/edgeStore.test.tsautogpt_platform/frontend/src/app/(platform)/build/__tests__/graphStore.test.tsautogpt_platform/frontend/src/app/(platform)/build/__tests__/historyStore.test.tsautogpt_platform/frontend/src/app/(platform)/build/__tests__/nodeStore.test.tsautogpt_platform/frontend/src/app/(platform)/build/__tests__/useCopyPaste.test.tsautogpt_platform/frontend/src/app/(platform)/build/__tests__/useFlow.test.ts
📜 Review details
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)
- GitHub Check: types
- GitHub Check: integration_test
- GitHub Check: Seer Code Review
- GitHub Check: Check PR Status
- GitHub Check: end-to-end tests
- GitHub Check: Analyze (python)
🧰 Additional context used
📓 Path-based instructions (15)
autogpt_platform/frontend/**/*.{ts,tsx,js,jsx}
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
autogpt_platform/frontend/**/*.{ts,tsx,js,jsx}: Use Node.js 21+ with pnpm package manager for frontend development
Always run 'pnpm format' for formatting and linting code in frontend development
autogpt_platform/frontend/**/*.{ts,tsx,js,jsx}: Runpnpm formatto auto-fix formatting issues before completing work
Runpnpm lintto check for lint errors and fix any that appear before completing work
Files:
autogpt_platform/frontend/src/app/(platform)/build/__tests__/useFlow.test.tsautogpt_platform/frontend/src/app/(platform)/build/__tests__/edgeStore.test.tsautogpt_platform/frontend/src/app/(platform)/build/__tests__/graphStore.test.tsautogpt_platform/frontend/src/app/(platform)/build/__tests__/NewBlockMenu.test.tsxautogpt_platform/frontend/src/app/(platform)/build/__tests__/CustomNode.test.tsxautogpt_platform/frontend/src/app/(platform)/build/__tests__/RunGraph.test.tsxautogpt_platform/frontend/src/app/(platform)/build/__tests__/useCopyPaste.test.tsautogpt_platform/frontend/src/app/(platform)/build/__tests__/NewSaveControl.test.tsxautogpt_platform/frontend/src/app/(platform)/build/__tests__/nodeStore.test.tsautogpt_platform/frontend/src/app/(platform)/build/__tests__/historyStore.test.tsautogpt_platform/frontend/src/app/(platform)/build/__tests__/copyPasteStore.test.ts
autogpt_platform/frontend/**/*.{tsx,ts}
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
autogpt_platform/frontend/**/*.{tsx,ts}: Use function declarations for components and handlers (not arrow functions) in React components
Only use arrow functions for small inline lambdas (map, filter, etc.) in React components
Use PascalCase for component names and camelCase with 'use' prefix for hook names in React
Use Tailwind CSS utilities only for styling in frontend components
Use design system components from 'src/components/' (atoms, molecules, organisms) in frontend development
Never use 'src/components/legacy/' in frontend code
Only use Phosphor Icons (@phosphor-icons/react) for icons in frontend components
Use generated API hooks from '@/app/api/generated/endpoints/' instead of deprecated 'BackendAPI' or 'src/lib/autogpt-server-api/'
Use React Query for server state (via generated hooks) in frontend development
Default to client components ('use client') in Next.js; only use server components for SEO or extreme TTFB needs
Use '' component for rendering errors in frontend UI; use toast notifications for mutation errors; use 'Sentry.captureException()' for manual exceptions
Separate render logic from data/behavior in React components; keep comments minimal (code should be self-documenting)
Files:
autogpt_platform/frontend/src/app/(platform)/build/__tests__/useFlow.test.tsautogpt_platform/frontend/src/app/(platform)/build/__tests__/edgeStore.test.tsautogpt_platform/frontend/src/app/(platform)/build/__tests__/graphStore.test.tsautogpt_platform/frontend/src/app/(platform)/build/__tests__/NewBlockMenu.test.tsxautogpt_platform/frontend/src/app/(platform)/build/__tests__/CustomNode.test.tsxautogpt_platform/frontend/src/app/(platform)/build/__tests__/RunGraph.test.tsxautogpt_platform/frontend/src/app/(platform)/build/__tests__/useCopyPaste.test.tsautogpt_platform/frontend/src/app/(platform)/build/__tests__/NewSaveControl.test.tsxautogpt_platform/frontend/src/app/(platform)/build/__tests__/nodeStore.test.tsautogpt_platform/frontend/src/app/(platform)/build/__tests__/historyStore.test.tsautogpt_platform/frontend/src/app/(platform)/build/__tests__/copyPasteStore.test.ts
autogpt_platform/frontend/**/*.{ts,tsx}
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
autogpt_platform/frontend/**/*.{ts,tsx}: No barrel files or 'index.ts' re-exports in frontend code
Regenerate API hooks with 'pnpm generate:api' after backend OpenAPI spec changes in frontend developmentRun
pnpm typesto check for type errors and fix any that appear before completing work
Files:
autogpt_platform/frontend/src/app/(platform)/build/__tests__/useFlow.test.tsautogpt_platform/frontend/src/app/(platform)/build/__tests__/edgeStore.test.tsautogpt_platform/frontend/src/app/(platform)/build/__tests__/graphStore.test.tsautogpt_platform/frontend/src/app/(platform)/build/__tests__/NewBlockMenu.test.tsxautogpt_platform/frontend/src/app/(platform)/build/__tests__/CustomNode.test.tsxautogpt_platform/frontend/src/app/(platform)/build/__tests__/RunGraph.test.tsxautogpt_platform/frontend/src/app/(platform)/build/__tests__/useCopyPaste.test.tsautogpt_platform/frontend/src/app/(platform)/build/__tests__/NewSaveControl.test.tsxautogpt_platform/frontend/src/app/(platform)/build/__tests__/nodeStore.test.tsautogpt_platform/frontend/src/app/(platform)/build/__tests__/historyStore.test.tsautogpt_platform/frontend/src/app/(platform)/build/__tests__/copyPasteStore.test.ts
autogpt_platform/frontend/**/*.{js,jsx,ts,tsx}
📄 CodeRabbit inference engine (AGENTS.md)
autogpt_platform/frontend/**/*.{js,jsx,ts,tsx}: Format frontend code usingpnpm format
Never use components fromsrc/components/__legacy__/*
Files:
autogpt_platform/frontend/src/app/(platform)/build/__tests__/useFlow.test.tsautogpt_platform/frontend/src/app/(platform)/build/__tests__/edgeStore.test.tsautogpt_platform/frontend/src/app/(platform)/build/__tests__/graphStore.test.tsautogpt_platform/frontend/src/app/(platform)/build/__tests__/NewBlockMenu.test.tsxautogpt_platform/frontend/src/app/(platform)/build/__tests__/CustomNode.test.tsxautogpt_platform/frontend/src/app/(platform)/build/__tests__/RunGraph.test.tsxautogpt_platform/frontend/src/app/(platform)/build/__tests__/useCopyPaste.test.tsautogpt_platform/frontend/src/app/(platform)/build/__tests__/NewSaveControl.test.tsxautogpt_platform/frontend/src/app/(platform)/build/__tests__/nodeStore.test.tsautogpt_platform/frontend/src/app/(platform)/build/__tests__/historyStore.test.tsautogpt_platform/frontend/src/app/(platform)/build/__tests__/copyPasteStore.test.ts
autogpt_platform/frontend/src/**/*.{ts,tsx}
📄 CodeRabbit inference engine (AGENTS.md)
autogpt_platform/frontend/src/**/*.{ts,tsx}: Structure components asComponentName/ComponentName.tsx+useComponentName.ts+helpers.tsand use design system components fromsrc/components/(atoms, molecules, organisms)
Use generated API hooks from@/app/api/__generated__/endpoints/with patternuse{Method}{Version}{OperationName}and regenerate withpnpm generate:api
Use function declarations (not arrow functions) for components and handlers
Separate render logic from business logic with component.tsx + useComponent.ts + helpers.ts structure
Colocate state when possible, avoid creating large components, use sub-components in local/componentsfolder
Avoid large hooks, abstract logic intohelpers.tsfiles when sensible
Use arrow functions only for callbacks, not for component declarations
Avoid comments at all times unless the code is very complex
Do not useuseCallbackoruseMemounless asked to optimize a given function
autogpt_platform/frontend/src/**/*.{ts,tsx}: Use function declarations (not arrow functions) for components and handlers
Use type-safe generated API hooks via Orval + React Query for data fetching
Use React Query for server state management and co-locate UI state in components/hooks
Separate render logic (.tsx) from business logic (use*.tshooks)
Use only shadcn/ui (Radix UI primitives) with Tailwind CSS for UI components
Use Phosphor Icons only for all icon implementations
Use ErrorCard component for render errors, toast for mutations, and Sentry for exceptions
Use design system components fromsrc/components/(atoms, molecules, organisms)
Never usesrc/components/__legacy__/*components
Use generated API hooks from@/app/api/__generated__/endpoints/with patternuse{Method}{Version}{OperationName}
Use Tailwind CSS only for styling with design tokens
Do not useuseCallbackoruseMemounless asked to optimize a specific function
Never type withanyunless a variable/attribute can actually be of any type
Files:
autogpt_platform/frontend/src/app/(platform)/build/__tests__/useFlow.test.tsautogpt_platform/frontend/src/app/(platform)/build/__tests__/edgeStore.test.tsautogpt_platform/frontend/src/app/(platform)/build/__tests__/graphStore.test.tsautogpt_platform/frontend/src/app/(platform)/build/__tests__/NewBlockMenu.test.tsxautogpt_platform/frontend/src/app/(platform)/build/__tests__/CustomNode.test.tsxautogpt_platform/frontend/src/app/(platform)/build/__tests__/RunGraph.test.tsxautogpt_platform/frontend/src/app/(platform)/build/__tests__/useCopyPaste.test.tsautogpt_platform/frontend/src/app/(platform)/build/__tests__/NewSaveControl.test.tsxautogpt_platform/frontend/src/app/(platform)/build/__tests__/nodeStore.test.tsautogpt_platform/frontend/src/app/(platform)/build/__tests__/historyStore.test.tsautogpt_platform/frontend/src/app/(platform)/build/__tests__/copyPasteStore.test.ts
autogpt_platform/frontend/**/*.{js,jsx,ts,tsx,css}
📄 CodeRabbit inference engine (AGENTS.md)
Use Tailwind CSS only for styling, use design tokens, and use Phosphor Icons only
Files:
autogpt_platform/frontend/src/app/(platform)/build/__tests__/useFlow.test.tsautogpt_platform/frontend/src/app/(platform)/build/__tests__/edgeStore.test.tsautogpt_platform/frontend/src/app/(platform)/build/__tests__/graphStore.test.tsautogpt_platform/frontend/src/app/(platform)/build/__tests__/NewBlockMenu.test.tsxautogpt_platform/frontend/src/app/(platform)/build/__tests__/CustomNode.test.tsxautogpt_platform/frontend/src/app/(platform)/build/__tests__/RunGraph.test.tsxautogpt_platform/frontend/src/app/(platform)/build/__tests__/useCopyPaste.test.tsautogpt_platform/frontend/src/app/(platform)/build/__tests__/NewSaveControl.test.tsxautogpt_platform/frontend/src/app/(platform)/build/__tests__/nodeStore.test.tsautogpt_platform/frontend/src/app/(platform)/build/__tests__/historyStore.test.tsautogpt_platform/frontend/src/app/(platform)/build/__tests__/copyPasteStore.test.ts
autogpt_platform/frontend/src/**/*.ts
📄 CodeRabbit inference engine (AGENTS.md)
Do not type hook returns, let Typescript infer as much as possible
Files:
autogpt_platform/frontend/src/app/(platform)/build/__tests__/useFlow.test.tsautogpt_platform/frontend/src/app/(platform)/build/__tests__/edgeStore.test.tsautogpt_platform/frontend/src/app/(platform)/build/__tests__/graphStore.test.tsautogpt_platform/frontend/src/app/(platform)/build/__tests__/useCopyPaste.test.tsautogpt_platform/frontend/src/app/(platform)/build/__tests__/nodeStore.test.tsautogpt_platform/frontend/src/app/(platform)/build/__tests__/historyStore.test.tsautogpt_platform/frontend/src/app/(platform)/build/__tests__/copyPasteStore.test.ts
autogpt_platform/**/*.{ts,tsx}
📄 CodeRabbit inference engine (AGENTS.md)
Never type with
any, if no types available useunknown
Files:
autogpt_platform/frontend/src/app/(platform)/build/__tests__/useFlow.test.tsautogpt_platform/frontend/src/app/(platform)/build/__tests__/edgeStore.test.tsautogpt_platform/frontend/src/app/(platform)/build/__tests__/graphStore.test.tsautogpt_platform/frontend/src/app/(platform)/build/__tests__/NewBlockMenu.test.tsxautogpt_platform/frontend/src/app/(platform)/build/__tests__/CustomNode.test.tsxautogpt_platform/frontend/src/app/(platform)/build/__tests__/RunGraph.test.tsxautogpt_platform/frontend/src/app/(platform)/build/__tests__/useCopyPaste.test.tsautogpt_platform/frontend/src/app/(platform)/build/__tests__/NewSaveControl.test.tsxautogpt_platform/frontend/src/app/(platform)/build/__tests__/nodeStore.test.tsautogpt_platform/frontend/src/app/(platform)/build/__tests__/historyStore.test.tsautogpt_platform/frontend/src/app/(platform)/build/__tests__/copyPasteStore.test.ts
autogpt_platform/frontend/**/*.{test,spec}.{ts,tsx}
📄 CodeRabbit inference engine (AGENTS.md)
Run
pnpm testorpnpm test-uifor frontend Playwright tests
Files:
autogpt_platform/frontend/src/app/(platform)/build/__tests__/useFlow.test.tsautogpt_platform/frontend/src/app/(platform)/build/__tests__/edgeStore.test.tsautogpt_platform/frontend/src/app/(platform)/build/__tests__/graphStore.test.tsautogpt_platform/frontend/src/app/(platform)/build/__tests__/NewBlockMenu.test.tsxautogpt_platform/frontend/src/app/(platform)/build/__tests__/CustomNode.test.tsxautogpt_platform/frontend/src/app/(platform)/build/__tests__/RunGraph.test.tsxautogpt_platform/frontend/src/app/(platform)/build/__tests__/useCopyPaste.test.tsautogpt_platform/frontend/src/app/(platform)/build/__tests__/NewSaveControl.test.tsxautogpt_platform/frontend/src/app/(platform)/build/__tests__/nodeStore.test.tsautogpt_platform/frontend/src/app/(platform)/build/__tests__/historyStore.test.tsautogpt_platform/frontend/src/app/(platform)/build/__tests__/copyPasteStore.test.ts
autogpt_platform/frontend/src/**/*.{ts,tsx,js,jsx}
📄 CodeRabbit inference engine (autogpt_platform/frontend/CLAUDE.md)
Fully capitalize acronyms in symbols, e.g.
graphID,useBackendAPI
Files:
autogpt_platform/frontend/src/app/(platform)/build/__tests__/useFlow.test.tsautogpt_platform/frontend/src/app/(platform)/build/__tests__/edgeStore.test.tsautogpt_platform/frontend/src/app/(platform)/build/__tests__/graphStore.test.tsautogpt_platform/frontend/src/app/(platform)/build/__tests__/NewBlockMenu.test.tsxautogpt_platform/frontend/src/app/(platform)/build/__tests__/CustomNode.test.tsxautogpt_platform/frontend/src/app/(platform)/build/__tests__/RunGraph.test.tsxautogpt_platform/frontend/src/app/(platform)/build/__tests__/useCopyPaste.test.tsautogpt_platform/frontend/src/app/(platform)/build/__tests__/NewSaveControl.test.tsxautogpt_platform/frontend/src/app/(platform)/build/__tests__/nodeStore.test.tsautogpt_platform/frontend/src/app/(platform)/build/__tests__/historyStore.test.tsautogpt_platform/frontend/src/app/(platform)/build/__tests__/copyPasteStore.test.ts
autogpt_platform/frontend/**/*.{spec.ts,test.ts,stories.tsx}
📄 CodeRabbit inference engine (autogpt_platform/frontend/CLAUDE.md)
Use Playwright for E2E testing and Storybook for component development
Files:
autogpt_platform/frontend/src/app/(platform)/build/__tests__/useFlow.test.tsautogpt_platform/frontend/src/app/(platform)/build/__tests__/edgeStore.test.tsautogpt_platform/frontend/src/app/(platform)/build/__tests__/graphStore.test.tsautogpt_platform/frontend/src/app/(platform)/build/__tests__/useCopyPaste.test.tsautogpt_platform/frontend/src/app/(platform)/build/__tests__/nodeStore.test.tsautogpt_platform/frontend/src/app/(platform)/build/__tests__/historyStore.test.tsautogpt_platform/frontend/src/app/(platform)/build/__tests__/copyPasteStore.test.ts
autogpt_platform/frontend/src/**/use*.ts
📄 CodeRabbit inference engine (autogpt_platform/frontend/CLAUDE.md)
autogpt_platform/frontend/src/**/use*.ts: Extract component logic into custom hooks grouped by concern, with each hook in its own.tsfile
Do not type hook returns; let TypeScript infer types as much as possible
Files:
autogpt_platform/frontend/src/app/(platform)/build/__tests__/useFlow.test.tsautogpt_platform/frontend/src/app/(platform)/build/__tests__/useCopyPaste.test.ts
autogpt_platform/frontend/**/*.{stories.tsx,spec.ts,test.ts}
📄 CodeRabbit inference engine (autogpt_platform/frontend/CLAUDE.md)
Add Storybook stories for new components and Playwright tests for E2E scenarios
Files:
autogpt_platform/frontend/src/app/(platform)/build/__tests__/useFlow.test.tsautogpt_platform/frontend/src/app/(platform)/build/__tests__/edgeStore.test.tsautogpt_platform/frontend/src/app/(platform)/build/__tests__/graphStore.test.tsautogpt_platform/frontend/src/app/(platform)/build/__tests__/useCopyPaste.test.tsautogpt_platform/frontend/src/app/(platform)/build/__tests__/nodeStore.test.tsautogpt_platform/frontend/src/app/(platform)/build/__tests__/historyStore.test.tsautogpt_platform/frontend/src/app/(platform)/build/__tests__/copyPasteStore.test.ts
autogpt_platform/frontend/src/**/*.tsx
📄 CodeRabbit inference engine (AGENTS.md)
Component props should be
interface Props { ... }(not exported) unless the interface needs to be used outside the componentUse
type Props = { ... }(not exported) for component props unless used outside the component
Files:
autogpt_platform/frontend/src/app/(platform)/build/__tests__/NewBlockMenu.test.tsxautogpt_platform/frontend/src/app/(platform)/build/__tests__/CustomNode.test.tsxautogpt_platform/frontend/src/app/(platform)/build/__tests__/RunGraph.test.tsxautogpt_platform/frontend/src/app/(platform)/build/__tests__/NewSaveControl.test.tsx
autogpt_platform/frontend/src/app/(platform)/**/*.tsx
📄 CodeRabbit inference engine (AGENTS.md)
If adding protected frontend routes, update
frontend/lib/supabase/middleware.ts
Files:
autogpt_platform/frontend/src/app/(platform)/build/__tests__/NewBlockMenu.test.tsxautogpt_platform/frontend/src/app/(platform)/build/__tests__/CustomNode.test.tsxautogpt_platform/frontend/src/app/(platform)/build/__tests__/RunGraph.test.tsxautogpt_platform/frontend/src/app/(platform)/build/__tests__/NewSaveControl.test.tsx
🧠 Learnings (24)
📓 Common learnings
Learnt from: CR
Repo: Significant-Gravitas/AutoGPT PR: 0
File: autogpt_platform/frontend/src/tests/CLAUDE.md:0-0
Timestamp: 2026-01-28T18:29:34.362Z
Learning: Applies to autogpt_platform/frontend/src/tests/**/__tests__/main.test.tsx : Start integration tests at the page level with a `main.test.tsx` file and split into smaller files as it grows
Learnt from: CR
Repo: Significant-Gravitas/AutoGPT PR: 0
File: autogpt_platform/frontend/CLAUDE.md:0-0
Timestamp: 2026-02-26T21:29:44.105Z
Learning: Applies to autogpt_platform/frontend/**/*.{stories.tsx,spec.ts,test.ts} : Add Storybook stories for new components and Playwright tests for E2E scenarios
Learnt from: CR
Repo: Significant-Gravitas/AutoGPT PR: 0
File: autogpt_platform/frontend/src/tests/CLAUDE.md:0-0
Timestamp: 2026-01-28T18:29:34.362Z
Learning: Applies to autogpt_platform/frontend/src/tests/**/__tests__/*.test.{tsx,ts} : Use integration tests (Vitest + RTL) for user interactions that trigger API calls and feature flows within a single page
Learnt from: CR
Repo: Significant-Gravitas/AutoGPT PR: 0
File: autogpt_platform/frontend/src/tests/CLAUDE.md:0-0
Timestamp: 2026-01-28T18:29:34.362Z
Learning: Applies to autogpt_platform/frontend/src/tests/**/__tests__/*.test.{tsx,ts} : Use integration tests (Vitest + RTL) for page-level behavior with mocked API responses and components that fetch data
Learnt from: CR
Repo: Significant-Gravitas/AutoGPT PR: 0
File: autogpt_platform/frontend/src/tests/CLAUDE.md:0-0
Timestamp: 2026-01-28T18:29:34.362Z
Learning: Applies to autogpt_platform/frontend/src/tests/**/*.test.{tsx,ts} : Use unit tests (Vitest + RTL) for component state changes and custom hooks
Learnt from: CR
Repo: Significant-Gravitas/AutoGPT PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-02-04T16:50:51.495Z
Learning: Applies to autogpt_platform/frontend/**/*.stories.{ts,tsx} : Add Storybook stories for new components and Playwright for E2E testing
Learnt from: CR
Repo: Significant-Gravitas/AutoGPT PR: 0
File: autogpt_platform/frontend/src/tests/CLAUDE.md:0-0
Timestamp: 2026-01-28T18:29:34.362Z
Learning: Applies to autogpt_platform/frontend/src/tests/src/tests/**/*.spec.ts : Place E2E tests (Playwright) in a centralized location for critical user journeys
Learnt from: Pwuts
Repo: Significant-Gravitas/AutoGPT PR: 12284
File: autogpt_platform/frontend/src/app/api/openapi.json:11897-11900
Timestamp: 2026-03-04T23:58:18.476Z
Learning: Repo: Significant-Gravitas/AutoGPT — PR `#12284`
Backend/frontend OpenAPI codegen convention: In backend/api/features/store/model.py, the StoreSubmission and StoreSubmissionAdminView models define submitted_at: datetime | None, changes_summary: str | None, and instructions: str | None with no default. This is intentional to produce “required but nullable” fields in OpenAPI (properties appear in required[] and use anyOf [type, null]). This matches Prisma’s submittedAt DateTime? and changesSummary String?. Do not flag this as a required/nullable mismatch.
Learnt from: CR
Repo: Significant-Gravitas/AutoGPT PR: 0
File: autogpt_platform/frontend/src/tests/CLAUDE.md:0-0
Timestamp: 2026-01-28T18:29:34.362Z
Learning: Applies to autogpt_platform/frontend/src/tests/**/*.test.{tsx,ts} : Use unit tests (Vitest + RTL) for testing pure utility functions and isolated components
Learnt from: CR
Repo: Significant-Gravitas/AutoGPT PR: 0
File: autogpt_platform/frontend/src/tests/CLAUDE.md:0-0
Timestamp: 2026-01-28T18:29:34.362Z
Learning: Applies to autogpt_platform/frontend/src/tests/src/tests/**/*.spec.ts : Use E2E tests (Playwright) for flows requiring real browser APIs (clipboard, downloads) or cross-page navigation
Learnt from: CR
Repo: Significant-Gravitas/AutoGPT PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-02-04T16:50:51.495Z
Learning: Applies to autogpt_platform/frontend/**/*.{test,spec}.{ts,tsx} : Run `pnpm test` or `pnpm test-ui` for frontend Playwright tests
Learnt from: CR
Repo: Significant-Gravitas/AutoGPT PR: 0
File: autogpt_platform/frontend/src/tests/CLAUDE.md:0-0
Timestamp: 2026-01-28T18:29:34.362Z
Learning: Applies to autogpt_platform/frontend/src/tests/**/*.test.{tsx,ts} : Place unit tests co-located with the source file: `Component.test.tsx` next to `Component.tsx`
📚 Learning: 2026-01-28T18:29:34.362Z
Learnt from: CR
Repo: Significant-Gravitas/AutoGPT PR: 0
File: autogpt_platform/frontend/src/tests/CLAUDE.md:0-0
Timestamp: 2026-01-28T18:29:34.362Z
Learning: Applies to autogpt_platform/frontend/src/tests/**/*.test.{tsx,ts} : Use unit tests (Vitest + RTL) for component state changes and custom hooks
Applied to files:
autogpt_platform/frontend/src/app/(platform)/build/__tests__/useFlow.test.tsautogpt_platform/frontend/src/app/(platform)/build/__tests__/edgeStore.test.tsautogpt_platform/frontend/src/app/(platform)/build/__tests__/graphStore.test.tsautogpt_platform/frontend/src/app/(platform)/build/__tests__/NewBlockMenu.test.tsxautogpt_platform/frontend/src/app/(platform)/build/__tests__/CustomNode.test.tsxautogpt_platform/frontend/src/app/(platform)/build/__tests__/RunGraph.test.tsxautogpt_platform/frontend/src/app/(platform)/build/__tests__/useCopyPaste.test.tsautogpt_platform/frontend/src/app/(platform)/build/__tests__/NewSaveControl.test.tsxautogpt_platform/frontend/src/app/(platform)/build/__tests__/nodeStore.test.tsautogpt_platform/frontend/src/app/(platform)/build/__tests__/historyStore.test.tsautogpt_platform/frontend/src/app/(platform)/build/__tests__/copyPasteStore.test.ts
📚 Learning: 2026-01-28T18:29:34.362Z
Learnt from: CR
Repo: Significant-Gravitas/AutoGPT PR: 0
File: autogpt_platform/frontend/src/tests/CLAUDE.md:0-0
Timestamp: 2026-01-28T18:29:34.362Z
Learning: Applies to autogpt_platform/frontend/src/tests/**/__tests__/*.test.{tsx,ts} : Use integration tests (Vitest + RTL) for user interactions that trigger API calls and feature flows within a single page
Applied to files:
autogpt_platform/frontend/src/app/(platform)/build/__tests__/useFlow.test.tsautogpt_platform/frontend/src/app/(platform)/build/__tests__/graphStore.test.tsautogpt_platform/frontend/src/app/(platform)/build/__tests__/NewBlockMenu.test.tsxautogpt_platform/frontend/src/app/(platform)/build/__tests__/CustomNode.test.tsxautogpt_platform/frontend/src/app/(platform)/build/__tests__/RunGraph.test.tsxautogpt_platform/frontend/src/app/(platform)/build/__tests__/useCopyPaste.test.tsautogpt_platform/frontend/src/app/(platform)/build/__tests__/NewSaveControl.test.tsxautogpt_platform/frontend/src/app/(platform)/build/__tests__/nodeStore.test.tsautogpt_platform/frontend/src/app/(platform)/build/__tests__/historyStore.test.tsautogpt_platform/frontend/src/app/(platform)/build/__tests__/copyPasteStore.test.ts
📚 Learning: 2026-01-28T18:29:34.362Z
Learnt from: CR
Repo: Significant-Gravitas/AutoGPT PR: 0
File: autogpt_platform/frontend/src/tests/CLAUDE.md:0-0
Timestamp: 2026-01-28T18:29:34.362Z
Learning: Applies to autogpt_platform/frontend/src/tests/src/tests/**/*.spec.ts : Use E2E tests (Playwright) for flows requiring real browser APIs (clipboard, downloads) or cross-page navigation
Applied to files:
autogpt_platform/frontend/src/app/(platform)/build/__tests__/useFlow.test.tsautogpt_platform/frontend/src/app/(platform)/build/__tests__/edgeStore.test.tsautogpt_platform/frontend/src/app/(platform)/build/__tests__/graphStore.test.tsautogpt_platform/frontend/src/app/(platform)/build/__tests__/RunGraph.test.tsxautogpt_platform/frontend/src/app/(platform)/build/__tests__/useCopyPaste.test.tsautogpt_platform/frontend/src/app/(platform)/build/__tests__/nodeStore.test.tsautogpt_platform/frontend/src/app/(platform)/build/__tests__/historyStore.test.tsautogpt_platform/frontend/src/app/(platform)/build/__tests__/copyPasteStore.test.ts
📚 Learning: 2026-01-28T18:29:34.362Z
Learnt from: CR
Repo: Significant-Gravitas/AutoGPT PR: 0
File: autogpt_platform/frontend/src/tests/CLAUDE.md:0-0
Timestamp: 2026-01-28T18:29:34.362Z
Learning: Applies to autogpt_platform/frontend/src/tests/**/__tests__/main.test.tsx : Start integration tests at the page level with a `main.test.tsx` file and split into smaller files as it grows
Applied to files:
autogpt_platform/frontend/src/app/(platform)/build/__tests__/useFlow.test.tsautogpt_platform/frontend/src/app/(platform)/build/__tests__/edgeStore.test.tsautogpt_platform/frontend/src/app/(platform)/build/__tests__/graphStore.test.tsautogpt_platform/frontend/src/app/(platform)/build/__tests__/NewBlockMenu.test.tsxautogpt_platform/frontend/src/app/(platform)/build/__tests__/CustomNode.test.tsxautogpt_platform/frontend/src/app/(platform)/build/__tests__/RunGraph.test.tsxautogpt_platform/frontend/src/app/(platform)/build/__tests__/useCopyPaste.test.tsautogpt_platform/frontend/src/app/(platform)/build/__tests__/NewSaveControl.test.tsxautogpt_platform/frontend/src/app/(platform)/build/__tests__/nodeStore.test.tsautogpt_platform/frontend/src/app/(platform)/build/__tests__/historyStore.test.tsautogpt_platform/frontend/src/app/(platform)/build/__tests__/copyPasteStore.test.ts
📚 Learning: 2026-01-28T18:29:34.362Z
Learnt from: CR
Repo: Significant-Gravitas/AutoGPT PR: 0
File: autogpt_platform/frontend/src/tests/CLAUDE.md:0-0
Timestamp: 2026-01-28T18:29:34.362Z
Learning: Applies to autogpt_platform/frontend/src/tests/**/__tests__/*.test.{tsx,ts} : Use integration tests (Vitest + RTL) for page-level behavior with mocked API responses and components that fetch data
Applied to files:
autogpt_platform/frontend/src/app/(platform)/build/__tests__/useFlow.test.tsautogpt_platform/frontend/src/app/(platform)/build/__tests__/graphStore.test.tsautogpt_platform/frontend/src/app/(platform)/build/__tests__/NewBlockMenu.test.tsxautogpt_platform/frontend/src/app/(platform)/build/__tests__/CustomNode.test.tsxautogpt_platform/frontend/src/app/(platform)/build/__tests__/RunGraph.test.tsxautogpt_platform/frontend/src/app/(platform)/build/__tests__/useCopyPaste.test.tsautogpt_platform/frontend/src/app/(platform)/build/__tests__/NewSaveControl.test.tsxautogpt_platform/frontend/src/app/(platform)/build/__tests__/nodeStore.test.tsautogpt_platform/frontend/src/app/(platform)/build/__tests__/copyPasteStore.test.ts
📚 Learning: 2026-01-28T18:29:34.362Z
Learnt from: CR
Repo: Significant-Gravitas/AutoGPT PR: 0
File: autogpt_platform/frontend/src/tests/CLAUDE.md:0-0
Timestamp: 2026-01-28T18:29:34.362Z
Learning: Applies to autogpt_platform/frontend/src/tests/**/*.test.{tsx,ts} : Use unit tests (Vitest + RTL) for testing pure utility functions and isolated components
Applied to files:
autogpt_platform/frontend/src/app/(platform)/build/__tests__/useFlow.test.tsautogpt_platform/frontend/src/app/(platform)/build/__tests__/edgeStore.test.tsautogpt_platform/frontend/src/app/(platform)/build/__tests__/graphStore.test.tsautogpt_platform/frontend/src/app/(platform)/build/__tests__/NewBlockMenu.test.tsxautogpt_platform/frontend/src/app/(platform)/build/__tests__/CustomNode.test.tsxautogpt_platform/frontend/src/app/(platform)/build/__tests__/RunGraph.test.tsxautogpt_platform/frontend/src/app/(platform)/build/__tests__/useCopyPaste.test.tsautogpt_platform/frontend/src/app/(platform)/build/__tests__/NewSaveControl.test.tsxautogpt_platform/frontend/src/app/(platform)/build/__tests__/nodeStore.test.tsautogpt_platform/frontend/src/app/(platform)/build/__tests__/copyPasteStore.test.ts
📚 Learning: 2026-02-26T21:29:44.105Z
Learnt from: CR
Repo: Significant-Gravitas/AutoGPT PR: 0
File: autogpt_platform/frontend/CLAUDE.md:0-0
Timestamp: 2026-02-26T21:29:44.105Z
Learning: Applies to autogpt_platform/frontend/src/**/*[Ww]orkflow*/**/*.{ts,tsx} : Use xyflow/react for visual graph editor implementation in the Workflow Builder
Applied to files:
autogpt_platform/frontend/src/app/(platform)/build/__tests__/useFlow.test.ts
📚 Learning: 2026-01-28T18:29:34.362Z
Learnt from: CR
Repo: Significant-Gravitas/AutoGPT PR: 0
File: autogpt_platform/frontend/src/tests/CLAUDE.md:0-0
Timestamp: 2026-01-28T18:29:34.362Z
Learning: Applies to autogpt_platform/frontend/src/tests/**/__tests__/*.test.{tsx,ts} : Mock API requests in integration tests via MSW (Mock Service Worker)
Applied to files:
autogpt_platform/frontend/src/app/(platform)/build/__tests__/useFlow.test.tsautogpt_platform/frontend/src/app/(platform)/build/__tests__/NewBlockMenu.test.tsxautogpt_platform/frontend/src/app/(platform)/build/__tests__/CustomNode.test.tsxautogpt_platform/frontend/src/app/(platform)/build/__tests__/RunGraph.test.tsxautogpt_platform/frontend/src/app/(platform)/build/__tests__/useCopyPaste.test.tsautogpt_platform/frontend/src/app/(platform)/build/__tests__/NewSaveControl.test.tsx
📚 Learning: 2026-01-28T18:29:34.362Z
Learnt from: CR
Repo: Significant-Gravitas/AutoGPT PR: 0
File: autogpt_platform/frontend/src/tests/CLAUDE.md:0-0
Timestamp: 2026-01-28T18:29:34.362Z
Learning: Applies to autogpt_platform/frontend/src/tests/src/tests/**/*.spec.ts : Use E2E tests (Playwright) for authentication flows (login, signup, logout) that MUST work in a real browser
Applied to files:
autogpt_platform/frontend/src/app/(platform)/build/__tests__/useFlow.test.tsautogpt_platform/frontend/src/app/(platform)/build/__tests__/edgeStore.test.tsautogpt_platform/frontend/src/app/(platform)/build/__tests__/useCopyPaste.test.tsautogpt_platform/frontend/src/app/(platform)/build/__tests__/historyStore.test.ts
📚 Learning: 2026-02-26T21:29:44.105Z
Learnt from: CR
Repo: Significant-Gravitas/AutoGPT PR: 0
File: autogpt_platform/frontend/CLAUDE.md:0-0
Timestamp: 2026-02-26T21:29:44.105Z
Learning: Applies to autogpt_platform/frontend/src/**/use*.ts : Extract component logic into custom hooks grouped by concern, with each hook in its own `.ts` file
Applied to files:
autogpt_platform/frontend/src/app/(platform)/build/__tests__/useFlow.test.ts
📚 Learning: 2026-01-28T18:29:34.362Z
Learnt from: CR
Repo: Significant-Gravitas/AutoGPT PR: 0
File: autogpt_platform/frontend/src/tests/CLAUDE.md:0-0
Timestamp: 2026-01-28T18:29:34.362Z
Learning: Applies to autogpt_platform/frontend/src/tests/**/*.stories.tsx : Use Storybook for design system, atoms, molecules, visual states (hover, disabled, loading), and responsive layouts
Applied to files:
autogpt_platform/frontend/src/app/(platform)/build/__tests__/useFlow.test.tsautogpt_platform/frontend/src/app/(platform)/build/__tests__/RunGraph.test.tsxautogpt_platform/frontend/src/app/(platform)/build/__tests__/NewSaveControl.test.tsxautogpt_platform/frontend/src/app/(platform)/build/__tests__/historyStore.test.ts
📚 Learning: 2026-01-28T18:29:34.362Z
Learnt from: CR
Repo: Significant-Gravitas/AutoGPT PR: 0
File: autogpt_platform/frontend/src/tests/CLAUDE.md:0-0
Timestamp: 2026-01-28T18:29:34.362Z
Learning: Applies to autogpt_platform/frontend/src/tests/src/tests/**/*.spec.ts : Place E2E tests (Playwright) in a centralized location for critical user journeys
Applied to files:
autogpt_platform/frontend/src/app/(platform)/build/__tests__/edgeStore.test.tsautogpt_platform/frontend/src/app/(platform)/build/__tests__/graphStore.test.tsautogpt_platform/frontend/src/app/(platform)/build/__tests__/CustomNode.test.tsxautogpt_platform/frontend/src/app/(platform)/build/__tests__/RunGraph.test.tsxautogpt_platform/frontend/src/app/(platform)/build/__tests__/useCopyPaste.test.tsautogpt_platform/frontend/src/app/(platform)/build/__tests__/NewSaveControl.test.tsxautogpt_platform/frontend/src/app/(platform)/build/__tests__/nodeStore.test.tsautogpt_platform/frontend/src/app/(platform)/build/__tests__/historyStore.test.tsautogpt_platform/frontend/src/app/(platform)/build/__tests__/copyPasteStore.test.ts
📚 Learning: 2026-02-26T21:29:44.105Z
Learnt from: CR
Repo: Significant-Gravitas/AutoGPT PR: 0
File: autogpt_platform/frontend/CLAUDE.md:0-0
Timestamp: 2026-02-26T21:29:44.105Z
Learning: Applies to autogpt_platform/frontend/**/*.{stories.tsx,spec.ts,test.ts} : Add Storybook stories for new components and Playwright tests for E2E scenarios
Applied to files:
autogpt_platform/frontend/src/app/(platform)/build/__tests__/edgeStore.test.tsautogpt_platform/frontend/src/app/(platform)/build/__tests__/graphStore.test.tsautogpt_platform/frontend/src/app/(platform)/build/__tests__/NewBlockMenu.test.tsxautogpt_platform/frontend/src/app/(platform)/build/__tests__/CustomNode.test.tsxautogpt_platform/frontend/src/app/(platform)/build/__tests__/RunGraph.test.tsxautogpt_platform/frontend/src/app/(platform)/build/__tests__/useCopyPaste.test.tsautogpt_platform/frontend/src/app/(platform)/build/__tests__/NewSaveControl.test.tsxautogpt_platform/frontend/src/app/(platform)/build/__tests__/nodeStore.test.tsautogpt_platform/frontend/src/app/(platform)/build/__tests__/historyStore.test.tsautogpt_platform/frontend/src/app/(platform)/build/__tests__/copyPasteStore.test.ts
📚 Learning: 2026-02-04T16:50:51.495Z
Learnt from: CR
Repo: Significant-Gravitas/AutoGPT PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-02-04T16:50:51.495Z
Learning: Applies to autogpt_platform/frontend/**/*.stories.{ts,tsx} : Add Storybook stories for new components and Playwright for E2E testing
Applied to files:
autogpt_platform/frontend/src/app/(platform)/build/__tests__/edgeStore.test.tsautogpt_platform/frontend/src/app/(platform)/build/__tests__/graphStore.test.tsautogpt_platform/frontend/src/app/(platform)/build/__tests__/NewBlockMenu.test.tsxautogpt_platform/frontend/src/app/(platform)/build/__tests__/NewSaveControl.test.tsxautogpt_platform/frontend/src/app/(platform)/build/__tests__/nodeStore.test.tsautogpt_platform/frontend/src/app/(platform)/build/__tests__/historyStore.test.tsautogpt_platform/frontend/src/app/(platform)/build/__tests__/copyPasteStore.test.ts
📚 Learning: 2026-01-28T18:29:34.362Z
Learnt from: CR
Repo: Significant-Gravitas/AutoGPT PR: 0
File: autogpt_platform/frontend/src/tests/CLAUDE.md:0-0
Timestamp: 2026-01-28T18:29:34.362Z
Learning: Applies to autogpt_platform/frontend/src/tests/src/tests/**/*.spec.ts : Use E2E tests (Playwright) for payment or sensitive transactions requiring a real browser
Applied to files:
autogpt_platform/frontend/src/app/(platform)/build/__tests__/edgeStore.test.tsautogpt_platform/frontend/src/app/(platform)/build/__tests__/useCopyPaste.test.ts
📚 Learning: 2026-02-26T21:29:44.105Z
Learnt from: CR
Repo: Significant-Gravitas/AutoGPT PR: 0
File: autogpt_platform/frontend/CLAUDE.md:0-0
Timestamp: 2026-02-26T21:29:44.105Z
Learning: Applies to autogpt_platform/frontend/**/*.{spec.ts,test.ts,stories.tsx} : Use Playwright for E2E testing and Storybook for component development
Applied to files:
autogpt_platform/frontend/src/app/(platform)/build/__tests__/edgeStore.test.tsautogpt_platform/frontend/src/app/(platform)/build/__tests__/graphStore.test.tsautogpt_platform/frontend/src/app/(platform)/build/__tests__/historyStore.test.ts
📚 Learning: 2026-01-28T18:29:34.362Z
Learnt from: CR
Repo: Significant-Gravitas/AutoGPT PR: 0
File: autogpt_platform/frontend/src/tests/CLAUDE.md:0-0
Timestamp: 2026-01-28T18:29:34.362Z
Learning: Applies to autogpt_platform/frontend/src/tests/**/__tests__/*.test.{tsx,ts} : Place integration tests in a `__tests__` folder next to the component being tested
Applied to files:
autogpt_platform/frontend/src/app/(platform)/build/__tests__/NewBlockMenu.test.tsxautogpt_platform/frontend/src/app/(platform)/build/__tests__/CustomNode.test.tsxautogpt_platform/frontend/src/app/(platform)/build/__tests__/RunGraph.test.tsxautogpt_platform/frontend/src/app/(platform)/build/__tests__/NewSaveControl.test.tsx
📚 Learning: 2026-01-28T18:29:34.362Z
Learnt from: CR
Repo: Significant-Gravitas/AutoGPT PR: 0
File: autogpt_platform/frontend/src/tests/CLAUDE.md:0-0
Timestamp: 2026-01-28T18:29:34.362Z
Learning: Applies to autogpt_platform/frontend/src/tests/**/*.test.{tsx,ts} : Place unit tests co-located with the source file: `Component.test.tsx` next to `Component.tsx`
Applied to files:
autogpt_platform/frontend/src/app/(platform)/build/__tests__/NewBlockMenu.test.tsxautogpt_platform/frontend/src/app/(platform)/build/__tests__/CustomNode.test.tsxautogpt_platform/frontend/src/app/(platform)/build/__tests__/RunGraph.test.tsxautogpt_platform/frontend/src/app/(platform)/build/__tests__/NewSaveControl.test.tsxautogpt_platform/frontend/src/app/(platform)/build/__tests__/copyPasteStore.test.ts
📚 Learning: 2026-01-28T18:29:34.362Z
Learnt from: CR
Repo: Significant-Gravitas/AutoGPT PR: 0
File: autogpt_platform/frontend/src/tests/CLAUDE.md:0-0
Timestamp: 2026-01-28T18:29:34.362Z
Learning: Applies to autogpt_platform/frontend/src/tests/**/__tests__/*.test.{tsx,ts} : Use `findBy...` methods most of the time in integration tests to wait for elements to appear and avoid flaky tests
Applied to files:
autogpt_platform/frontend/src/app/(platform)/build/__tests__/NewBlockMenu.test.tsxautogpt_platform/frontend/src/app/(platform)/build/__tests__/RunGraph.test.tsxautogpt_platform/frontend/src/app/(platform)/build/__tests__/NewSaveControl.test.tsx
📚 Learning: 2026-01-28T18:29:34.362Z
Learnt from: CR
Repo: Significant-Gravitas/AutoGPT PR: 0
File: autogpt_platform/frontend/src/tests/CLAUDE.md:0-0
Timestamp: 2026-01-28T18:29:34.362Z
Learning: Do not test third-party library internals (Radix UI, React Query)
Applied to files:
autogpt_platform/frontend/src/app/(platform)/build/__tests__/NewBlockMenu.test.tsxautogpt_platform/frontend/src/app/(platform)/build/__tests__/RunGraph.test.tsx
📚 Learning: 2026-02-27T10:45:49.499Z
Learnt from: majdyz
Repo: Significant-Gravitas/AutoGPT PR: 12213
File: autogpt_platform/frontend/src/app/(platform)/copilot/tools/RunMCPTool/helpers.tsx:23-24
Timestamp: 2026-02-27T10:45:49.499Z
Learning: Prefer using generated OpenAPI types from '@/app/api/__generated__/' for payloads defined in openapi.json (e.g., MCPToolsDiscoveredResponse, MCPToolOutputResponse). Use inline TypeScript interfaces only for payloads that are SSE-stream-only and not exposed via OpenAPI. Apply this pattern to frontend tool components (e.g., RunMCPTool) and related areas where similar SSE/openapi-discrepancies occur; avoid re-implementing types when a generated type is available.
Applied to files:
autogpt_platform/frontend/src/app/(platform)/build/__tests__/NewBlockMenu.test.tsxautogpt_platform/frontend/src/app/(platform)/build/__tests__/CustomNode.test.tsxautogpt_platform/frontend/src/app/(platform)/build/__tests__/RunGraph.test.tsxautogpt_platform/frontend/src/app/(platform)/build/__tests__/NewSaveControl.test.tsx
📚 Learning: 2026-01-28T18:29:34.362Z
Learnt from: CR
Repo: Significant-Gravitas/AutoGPT PR: 0
File: autogpt_platform/frontend/src/tests/CLAUDE.md:0-0
Timestamp: 2026-01-28T18:29:34.362Z
Learning: Do not test simple prop-passing components with no logic
Applied to files:
autogpt_platform/frontend/src/app/(platform)/build/__tests__/CustomNode.test.tsx
📚 Learning: 2026-02-04T16:50:51.495Z
Learnt from: CR
Repo: Significant-Gravitas/AutoGPT PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-02-04T16:50:51.495Z
Learning: Applies to autogpt_platform/frontend/**/*.{test,spec}.{ts,tsx} : Run `pnpm test` or `pnpm test-ui` for frontend Playwright tests
Applied to files:
autogpt_platform/frontend/src/app/(platform)/build/__tests__/RunGraph.test.tsxautogpt_platform/frontend/src/app/(platform)/build/__tests__/nodeStore.test.ts
🔇 Additional comments (6)
autogpt_platform/frontend/src/app/(platform)/build/__tests__/CustomNode.test.tsx (1)
198-402: Strong branch-focused coverage forCustomNoderendering states.The scenario matrix is thorough (UI type branches + error/edge conditions) and clearly supports the PR’s integration-test objective.
autogpt_platform/frontend/src/app/(platform)/build/__tests__/RunGraph.test.tsx (1)
65-146: Solid interaction/state coverage forRunGraph.Nice matrix across disabled states, running/not-running actions, and dialog visibility; this meaningfully protects regression-prone UI behavior.
autogpt_platform/frontend/src/app/(platform)/build/__tests__/useFlow.test.ts (1)
83-134:useFlowtests are focused and well-isolated.The loading-state permutations and initial-load completion check are well targeted for this hook.
autogpt_platform/frontend/src/app/(platform)/build/__tests__/copyPasteStore.test.ts (1)
59-256: Good store-level coverage for copy/paste semantics.The suite captures key invariants (edge filtering, remap correctness, selection behavior, and empty clipboard no-op) well.
autogpt_platform/frontend/src/app/(platform)/build/__tests__/edgeStore.test.ts (1)
65-751: Great depth on edgeStore behavioral contracts.Coverage of duplicate rejection, history interaction, link conversion, and bead-state transitions is strong and pragmatic.
autogpt_platform/frontend/src/app/(platform)/build/__tests__/graphStore.test.ts (1)
34-347: Graph store behavior is covered comprehensively.Execution lifecycle, schema predicates, reset semantics, and subgraph replacement paths are all tested clearly.
- Replace `any` types with proper interfaces and `unknown` - Add `createExecutionResult()` helper for consistent test data - Replace setTimeout-based microtask flushing with `queueMicrotask()` - Use `vi.waitFor()` for reliable async assertions - Remove redundant `cleanup()` call in beforeEach - Split combined test case into separate assertions
There was a problem hiding this comment.
Actionable comments posted: 1
♻️ Duplicate comments (1)
autogpt_platform/frontend/src/app/(platform)/build/__tests__/nodeStore.test.ts (1)
736-752:⚠️ Potential issue | 🟠 MajorAvoid encoding duplicate node IDs as valid behavior.
At Line 736, this test asserts duplicate IDs are accepted and retained. If ID-keyed store APIs resolve by single-ID lookup, this introduces ambiguous/non-deterministic updates and reads. Please enforce one invariant (reject/replace duplicates) and update this expectation accordingly.
#!/bin/bash set -euo pipefail node_store_file="$(fd 'nodeStore.ts$' | head -n1)" echo "Inspecting: ${node_store_file}" echo echo "== addNode/addNodes implementations ==" rg -n -C4 '\b(addNode|addNodes)\s*:\s*\(' "${node_store_file}" echo echo "== ID-keyed methods ==" rg -n -C3 '\b(getNodeStatus|getNodeErrors|updateNodeData|getNodeExecutionResults|getLatestNodeExecutionResult)\s*:\s*\(' "${node_store_file}" echo echo "== Lookup patterns (.find / filtering by id) ==" rg -n -C2 '\.find\s*\(|\.filter\s*\(' "${node_store_file}"Expected verification outcome: either duplicate IDs are prevented at insertion, or all ID-keyed methods handle duplicates deterministically by design.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@autogpt_platform/frontend/src/app/`(platform)/build/__tests__/nodeStore.test.ts around lines 736 - 752, The test and store must enforce a single consistent invariant for node IDs; update the store implementation (addNode/addNodes) to deduplicate incoming nodes by id (e.g., keep first or last occurrence) or reject duplicates and throw, and ensure all ID-keyed accessors (getNodeStatus, getNodeErrors, updateNodeData, getNodeExecutionResults, getLatestNodeExecutionResult) operate against a unique-id invariant; specifically, modify addNodes/addNode to detect duplicate ids in the input or existing state and resolve them deterministically (dedupe by id before merging into the nodes array or throw an error), then update the test to expect the chosen behavior (no ambiguous duplicate IDs in the nodes array).
🧹 Nitpick comments (3)
autogpt_platform/frontend/src/app/(platform)/build/__tests__/CustomNode.test.tsx (2)
390-405: Consider adding test for NOTE type not rendering NodeExecutionBadge.The describe block states "always renders NodeExecutionBadge for non-NOTE types" but doesn't include a test verifying that NOTE type does not render it. This would complete the coverage for that conditional.
💡 Suggested test addition
it("renders NodeExecutionBadge for OUTPUT type", () => { renderCustomNode({ uiType: BlockUIType.OUTPUT }); expect(screen.getByTestId("node-execution-badge")).toBeDefined(); }); + + it("does not render NodeExecutionBadge for NOTE type", () => { + renderCustomNode({ uiType: BlockUIType.NOTE }); + expect(screen.queryByTestId("node-execution-badge")).toBeNull(); + }); });🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@autogpt_platform/frontend/src/app/`(platform)/build/__tests__/CustomNode.test.tsx around lines 390 - 405, Add a test to verify that NodeExecutionBadge is not rendered for NOTE blocks: in the "NodeExecutionBadge" describe block use renderCustomNode({ uiType: BlockUIType.NOTE }) and assert that screen.queryByTestId("node-execution-badge") returns null (or use expect(...).toBeFalsy()/toBeNull()) instead of getByTestId so the absence is correctly asserted; place this alongside the existing tests for STANDARD/AGENT/OUTPUT to complete the conditional coverage.
224-226:cleanup()call is typically redundant with Vitest.Vitest with React Testing Library auto-runs
cleanupafter each test. This explicit call is not harmful but can be removed for brevity.♻️ Optional cleanup
-beforeEach(() => { - cleanup(); -});🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@autogpt_platform/frontend/src/app/`(platform)/build/__tests__/CustomNode.test.tsx around lines 224 - 226, Remove the redundant explicit cleanup() call from the test setup: delete the beforeEach block that calls cleanup() since Vitest + React Testing Library already auto-runs cleanup after each test; locate the beforeEach containing cleanup() in CustomNode.test.tsx to remove it and leave tests relying on the default automatic cleanup behavior.autogpt_platform/frontend/src/app/(platform)/build/__tests__/historyStore.test.ts (1)
5-6: Useimport typefor type-only imports.
CustomNodeandCustomEdgeare used only as types in function signatures and return types. Usingimport typeclarifies intent and allows bundlers to eliminate these imports.♻️ Suggested fix
-import { CustomNode } from "../components/FlowEditor/nodes/CustomNode/CustomNode"; -import { CustomEdge } from "../components/FlowEditor/edges/CustomEdge"; +import type { CustomNode } from "../components/FlowEditor/nodes/CustomNode/CustomNode"; +import type { CustomEdge } from "../components/FlowEditor/edges/CustomEdge";🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@autogpt_platform/frontend/src/app/`(platform)/build/__tests__/historyStore.test.ts around lines 5 - 6, Change the two runtime imports to type-only imports: replace the current imports of CustomNode and CustomEdge with "import type" declarations so they are treated as TypeScript type-only imports (e.g., import type { CustomNode } and import type { CustomEdge }), and verify that neither CustomNode nor CustomEdge is used at runtime in the test file (only in function signatures/return types) so the change is safe and bundlers can remove them.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In
`@autogpt_platform/frontend/src/app/`(platform)/build/__tests__/historyStore.test.ts:
- Line 22: Replace the unsafe type assertion on the test's uiType value: instead
of using the string literal "STANDARD" as never, set uiType to the enum member
BlockUIType.STANDARD (the correct value equals "Standard"); update the test
helper in historyStore.test.ts to import/use BlockUIType and assign uiType =
BlockUIType.STANDARD so the type matches and you don't suppress type checking.
---
Duplicate comments:
In
`@autogpt_platform/frontend/src/app/`(platform)/build/__tests__/nodeStore.test.ts:
- Around line 736-752: The test and store must enforce a single consistent
invariant for node IDs; update the store implementation (addNode/addNodes) to
deduplicate incoming nodes by id (e.g., keep first or last occurrence) or reject
duplicates and throw, and ensure all ID-keyed accessors (getNodeStatus,
getNodeErrors, updateNodeData, getNodeExecutionResults,
getLatestNodeExecutionResult) operate against a unique-id invariant;
specifically, modify addNodes/addNode to detect duplicate ids in the input or
existing state and resolve them deterministically (dedupe by id before merging
into the nodes array or throw an error), then update the test to expect the
chosen behavior (no ambiguous duplicate IDs in the nodes array).
---
Nitpick comments:
In
`@autogpt_platform/frontend/src/app/`(platform)/build/__tests__/CustomNode.test.tsx:
- Around line 390-405: Add a test to verify that NodeExecutionBadge is not
rendered for NOTE blocks: in the "NodeExecutionBadge" describe block use
renderCustomNode({ uiType: BlockUIType.NOTE }) and assert that
screen.queryByTestId("node-execution-badge") returns null (or use
expect(...).toBeFalsy()/toBeNull()) instead of getByTestId so the absence is
correctly asserted; place this alongside the existing tests for
STANDARD/AGENT/OUTPUT to complete the conditional coverage.
- Around line 224-226: Remove the redundant explicit cleanup() call from the
test setup: delete the beforeEach block that calls cleanup() since Vitest +
React Testing Library already auto-runs cleanup after each test; locate the
beforeEach containing cleanup() in CustomNode.test.tsx to remove it and leave
tests relying on the default automatic cleanup behavior.
In
`@autogpt_platform/frontend/src/app/`(platform)/build/__tests__/historyStore.test.ts:
- Around line 5-6: Change the two runtime imports to type-only imports: replace
the current imports of CustomNode and CustomEdge with "import type" declarations
so they are treated as TypeScript type-only imports (e.g., import type {
CustomNode } and import type { CustomEdge }), and verify that neither CustomNode
nor CustomEdge is used at runtime in the test file (only in function
signatures/return types) so the change is safe and bundlers can remove them.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: cf4fec29-f2a7-4a23-a97b-23115a874b78
📒 Files selected for processing (6)
autogpt_platform/frontend/src/app/(platform)/build/__tests__/CustomNode.test.tsxautogpt_platform/frontend/src/app/(platform)/build/__tests__/NewBlockMenu.test.tsxautogpt_platform/frontend/src/app/(platform)/build/__tests__/NewSaveControl.test.tsxautogpt_platform/frontend/src/app/(platform)/build/__tests__/historyStore.test.tsautogpt_platform/frontend/src/app/(platform)/build/__tests__/nodeStore.test.tsautogpt_platform/frontend/src/app/(platform)/build/__tests__/useCopyPaste.test.ts
🚧 Files skipped from review as they are similar to previous changes (3)
- autogpt_platform/frontend/src/app/(platform)/build/tests/NewSaveControl.test.tsx
- autogpt_platform/frontend/src/app/(platform)/build/tests/useCopyPaste.test.ts
- autogpt_platform/frontend/src/app/(platform)/build/tests/NewBlockMenu.test.tsx
📜 Review details
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (5)
- GitHub Check: types
- GitHub Check: Seer Code Review
- GitHub Check: end-to-end tests
- GitHub Check: Analyze (python)
- GitHub Check: Check PR Status
🧰 Additional context used
📓 Path-based instructions (14)
autogpt_platform/frontend/**/*.{ts,tsx,js,jsx}
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
autogpt_platform/frontend/**/*.{ts,tsx,js,jsx}: Use Node.js 21+ with pnpm package manager for frontend development
Always run 'pnpm format' for formatting and linting code in frontend development
autogpt_platform/frontend/**/*.{ts,tsx,js,jsx}: Runpnpm formatto auto-fix formatting issues before completing work
Runpnpm lintto check for lint errors and fix any that appear before completing work
Files:
autogpt_platform/frontend/src/app/(platform)/build/__tests__/CustomNode.test.tsxautogpt_platform/frontend/src/app/(platform)/build/__tests__/nodeStore.test.tsautogpt_platform/frontend/src/app/(platform)/build/__tests__/historyStore.test.ts
autogpt_platform/frontend/**/*.{tsx,ts}
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
autogpt_platform/frontend/**/*.{tsx,ts}: Use function declarations for components and handlers (not arrow functions) in React components
Only use arrow functions for small inline lambdas (map, filter, etc.) in React components
Use PascalCase for component names and camelCase with 'use' prefix for hook names in React
Use Tailwind CSS utilities only for styling in frontend components
Use design system components from 'src/components/' (atoms, molecules, organisms) in frontend development
Never use 'src/components/legacy/' in frontend code
Only use Phosphor Icons (@phosphor-icons/react) for icons in frontend components
Use generated API hooks from '@/app/api/generated/endpoints/' instead of deprecated 'BackendAPI' or 'src/lib/autogpt-server-api/'
Use React Query for server state (via generated hooks) in frontend development
Default to client components ('use client') in Next.js; only use server components for SEO or extreme TTFB needs
Use '' component for rendering errors in frontend UI; use toast notifications for mutation errors; use 'Sentry.captureException()' for manual exceptions
Separate render logic from data/behavior in React components; keep comments minimal (code should be self-documenting)
Files:
autogpt_platform/frontend/src/app/(platform)/build/__tests__/CustomNode.test.tsxautogpt_platform/frontend/src/app/(platform)/build/__tests__/nodeStore.test.tsautogpt_platform/frontend/src/app/(platform)/build/__tests__/historyStore.test.ts
autogpt_platform/frontend/**/*.{ts,tsx}
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
autogpt_platform/frontend/**/*.{ts,tsx}: No barrel files or 'index.ts' re-exports in frontend code
Regenerate API hooks with 'pnpm generate:api' after backend OpenAPI spec changes in frontend developmentRun
pnpm typesto check for type errors and fix any that appear before completing work
Files:
autogpt_platform/frontend/src/app/(platform)/build/__tests__/CustomNode.test.tsxautogpt_platform/frontend/src/app/(platform)/build/__tests__/nodeStore.test.tsautogpt_platform/frontend/src/app/(platform)/build/__tests__/historyStore.test.ts
autogpt_platform/frontend/**/*.{js,jsx,ts,tsx}
📄 CodeRabbit inference engine (AGENTS.md)
autogpt_platform/frontend/**/*.{js,jsx,ts,tsx}: Format frontend code usingpnpm format
Never use components fromsrc/components/__legacy__/*
Files:
autogpt_platform/frontend/src/app/(platform)/build/__tests__/CustomNode.test.tsxautogpt_platform/frontend/src/app/(platform)/build/__tests__/nodeStore.test.tsautogpt_platform/frontend/src/app/(platform)/build/__tests__/historyStore.test.ts
autogpt_platform/frontend/src/**/*.{ts,tsx}
📄 CodeRabbit inference engine (AGENTS.md)
autogpt_platform/frontend/src/**/*.{ts,tsx}: Structure components asComponentName/ComponentName.tsx+useComponentName.ts+helpers.tsand use design system components fromsrc/components/(atoms, molecules, organisms)
Use generated API hooks from@/app/api/__generated__/endpoints/with patternuse{Method}{Version}{OperationName}and regenerate withpnpm generate:api
Use function declarations (not arrow functions) for components and handlers
Separate render logic from business logic with component.tsx + useComponent.ts + helpers.ts structure
Colocate state when possible, avoid creating large components, use sub-components in local/componentsfolder
Avoid large hooks, abstract logic intohelpers.tsfiles when sensible
Use arrow functions only for callbacks, not for component declarations
Avoid comments at all times unless the code is very complex
Do not useuseCallbackoruseMemounless asked to optimize a given function
autogpt_platform/frontend/src/**/*.{ts,tsx}: Use function declarations (not arrow functions) for components and handlers
Use type-safe generated API hooks via Orval + React Query for data fetching
Use React Query for server state management and co-locate UI state in components/hooks
Separate render logic (.tsx) from business logic (use*.tshooks)
Use only shadcn/ui (Radix UI primitives) with Tailwind CSS for UI components
Use Phosphor Icons only for all icon implementations
Use ErrorCard component for render errors, toast for mutations, and Sentry for exceptions
Use design system components fromsrc/components/(atoms, molecules, organisms)
Never usesrc/components/__legacy__/*components
Use generated API hooks from@/app/api/__generated__/endpoints/with patternuse{Method}{Version}{OperationName}
Use Tailwind CSS only for styling with design tokens
Do not useuseCallbackoruseMemounless asked to optimize a specific function
Never type withanyunless a variable/attribute can actually be of any type
Files:
autogpt_platform/frontend/src/app/(platform)/build/__tests__/CustomNode.test.tsxautogpt_platform/frontend/src/app/(platform)/build/__tests__/nodeStore.test.tsautogpt_platform/frontend/src/app/(platform)/build/__tests__/historyStore.test.ts
autogpt_platform/frontend/**/*.{js,jsx,ts,tsx,css}
📄 CodeRabbit inference engine (AGENTS.md)
Use Tailwind CSS only for styling, use design tokens, and use Phosphor Icons only
Files:
autogpt_platform/frontend/src/app/(platform)/build/__tests__/CustomNode.test.tsxautogpt_platform/frontend/src/app/(platform)/build/__tests__/nodeStore.test.tsautogpt_platform/frontend/src/app/(platform)/build/__tests__/historyStore.test.ts
autogpt_platform/frontend/src/**/*.tsx
📄 CodeRabbit inference engine (AGENTS.md)
Component props should be
interface Props { ... }(not exported) unless the interface needs to be used outside the componentUse
type Props = { ... }(not exported) for component props unless used outside the component
Files:
autogpt_platform/frontend/src/app/(platform)/build/__tests__/CustomNode.test.tsx
autogpt_platform/**/*.{ts,tsx}
📄 CodeRabbit inference engine (AGENTS.md)
Never type with
any, if no types available useunknown
Files:
autogpt_platform/frontend/src/app/(platform)/build/__tests__/CustomNode.test.tsxautogpt_platform/frontend/src/app/(platform)/build/__tests__/nodeStore.test.tsautogpt_platform/frontend/src/app/(platform)/build/__tests__/historyStore.test.ts
autogpt_platform/frontend/**/*.{test,spec}.{ts,tsx}
📄 CodeRabbit inference engine (AGENTS.md)
Run
pnpm testorpnpm test-uifor frontend Playwright tests
Files:
autogpt_platform/frontend/src/app/(platform)/build/__tests__/CustomNode.test.tsxautogpt_platform/frontend/src/app/(platform)/build/__tests__/nodeStore.test.tsautogpt_platform/frontend/src/app/(platform)/build/__tests__/historyStore.test.ts
autogpt_platform/frontend/src/app/(platform)/**/*.tsx
📄 CodeRabbit inference engine (AGENTS.md)
If adding protected frontend routes, update
frontend/lib/supabase/middleware.ts
Files:
autogpt_platform/frontend/src/app/(platform)/build/__tests__/CustomNode.test.tsx
autogpt_platform/frontend/src/**/*.{ts,tsx,js,jsx}
📄 CodeRabbit inference engine (autogpt_platform/frontend/CLAUDE.md)
Fully capitalize acronyms in symbols, e.g.
graphID,useBackendAPI
Files:
autogpt_platform/frontend/src/app/(platform)/build/__tests__/CustomNode.test.tsxautogpt_platform/frontend/src/app/(platform)/build/__tests__/nodeStore.test.tsautogpt_platform/frontend/src/app/(platform)/build/__tests__/historyStore.test.ts
autogpt_platform/frontend/src/**/*.ts
📄 CodeRabbit inference engine (AGENTS.md)
Do not type hook returns, let Typescript infer as much as possible
Files:
autogpt_platform/frontend/src/app/(platform)/build/__tests__/nodeStore.test.tsautogpt_platform/frontend/src/app/(platform)/build/__tests__/historyStore.test.ts
autogpt_platform/frontend/**/*.{spec.ts,test.ts,stories.tsx}
📄 CodeRabbit inference engine (autogpt_platform/frontend/CLAUDE.md)
Use Playwright for E2E testing and Storybook for component development
Files:
autogpt_platform/frontend/src/app/(platform)/build/__tests__/nodeStore.test.tsautogpt_platform/frontend/src/app/(platform)/build/__tests__/historyStore.test.ts
autogpt_platform/frontend/**/*.{stories.tsx,spec.ts,test.ts}
📄 CodeRabbit inference engine (autogpt_platform/frontend/CLAUDE.md)
Add Storybook stories for new components and Playwright tests for E2E scenarios
Files:
autogpt_platform/frontend/src/app/(platform)/build/__tests__/nodeStore.test.tsautogpt_platform/frontend/src/app/(platform)/build/__tests__/historyStore.test.ts
🧠 Learnings (27)
📓 Common learnings
Learnt from: CR
Repo: Significant-Gravitas/AutoGPT PR: 0
File: autogpt_platform/frontend/src/tests/CLAUDE.md:0-0
Timestamp: 2026-01-28T18:29:34.362Z
Learning: Applies to autogpt_platform/frontend/src/tests/**/__tests__/main.test.tsx : Start integration tests at the page level with a `main.test.tsx` file and split into smaller files as it grows
Learnt from: CR
Repo: Significant-Gravitas/AutoGPT PR: 0
File: autogpt_platform/frontend/src/tests/CLAUDE.md:0-0
Timestamp: 2026-01-28T18:29:34.362Z
Learning: Applies to autogpt_platform/frontend/src/tests/**/__tests__/*.test.{tsx,ts} : Use integration tests (Vitest + RTL) for user interactions that trigger API calls and feature flows within a single page
Learnt from: CR
Repo: Significant-Gravitas/AutoGPT PR: 0
File: autogpt_platform/frontend/CLAUDE.md:0-0
Timestamp: 2026-02-26T21:29:44.105Z
Learning: Applies to autogpt_platform/frontend/**/*.{stories.tsx,spec.ts,test.ts} : Add Storybook stories for new components and Playwright tests for E2E scenarios
Learnt from: CR
Repo: Significant-Gravitas/AutoGPT PR: 0
File: autogpt_platform/frontend/src/tests/CLAUDE.md:0-0
Timestamp: 2026-01-28T18:29:34.362Z
Learning: Applies to autogpt_platform/frontend/src/tests/**/__tests__/*.test.{tsx,ts} : Use integration tests (Vitest + RTL) for page-level behavior with mocked API responses and components that fetch data
Learnt from: CR
Repo: Significant-Gravitas/AutoGPT PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-02-04T16:50:51.495Z
Learning: Applies to autogpt_platform/frontend/**/*.stories.{ts,tsx} : Add Storybook stories for new components and Playwright for E2E testing
Learnt from: CR
Repo: Significant-Gravitas/AutoGPT PR: 0
File: autogpt_platform/frontend/src/tests/CLAUDE.md:0-0
Timestamp: 2026-01-28T18:29:34.362Z
Learning: Applies to autogpt_platform/frontend/src/tests/**/*.test.{tsx,ts} : Use unit tests (Vitest + RTL) for component state changes and custom hooks
Learnt from: CR
Repo: Significant-Gravitas/AutoGPT PR: 0
File: autogpt_platform/frontend/src/tests/CLAUDE.md:0-0
Timestamp: 2026-01-28T18:29:34.362Z
Learning: Applies to autogpt_platform/frontend/src/tests/src/tests/**/*.spec.ts : Place E2E tests (Playwright) in a centralized location for critical user journeys
Learnt from: CR
Repo: Significant-Gravitas/AutoGPT PR: 0
File: autogpt_platform/frontend/src/tests/CLAUDE.md:0-0
Timestamp: 2026-01-28T18:29:34.362Z
Learning: Applies to autogpt_platform/frontend/src/tests/src/tests/**/*.spec.ts : Use E2E tests (Playwright) for flows requiring real browser APIs (clipboard, downloads) or cross-page navigation
Learnt from: CR
Repo: Significant-Gravitas/AutoGPT PR: 0
File: autogpt_platform/frontend/src/tests/CLAUDE.md:0-0
Timestamp: 2026-01-28T18:29:34.362Z
Learning: Applies to autogpt_platform/frontend/src/tests/**/__tests__/*.test.{tsx,ts} : Place integration tests in a `__tests__` folder next to the component being tested
Learnt from: CR
Repo: Significant-Gravitas/AutoGPT PR: 0
File: autogpt_platform/frontend/CLAUDE.md:0-0
Timestamp: 2026-02-26T21:29:44.105Z
Learning: Applies to autogpt_platform/frontend/**/*.{spec.ts,test.ts,stories.tsx} : Use Playwright for E2E testing and Storybook for component development
Learnt from: CR
Repo: Significant-Gravitas/AutoGPT PR: 0
File: autogpt_platform/frontend/src/tests/CLAUDE.md:0-0
Timestamp: 2026-01-28T18:29:34.362Z
Learning: Applies to autogpt_platform/frontend/src/tests/**/*.test.{tsx,ts} : Use unit tests (Vitest + RTL) for testing pure utility functions and isolated components
Learnt from: CR
Repo: Significant-Gravitas/AutoGPT PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-02-04T16:50:51.495Z
Learning: Applies to autogpt_platform/frontend/**/*.{test,spec}.{ts,tsx} : Run `pnpm test` or `pnpm test-ui` for frontend Playwright tests
📚 Learning: 2026-01-28T18:29:34.362Z
Learnt from: CR
Repo: Significant-Gravitas/AutoGPT PR: 0
File: autogpt_platform/frontend/src/tests/CLAUDE.md:0-0
Timestamp: 2026-01-28T18:29:34.362Z
Learning: Applies to autogpt_platform/frontend/src/tests/**/*.test.{tsx,ts} : Use unit tests (Vitest + RTL) for component state changes and custom hooks
Applied to files:
autogpt_platform/frontend/src/app/(platform)/build/__tests__/CustomNode.test.tsxautogpt_platform/frontend/src/app/(platform)/build/__tests__/nodeStore.test.tsautogpt_platform/frontend/src/app/(platform)/build/__tests__/historyStore.test.ts
📚 Learning: 2026-01-28T18:29:34.362Z
Learnt from: CR
Repo: Significant-Gravitas/AutoGPT PR: 0
File: autogpt_platform/frontend/src/tests/CLAUDE.md:0-0
Timestamp: 2026-01-28T18:29:34.362Z
Learning: Applies to autogpt_platform/frontend/src/tests/**/__tests__/main.test.tsx : Start integration tests at the page level with a `main.test.tsx` file and split into smaller files as it grows
Applied to files:
autogpt_platform/frontend/src/app/(platform)/build/__tests__/CustomNode.test.tsxautogpt_platform/frontend/src/app/(platform)/build/__tests__/nodeStore.test.tsautogpt_platform/frontend/src/app/(platform)/build/__tests__/historyStore.test.ts
📚 Learning: 2026-01-28T18:29:34.362Z
Learnt from: CR
Repo: Significant-Gravitas/AutoGPT PR: 0
File: autogpt_platform/frontend/src/tests/CLAUDE.md:0-0
Timestamp: 2026-01-28T18:29:34.362Z
Learning: Applies to autogpt_platform/frontend/src/tests/**/*.test.{tsx,ts} : Place unit tests co-located with the source file: `Component.test.tsx` next to `Component.tsx`
Applied to files:
autogpt_platform/frontend/src/app/(platform)/build/__tests__/CustomNode.test.tsx
📚 Learning: 2026-01-28T18:29:34.362Z
Learnt from: CR
Repo: Significant-Gravitas/AutoGPT PR: 0
File: autogpt_platform/frontend/src/tests/CLAUDE.md:0-0
Timestamp: 2026-01-28T18:29:34.362Z
Learning: Applies to autogpt_platform/frontend/src/tests/src/tests/**/*.spec.ts : Place E2E tests (Playwright) in a centralized location for critical user journeys
Applied to files:
autogpt_platform/frontend/src/app/(platform)/build/__tests__/CustomNode.test.tsxautogpt_platform/frontend/src/app/(platform)/build/__tests__/nodeStore.test.tsautogpt_platform/frontend/src/app/(platform)/build/__tests__/historyStore.test.ts
📚 Learning: 2026-01-28T18:29:34.362Z
Learnt from: CR
Repo: Significant-Gravitas/AutoGPT PR: 0
File: autogpt_platform/frontend/src/tests/CLAUDE.md:0-0
Timestamp: 2026-01-28T18:29:34.362Z
Learning: Applies to autogpt_platform/frontend/src/tests/**/*.test.{tsx,ts} : Use unit tests (Vitest + RTL) for testing pure utility functions and isolated components
Applied to files:
autogpt_platform/frontend/src/app/(platform)/build/__tests__/CustomNode.test.tsxautogpt_platform/frontend/src/app/(platform)/build/__tests__/nodeStore.test.ts
📚 Learning: 2026-01-28T18:29:34.362Z
Learnt from: CR
Repo: Significant-Gravitas/AutoGPT PR: 0
File: autogpt_platform/frontend/src/tests/CLAUDE.md:0-0
Timestamp: 2026-01-28T18:29:34.362Z
Learning: Applies to autogpt_platform/frontend/src/tests/**/__tests__/*.test.{tsx,ts} : Place integration tests in a `__tests__` folder next to the component being tested
Applied to files:
autogpt_platform/frontend/src/app/(platform)/build/__tests__/CustomNode.test.tsx
📚 Learning: 2026-02-26T21:29:44.105Z
Learnt from: CR
Repo: Significant-Gravitas/AutoGPT PR: 0
File: autogpt_platform/frontend/CLAUDE.md:0-0
Timestamp: 2026-02-26T21:29:44.105Z
Learning: Applies to autogpt_platform/frontend/**/*.{stories.tsx,spec.ts,test.ts} : Add Storybook stories for new components and Playwright tests for E2E scenarios
Applied to files:
autogpt_platform/frontend/src/app/(platform)/build/__tests__/CustomNode.test.tsxautogpt_platform/frontend/src/app/(platform)/build/__tests__/nodeStore.test.tsautogpt_platform/frontend/src/app/(platform)/build/__tests__/historyStore.test.ts
📚 Learning: 2026-01-28T18:29:34.362Z
Learnt from: CR
Repo: Significant-Gravitas/AutoGPT PR: 0
File: autogpt_platform/frontend/src/tests/CLAUDE.md:0-0
Timestamp: 2026-01-28T18:29:34.362Z
Learning: Applies to autogpt_platform/frontend/src/tests/**/__tests__/*.test.{tsx,ts} : Use integration tests (Vitest + RTL) for page-level behavior with mocked API responses and components that fetch data
Applied to files:
autogpt_platform/frontend/src/app/(platform)/build/__tests__/CustomNode.test.tsxautogpt_platform/frontend/src/app/(platform)/build/__tests__/nodeStore.test.ts
📚 Learning: 2026-01-28T18:29:34.362Z
Learnt from: CR
Repo: Significant-Gravitas/AutoGPT PR: 0
File: autogpt_platform/frontend/src/tests/CLAUDE.md:0-0
Timestamp: 2026-01-28T18:29:34.362Z
Learning: Applies to autogpt_platform/frontend/src/tests/**/__tests__/*.test.{tsx,ts} : Use integration tests (Vitest + RTL) for user interactions that trigger API calls and feature flows within a single page
Applied to files:
autogpt_platform/frontend/src/app/(platform)/build/__tests__/CustomNode.test.tsxautogpt_platform/frontend/src/app/(platform)/build/__tests__/nodeStore.test.tsautogpt_platform/frontend/src/app/(platform)/build/__tests__/historyStore.test.ts
📚 Learning: 2026-01-28T18:29:34.362Z
Learnt from: CR
Repo: Significant-Gravitas/AutoGPT PR: 0
File: autogpt_platform/frontend/src/tests/CLAUDE.md:0-0
Timestamp: 2026-01-28T18:29:34.362Z
Learning: Applies to autogpt_platform/frontend/src/tests/**/__tests__/*.test.{tsx,ts} : Mock API requests in integration tests via MSW (Mock Service Worker)
Applied to files:
autogpt_platform/frontend/src/app/(platform)/build/__tests__/CustomNode.test.tsx
📚 Learning: 2026-02-04T16:50:51.495Z
Learnt from: CR
Repo: Significant-Gravitas/AutoGPT PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-02-04T16:50:51.495Z
Learning: Applies to autogpt_platform/**/*.{ts,tsx} : Never type with `any`, if no types available use `unknown`
Applied to files:
autogpt_platform/frontend/src/app/(platform)/build/__tests__/CustomNode.test.tsx
📚 Learning: 2026-02-26T21:29:44.105Z
Learnt from: CR
Repo: Significant-Gravitas/AutoGPT PR: 0
File: autogpt_platform/frontend/CLAUDE.md:0-0
Timestamp: 2026-02-26T21:29:44.105Z
Learning: Applies to autogpt_platform/frontend/**/*.{ts,tsx} : Run `pnpm types` to check for type errors and fix any that appear before completing work
Applied to files:
autogpt_platform/frontend/src/app/(platform)/build/__tests__/CustomNode.test.tsx
📚 Learning: 2026-02-26T21:29:44.105Z
Learnt from: CR
Repo: Significant-Gravitas/AutoGPT PR: 0
File: autogpt_platform/frontend/CLAUDE.md:0-0
Timestamp: 2026-02-26T21:29:44.105Z
Learning: Applies to autogpt_platform/frontend/src/**/*.{ts,tsx} : Never type with `any` unless a variable/attribute can actually be of any type
Applied to files:
autogpt_platform/frontend/src/app/(platform)/build/__tests__/CustomNode.test.tsx
📚 Learning: 2026-01-28T18:29:34.362Z
Learnt from: CR
Repo: Significant-Gravitas/AutoGPT PR: 0
File: autogpt_platform/frontend/src/tests/CLAUDE.md:0-0
Timestamp: 2026-01-28T18:29:34.362Z
Learning: Do not test TypeScript types
Applied to files:
autogpt_platform/frontend/src/app/(platform)/build/__tests__/CustomNode.test.tsx
📚 Learning: 2026-03-10T06:34:10.984Z
Learnt from: Abhi1992002
Repo: Significant-Gravitas/AutoGPT PR: 12354
File: autogpt_platform/frontend/src/components/renderers/InputRenderer/base/oneof/OneOfField.tsx:16-19
Timestamp: 2026-03-10T06:34:10.984Z
Learning: In `autogpt_platform/frontend/src/components/renderers/InputRenderer/base/oneof/OneOfField.tsx`, the schema parameters in functions like `getDiscriminatorPropName` use `any` intentionally because `discriminator`, `const`, and `advanced` are custom JSON Schema extensions not present in `RJSFSchema` from `rjsf/utils`. A typed intersection `RJSFSchema & { discriminator?: string | { propertyName: string }; const?: unknown; advanced?: boolean }` is the preferred alternative over bare `any` to maintain type safety while accommodating these extensions.
Applied to files:
autogpt_platform/frontend/src/app/(platform)/build/__tests__/CustomNode.test.tsx
📚 Learning: 2026-02-26T21:29:44.105Z
Learnt from: CR
Repo: Significant-Gravitas/AutoGPT PR: 0
File: autogpt_platform/frontend/CLAUDE.md:0-0
Timestamp: 2026-02-26T21:29:44.105Z
Learning: Applies to autogpt_platform/frontend/**/*.{ts,tsx,js,jsx} : Run `pnpm lint` to check for lint errors and fix any that appear before completing work
Applied to files:
autogpt_platform/frontend/src/app/(platform)/build/__tests__/CustomNode.test.tsx
📚 Learning: 2026-01-28T18:29:34.362Z
Learnt from: CR
Repo: Significant-Gravitas/AutoGPT PR: 0
File: autogpt_platform/frontend/src/tests/CLAUDE.md:0-0
Timestamp: 2026-01-28T18:29:34.362Z
Learning: Applies to autogpt_platform/frontend/src/tests/src/tests/**/*.spec.ts : Use E2E tests (Playwright) for flows requiring real browser APIs (clipboard, downloads) or cross-page navigation
Applied to files:
autogpt_platform/frontend/src/app/(platform)/build/__tests__/CustomNode.test.tsxautogpt_platform/frontend/src/app/(platform)/build/__tests__/nodeStore.test.tsautogpt_platform/frontend/src/app/(platform)/build/__tests__/historyStore.test.ts
📚 Learning: 2026-01-28T18:29:34.362Z
Learnt from: CR
Repo: Significant-Gravitas/AutoGPT PR: 0
File: autogpt_platform/frontend/src/tests/CLAUDE.md:0-0
Timestamp: 2026-01-28T18:29:34.362Z
Learning: Applies to autogpt_platform/frontend/src/tests/**/__tests__/*.test.{tsx,ts} : Use `findBy...` methods most of the time in integration tests to wait for elements to appear and avoid flaky tests
Applied to files:
autogpt_platform/frontend/src/app/(platform)/build/__tests__/CustomNode.test.tsx
📚 Learning: 2026-01-28T18:29:34.362Z
Learnt from: CR
Repo: Significant-Gravitas/AutoGPT PR: 0
File: autogpt_platform/frontend/src/tests/CLAUDE.md:0-0
Timestamp: 2026-01-28T18:29:34.362Z
Learning: Do not test simple prop-passing components with no logic
Applied to files:
autogpt_platform/frontend/src/app/(platform)/build/__tests__/CustomNode.test.tsx
📚 Learning: 2026-02-27T10:45:49.499Z
Learnt from: majdyz
Repo: Significant-Gravitas/AutoGPT PR: 12213
File: autogpt_platform/frontend/src/app/(platform)/copilot/tools/RunMCPTool/helpers.tsx:23-24
Timestamp: 2026-02-27T10:45:49.499Z
Learning: Prefer using generated OpenAPI types from '@/app/api/__generated__/' for payloads defined in openapi.json (e.g., MCPToolsDiscoveredResponse, MCPToolOutputResponse). Use inline TypeScript interfaces only for payloads that are SSE-stream-only and not exposed via OpenAPI. Apply this pattern to frontend tool components (e.g., RunMCPTool) and related areas where similar SSE/openapi-discrepancies occur; avoid re-implementing types when a generated type is available.
Applied to files:
autogpt_platform/frontend/src/app/(platform)/build/__tests__/CustomNode.test.tsx
📚 Learning: 2026-02-04T16:50:51.495Z
Learnt from: CR
Repo: Significant-Gravitas/AutoGPT PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-02-04T16:50:51.495Z
Learning: Applies to autogpt_platform/frontend/**/*.{test,spec}.{ts,tsx} : Run `pnpm test` or `pnpm test-ui` for frontend Playwright tests
Applied to files:
autogpt_platform/frontend/src/app/(platform)/build/__tests__/nodeStore.test.ts
📚 Learning: 2026-02-04T16:50:51.495Z
Learnt from: CR
Repo: Significant-Gravitas/AutoGPT PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-02-04T16:50:51.495Z
Learning: Applies to autogpt_platform/frontend/**/*.stories.{ts,tsx} : Add Storybook stories for new components and Playwright for E2E testing
Applied to files:
autogpt_platform/frontend/src/app/(platform)/build/__tests__/nodeStore.test.tsautogpt_platform/frontend/src/app/(platform)/build/__tests__/historyStore.test.ts
📚 Learning: 2026-03-10T08:39:13.707Z
Learnt from: majdyz
Repo: Significant-Gravitas/AutoGPT PR: 12356
File: autogpt_platform/backend/backend/copilot/constants.py:9-12
Timestamp: 2026-03-10T08:39:13.707Z
Learning: In Significant-Gravitas/AutoGPT PR `#12356`, the `COPILOT_SYNTHETIC_ID_PREFIX = "copilot-"` check in `create_auto_approval_record` (human_review.py) is intentional and safe. The `graph_exec_id` passed to this function comes from server-side `PendingHumanReview` DB records (not from user input); the API only accepts `node_exec_id` from users. Synthetic `copilot-*` IDs are only ever created server-side in `run_block.py`. The prefix skip avoids a DB lookup for a `AgentGraphExecution` record that legitimately does not exist for CoPilot sessions, while `user_id` scoping is enforced at the auth layer and on the resulting auto-approval record.
Applied to files:
autogpt_platform/frontend/src/app/(platform)/build/__tests__/nodeStore.test.ts
📚 Learning: 2026-01-28T18:29:34.362Z
Learnt from: CR
Repo: Significant-Gravitas/AutoGPT PR: 0
File: autogpt_platform/frontend/src/tests/CLAUDE.md:0-0
Timestamp: 2026-01-28T18:29:34.362Z
Learning: Applies to autogpt_platform/frontend/src/tests/src/tests/**/*.spec.ts : Use E2E tests (Playwright) for authentication flows (login, signup, logout) that MUST work in a real browser
Applied to files:
autogpt_platform/frontend/src/app/(platform)/build/__tests__/historyStore.test.ts
📚 Learning: 2026-02-26T21:29:44.105Z
Learnt from: CR
Repo: Significant-Gravitas/AutoGPT PR: 0
File: autogpt_platform/frontend/CLAUDE.md:0-0
Timestamp: 2026-02-26T21:29:44.105Z
Learning: Applies to autogpt_platform/frontend/**/*.{spec.ts,test.ts,stories.tsx} : Use Playwright for E2E testing and Storybook for component development
Applied to files:
autogpt_platform/frontend/src/app/(platform)/build/__tests__/historyStore.test.ts
📚 Learning: 2026-01-28T18:29:34.362Z
Learnt from: CR
Repo: Significant-Gravitas/AutoGPT PR: 0
File: autogpt_platform/frontend/src/tests/CLAUDE.md:0-0
Timestamp: 2026-01-28T18:29:34.362Z
Learning: Applies to autogpt_platform/frontend/src/tests/**/*.stories.tsx : Use Storybook for design system, atoms, molecules, visual states (hover, disabled, loading), and responsive layouts
Applied to files:
autogpt_platform/frontend/src/app/(platform)/build/__tests__/historyStore.test.ts
🔇 Additional comments (5)
autogpt_platform/frontend/src/app/(platform)/build/__tests__/CustomNode.test.tsx (2)
1-8: Good type imports and structure.The imports are well-organized with proper type-only imports for
CustomNodeData,NodeProps, andNodeExecutionResult. This addresses the previous review concerns aboutanytypes.
201-220: DateTime fields are correctly typed asDateobjects.The
NodeExecutionResulttype inautogpt_platform/frontend/src/lib/autogpt-server-api/types.tsdefinesadd_time,queue_time,start_time, andend_timeasDateobjects (not strings). The test helper correctly createsDateinstances for these fields—no type mismatch exists.> Likely an incorrect or invalid review comment.autogpt_platform/frontend/src/app/(platform)/build/__tests__/nodeStore.test.ts (1)
35-54: Good fixture normalization withcreateExecutionResult.Centralizing
NodeExecutionResultsetup here makes the suite more consistent and easier to maintain.autogpt_platform/frontend/src/app/(platform)/build/__tests__/historyStore.test.ts (2)
44-52: LGTM!The
flushMicrotaskshelper correctly usesqueueMicrotaskmatching the store's batching primitive. Test isolation is properly implemented by resetting all three interdependent stores.
54-407: LGTM!Comprehensive test coverage for the historyStore including undo/redo semantics, history limits, microtask batching behavior, canUndo/canRedo API, deduplication, and edge restoration. The tests correctly verify state consistency across the interdependent nodeStore and edgeStore.
…ponents, and hooks (part-1) (#12433) ### Changes - Add 329 integration tests across 11 test files for the builder (visual workflow editor) - Cover all Zustand stores (nodeStore, edgeStore, historyStore, graphStore, copyPasteStore, blockMenuStore, controlPanelStore) - Cover key components (CustomNode, NewBlockMenu, NewSaveControl, RunGraph) - Cover hooks (useFlow, useCopyPaste) ### Test files | File | Tests | Coverage | |------|-------|----------| | `nodeStore.test.ts` | 58 | Node lifecycle, bulk ops, backend conversion, execution tracking, status, errors, resolution mode | | `edgeStore.test.ts` | 37 | Edge CRUD, duplicate rejection, bead visualization, backend link conversion, upsert | | `historyStore.test.ts` | 22 | Undo/redo, history limits (50), microtask batching, deduplication, canUndo/canRedo | | `graphStore.test.ts` | 28 | Execution status transitions, isGraphRunning, schema management, sub-graphs | | `copyPasteStore.test.ts` | 8 | Copy/paste with ID remapping, position offset, edge preservation | | `CustomNode.test.tsx` | 25 | Rendering by block type (NOTE, WEBHOOK, AGENT, OUTPUT, AYRSHARE), error states | | `NewBlockMenu.test.tsx` | 29 | Store state (search, filters, creators, categories), search/default view routing | | `NewSaveControl.test.tsx` | 11 | Save dialog rendering, form validation, version display, popover state | | `RunGraph.test.tsx` | 11 | Run/stop button states, loading, click handlers, RunInputDialog visibility | | `useFlow.test.ts` | 4 | Loading states, initial load completion | | `useCopyPaste.test.ts` | 16 | Clipboard copy/paste, UUID remapping, viewport centering, input field guard |
…ponents, and hooks (part-1) (Significant-Gravitas#12433) ### Changes - Add 329 integration tests across 11 test files for the builder (visual workflow editor) - Cover all Zustand stores (nodeStore, edgeStore, historyStore, graphStore, copyPasteStore, blockMenuStore, controlPanelStore) - Cover key components (CustomNode, NewBlockMenu, NewSaveControl, RunGraph) - Cover hooks (useFlow, useCopyPaste) ### Test files | File | Tests | Coverage | |------|-------|----------| | `nodeStore.test.ts` | 58 | Node lifecycle, bulk ops, backend conversion, execution tracking, status, errors, resolution mode | | `edgeStore.test.ts` | 37 | Edge CRUD, duplicate rejection, bead visualization, backend link conversion, upsert | | `historyStore.test.ts` | 22 | Undo/redo, history limits (50), microtask batching, deduplication, canUndo/canRedo | | `graphStore.test.ts` | 28 | Execution status transitions, isGraphRunning, schema management, sub-graphs | | `copyPasteStore.test.ts` | 8 | Copy/paste with ID remapping, position offset, edge preservation | | `CustomNode.test.tsx` | 25 | Rendering by block type (NOTE, WEBHOOK, AGENT, OUTPUT, AYRSHARE), error states | | `NewBlockMenu.test.tsx` | 29 | Store state (search, filters, creators, categories), search/default view routing | | `NewSaveControl.test.tsx` | 11 | Save dialog rendering, form validation, version display, popover state | | `RunGraph.test.tsx` | 11 | Run/stop button states, loading, click handlers, RunInputDialog visibility | | `useFlow.test.ts` | 4 | Loading states, initial load completion | | `useCopyPaste.test.ts` | 16 | Clipboard copy/paste, UUID remapping, viewport centering, input field guard |
Changes
workflow editor)
copyPasteStore, blockMenuStore, controlPanelStore)
Test files
nodeStore.test.tsedgeStore.test.tshistoryStore.test.tsgraphStore.test.tscopyPasteStore.test.tsCustomNode.test.tsxNewBlockMenu.test.tsxNewSaveControl.test.tsxRunGraph.test.tsxuseFlow.test.tsuseCopyPaste.test.ts