Skip to content

fix(frontend/copilot): show clarification and agent-saved cards without accordion#12204

Merged
0ubbe merged 7 commits intodevfrom
fix/better-credentials-input-asking-2
Feb 25, 2026
Merged

fix(frontend/copilot): show clarification and agent-saved cards without accordion#12204
0ubbe merged 7 commits intodevfrom
fix/better-credentials-input-asking-2

Conversation

@0ubbe
Copy link
Contributor

@0ubbe 0ubbe commented Feb 25, 2026

Background

The CoPilot tool UI wraps several output cards (clarification questions, agent saved confirmation) inside a collapsible ToolAccordion. This means users have to expand the accordion to see important interactive content β€” clarification questions they need to answer, or confirmation that their agent was created/updated.

Changes πŸ—οΈ

  • Clarification questions always visible: Moved ClarificationQuestionsCard out of the ToolAccordion in both CreateAgent and EditAgent tools so users immediately see and can answer questions without expanding an accordion
  • Agent saved card always visible: Moved the agent-saved confirmation card out of the ToolAccordion in both tools so the success state with library/builder links is immediately visible
  • Extracted AgentSavedCard component: The agent-saved card was duplicated between CreateAgent and EditAgent β€” extracted it into a shared copilot/components/AgentSavedCard/AgentSavedCard.tsx component, parameterized by message ("has been saved to your library!" vs "has been updated!")
  • ClarificationQuestionsCard polish: Updated spacing, icon (ChatTeardropDotsIcon), typography variants, border styles, and number badge sizing for a cleaner look
  • Minor atom tweaks: Lightened secondary button variant (zinc-200 β†’ zinc-100), changed textarea border radius from rounded-3xl to rounded-xl

Checklist πŸ“‹

For code changes:

  • I have clearly listed my changes in the PR description
  • I have made a test plan
  • I have tested my changes according to the test plan:
    • pnpm format passes
    • pnpm lint passes
    • pnpm types passes
    • Create an agent via CoPilot and verify the saved card shows without accordion
    • Trigger clarification questions and verify they show without accordion
    • Edit an agent via CoPilot and verify the updated card shows without accordion
    • Verify the ClarificationQuestionsCard styling looks correct (spacing, icons, borders)

πŸ€– Generated with Claude Code

0ubbe and others added 3 commits February 24, 2026 18:08
…ut accordion wrapper

- Move ClarificationQuestionsCard and agent-saved card outside ToolAccordion
  so they are always visible to the user
- Extract shared AgentSavedCard component to copilot/components to deduplicate
  the identical card rendered in CreateAgent and EditAgent
- Polish ClarificationQuestionsCard spacing, icons, and typography
- Lighten secondary button variant and use rounded-xl for textarea inputs

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@0ubbe 0ubbe requested a review from a team as a code owner February 25, 2026 09:57
@0ubbe 0ubbe requested review from Abhi1992002, Bentlybro, Pwuts and ntindle and removed request for a team February 25, 2026 09:57
@github-project-automation github-project-automation bot moved this to πŸ†• Needs initial review in AutoGPT development kanban Feb 25, 2026
Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.

@github-actions github-actions bot added the platform/frontend AutoGPT Platform - Front end label Feb 25, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Feb 25, 2026

πŸ” PR Overlap Detection

This check compares your PR against all other open PRs targeting the same branch to detect potential merge conflicts early.

πŸ”΄ Merge Conflicts Detected

The following PRs have been tested and will have merge conflicts if merged after this PR. Consider coordinating with the authors.

  • chore(frontend): Fix react-doctor warnings + add CI jobΒ #12163 (0ubbe Β· updated 23h ago)
    • πŸ“ autogpt_platform/frontend/src/app/(platform)/copilot/
      • components/ChatMessagesContainer/ChatMessagesContainer.tsx (1 conflict, ~6 lines)
      • tools/RunAgent/components/AgentDetailsCard/AgentDetailsCard.tsx (2 conflicts, ~117 lines)

🟒 Low Risk β€” File Overlap Only

These PRs touch the same files but different sections (click to expand)

Summary: 1 conflict(s), 0 medium risk, 1 low risk (out of 2 PRs with file overlap)


Auto-generated on push. Ignores: openapi.json, lock files.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 25, 2026

Walkthrough

Adds AgentSavedCard and ToolErrorCard components; swaps inline saved/error UIs in CreateAgent/EditAgent to these components; introduces clarifying-question normalization and schema-driven input handling (extractDefaults, isFormValid) for AgentDetailsCard; updates ClarificationQuestionsCard layout; minor UI tweaks and story removal.

Changes

Cohort / File(s) Summary
New components
src/app/(platform)/copilot/components/AgentSavedCard/AgentSavedCard.tsx, src/app/(platform)/copilot/components/ToolErrorCard/ToolErrorCard.tsx
Adds AgentSavedCard (saved-agent UI with action links) and ToolErrorCard (standardized error card with optional details and actions).
CreateAgent & EditAgent
src/app/(platform)/copilot/tools/CreateAgent/CreateAgent.tsx, src/app/(platform)/copilot/tools/EditAgent/EditAgent.tsx
Replaces inline saved/error UI with AgentSavedCard and ToolErrorCard; removes some inline decorative assets; excludes clarification/agent-saved outputs from accordion; integrates normalizeClarifyingQuestions for clarification flow.
Clarification helpers & UI
src/app/(platform)/copilot/tools/CreateAgent/helpers.tsx, src/app/(platform)/copilot/tools/CreateAgent/components/ClarificationQuestionsCard.tsx
Adds ClarifyingQuestion type and normalizeClarifyingQuestions helper; ClarificationQuestionsCard updated props, layout, styles, and uses normalized questions.
RunAgent β€” schema-driven inputs
src/app/(platform)/copilot/tools/RunAgent/components/AgentDetailsCard/AgentDetailsCard.tsx, src/app/(platform)/copilot/tools/RunAgent/components/AgentDetailsCard/helpers.ts
Replaces toggle-based input UI with schema-driven FormRenderer; adds extractDefaults and isFormValid helpers; validates inputs and changes primary action to Proceed.
Styleguide / sample agent shape
src/app/(platform)/copilot/styleguide/page.tsx
Updates sample agent payload: adds agent.id and converts inputs from an array to an object with properties, defaults, and required fields.
Minor UI tweaks
src/components/atoms/Button/helpers.ts, src/components/atoms/Input/Input.tsx, src/app/(platform)/copilot/tools/RunBlock/components/SetupRequirementsCard/SetupRequirementsCard.tsx
Adjusts secondary button background (zinc-200→zinc-100), reduces textarea radius (rounded-3xl→rounded-xl), and adds top margin to Proceed button.
Storybook removal
src/app/(platform)/copilot/tools/RunBlock/components/BlockDetailsCard/BlockDetailsCard.stories.tsx
Removes Storybook stories and meta for BlockDetailsCard.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  participant User as "User (click)"
  participant AgentDetails as "AgentDetailsCard\n(FormRenderer)"
  participant Validator as "helpers\n(extractDefaults/isFormValid)"
  participant Backend as "Backend / run API"

  rect rgba(220,240,255,0.5)
    User->>AgentDetails: Open details / review inputs
    AgentDetails->>Validator: derive schema & defaults
    Validator-->>AgentDetails: defaults, validation rules
    User->>AgentDetails: Fill inputs
    AgentDetails->>Validator: validate form
    Validator-->>AgentDetails: valid/invalid
    User->>AgentDetails: Click "Proceed"
    AgentDetails->>Backend: send run request (non-empty inputs)
    Backend-->>AgentDetails: run started / response
  end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Suggested labels

Review effort 3/5

Suggested reviewers

  • ntindle
  • Pwuts
  • Abhi1992002

Poem

🐰
I hopped in with a tiny card to show,
Saved agents sparkle, errors now glow,
Questions made tidy, defaults in place,
Forms that behave with gentle grace β€”
Hooray for tiny frontend pace! ✨

πŸš₯ Pre-merge checks | βœ… 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 6.67% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
βœ… Passed checks (2 passed)
Check name Status Explanation
Title check βœ… Passed The title clearly and specifically describes the main objective: moving clarification questions and agent-saved cards outside of the accordion so they are always visible.
Description check βœ… Passed The description provides comprehensive detail about the changes, including background, specific modifications, component extraction, styling updates, and a test plan checklist aligned with the changeset.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • πŸ“ Generate docstrings (stacked PR)
  • πŸ“ Generate docstrings (commit on current branch)
πŸ§ͺ Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/better-credentials-input-asking-2

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.

❀️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
autogpt_platform/frontend/src/app/(platform)/copilot/tools/CreateAgent/CreateAgent.tsx (1)

150-197: πŸ› οΈ Refactor suggestion | 🟠 Major

Use <ErrorCard /> for this render-time error block.

This section still hand-rolls error UI instead of using the shared error component, which makes error handling inconsistent across the frontend.

As per coding guidelines: Use '' component for rendering errors in frontend UI; use toast notifications for mutation errors; use 'Sentry.captureException()' for manual exceptions.

πŸ€– Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@autogpt_platform/frontend/src/app/`(platform)/copilot/tools/CreateAgent/CreateAgent.tsx
around lines 150 - 197, Replace the hand-rolled error UI in CreateAgent (the
conditional block that checks isError && output && isErrorOutput(output)) with
the shared ErrorCard component: call ErrorCard and pass the user-facing message
(use output.message || fallback), pass technical details (output.error formatted
via formatMaybeJson) and any extra details (output.details) into the appropriate
ErrorCard props or slots, and keep the two action buttons ("Try again" and
"Simplify goal") wired to onSend exactly as before; remove the custom markup
(WarningDiamondIcon, <details>, and <pre> blocks) so error rendering is
centralized via ErrorCard and any manual exception capturing should use
Sentry.captureException where needed.
🧹 Nitpick comments (5)
autogpt_platform/frontend/src/app/(platform)/copilot/tools/RunAgent/components/AgentDetailsCard/AgentDetailsCard.tsx (3)

6-6: Remove unused useMemo import if the memo is dropped.

If the useMemo call is removed per the guideline above, clean up this import accordingly.

♻️ Suggested change
-import { useMemo, useState } from "react";
+import { useState } from "react";
πŸ€– Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@autogpt_platform/frontend/src/app/`(platform)/copilot/tools/RunAgent/components/AgentDetailsCard/AgentDetailsCard.tsx
at line 6, The import line in AgentDetailsCard.tsx still includes useMemo though
the memo usage was removed; update the import to drop useMemo so only required
hooks (e.g., useState) are imported, ensuring the import statement (import {
useMemo, useState } from "react") is changed to remove useMemo and avoid
unused-import lint warnings.

24-28: useState(defaults) captures only the initial value β€” won't react to prop changes.

If this component were ever re-rendered with a different output prop (e.g. HMR or parent re-key), inputValues would remain stale because useState only reads the initializer once. Currently this is likely fine since each tool call renders its own card, but it's worth noting. If this becomes an issue, a useEffect syncing defaults into state (or a key on the parent) would solve it.

πŸ€– Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@autogpt_platform/frontend/src/app/`(platform)/copilot/tools/RunAgent/components/AgentDetailsCard/AgentDetailsCard.tsx
around lines 24 - 28, The component initializes inputValues via
useState(defaults) which won't update when defaults prop changes; add a
useEffect that watches defaults (and schema) and calls setInputValues(defaults)
to sync state, and also recomputes validity by calling setValid(schema ?
isFormValid(schema, defaults) : false); update references to
inputValues/setInputValues and valid/setValid accordingly so the component
reflects prop changes without requiring a parent re-key.

19-22: useMemo usage conflicts with coding guidelines.

The guidelines state "Do not use useCallback or useMemo unless asked to optimize a given function." extractDefaults is cheap (iterates a small property map), so the memo is unnecessary here. You can inline it directly.

♻️ Suggested change
-  const defaults = useMemo(
-    () => (schema ? extractDefaults(schema) : {}),
-    [schema],
-  );
+  const defaults = schema ? extractDefaults(schema) : {};

As per coding guidelines: autogpt_platform/frontend/src/**/*.{ts,tsx}: "Do not use useCallback or useMemo unless asked to optimize a given function"

πŸ€– Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@autogpt_platform/frontend/src/app/`(platform)/copilot/tools/RunAgent/components/AgentDetailsCard/AgentDetailsCard.tsx
around lines 19 - 22, Remove the unnecessary useMemo around defaults in
AgentDetailsCard: instead of computing defaults via const defaults = useMemo(()
=> (schema ? extractDefaults(schema) : {}), [schema]); directly call
extractDefaults when needed (e.g., const defaults = schema ?
extractDefaults(schema) : {} or inline the expression where used) and remove the
useMemo import/usages; ensure references to schema and extractDefaults remain
correct and no stale dependency array is needed.
autogpt_platform/frontend/src/app/(platform)/copilot/tools/RunAgent/components/AgentDetailsCard/helpers.ts (1)

31-37: isFormValid runs full schema validation on every keystroke β€” acceptable for now, but worth noting.

customValidator.validateFormData performs a complete Ajv validation pass. For small schemas this is fine, but if schemas grow large or inputs change rapidly (e.g. debounce-less typing), this could become a hot path. No action needed today, but keep in mind if performance degrades.

πŸ€– Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@autogpt_platform/frontend/src/app/`(platform)/copilot/tools/RunAgent/components/AgentDetailsCard/helpers.ts
around lines 31 - 37, The current isFormValid function calls
customValidator.validateFormData(schema, formData) on every keystroke which
triggers a full AJV pass; to avoid this hot path either debounce calls to
isFormValid (wrap callers of isFormValid with a short debounce) or switch to a
partial/field-level validation API on customValidator (validate only the changed
field(s) instead of validateFormData) and maintain a cached overall validity
state; update callers that pass RJSFSchema/formData to use the debounced helper
or the partial validation flow so large schemas or rapid typing won’t run full
validation on every input.
autogpt_platform/frontend/src/app/(platform)/copilot/tools/CreateAgent/CreateAgent.tsx (1)

247-260: Extract clarification-question normalization into a shared helper.

The question-mapping/example sanitization logic is duplicated with EditAgent and is a good candidate for a shared helper to prevent divergence.

As per coding guidelines: Separate render logic from business logic with component.tsx + useComponent.ts + helpers.ts structure.

πŸ€– Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@autogpt_platform/frontend/src/app/`(platform)/copilot/tools/CreateAgent/CreateAgent.tsx
around lines 247 - 260, Extract the duplicated mapping/sanitization into a
shared helper (e.g., normalizeClarifyingQuestions) and replace the inline
mapping in CreateAgent.tsx (the block that builds ClarifyingQuestion items for
ClarificationQuestionsCard) with a call to that helper; implement the same
helper usage in EditAgent to remove duplication, and place the helper in a
shared helpers.ts (follow component.tsx + useComponent.ts + helpers.ts
structure) so CreateAgent.tsx and EditAgent both import and use
normalizeClarifyingQuestions to perform the question -> ClarifyingQuestion
transformation and example trimming/nullable logic.
πŸ€– Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Outside diff comments:
In
`@autogpt_platform/frontend/src/app/`(platform)/copilot/tools/CreateAgent/CreateAgent.tsx:
- Around line 150-197: Replace the hand-rolled error UI in CreateAgent (the
conditional block that checks isError && output && isErrorOutput(output)) with
the shared ErrorCard component: call ErrorCard and pass the user-facing message
(use output.message || fallback), pass technical details (output.error formatted
via formatMaybeJson) and any extra details (output.details) into the appropriate
ErrorCard props or slots, and keep the two action buttons ("Try again" and
"Simplify goal") wired to onSend exactly as before; remove the custom markup
(WarningDiamondIcon, <details>, and <pre> blocks) so error rendering is
centralized via ErrorCard and any manual exception capturing should use
Sentry.captureException where needed.

---

Nitpick comments:
In
`@autogpt_platform/frontend/src/app/`(platform)/copilot/tools/CreateAgent/CreateAgent.tsx:
- Around line 247-260: Extract the duplicated mapping/sanitization into a shared
helper (e.g., normalizeClarifyingQuestions) and replace the inline mapping in
CreateAgent.tsx (the block that builds ClarifyingQuestion items for
ClarificationQuestionsCard) with a call to that helper; implement the same
helper usage in EditAgent to remove duplication, and place the helper in a
shared helpers.ts (follow component.tsx + useComponent.ts + helpers.ts
structure) so CreateAgent.tsx and EditAgent both import and use
normalizeClarifyingQuestions to perform the question -> ClarifyingQuestion
transformation and example trimming/nullable logic.

In
`@autogpt_platform/frontend/src/app/`(platform)/copilot/tools/RunAgent/components/AgentDetailsCard/AgentDetailsCard.tsx:
- Line 6: The import line in AgentDetailsCard.tsx still includes useMemo though
the memo usage was removed; update the import to drop useMemo so only required
hooks (e.g., useState) are imported, ensuring the import statement (import {
useMemo, useState } from "react") is changed to remove useMemo and avoid
unused-import lint warnings.
- Around line 24-28: The component initializes inputValues via
useState(defaults) which won't update when defaults prop changes; add a
useEffect that watches defaults (and schema) and calls setInputValues(defaults)
to sync state, and also recomputes validity by calling setValid(schema ?
isFormValid(schema, defaults) : false); update references to
inputValues/setInputValues and valid/setValid accordingly so the component
reflects prop changes without requiring a parent re-key.
- Around line 19-22: Remove the unnecessary useMemo around defaults in
AgentDetailsCard: instead of computing defaults via const defaults = useMemo(()
=> (schema ? extractDefaults(schema) : {}), [schema]); directly call
extractDefaults when needed (e.g., const defaults = schema ?
extractDefaults(schema) : {} or inline the expression where used) and remove the
useMemo import/usages; ensure references to schema and extractDefaults remain
correct and no stale dependency array is needed.

In
`@autogpt_platform/frontend/src/app/`(platform)/copilot/tools/RunAgent/components/AgentDetailsCard/helpers.ts:
- Around line 31-37: The current isFormValid function calls
customValidator.validateFormData(schema, formData) on every keystroke which
triggers a full AJV pass; to avoid this hot path either debounce calls to
isFormValid (wrap callers of isFormValid with a short debounce) or switch to a
partial/field-level validation API on customValidator (validate only the changed
field(s) instead of validateFormData) and maintain a cached overall validity
state; update callers that pass RJSFSchema/formData to use the debounced helper
or the partial validation flow so large schemas or rapid typing won’t run full
validation on every input.

ℹ️ Review info

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Linear integration is disabled

You can enable these sources in your CodeRabbit configuration.

πŸ“₯ Commits

Reviewing files that changed from the base of the PR and between 2136def and 2c4467a.

πŸ“’ Files selected for processing (11)
  • autogpt_platform/frontend/src/app/(platform)/copilot/components/AgentSavedCard/AgentSavedCard.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/styleguide/page.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/CreateAgent/CreateAgent.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/CreateAgent/components/ClarificationQuestionsCard.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/EditAgent/EditAgent.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/RunAgent/components/AgentDetailsCard/AgentDetailsCard.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/RunAgent/components/AgentDetailsCard/helpers.ts
  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/RunBlock/components/BlockDetailsCard/BlockDetailsCard.stories.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/RunBlock/components/SetupRequirementsCard/SetupRequirementsCard.tsx
  • autogpt_platform/frontend/src/components/atoms/Button/helpers.ts
  • autogpt_platform/frontend/src/components/atoms/Input/Input.tsx
πŸ’€ Files with no reviewable changes (1)
  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/RunBlock/components/BlockDetailsCard/BlockDetailsCard.stories.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). (3)
  • GitHub Check: types
  • GitHub Check: end-to-end tests
  • 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

Files:

  • autogpt_platform/frontend/src/components/atoms/Input/Input.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/RunAgent/components/AgentDetailsCard/helpers.ts
  • autogpt_platform/frontend/src/app/(platform)/copilot/styleguide/page.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/components/AgentSavedCard/AgentSavedCard.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/RunAgent/components/AgentDetailsCard/AgentDetailsCard.tsx
  • autogpt_platform/frontend/src/components/atoms/Button/helpers.ts
  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/RunBlock/components/SetupRequirementsCard/SetupRequirementsCard.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/EditAgent/EditAgent.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/CreateAgent/CreateAgent.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/CreateAgent/components/ClarificationQuestionsCard.tsx
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/components/atoms/Input/Input.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/RunAgent/components/AgentDetailsCard/helpers.ts
  • autogpt_platform/frontend/src/app/(platform)/copilot/styleguide/page.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/components/AgentSavedCard/AgentSavedCard.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/RunAgent/components/AgentDetailsCard/AgentDetailsCard.tsx
  • autogpt_platform/frontend/src/components/atoms/Button/helpers.ts
  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/RunBlock/components/SetupRequirementsCard/SetupRequirementsCard.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/EditAgent/EditAgent.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/CreateAgent/CreateAgent.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/CreateAgent/components/ClarificationQuestionsCard.tsx
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 development

Files:

  • autogpt_platform/frontend/src/components/atoms/Input/Input.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/RunAgent/components/AgentDetailsCard/helpers.ts
  • autogpt_platform/frontend/src/app/(platform)/copilot/styleguide/page.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/components/AgentSavedCard/AgentSavedCard.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/RunAgent/components/AgentDetailsCard/AgentDetailsCard.tsx
  • autogpt_platform/frontend/src/components/atoms/Button/helpers.ts
  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/RunBlock/components/SetupRequirementsCard/SetupRequirementsCard.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/EditAgent/EditAgent.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/CreateAgent/CreateAgent.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/CreateAgent/components/ClarificationQuestionsCard.tsx
autogpt_platform/frontend/src/components/**/*.{tsx,ts}

πŸ“„ CodeRabbit inference engine (.github/copilot-instructions.md)

Structure React components as: ComponentName/ComponentName.tsx + useComponentName.ts + helpers.ts (exception: small 3-4 line components can be inline; render-only components can be direct files)

Files:

  • autogpt_platform/frontend/src/components/atoms/Input/Input.tsx
  • autogpt_platform/frontend/src/components/atoms/Button/helpers.ts
autogpt_platform/frontend/src/**/*.{ts,tsx}

πŸ“„ CodeRabbit inference engine (autogpt_platform/frontend/CLAUDE.md)

autogpt_platform/frontend/src/**/*.{ts,tsx}: Fully capitalize acronyms in symbols, e.g. graphID, useBackendAPI
Use function declarations (not arrow functions) for components and handlers
Separate render logic (.tsx) from business logic (use*.ts hooks)
Use shadcn/ui (Radix UI primitives) with Tailwind CSS styling for UI components
Use Phosphor Icons only for icons
Use ErrorCard for render errors, toast for mutations, and Sentry for exceptions
Use design system components from src/components/ (atoms, molecules, organisms)
Never use src/components/__legacy__/* components
Use generated API hooks from @/app/api/__generated__/endpoints/ with pattern use{Method}{Version}{OperationName}
Use Tailwind CSS only for styling, with design tokens
Do not use useCallback or useMemo unless asked to optimize a given function
Never type with any unless a variable/attribute can ACTUALLY be of any type

autogpt_platform/frontend/src/**/*.{ts,tsx}: Structure components as ComponentName/ComponentName.tsx + useComponentName.ts + helpers.ts and use design system components from src/components/ (atoms, molecules, organisms)
Use generated API hooks from @/app/api/__generated__/endpoints/ with pattern use{Method}{Version}{OperationName} and regenerate with pnpm 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 /components folder
Avoid large hooks, abstract logic into helpers.ts files 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 use useCallback or useMemo unless asked to optimize a given function

Files:

  • autogpt_platform/frontend/src/components/atoms/Input/Input.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/RunAgent/components/AgentDetailsCard/helpers.ts
  • autogpt_platform/frontend/src/app/(platform)/copilot/styleguide/page.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/components/AgentSavedCard/AgentSavedCard.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/RunAgent/components/AgentDetailsCard/AgentDetailsCard.tsx
  • autogpt_platform/frontend/src/components/atoms/Button/helpers.ts
  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/RunBlock/components/SetupRequirementsCard/SetupRequirementsCard.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/EditAgent/EditAgent.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/CreateAgent/CreateAgent.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/CreateAgent/components/ClarificationQuestionsCard.tsx
autogpt_platform/frontend/src/**/*.tsx

πŸ“„ CodeRabbit inference engine (autogpt_platform/frontend/CLAUDE.md)

Component props should be type Props = { ... } (not exported) unless it needs to be used outside the component

Component props should be interface Props { ... } (not exported) unless the interface needs to be used outside the component

Files:

  • autogpt_platform/frontend/src/components/atoms/Input/Input.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/styleguide/page.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/components/AgentSavedCard/AgentSavedCard.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/RunAgent/components/AgentDetailsCard/AgentDetailsCard.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/RunBlock/components/SetupRequirementsCard/SetupRequirementsCard.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/EditAgent/EditAgent.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/CreateAgent/CreateAgent.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/CreateAgent/components/ClarificationQuestionsCard.tsx
autogpt_platform/frontend/src/components/**/*.{ts,tsx}

πŸ“„ CodeRabbit inference engine (autogpt_platform/frontend/CLAUDE.md)

Structure components as ComponentName/ComponentName.tsx + useComponentName.ts + helpers.ts

Files:

  • autogpt_platform/frontend/src/components/atoms/Input/Input.tsx
  • autogpt_platform/frontend/src/components/atoms/Button/helpers.ts
autogpt_platform/frontend/**/*.{js,jsx,ts,tsx}

πŸ“„ CodeRabbit inference engine (AGENTS.md)

autogpt_platform/frontend/**/*.{js,jsx,ts,tsx}: Format frontend code using pnpm format
Never use components from src/components/__legacy__/*

Files:

  • autogpt_platform/frontend/src/components/atoms/Input/Input.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/RunAgent/components/AgentDetailsCard/helpers.ts
  • autogpt_platform/frontend/src/app/(platform)/copilot/styleguide/page.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/components/AgentSavedCard/AgentSavedCard.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/RunAgent/components/AgentDetailsCard/AgentDetailsCard.tsx
  • autogpt_platform/frontend/src/components/atoms/Button/helpers.ts
  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/RunBlock/components/SetupRequirementsCard/SetupRequirementsCard.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/EditAgent/EditAgent.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/CreateAgent/CreateAgent.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/CreateAgent/components/ClarificationQuestionsCard.tsx
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/components/atoms/Input/Input.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/RunAgent/components/AgentDetailsCard/helpers.ts
  • autogpt_platform/frontend/src/app/(platform)/copilot/styleguide/page.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/components/AgentSavedCard/AgentSavedCard.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/RunAgent/components/AgentDetailsCard/AgentDetailsCard.tsx
  • autogpt_platform/frontend/src/components/atoms/Button/helpers.ts
  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/RunBlock/components/SetupRequirementsCard/SetupRequirementsCard.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/EditAgent/EditAgent.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/CreateAgent/CreateAgent.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/CreateAgent/components/ClarificationQuestionsCard.tsx
autogpt_platform/**/*.{ts,tsx}

πŸ“„ CodeRabbit inference engine (AGENTS.md)

Never type with any, if no types available use unknown

Files:

  • autogpt_platform/frontend/src/components/atoms/Input/Input.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/RunAgent/components/AgentDetailsCard/helpers.ts
  • autogpt_platform/frontend/src/app/(platform)/copilot/styleguide/page.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/components/AgentSavedCard/AgentSavedCard.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/RunAgent/components/AgentDetailsCard/AgentDetailsCard.tsx
  • autogpt_platform/frontend/src/components/atoms/Button/helpers.ts
  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/RunBlock/components/SetupRequirementsCard/SetupRequirementsCard.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/EditAgent/EditAgent.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/CreateAgent/CreateAgent.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/CreateAgent/components/ClarificationQuestionsCard.tsx
autogpt_platform/frontend/src/app/(platform)/**/components/**/*.{ts,tsx}

πŸ“„ CodeRabbit inference engine (autogpt_platform/frontend/CLAUDE.md)

Put sub-components in local components/ folder within feature directories

Files:

  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/RunAgent/components/AgentDetailsCard/helpers.ts
  • autogpt_platform/frontend/src/app/(platform)/copilot/components/AgentSavedCard/AgentSavedCard.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/RunAgent/components/AgentDetailsCard/AgentDetailsCard.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/RunBlock/components/SetupRequirementsCard/SetupRequirementsCard.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/CreateAgent/components/ClarificationQuestionsCard.tsx
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)/copilot/tools/RunAgent/components/AgentDetailsCard/helpers.ts
  • autogpt_platform/frontend/src/components/atoms/Button/helpers.ts
autogpt_platform/frontend/src/app/(platform)/**/page.tsx

πŸ“„ CodeRabbit inference engine (autogpt_platform/frontend/CLAUDE.md)

Create pages in src/app/(platform)/feature-name/page.tsx with component logic extracted into custom hooks grouped by concern, each hook in its own .ts file

Create pages in src/app/(platform)/feature-name/page.tsx with a usePageName.ts hook for logic and sub-components in local components/ folder

Files:

  • autogpt_platform/frontend/src/app/(platform)/copilot/styleguide/page.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)/copilot/styleguide/page.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/components/AgentSavedCard/AgentSavedCard.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/RunAgent/components/AgentDetailsCard/AgentDetailsCard.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/RunBlock/components/SetupRequirementsCard/SetupRequirementsCard.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/EditAgent/EditAgent.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/CreateAgent/CreateAgent.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/CreateAgent/components/ClarificationQuestionsCard.tsx
🧠 Learnings (25)
πŸ“š Learning: 2026-02-04T16:50:33.615Z
Learnt from: CR
Repo: Significant-Gravitas/AutoGPT PR: 0
File: autogpt_platform/frontend/CLAUDE.md:0-0
Timestamp: 2026-02-04T16:50:33.615Z
Learning: Applies to autogpt_platform/frontend/src/**/*.{ts,tsx} : Use shadcn/ui (Radix UI primitives) with Tailwind CSS styling for UI components

Applied to files:

  • autogpt_platform/frontend/src/components/atoms/Input/Input.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/RunBlock/components/SetupRequirementsCard/SetupRequirementsCard.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/EditAgent/EditAgent.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/CreateAgent/CreateAgent.tsx
πŸ“š Learning: 2026-02-04T16:49:42.490Z
Learnt from: CR
Repo: Significant-Gravitas/AutoGPT PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2026-02-04T16:49:42.490Z
Learning: Applies to autogpt_platform/frontend/**/*.{tsx,ts} : Use Tailwind CSS utilities only for styling in frontend components

Applied to files:

  • autogpt_platform/frontend/src/components/atoms/Input/Input.tsx
πŸ“š Learning: 2026-02-04T16:50:33.615Z
Learnt from: CR
Repo: Significant-Gravitas/AutoGPT PR: 0
File: autogpt_platform/frontend/CLAUDE.md:0-0
Timestamp: 2026-02-04T16:50:33.615Z
Learning: Applies to autogpt_platform/frontend/src/**/*.{ts,tsx} : Use Tailwind CSS only for styling, with design tokens

Applied to files:

  • autogpt_platform/frontend/src/components/atoms/Input/Input.tsx
  • autogpt_platform/frontend/src/components/atoms/Button/helpers.ts
  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/RunBlock/components/SetupRequirementsCard/SetupRequirementsCard.tsx
πŸ“š Learning: 2026-02-04T16:50:33.615Z
Learnt from: CR
Repo: Significant-Gravitas/AutoGPT PR: 0
File: autogpt_platform/frontend/CLAUDE.md:0-0
Timestamp: 2026-02-04T16:50:33.615Z
Learning: Applies to autogpt_platform/frontend/src/**/*.{ts,tsx} : Use design system components from `src/components/` (atoms, molecules, organisms)

Applied to files:

  • autogpt_platform/frontend/src/components/atoms/Input/Input.tsx
  • autogpt_platform/frontend/src/components/atoms/Button/helpers.ts
  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/EditAgent/EditAgent.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/CreateAgent/CreateAgent.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/src/**/*.{ts,tsx} : Structure components as `ComponentName/ComponentName.tsx` + `useComponentName.ts` + `helpers.ts` and use design system components from `src/components/` (atoms, molecules, organisms)

Applied to files:

  • autogpt_platform/frontend/src/components/atoms/Input/Input.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/components/AgentSavedCard/AgentSavedCard.tsx
  • autogpt_platform/frontend/src/components/atoms/Button/helpers.ts
  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/RunBlock/components/SetupRequirementsCard/SetupRequirementsCard.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/CreateAgent/CreateAgent.tsx
πŸ“š Learning: 2026-02-04T16:49:42.490Z
Learnt from: CR
Repo: Significant-Gravitas/AutoGPT PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2026-02-04T16:49:42.490Z
Learning: Applies to autogpt_platform/frontend/**/*.{tsx,ts} : Use design system components from 'src/components/' (atoms, molecules, organisms) in frontend development

Applied to files:

  • autogpt_platform/frontend/src/components/atoms/Input/Input.tsx
  • autogpt_platform/frontend/src/components/atoms/Button/helpers.ts
  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/EditAgent/EditAgent.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/CreateAgent/CreateAgent.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/**/*.{js,jsx,ts,tsx,css} : Use Tailwind CSS only for styling, use design tokens, and use Phosphor Icons only

Applied to files:

  • autogpt_platform/frontend/src/components/atoms/Input/Input.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/RunBlock/components/SetupRequirementsCard/SetupRequirementsCard.tsx
πŸ“š Learning: 2026-02-04T16:50:33.615Z
Learnt from: CR
Repo: Significant-Gravitas/AutoGPT PR: 0
File: autogpt_platform/frontend/CLAUDE.md:0-0
Timestamp: 2026-02-04T16:50:33.615Z
Learning: Applies to autogpt_platform/frontend/src/**/*.tsx : Component props should be `type Props = { ... }` (not exported) unless it needs to be used outside the component

Applied to files:

  • autogpt_platform/frontend/src/components/atoms/Input/Input.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/components/AgentSavedCard/AgentSavedCard.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/RunBlock/components/SetupRequirementsCard/SetupRequirementsCard.tsx
πŸ“š Learning: 2026-02-04T16:49:42.490Z
Learnt from: CR
Repo: Significant-Gravitas/AutoGPT PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2026-02-04T16:49:42.490Z
Learning: Applies to autogpt_platform/frontend/**/*.{tsx,ts} : Use PascalCase for component names and camelCase with 'use' prefix for hook names in React

Applied to files:

  • autogpt_platform/frontend/src/components/atoms/Input/Input.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/RunBlock/components/SetupRequirementsCard/SetupRequirementsCard.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/EditAgent/EditAgent.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/CreateAgent/CreateAgent.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/src/**/*.{ts,tsx} : Avoid large hooks, abstract logic into `helpers.ts` files when sensible

Applied to files:

  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/RunAgent/components/AgentDetailsCard/helpers.ts
  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/CreateAgent/CreateAgent.tsx
πŸ“š Learning: 2026-02-04T16:49:42.490Z
Learnt from: CR
Repo: Significant-Gravitas/AutoGPT PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2026-02-04T16:49:42.490Z
Learning: Applies to autogpt_platform/frontend/**/*.{tsx,ts} : Use '<ErrorCard />' component for rendering errors in frontend UI; use toast notifications for mutation errors; use 'Sentry.captureException()' for manual exceptions

Applied to files:

  • autogpt_platform/frontend/src/app/(platform)/copilot/components/AgentSavedCard/AgentSavedCard.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/RunAgent/components/AgentDetailsCard/AgentDetailsCard.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/RunBlock/components/SetupRequirementsCard/SetupRequirementsCard.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/EditAgent/EditAgent.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/CreateAgent/CreateAgent.tsx
πŸ“š Learning: 2026-02-04T16:50:33.615Z
Learnt from: CR
Repo: Significant-Gravitas/AutoGPT PR: 0
File: autogpt_platform/frontend/CLAUDE.md:0-0
Timestamp: 2026-02-04T16:50:33.615Z
Learning: Applies to autogpt_platform/frontend/src/**/*.{ts,tsx} : Use ErrorCard for render errors, toast for mutations, and Sentry for exceptions

Applied to files:

  • autogpt_platform/frontend/src/app/(platform)/copilot/components/AgentSavedCard/AgentSavedCard.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/RunAgent/components/AgentDetailsCard/AgentDetailsCard.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/EditAgent/EditAgent.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/CreateAgent/CreateAgent.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/src/**/*.tsx : Component props should be `interface Props { ... }` (not exported) unless the interface needs to be used outside the component

Applied to files:

  • autogpt_platform/frontend/src/app/(platform)/copilot/components/AgentSavedCard/AgentSavedCard.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/RunBlock/components/SetupRequirementsCard/SetupRequirementsCard.tsx
πŸ“š Learning: 2026-02-04T16:49:42.490Z
Learnt from: CR
Repo: Significant-Gravitas/AutoGPT PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2026-02-04T16:49:42.490Z
Learning: Applies to autogpt_platform/frontend/**/*.{tsx,ts} : Separate render logic from data/behavior in React components; keep comments minimal (code should be self-documenting)

Applied to files:

  • autogpt_platform/frontend/src/app/(platform)/copilot/components/AgentSavedCard/AgentSavedCard.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/RunAgent/components/AgentDetailsCard/AgentDetailsCard.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/RunBlock/components/SetupRequirementsCard/SetupRequirementsCard.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/EditAgent/EditAgent.tsx
πŸ“š Learning: 2026-02-04T16:50:33.615Z
Learnt from: CR
Repo: Significant-Gravitas/AutoGPT PR: 0
File: autogpt_platform/frontend/CLAUDE.md:0-0
Timestamp: 2026-02-04T16:50:33.615Z
Learning: Applies to autogpt_platform/frontend/src/app/(platform)/**/page.tsx : Create pages in `src/app/(platform)/feature-name/page.tsx` with component logic extracted into custom hooks grouped by concern, each hook in its own `.ts` file

Applied to files:

  • autogpt_platform/frontend/src/app/(platform)/copilot/components/AgentSavedCard/AgentSavedCard.tsx
πŸ“š Learning: 2026-02-04T16:49:42.490Z
Learnt from: CR
Repo: Significant-Gravitas/AutoGPT PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2026-02-04T16:49:42.490Z
Learning: Applies to autogpt_platform/frontend/src/components/**/*.{tsx,ts} : Structure React components as: ComponentName/ComponentName.tsx + useComponentName.ts + helpers.ts (exception: small 3-4 line components can be inline; render-only components can be direct files)

Applied to files:

  • autogpt_platform/frontend/src/app/(platform)/copilot/components/AgentSavedCard/AgentSavedCard.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/src/**/*.{ts,tsx} : Separate render logic from business logic with component.tsx + useComponent.ts + helpers.ts structure

Applied to files:

  • autogpt_platform/frontend/src/app/(platform)/copilot/components/AgentSavedCard/AgentSavedCard.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/CreateAgent/CreateAgent.tsx
πŸ“š Learning: 2026-02-04T16:49:42.490Z
Learnt from: CR
Repo: Significant-Gravitas/AutoGPT PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2026-02-04T16:49:42.490Z
Learning: Applies to autogpt_platform/frontend/**/*.{stories.tsx,stories.ts} : Add/update Storybook stories for UI components in frontend development

Applied to files:

  • autogpt_platform/frontend/src/app/(platform)/copilot/components/AgentSavedCard/AgentSavedCard.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/RunBlock/components/SetupRequirementsCard/SetupRequirementsCard.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/CreateAgent/CreateAgent.tsx
πŸ“š Learning: 2026-02-04T16:49:42.490Z
Learnt from: CR
Repo: Significant-Gravitas/AutoGPT PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2026-02-04T16:49:42.490Z
Learning: Applies to autogpt_platform/frontend/**/*.{tsx,ts} : Only use Phosphor Icons (phosphor-icons/react) for icons in frontend components

Applied to files:

  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/EditAgent/EditAgent.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/CreateAgent/CreateAgent.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/**/*.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)/copilot/tools/EditAgent/EditAgent.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/CreateAgent/CreateAgent.tsx
πŸ“š Learning: 2026-02-04T16:50:33.615Z
Learnt from: CR
Repo: Significant-Gravitas/AutoGPT PR: 0
File: autogpt_platform/frontend/CLAUDE.md:0-0
Timestamp: 2026-02-04T16:50:33.615Z
Learning: Applies to autogpt_platform/frontend/src/**/*.{ts,tsx} : Use Phosphor Icons only for icons

Applied to files:

  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/EditAgent/EditAgent.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/CreateAgent/CreateAgent.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/src/**/*.{ts,tsx} : Colocate state when possible, avoid creating large components, use sub-components in local `/components` folder

Applied to files:

  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/CreateAgent/CreateAgent.tsx
πŸ“š Learning: 2026-02-04T16:50:33.615Z
Learnt from: CR
Repo: Significant-Gravitas/AutoGPT PR: 0
File: autogpt_platform/frontend/CLAUDE.md:0-0
Timestamp: 2026-02-04T16:50:33.615Z
Learning: Applies to autogpt_platform/frontend/src/**/*.{ts,tsx} : Fully capitalize acronyms in symbols, e.g. `graphID`, `useBackendAPI`

Applied to files:

  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/CreateAgent/CreateAgent.tsx
πŸ“š Learning: 2026-02-04T16:49:42.490Z
Learnt from: CR
Repo: Significant-Gravitas/AutoGPT PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2026-02-04T16:49:42.490Z
Learning: Applies to autogpt_platform/frontend/**/*.{ts,tsx} : Regenerate API hooks with 'pnpm generate:api' after backend OpenAPI spec changes in frontend development

Applied to files:

  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/CreateAgent/CreateAgent.tsx
πŸ“š Learning: 2026-02-04T16:50:33.615Z
Learnt from: CR
Repo: Significant-Gravitas/AutoGPT PR: 0
File: autogpt_platform/frontend/CLAUDE.md:0-0
Timestamp: 2026-02-04T16:50:33.615Z
Learning: Applies to autogpt_platform/frontend/src/**/*.{ts,tsx} : Separate render logic (`.tsx`) from business logic (`use*.ts` hooks)

Applied to files:

  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/CreateAgent/CreateAgent.tsx
🧬 Code graph analysis (4)
autogpt_platform/frontend/src/app/(platform)/copilot/components/AgentSavedCard/AgentSavedCard.tsx (1)
autogpt_platform/frontend/src/components/atoms/Text/Text.tsx (1)
  • Text (16-36)
autogpt_platform/frontend/src/app/(platform)/copilot/tools/RunAgent/components/AgentDetailsCard/AgentDetailsCard.tsx (3)
autogpt_platform/frontend/src/app/(platform)/copilot/components/CopilotChatActionsProvider/useCopilotChatActions.ts (1)
  • useCopilotChatActions (13-21)
autogpt_platform/frontend/src/app/(platform)/copilot/tools/RunAgent/components/AgentDetailsCard/helpers.ts (3)
  • buildInputSchema (4-9)
  • extractDefaults (11-29)
  • isFormValid (31-37)
autogpt_platform/frontend/src/app/(platform)/copilot/components/ToolAccordion/AccordionContent.tsx (1)
  • ContentMessage (112-124)
autogpt_platform/frontend/src/app/(platform)/copilot/tools/CreateAgent/CreateAgent.tsx (2)
autogpt_platform/frontend/src/app/(platform)/copilot/tools/CreateAgent/helpers.tsx (5)
  • isClarificationNeededOutput (77-83)
  • isAgentSavedOutput (69-75)
  • isAgentPreviewOutput (63-67)
  • truncateText (155-159)
  • formatMaybeJson (146-153)
autogpt_platform/backend/backend/copilot/tools/models.py (1)
  • ClarifyingQuestion (260-265)
autogpt_platform/frontend/src/app/(platform)/copilot/tools/CreateAgent/components/ClarificationQuestionsCard.tsx (2)
autogpt_platform/frontend/src/components/atoms/Skeleton/skeleton.stories.tsx (1)
  • Card (37-39)
autogpt_platform/frontend/src/components/atoms/Text/Text.tsx (1)
  • Text (16-36)
πŸ”‡ Additional comments (10)
autogpt_platform/frontend/src/components/atoms/Input/Input.tsx (1)

95-95: Textarea border-radius update is clean and scoped.

rounded-xl is applied only in the textarea path and correctly overrides the shared base radius without impacting other input variants.

autogpt_platform/frontend/src/app/(platform)/copilot/tools/RunBlock/components/SetupRequirementsCard/SetupRequirementsCard.tsx (1)

137-137: Proceed button spacing update looks good.

Adding top margin here improves visual separation from the input sections without changing behavior.

autogpt_platform/frontend/src/components/atoms/Button/helpers.ts (1)

19-19: Secondary variant tone adjustment is solid.

The lighter base plus adjusted hover state keeps the variant behavior consistent while improving visual hierarchy.

autogpt_platform/frontend/src/app/(platform)/copilot/tools/RunAgent/components/AgentDetailsCard/helpers.ts (1)

11-29: LGTM β€” clean helper extraction.

Good defensive handling of missing/non-object properties and boolean schemas. Aligns well with the helpers.ts pattern for keeping hooks lean.

autogpt_platform/frontend/src/app/(platform)/copilot/tools/RunAgent/components/AgentDetailsCard/AgentDetailsCard.tsx (1)

70-103: LGTM β€” clean form rendering with validation-gated submit.

The schema-driven form with real-time validation and a disabled Proceed button is a solid UX pattern.

autogpt_platform/frontend/src/app/(platform)/copilot/styleguide/page.tsx (1)

924-946: LGTM β€” mock data correctly aligned with new schema-driven input contract.

The inputs shape now matches what buildInputSchema, extractDefaults, and isFormValid expect (a JSON Schema object with properties, default values, and required). Good consistency between the styleguide fixtures and the runtime components.

autogpt_platform/frontend/src/app/(platform)/copilot/components/AgentSavedCard/AgentSavedCard.tsx (1)

16-57: Solid reusable component extraction for saved/update states.

This is a clean render-only component with good prop boundaries, and it removes duplicated UI from the tool flows.

autogpt_platform/frontend/src/app/(platform)/copilot/tools/CreateAgent/CreateAgent.tsx (1)

199-245: Good separation of output modes from accordion rendering.

Moving clarification and saved states out of ToolAccordion improves visibility and reduces nested conditional UI complexity.

autogpt_platform/frontend/src/app/(platform)/copilot/tools/EditAgent/EditAgent.tsx (1)

179-233: Nice alignment with CreateAgent output handling.

The independent rendering branches for saved and clarification outputs are clear and make these states consistently visible without accordion interaction.

autogpt_platform/frontend/src/app/(platform)/copilot/tools/CreateAgent/components/ClarificationQuestionsCard.tsx (1)

136-230: UI polish here looks good and keeps behavior intact.

The updated header, spacing, and question-state visuals improve readability while preserving the existing answer/submit flow.

Extract shared ToolErrorCard component to deduplicate error UI between
CreateAgent and EditAgent. Extract normalizeClarifyingQuestions helper
to remove duplicated question mapping logic. Remove unnecessary useMemo
in AgentDetailsCard per project guidelines.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (6)
autogpt_platform/frontend/src/app/(platform)/copilot/tools/EditAgent/EditAgent.tsx (1)

65-67: Dead code: isAgentSavedOutput branch in getAccordionMeta is unreachable

getAccordionMeta is only called within ToolAccordion, which is now conditionally excluded when isAgentSavedOutput(output) is true (Line 154). The matching branch at Line 65–67 inside getAccordionMeta can never be reached.

Similarly, the error branch (Lines 83–89) that renders a WarningDiamondIcon is unreachable because the accordion is suppressed when isError is true. This also makes the WarningDiamondIcon import on Line 3 effectively unused.

♻️ Proposed cleanup
 function getAccordionMeta(output: EditAgentToolOutput | null) {
   const icon = <AccordionIcon />;

   if (!output) {
     return {
       icon,
       title: "Editing agent, this may take a few minutes. Play while you wait.",
       expanded: true,
     };
   }

-  if (isAgentSavedOutput(output)) {
-    return { icon, title: output.agent_name, expanded: true };
-  }
   if (isAgentPreviewOutput(output)) {
     ...
   }
   if (isClarificationNeededOutput(output)) {
     ...
   }
-  return {
-    icon: (
-      <WarningDiamondIcon size={32} weight="light" className="text-red-500" />
-    ),
-    title: "Error",
-    titleClassName: "text-red-500",
-  };
+  return { icon, title: "" };
 }

And remove the WarningDiamondIcon import on Line 3.

πŸ€– Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@autogpt_platform/frontend/src/app/`(platform)/copilot/tools/EditAgent/EditAgent.tsx
around lines 65 - 67, The getAccordionMeta function contains unreachable
branches: the isAgentSavedOutput(output) branch and the isError branch that
returns a WarningDiamondIcon are never hit because ToolAccordion is
conditionally excluded when isAgentSavedOutput(output) or isError is true;
remove these dead branches from getAccordionMeta and delete the unused
WarningDiamondIcon import; update getAccordionMeta to only return the remaining
reachable metadata (icon/title/expanded) and ensure ToolAccordion usage and
isAgentSavedOutput checks remain unchanged.
autogpt_platform/frontend/src/app/(platform)/copilot/components/ToolErrorCard/ToolErrorCard.tsx (2)

58-58: key={action.label} is fragile if labels are ever duplicated

Using a human-readable label as a React list key works today (labels are unique), but is brittle. An index or a stable id field would be safer.

♻️ Suggested improvement
-        {actions.map((action) => (
+        {actions.map((action, i) => (
           <Button
-            key={action.label}
+            key={i}
             variant={action.variant ?? "outline"}
πŸ€– Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@autogpt_platform/frontend/src/app/`(platform)/copilot/components/ToolErrorCard/ToolErrorCard.tsx
at line 58, In ToolErrorCard replace the fragile React list key usage
key={action.label} with a stable identifier: use a unique id on the action
object (e.g., action.id) or, if no id exists, use the array index as a fallback
(e.g., key={`action-${index}`}) when mapping actions in the component render;
update the map callback that produces the action elements (where action.label is
currently used as the key) to reference the stable key instead.

19-69: Clarify whether <ErrorCard /> should be extended or if custom error cards are acceptable for tool-specific needs

ToolErrorCard does violate the guideline to use the design system <ErrorCard /> component. However, the design system ErrorCard is designed for structured API/HTTP errors (with responseError and httpError objects) and doesn't support ToolErrorCard's specific requirements: collapsible technical details (via <details>/<summary>), a separate details block, and a custom actions array with variants.

Before requiring this component to use the design system ErrorCard, clarify whether:

  • <ErrorCard /> should be extended to support collapsible technical details and arbitrary action buttons, or
  • Custom error cards like ToolErrorCard are acceptable for tool-specific error displays that differ significantly from API-error patterns.
πŸ€– Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@autogpt_platform/frontend/src/app/`(platform)/copilot/components/ToolErrorCard/ToolErrorCard.tsx
around lines 19 - 69, The reviewer asks whether we should extend the
design-system ErrorCard or allow custom tool-specific cards; update the PR by
clarifying the intended approach in the codebase/docs and adjust the component
accordingly: either (A) extend ErrorCard to accept collapsible technical details
and an actions prop (make ErrorCard accept props like error/details/actions or
provide subcomponents to render <details>/<summary> and arbitrary Button arrays)
and refactor ToolErrorCard to reuse ErrorCard, or (B) document and mark
ToolErrorCard as an allowed custom component for tool-specific UIs (keep
ToolErrorCard as-is using message/fallbackMessage/error/details/actions and add
a comment linking to the style guideline). Reference ToolErrorCard, ErrorCard,
and the props message/fallbackMessage/error/details/actions in your change so
reviewers can see the chosen path.
autogpt_platform/frontend/src/app/(platform)/copilot/tools/RunAgent/components/AgentDetailsCard/AgentDetailsCard.tsx (1)

17-25: defaults recomputed every render but only used as initial state

schema (line 17) and defaults (line 19) are derived on every render, but defaults is only consumed as the useState initial value (line 21) β€” which React ignores after mount. If output.agent.inputs could ever change (e.g., the same card re-renders with a different output), the form would silently retain stale initial values.

This is benign for the current use case (tool output is immutable once set), but worth noting. If output can change, consider using a key prop at the call site to remount the component, or derive state with useEffect.

πŸ€– Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@autogpt_platform/frontend/src/app/`(platform)/copilot/tools/RunAgent/components/AgentDetailsCard/AgentDetailsCard.tsx
around lines 17 - 25, The component derives schema via
buildInputSchema(output.agent.inputs) and defaults via extractDefaults(schema)
each render but passes defaults only as the initial value to useState for
inputValues and valid, so if output.agent.inputs can change the component will
keep stale state; update the component to respond to changes by adding an effect
that watches output.agent.inputs (or schema) and calls
setInputValues(extractDefaults(newSchema)) and setValid(isFormValid(newSchema,
extractedDefaults)) when it changes, or alternatively document/require that
callers pass a key to force remount; reference the symbols schema, defaults,
inputValues, setInputValues, valid, setValid, buildInputSchema, extractDefaults,
and isFormValid when making the change.
autogpt_platform/frontend/src/app/(platform)/copilot/tools/CreateAgent/CreateAgent.tsx (1)

62-64: Same dead-code pattern as EditAgent.tsx: isAgentSavedOutput and error branches in getAccordionMeta are unreachable

getAccordionMeta is only passed to ToolAccordion, which is guarded by !(isAgentSavedOutput(output)) (Line 171) and !isError (Lines 113, 169). The isAgentSavedOutput branch (Lines 62–64) and the fallthrough error branch (Lines 88–94) are therefore never reached. The WarningDiamondIcon import on Line 3 is also effectively dead.

Also applies to: 88-95

πŸ€– Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@autogpt_platform/frontend/src/app/`(platform)/copilot/tools/CreateAgent/CreateAgent.tsx
around lines 62 - 64, getAccordionMeta contains unreachable branches: the
isAgentSavedOutput check and the error fallthrough are never hit because callers
(ToolAccordion) are already guarded by !(isAgentSavedOutput(output)) and
!isError; remove the dead branches and the unused WarningDiamondIcon import to
simplify the function. Specifically, edit getAccordionMeta to only return the
meta for the non-saved, non-error path (delete the isAgentSavedOutput(...)
return and the final error-return block), remove the WarningDiamondIcon import,
and ensure callers still pass the same inputs to ToolAccordion (no behavior
change).
autogpt_platform/frontend/src/app/(platform)/copilot/tools/CreateAgent/components/ClarificationQuestionsCard.tsx (1)

17-32: Move normalizeClarifyingQuestions and ClarifyingQuestion to helpers.tsx.

This is pure business logic exported from a "use client" component. Moving both the function and interface to the existing helpers.tsx separates data transformation from component rendering. EditAgent.tsx currently imports this from ../CreateAgent/components/ClarificationQuestionsCard, so consolidating in helpers.tsx simplifies the import path across features.

πŸ€– Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@autogpt_platform/frontend/src/app/`(platform)/copilot/tools/CreateAgent/components/ClarificationQuestionsCard.tsx
around lines 17 - 32, Move the normalizeClarifyingQuestions function and the
ClarifyingQuestion type/interface out of ClarificationQuestionsCard.tsx into the
existing helpers.tsx: create and export the ClarifyingQuestion interface there,
copy normalizeClarifyingQuestions (keeping its implementation unchanged) and
export it from helpers.tsx, then remove both declarations from
ClarificationQuestionsCard.tsx and update all imports (e.g., EditAgent.tsx and
any other modules that import from
../CreateAgent/components/ClarificationQuestionsCard) to import {
ClarifyingQuestion, normalizeClarifyingQuestions } from the helpers module
instead. Ensure the helpers.tsx export names match the originals so callers need
only the import path change.
πŸ€– 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)/copilot/tools/CreateAgent/components/ClarificationQuestionsCard.tsx:
- Around line 17-32: In normalizeClarifyingQuestions, normalize and deduplicate
the keyword before returning ClarifyingQuestion items: trim and lower-case
q.keyword, convert empty/blank keywords to a deterministic fallback (e.g.,
`question-{index}`), and ensure uniqueness by appending a numeric suffix when a
normalized keyword collides with a previously seen one; update the function
(normalizeClarifyingQuestions, the local item.keyword assignment and return
array) to perform these steps so each returned ClarifyingQuestion.keyword is
non-empty and unique.

---

Nitpick comments:
In
`@autogpt_platform/frontend/src/app/`(platform)/copilot/components/ToolErrorCard/ToolErrorCard.tsx:
- Line 58: In ToolErrorCard replace the fragile React list key usage
key={action.label} with a stable identifier: use a unique id on the action
object (e.g., action.id) or, if no id exists, use the array index as a fallback
(e.g., key={`action-${index}`}) when mapping actions in the component render;
update the map callback that produces the action elements (where action.label is
currently used as the key) to reference the stable key instead.
- Around line 19-69: The reviewer asks whether we should extend the
design-system ErrorCard or allow custom tool-specific cards; update the PR by
clarifying the intended approach in the codebase/docs and adjust the component
accordingly: either (A) extend ErrorCard to accept collapsible technical details
and an actions prop (make ErrorCard accept props like error/details/actions or
provide subcomponents to render <details>/<summary> and arbitrary Button arrays)
and refactor ToolErrorCard to reuse ErrorCard, or (B) document and mark
ToolErrorCard as an allowed custom component for tool-specific UIs (keep
ToolErrorCard as-is using message/fallbackMessage/error/details/actions and add
a comment linking to the style guideline). Reference ToolErrorCard, ErrorCard,
and the props message/fallbackMessage/error/details/actions in your change so
reviewers can see the chosen path.

In
`@autogpt_platform/frontend/src/app/`(platform)/copilot/tools/CreateAgent/components/ClarificationQuestionsCard.tsx:
- Around line 17-32: Move the normalizeClarifyingQuestions function and the
ClarifyingQuestion type/interface out of ClarificationQuestionsCard.tsx into the
existing helpers.tsx: create and export the ClarifyingQuestion interface there,
copy normalizeClarifyingQuestions (keeping its implementation unchanged) and
export it from helpers.tsx, then remove both declarations from
ClarificationQuestionsCard.tsx and update all imports (e.g., EditAgent.tsx and
any other modules that import from
../CreateAgent/components/ClarificationQuestionsCard) to import {
ClarifyingQuestion, normalizeClarifyingQuestions } from the helpers module
instead. Ensure the helpers.tsx export names match the originals so callers need
only the import path change.

In
`@autogpt_platform/frontend/src/app/`(platform)/copilot/tools/CreateAgent/CreateAgent.tsx:
- Around line 62-64: getAccordionMeta contains unreachable branches: the
isAgentSavedOutput check and the error fallthrough are never hit because callers
(ToolAccordion) are already guarded by !(isAgentSavedOutput(output)) and
!isError; remove the dead branches and the unused WarningDiamondIcon import to
simplify the function. Specifically, edit getAccordionMeta to only return the
meta for the non-saved, non-error path (delete the isAgentSavedOutput(...)
return and the final error-return block), remove the WarningDiamondIcon import,
and ensure callers still pass the same inputs to ToolAccordion (no behavior
change).

In
`@autogpt_platform/frontend/src/app/`(platform)/copilot/tools/EditAgent/EditAgent.tsx:
- Around line 65-67: The getAccordionMeta function contains unreachable
branches: the isAgentSavedOutput(output) branch and the isError branch that
returns a WarningDiamondIcon are never hit because ToolAccordion is
conditionally excluded when isAgentSavedOutput(output) or isError is true;
remove these dead branches from getAccordionMeta and delete the unused
WarningDiamondIcon import; update getAccordionMeta to only return the remaining
reachable metadata (icon/title/expanded) and ensure ToolAccordion usage and
isAgentSavedOutput checks remain unchanged.

In
`@autogpt_platform/frontend/src/app/`(platform)/copilot/tools/RunAgent/components/AgentDetailsCard/AgentDetailsCard.tsx:
- Around line 17-25: The component derives schema via
buildInputSchema(output.agent.inputs) and defaults via extractDefaults(schema)
each render but passes defaults only as the initial value to useState for
inputValues and valid, so if output.agent.inputs can change the component will
keep stale state; update the component to respond to changes by adding an effect
that watches output.agent.inputs (or schema) and calls
setInputValues(extractDefaults(newSchema)) and setValid(isFormValid(newSchema,
extractedDefaults)) when it changes, or alternatively document/require that
callers pass a key to force remount; reference the symbols schema, defaults,
inputValues, setInputValues, valid, setValid, buildInputSchema, extractDefaults,
and isFormValid when making the change.

ℹ️ Review info

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Linear integration is disabled

You can enable these sources in your CodeRabbit configuration.

πŸ“₯ Commits

Reviewing files that changed from the base of the PR and between 2c4467a and 665678a.

πŸ“’ Files selected for processing (5)
  • autogpt_platform/frontend/src/app/(platform)/copilot/components/ToolErrorCard/ToolErrorCard.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/CreateAgent/CreateAgent.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/CreateAgent/components/ClarificationQuestionsCard.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/EditAgent/EditAgent.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/RunAgent/components/AgentDetailsCard/AgentDetailsCard.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). (2)
  • GitHub Check: end-to-end tests
  • GitHub Check: Check PR Status
🧰 Additional context used
πŸ““ Path-based instructions (10)
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

Files:

  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/RunAgent/components/AgentDetailsCard/AgentDetailsCard.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/components/ToolErrorCard/ToolErrorCard.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/CreateAgent/CreateAgent.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/EditAgent/EditAgent.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/CreateAgent/components/ClarificationQuestionsCard.tsx
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)/copilot/tools/RunAgent/components/AgentDetailsCard/AgentDetailsCard.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/components/ToolErrorCard/ToolErrorCard.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/CreateAgent/CreateAgent.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/EditAgent/EditAgent.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/CreateAgent/components/ClarificationQuestionsCard.tsx
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 development

Files:

  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/RunAgent/components/AgentDetailsCard/AgentDetailsCard.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/components/ToolErrorCard/ToolErrorCard.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/CreateAgent/CreateAgent.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/EditAgent/EditAgent.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/CreateAgent/components/ClarificationQuestionsCard.tsx
autogpt_platform/frontend/src/**/*.{ts,tsx}

πŸ“„ CodeRabbit inference engine (autogpt_platform/frontend/CLAUDE.md)

autogpt_platform/frontend/src/**/*.{ts,tsx}: Fully capitalize acronyms in symbols, e.g. graphID, useBackendAPI
Use function declarations (not arrow functions) for components and handlers
Separate render logic (.tsx) from business logic (use*.ts hooks)
Use shadcn/ui (Radix UI primitives) with Tailwind CSS styling for UI components
Use Phosphor Icons only for icons
Use ErrorCard for render errors, toast for mutations, and Sentry for exceptions
Use design system components from src/components/ (atoms, molecules, organisms)
Never use src/components/__legacy__/* components
Use generated API hooks from @/app/api/__generated__/endpoints/ with pattern use{Method}{Version}{OperationName}
Use Tailwind CSS only for styling, with design tokens
Do not use useCallback or useMemo unless asked to optimize a given function
Never type with any unless a variable/attribute can ACTUALLY be of any type

autogpt_platform/frontend/src/**/*.{ts,tsx}: Structure components as ComponentName/ComponentName.tsx + useComponentName.ts + helpers.ts and use design system components from src/components/ (atoms, molecules, organisms)
Use generated API hooks from @/app/api/__generated__/endpoints/ with pattern use{Method}{Version}{OperationName} and regenerate with pnpm 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 /components folder
Avoid large hooks, abstract logic into helpers.ts files 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 use useCallback or useMemo unless asked to optimize a given function

Files:

  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/RunAgent/components/AgentDetailsCard/AgentDetailsCard.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/components/ToolErrorCard/ToolErrorCard.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/CreateAgent/CreateAgent.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/EditAgent/EditAgent.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/CreateAgent/components/ClarificationQuestionsCard.tsx
autogpt_platform/frontend/src/app/(platform)/**/components/**/*.{ts,tsx}

πŸ“„ CodeRabbit inference engine (autogpt_platform/frontend/CLAUDE.md)

Put sub-components in local components/ folder within feature directories

Files:

  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/RunAgent/components/AgentDetailsCard/AgentDetailsCard.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/components/ToolErrorCard/ToolErrorCard.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/CreateAgent/components/ClarificationQuestionsCard.tsx
autogpt_platform/frontend/src/**/*.tsx

πŸ“„ CodeRabbit inference engine (autogpt_platform/frontend/CLAUDE.md)

Component props should be type Props = { ... } (not exported) unless it needs to be used outside the component

Component props should be interface Props { ... } (not exported) unless the interface needs to be used outside the component

Files:

  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/RunAgent/components/AgentDetailsCard/AgentDetailsCard.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/components/ToolErrorCard/ToolErrorCard.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/CreateAgent/CreateAgent.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/EditAgent/EditAgent.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/CreateAgent/components/ClarificationQuestionsCard.tsx
autogpt_platform/frontend/**/*.{js,jsx,ts,tsx}

πŸ“„ CodeRabbit inference engine (AGENTS.md)

autogpt_platform/frontend/**/*.{js,jsx,ts,tsx}: Format frontend code using pnpm format
Never use components from src/components/__legacy__/*

Files:

  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/RunAgent/components/AgentDetailsCard/AgentDetailsCard.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/components/ToolErrorCard/ToolErrorCard.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/CreateAgent/CreateAgent.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/EditAgent/EditAgent.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/CreateAgent/components/ClarificationQuestionsCard.tsx
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)/copilot/tools/RunAgent/components/AgentDetailsCard/AgentDetailsCard.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/components/ToolErrorCard/ToolErrorCard.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/CreateAgent/CreateAgent.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/EditAgent/EditAgent.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/CreateAgent/components/ClarificationQuestionsCard.tsx
autogpt_platform/**/*.{ts,tsx}

πŸ“„ CodeRabbit inference engine (AGENTS.md)

Never type with any, if no types available use unknown

Files:

  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/RunAgent/components/AgentDetailsCard/AgentDetailsCard.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/components/ToolErrorCard/ToolErrorCard.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/CreateAgent/CreateAgent.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/EditAgent/EditAgent.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/CreateAgent/components/ClarificationQuestionsCard.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)/copilot/tools/RunAgent/components/AgentDetailsCard/AgentDetailsCard.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/components/ToolErrorCard/ToolErrorCard.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/CreateAgent/CreateAgent.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/EditAgent/EditAgent.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/CreateAgent/components/ClarificationQuestionsCard.tsx
🧠 Learnings (18)
πŸ“š Learning: 2026-02-04T16:49:42.490Z
Learnt from: CR
Repo: Significant-Gravitas/AutoGPT PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2026-02-04T16:49:42.490Z
Learning: Applies to autogpt_platform/frontend/**/*.{tsx,ts} : Separate render logic from data/behavior in React components; keep comments minimal (code should be self-documenting)

Applied to files:

  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/RunAgent/components/AgentDetailsCard/AgentDetailsCard.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/components/ToolErrorCard/ToolErrorCard.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/CreateAgent/CreateAgent.tsx
πŸ“š Learning: 2026-02-04T16:49:42.490Z
Learnt from: CR
Repo: Significant-Gravitas/AutoGPT PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2026-02-04T16:49:42.490Z
Learning: Applies to autogpt_platform/frontend/**/*.{tsx,ts} : Use '<ErrorCard />' component for rendering errors in frontend UI; use toast notifications for mutation errors; use 'Sentry.captureException()' for manual exceptions

Applied to files:

  • autogpt_platform/frontend/src/app/(platform)/copilot/components/ToolErrorCard/ToolErrorCard.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/CreateAgent/CreateAgent.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/EditAgent/EditAgent.tsx
πŸ“š Learning: 2026-02-04T16:50:33.615Z
Learnt from: CR
Repo: Significant-Gravitas/AutoGPT PR: 0
File: autogpt_platform/frontend/CLAUDE.md:0-0
Timestamp: 2026-02-04T16:50:33.615Z
Learning: Applies to autogpt_platform/frontend/src/**/*.{ts,tsx} : Use ErrorCard for render errors, toast for mutations, and Sentry for exceptions

Applied to files:

  • autogpt_platform/frontend/src/app/(platform)/copilot/components/ToolErrorCard/ToolErrorCard.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/CreateAgent/CreateAgent.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/EditAgent/EditAgent.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/src/**/*.tsx : Component props should be `interface Props { ... }` (not exported) unless the interface needs to be used outside the component

Applied to files:

  • autogpt_platform/frontend/src/app/(platform)/copilot/components/ToolErrorCard/ToolErrorCard.tsx
πŸ“š Learning: 2026-02-04T16:50:33.615Z
Learnt from: CR
Repo: Significant-Gravitas/AutoGPT PR: 0
File: autogpt_platform/frontend/CLAUDE.md:0-0
Timestamp: 2026-02-04T16:50:33.615Z
Learning: Applies to autogpt_platform/frontend/src/**/*.tsx : Component props should be `type Props = { ... }` (not exported) unless it needs to be used outside the component

Applied to files:

  • autogpt_platform/frontend/src/app/(platform)/copilot/components/ToolErrorCard/ToolErrorCard.tsx
πŸ“š Learning: 2026-02-04T16:49:42.490Z
Learnt from: CR
Repo: Significant-Gravitas/AutoGPT PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2026-02-04T16:49:42.490Z
Learning: Applies to autogpt_platform/frontend/src/components/**/*.{tsx,ts} : Structure React components as: ComponentName/ComponentName.tsx + useComponentName.ts + helpers.ts (exception: small 3-4 line components can be inline; render-only components can be direct files)

Applied to files:

  • autogpt_platform/frontend/src/app/(platform)/copilot/components/ToolErrorCard/ToolErrorCard.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/src/**/*.{ts,tsx} : Structure components as `ComponentName/ComponentName.tsx` + `useComponentName.ts` + `helpers.ts` and use design system components from `src/components/` (atoms, molecules, organisms)

Applied to files:

  • autogpt_platform/frontend/src/app/(platform)/copilot/components/ToolErrorCard/ToolErrorCard.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/CreateAgent/CreateAgent.tsx
πŸ“š Learning: 2026-02-04T16:49:42.490Z
Learnt from: CR
Repo: Significant-Gravitas/AutoGPT PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2026-02-04T16:49:42.490Z
Learning: Applies to autogpt_platform/frontend/**/*.{stories.tsx,stories.ts} : Add/update Storybook stories for UI components in frontend development

Applied to files:

  • autogpt_platform/frontend/src/app/(platform)/copilot/components/ToolErrorCard/ToolErrorCard.tsx
πŸ“š Learning: 2026-02-04T16:50:33.615Z
Learnt from: CR
Repo: Significant-Gravitas/AutoGPT PR: 0
File: autogpt_platform/frontend/CLAUDE.md:0-0
Timestamp: 2026-02-04T16:50:33.615Z
Learning: Applies to autogpt_platform/frontend/src/components/**/*.{ts,tsx} : Structure components as `ComponentName/ComponentName.tsx` + `useComponentName.ts` + `helpers.ts`

Applied to files:

  • autogpt_platform/frontend/src/app/(platform)/copilot/components/ToolErrorCard/ToolErrorCard.tsx
πŸ“š Learning: 2026-02-04T16:49:42.490Z
Learnt from: CR
Repo: Significant-Gravitas/AutoGPT PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2026-02-04T16:49:42.490Z
Learning: Applies to autogpt_platform/frontend/**/*.{tsx,ts} : Use function declarations for components and handlers (not arrow functions) in React components

Applied to files:

  • autogpt_platform/frontend/src/app/(platform)/copilot/components/ToolErrorCard/ToolErrorCard.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/src/**/*.{ts,tsx} : Colocate state when possible, avoid creating large components, use sub-components in local `/components` folder

Applied to files:

  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/CreateAgent/CreateAgent.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/src/**/*.{ts,tsx} : Separate render logic from business logic with component.tsx + useComponent.ts + helpers.ts structure

Applied to files:

  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/CreateAgent/CreateAgent.tsx
πŸ“š Learning: 2026-02-04T16:49:42.490Z
Learnt from: CR
Repo: Significant-Gravitas/AutoGPT PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2026-02-04T16:49:42.490Z
Learning: Applies to autogpt_platform/frontend/**/*.{tsx,ts} : Use design system components from 'src/components/' (atoms, molecules, organisms) in frontend development

Applied to files:

  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/CreateAgent/CreateAgent.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/EditAgent/EditAgent.tsx
πŸ“š Learning: 2026-02-04T16:49:42.490Z
Learnt from: CR
Repo: Significant-Gravitas/AutoGPT PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2026-02-04T16:49:42.490Z
Learning: Applies to autogpt_platform/frontend/**/*.{tsx,ts} : Only use Phosphor Icons (phosphor-icons/react) for icons in frontend components

Applied to files:

  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/CreateAgent/CreateAgent.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/EditAgent/EditAgent.tsx
πŸ“š Learning: 2026-02-04T16:50:33.615Z
Learnt from: CR
Repo: Significant-Gravitas/AutoGPT PR: 0
File: autogpt_platform/frontend/CLAUDE.md:0-0
Timestamp: 2026-02-04T16:50:33.615Z
Learning: Applies to autogpt_platform/frontend/src/**/*.{ts,tsx} : Use design system components from `src/components/` (atoms, molecules, organisms)

Applied to files:

  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/CreateAgent/CreateAgent.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/EditAgent/EditAgent.tsx
πŸ“š Learning: 2026-02-04T16:49:42.490Z
Learnt from: CR
Repo: Significant-Gravitas/AutoGPT PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2026-02-04T16:49:42.490Z
Learning: Applies to autogpt_platform/frontend/**/*.{tsx,ts} : Default to client components ('use client') in Next.js; only use server components for SEO or extreme TTFB needs

Applied to files:

  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/CreateAgent/CreateAgent.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/EditAgent/EditAgent.tsx
πŸ“š Learning: 2026-02-04T16:50:33.615Z
Learnt from: CR
Repo: Significant-Gravitas/AutoGPT PR: 0
File: autogpt_platform/frontend/CLAUDE.md:0-0
Timestamp: 2026-02-04T16:50:33.615Z
Learning: Applies to autogpt_platform/frontend/src/**/*.{ts,tsx} : Use shadcn/ui (Radix UI primitives) with Tailwind CSS styling for UI components

Applied to files:

  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/CreateAgent/CreateAgent.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/EditAgent/EditAgent.tsx
πŸ“š Learning: 2026-02-04T16:49:42.490Z
Learnt from: CR
Repo: Significant-Gravitas/AutoGPT PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2026-02-04T16:49:42.490Z
Learning: Applies to autogpt_platform/frontend/**/*.{tsx,ts} : Use PascalCase for component names and camelCase with 'use' prefix for hook names in React

Applied to files:

  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/CreateAgent/CreateAgent.tsx
🧬 Code graph analysis (2)
autogpt_platform/frontend/src/app/(platform)/copilot/tools/RunAgent/components/AgentDetailsCard/AgentDetailsCard.tsx (4)
autogpt_platform/backend/backend/copilot/tools/models.py (1)
  • AgentDetailsResponse (139-146)
autogpt_platform/frontend/src/app/(platform)/copilot/components/CopilotChatActionsProvider/useCopilotChatActions.ts (1)
  • useCopilotChatActions (13-21)
autogpt_platform/frontend/src/app/(platform)/copilot/tools/RunAgent/components/AgentDetailsCard/helpers.ts (3)
  • buildInputSchema (4-9)
  • extractDefaults (11-29)
  • isFormValid (31-37)
autogpt_platform/frontend/src/app/(platform)/copilot/components/ToolAccordion/AccordionContent.tsx (1)
  • ContentMessage (112-124)
autogpt_platform/frontend/src/app/(platform)/copilot/components/ToolErrorCard/ToolErrorCard.tsx (2)
autogpt_platform/frontend/src/components/atoms/Text/Text.tsx (1)
  • Text (16-36)
autogpt_platform/backend/backend/util/logging.py (1)
  • error (49-51)
πŸ”‡ Additional comments (2)
autogpt_platform/frontend/src/app/(platform)/copilot/tools/CreateAgent/CreateAgent.tsx (1)

119-135: No mismatch exists between handleClarificationAnswers and normalizeClarifyingQuestions

normalizeClarifyingQuestions preserves keyword values as-is (line 23 in ClarificationQuestionsCard.tsx: keyword: q.keyword). It only transforms the example field by trimming whitespace. Since keywords remain unchanged through normalization, the answers submitted by the card (keyed by normalized question keywords) perfectly match the keys expected by handleClarificationAnswers (which reads from raw questions with identical keywords). The same applies to EditAgent.tsx.

autogpt_platform/frontend/src/app/(platform)/copilot/tools/CreateAgent/components/ClarificationQuestionsCard.tsx (1)

159-210: UI state differentiation looks solid.

The new header/icon treatment and answered-vs-unanswered visual states are clearer and improve scanability without adding complexity.

0ubbe and others added 2 commits February 25, 2026 18:43
…on keywords

Trim, lower-case, and deduplicate keyword values in
normalizeClarifyingQuestions to ensure each ClarifyingQuestion.keyword
is non-empty and unique. Empty keywords fall back to question-{index}.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Remove dead code branches in getAccordionMeta for both CreateAgent
  and EditAgent (isAgentSavedOutput and error fallthrough are
  unreachable since ToolAccordion is already guarded)
- Remove unused WarningDiamondIcon imports from both files
- Use index-based key instead of action.label in ToolErrorCard
- Move ClarifyingQuestion interface and normalizeClarifyingQuestions
  to helpers.tsx for better separation of concerns

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@github-project-automation github-project-automation bot moved this from πŸ†• Needs initial review to πŸ‘πŸΌ Mergeable in AutoGPT development kanban Feb 25, 2026
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
autogpt_platform/frontend/src/app/(platform)/copilot/tools/CreateAgent/CreateAgent.tsx (1)

107-117: ⚠️ Potential issue | 🟠 Major

Clarification answers can be lost due to keyword mismatch.

Line 207 passes normalized question keywords to ClarificationQuestionsCard, but Line 115 looks up answers with the raw output.questions keywords. For trimmed/lowercased/deduped/fallback keywords, the submitted message can miss user answers.

πŸ’‘ Suggested fix
   const output = getCreateAgentToolOutput(part);
+  const clarificationQuestions =
+    output && isClarificationNeededOutput(output)
+      ? normalizeClarifyingQuestions(output.questions ?? [])
+      : [];

   function handleClarificationAnswers(answers: Record<string, string>) {
-    const questions =
-      output && isClarificationNeededOutput(output)
-        ? (output.questions ?? [])
-        : [];
-
-    const contextMessage = questions
+    const contextMessage = clarificationQuestions
       .map((q) => {
-        const answer = answers[q.keyword] || "";
+        const answer = answers[q.keyword] ?? "";
         return `> ${q.question}\n\n${answer}`;
       })
       .join("\n\n");
@@
       {output && isClarificationNeededOutput(output) && (
         <ClarificationQuestionsCard
-          questions={normalizeClarifyingQuestions(output.questions ?? [])}
+          questions={clarificationQuestions}
           message={output.message}
           onSubmitAnswers={handleClarificationAnswers}
         />
       )}

Also applies to: 205-207

πŸ€– Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@autogpt_platform/frontend/src/app/`(platform)/copilot/tools/CreateAgent/CreateAgent.tsx
around lines 107 - 117, The handler handleClarificationAnswers uses raw
output.questions keys to look up answers which can mismatch because
ClarificationQuestionsCard receives normalized/trimmed/lowercased/deduped
keywords; update handleClarificationAnswers to lookup answers using the same
normalization logic used when creating the questions passed to
ClarificationQuestionsCard (i.e., compute the normalized keyword for each
question before accessing answers[qKeyword] or store and use the normalized key
field from the question object), ensuring consistency for the mapping of answers
to questions (apply the same fix where questions are prepared around
ClarificationQuestionsCard usage at the earlier 205-207 area).
autogpt_platform/frontend/src/app/(platform)/copilot/tools/EditAgent/EditAgent.tsx (1)

96-106: ⚠️ Potential issue | 🟠 Major

Submitted clarification text can omit answers after normalization.

Line 181 uses normalized keywords in the form, while Line 104 reads answers using raw backend keywords. If normalization changed a keyword, the generated context message can include empty answers.

πŸ’‘ Suggested fix
   const output = getEditAgentToolOutput(part);
+  const clarificationQuestions =
+    output && isClarificationNeededOutput(output)
+      ? normalizeClarifyingQuestions(output.questions ?? [])
+      : [];

   function handleClarificationAnswers(answers: Record<string, string>) {
-    const questions =
-      output && isClarificationNeededOutput(output)
-        ? (output.questions ?? [])
-        : [];
-
-    const contextMessage = questions
+    const contextMessage = clarificationQuestions
       .map((q) => {
-        const answer = answers[q.keyword] || "";
+        const answer = answers[q.keyword] ?? "";
         return `> ${q.question}\n\n${answer}`;
       })
       .join("\n\n");
@@
       {output && isClarificationNeededOutput(output) && (
         <ClarificationQuestionsCard
-          questions={normalizeClarifyingQuestions(output.questions ?? [])}
+          questions={clarificationQuestions}
           message={output.message}
           onSubmitAnswers={handleClarificationAnswers}
         />
       )}

Also applies to: 179-182

πŸ€– Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@autogpt_platform/frontend/src/app/`(platform)/copilot/tools/EditAgent/EditAgent.tsx
around lines 96 - 106, In handleClarificationAnswers, the code uses raw backend
question keys (q.keyword) to read answers but the form stores answers under
normalized keys, so replace the direct lookup answers[q.keyword] with a
normalization-aware lookup: compute the normalized key used by the form (e.g.,
call the same normalization function used when building the form or derive it
from q.keyword) and read answers[normalizedKey] (falling back to
answers[q.keyword] if needed) when building contextMessage; update the same
logic used around lines handling the form submission so both places use the same
normalization (refer to handleClarificationAnswers, output,
isClarificationNeededOutput, contextMessage and q.keyword).
πŸ€– 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)/copilot/components/ToolErrorCard/ToolErrorCard.tsx:
- Around line 19-69: Replace the custom markup in ToolErrorCard with the shared
ErrorCard: import ErrorCard and render it inside ToolErrorCard (keeping
ToolErrorCard as a thin wrapper only if extra actions are required), forward
Props (message or fallbackMessage -> title/message, error/details ->
description/technical info or error props) and map the actions array to
ErrorCard's actions/cta API; remove the duplicated styled markup (the
WarningDiamondIcon, details/pre blocks, and buttons) and ensure ToolErrorCard
still exposes the same Props shape so callers are unaffected and any manual
exceptions use Sentry.captureException elsewhere per guidelines.

---

Outside diff comments:
In
`@autogpt_platform/frontend/src/app/`(platform)/copilot/tools/CreateAgent/CreateAgent.tsx:
- Around line 107-117: The handler handleClarificationAnswers uses raw
output.questions keys to look up answers which can mismatch because
ClarificationQuestionsCard receives normalized/trimmed/lowercased/deduped
keywords; update handleClarificationAnswers to lookup answers using the same
normalization logic used when creating the questions passed to
ClarificationQuestionsCard (i.e., compute the normalized keyword for each
question before accessing answers[qKeyword] or store and use the normalized key
field from the question object), ensuring consistency for the mapping of answers
to questions (apply the same fix where questions are prepared around
ClarificationQuestionsCard usage at the earlier 205-207 area).

In
`@autogpt_platform/frontend/src/app/`(platform)/copilot/tools/EditAgent/EditAgent.tsx:
- Around line 96-106: In handleClarificationAnswers, the code uses raw backend
question keys (q.keyword) to read answers but the form stores answers under
normalized keys, so replace the direct lookup answers[q.keyword] with a
normalization-aware lookup: compute the normalized key used by the form (e.g.,
call the same normalization function used when building the form or derive it
from q.keyword) and read answers[normalizedKey] (falling back to
answers[q.keyword] if needed) when building contextMessage; update the same
logic used around lines handling the form submission so both places use the same
normalization (refer to handleClarificationAnswers, output,
isClarificationNeededOutput, contextMessage and q.keyword).

ℹ️ Review info

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Linear integration is disabled

You can enable these sources in your CodeRabbit configuration.

πŸ“₯ Commits

Reviewing files that changed from the base of the PR and between 665678a and 5dda3a2.

πŸ“’ Files selected for processing (5)
  • autogpt_platform/frontend/src/app/(platform)/copilot/components/ToolErrorCard/ToolErrorCard.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/CreateAgent/CreateAgent.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/CreateAgent/components/ClarificationQuestionsCard.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/CreateAgent/helpers.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/EditAgent/EditAgent.tsx
🚧 Files skipped from review as they are similar to previous changes (1)
  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/CreateAgent/components/ClarificationQuestionsCard.tsx
πŸ“œ Review details
🧰 Additional context used
πŸ““ Path-based instructions (10)
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

Files:

  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/CreateAgent/helpers.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/CreateAgent/CreateAgent.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/EditAgent/EditAgent.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/components/ToolErrorCard/ToolErrorCard.tsx
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)/copilot/tools/CreateAgent/helpers.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/CreateAgent/CreateAgent.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/EditAgent/EditAgent.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/components/ToolErrorCard/ToolErrorCard.tsx
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 development

Files:

  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/CreateAgent/helpers.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/CreateAgent/CreateAgent.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/EditAgent/EditAgent.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/components/ToolErrorCard/ToolErrorCard.tsx
autogpt_platform/frontend/src/**/*.{ts,tsx}

πŸ“„ CodeRabbit inference engine (autogpt_platform/frontend/CLAUDE.md)

autogpt_platform/frontend/src/**/*.{ts,tsx}: Fully capitalize acronyms in symbols, e.g. graphID, useBackendAPI
Use function declarations (not arrow functions) for components and handlers
Separate render logic (.tsx) from business logic (use*.ts hooks)
Use shadcn/ui (Radix UI primitives) with Tailwind CSS styling for UI components
Use Phosphor Icons only for icons
Use ErrorCard for render errors, toast for mutations, and Sentry for exceptions
Use design system components from src/components/ (atoms, molecules, organisms)
Never use src/components/__legacy__/* components
Use generated API hooks from @/app/api/__generated__/endpoints/ with pattern use{Method}{Version}{OperationName}
Use Tailwind CSS only for styling, with design tokens
Do not use useCallback or useMemo unless asked to optimize a given function
Never type with any unless a variable/attribute can ACTUALLY be of any type

autogpt_platform/frontend/src/**/*.{ts,tsx}: Structure components as ComponentName/ComponentName.tsx + useComponentName.ts + helpers.ts and use design system components from src/components/ (atoms, molecules, organisms)
Use generated API hooks from @/app/api/__generated__/endpoints/ with pattern use{Method}{Version}{OperationName} and regenerate with pnpm 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 /components folder
Avoid large hooks, abstract logic into helpers.ts files 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 use useCallback or useMemo unless asked to optimize a given function

Files:

  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/CreateAgent/helpers.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/CreateAgent/CreateAgent.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/EditAgent/EditAgent.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/components/ToolErrorCard/ToolErrorCard.tsx
autogpt_platform/frontend/src/**/*.tsx

πŸ“„ CodeRabbit inference engine (autogpt_platform/frontend/CLAUDE.md)

Component props should be type Props = { ... } (not exported) unless it needs to be used outside the component

Component props should be interface Props { ... } (not exported) unless the interface needs to be used outside the component

Files:

  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/CreateAgent/helpers.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/CreateAgent/CreateAgent.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/EditAgent/EditAgent.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/components/ToolErrorCard/ToolErrorCard.tsx
autogpt_platform/frontend/**/*.{js,jsx,ts,tsx}

πŸ“„ CodeRabbit inference engine (AGENTS.md)

autogpt_platform/frontend/**/*.{js,jsx,ts,tsx}: Format frontend code using pnpm format
Never use components from src/components/__legacy__/*

Files:

  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/CreateAgent/helpers.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/CreateAgent/CreateAgent.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/EditAgent/EditAgent.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/components/ToolErrorCard/ToolErrorCard.tsx
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)/copilot/tools/CreateAgent/helpers.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/CreateAgent/CreateAgent.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/EditAgent/EditAgent.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/components/ToolErrorCard/ToolErrorCard.tsx
autogpt_platform/**/*.{ts,tsx}

πŸ“„ CodeRabbit inference engine (AGENTS.md)

Never type with any, if no types available use unknown

Files:

  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/CreateAgent/helpers.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/CreateAgent/CreateAgent.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/EditAgent/EditAgent.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/components/ToolErrorCard/ToolErrorCard.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)/copilot/tools/CreateAgent/helpers.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/CreateAgent/CreateAgent.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/EditAgent/EditAgent.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/components/ToolErrorCard/ToolErrorCard.tsx
autogpt_platform/frontend/src/app/(platform)/**/components/**/*.{ts,tsx}

πŸ“„ CodeRabbit inference engine (autogpt_platform/frontend/CLAUDE.md)

Put sub-components in local components/ folder within feature directories

Files:

  • autogpt_platform/frontend/src/app/(platform)/copilot/components/ToolErrorCard/ToolErrorCard.tsx
🧠 Learnings (18)
πŸ““ Common learnings
Learnt from: CR
Repo: Significant-Gravitas/AutoGPT PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2026-02-04T16:49:42.490Z
Learning: Applies to autogpt_platform/frontend/**/*.{tsx,ts} : Use '<ErrorCard />' component for rendering errors in frontend UI; use toast notifications for mutation errors; use 'Sentry.captureException()' for manual exceptions
πŸ“š Learning: 2026-02-04T16:49:42.490Z
Learnt from: CR
Repo: Significant-Gravitas/AutoGPT PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2026-02-04T16:49:42.490Z
Learning: Applies to autogpt_platform/frontend/**/*.{tsx,ts} : Use '<ErrorCard />' component for rendering errors in frontend UI; use toast notifications for mutation errors; use 'Sentry.captureException()' for manual exceptions

Applied to files:

  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/CreateAgent/CreateAgent.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/EditAgent/EditAgent.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/components/ToolErrorCard/ToolErrorCard.tsx
πŸ“š Learning: 2026-02-04T16:50:33.615Z
Learnt from: CR
Repo: Significant-Gravitas/AutoGPT PR: 0
File: autogpt_platform/frontend/CLAUDE.md:0-0
Timestamp: 2026-02-04T16:50:33.615Z
Learning: Applies to autogpt_platform/frontend/src/**/*.{ts,tsx} : Use ErrorCard for render errors, toast for mutations, and Sentry for exceptions

Applied to files:

  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/CreateAgent/CreateAgent.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/EditAgent/EditAgent.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/components/ToolErrorCard/ToolErrorCard.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/src/**/*.{ts,tsx} : Colocate state when possible, avoid creating large components, use sub-components in local `/components` folder

Applied to files:

  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/CreateAgent/CreateAgent.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/src/**/*.{ts,tsx} : Separate render logic from business logic with component.tsx + useComponent.ts + helpers.ts structure

Applied to files:

  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/CreateAgent/CreateAgent.tsx
πŸ“š Learning: 2026-02-04T16:49:42.490Z
Learnt from: CR
Repo: Significant-Gravitas/AutoGPT PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2026-02-04T16:49:42.490Z
Learning: Applies to autogpt_platform/frontend/**/*.{tsx,ts} : Separate render logic from data/behavior in React components; keep comments minimal (code should be self-documenting)

Applied to files:

  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/CreateAgent/CreateAgent.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/components/ToolErrorCard/ToolErrorCard.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/src/**/*.{ts,tsx} : Structure components as `ComponentName/ComponentName.tsx` + `useComponentName.ts` + `helpers.ts` and use design system components from `src/components/` (atoms, molecules, organisms)

Applied to files:

  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/CreateAgent/CreateAgent.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/components/ToolErrorCard/ToolErrorCard.tsx
πŸ“š Learning: 2026-02-04T16:50:33.615Z
Learnt from: CR
Repo: Significant-Gravitas/AutoGPT PR: 0
File: autogpt_platform/frontend/CLAUDE.md:0-0
Timestamp: 2026-02-04T16:50:33.615Z
Learning: Applies to autogpt_platform/frontend/src/**/*.tsx : Component props should be `type Props = { ... }` (not exported) unless it needs to be used outside the component

Applied to files:

  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/CreateAgent/CreateAgent.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/components/ToolErrorCard/ToolErrorCard.tsx
πŸ“š Learning: 2026-02-04T16:50:33.615Z
Learnt from: CR
Repo: Significant-Gravitas/AutoGPT PR: 0
File: autogpt_platform/frontend/CLAUDE.md:0-0
Timestamp: 2026-02-04T16:50:33.615Z
Learning: Applies to autogpt_platform/frontend/src/**/*.{ts,tsx} : Separate render logic (`.tsx`) from business logic (`use*.ts` hooks)

Applied to files:

  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/CreateAgent/CreateAgent.tsx
πŸ“š Learning: 2026-02-04T16:49:42.490Z
Learnt from: CR
Repo: Significant-Gravitas/AutoGPT PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2026-02-04T16:49:42.490Z
Learning: Applies to autogpt_platform/frontend/**/*.{tsx,ts} : Use design system components from 'src/components/' (atoms, molecules, organisms) in frontend development

Applied to files:

  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/CreateAgent/CreateAgent.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/EditAgent/EditAgent.tsx
πŸ“š Learning: 2026-02-04T16:49:42.490Z
Learnt from: CR
Repo: Significant-Gravitas/AutoGPT PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2026-02-04T16:49:42.490Z
Learning: Applies to autogpt_platform/frontend/**/*.{tsx,ts} : Default to client components ('use client') in Next.js; only use server components for SEO or extreme TTFB needs

Applied to files:

  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/CreateAgent/CreateAgent.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/EditAgent/EditAgent.tsx
πŸ“š Learning: 2026-02-04T16:50:33.615Z
Learnt from: CR
Repo: Significant-Gravitas/AutoGPT PR: 0
File: autogpt_platform/frontend/CLAUDE.md:0-0
Timestamp: 2026-02-04T16:50:33.615Z
Learning: Applies to autogpt_platform/frontend/src/**/*.{ts,tsx} : Use design system components from `src/components/` (atoms, molecules, organisms)

Applied to files:

  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/CreateAgent/CreateAgent.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/EditAgent/EditAgent.tsx
πŸ“š Learning: 2026-02-04T16:49:42.490Z
Learnt from: CR
Repo: Significant-Gravitas/AutoGPT PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2026-02-04T16:49:42.490Z
Learning: Applies to autogpt_platform/frontend/**/*.{tsx,ts} : Only use Phosphor Icons (phosphor-icons/react) for icons in frontend components

Applied to files:

  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/CreateAgent/CreateAgent.tsx
  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/EditAgent/EditAgent.tsx
πŸ“š Learning: 2026-02-04T16:50:33.615Z
Learnt from: CR
Repo: Significant-Gravitas/AutoGPT PR: 0
File: autogpt_platform/frontend/CLAUDE.md:0-0
Timestamp: 2026-02-04T16:50:33.615Z
Learning: Applies to autogpt_platform/frontend/src/**/*.{ts,tsx} : Use shadcn/ui (Radix UI primitives) with Tailwind CSS styling for UI components

Applied to files:

  • autogpt_platform/frontend/src/app/(platform)/copilot/tools/CreateAgent/CreateAgent.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/src/**/*.tsx : Component props should be `interface Props { ... }` (not exported) unless the interface needs to be used outside the component

Applied to files:

  • autogpt_platform/frontend/src/app/(platform)/copilot/components/ToolErrorCard/ToolErrorCard.tsx
πŸ“š Learning: 2026-02-04T16:49:42.490Z
Learnt from: CR
Repo: Significant-Gravitas/AutoGPT PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2026-02-04T16:49:42.490Z
Learning: Applies to autogpt_platform/frontend/src/components/**/*.{tsx,ts} : Structure React components as: ComponentName/ComponentName.tsx + useComponentName.ts + helpers.ts (exception: small 3-4 line components can be inline; render-only components can be direct files)

Applied to files:

  • autogpt_platform/frontend/src/app/(platform)/copilot/components/ToolErrorCard/ToolErrorCard.tsx
πŸ“š Learning: 2026-02-04T16:49:42.490Z
Learnt from: CR
Repo: Significant-Gravitas/AutoGPT PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2026-02-04T16:49:42.490Z
Learning: Applies to autogpt_platform/frontend/**/*.{stories.tsx,stories.ts} : Add/update Storybook stories for UI components in frontend development

Applied to files:

  • autogpt_platform/frontend/src/app/(platform)/copilot/components/ToolErrorCard/ToolErrorCard.tsx
πŸ“š Learning: 2026-02-04T16:49:42.490Z
Learnt from: CR
Repo: Significant-Gravitas/AutoGPT PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2026-02-04T16:49:42.490Z
Learning: Applies to autogpt_platform/frontend/**/*.{tsx,ts} : Use function declarations for components and handlers (not arrow functions) in React components

Applied to files:

  • autogpt_platform/frontend/src/app/(platform)/copilot/components/ToolErrorCard/ToolErrorCard.tsx
🧬 Code graph analysis (4)
autogpt_platform/frontend/src/app/(platform)/copilot/tools/CreateAgent/helpers.tsx (1)
autogpt_platform/backend/backend/copilot/tools/models.py (1)
  • ClarifyingQuestion (260-265)
autogpt_platform/frontend/src/app/(platform)/copilot/tools/CreateAgent/CreateAgent.tsx (6)
autogpt_platform/frontend/src/app/(platform)/copilot/components/ToolErrorCard/ToolErrorCard.tsx (1)
  • ToolErrorCard (19-69)
autogpt_platform/frontend/src/app/(platform)/copilot/tools/CreateAgent/helpers.tsx (6)
  • formatMaybeJson (146-153)
  • isClarificationNeededOutput (77-83)
  • isAgentSavedOutput (69-75)
  • isAgentPreviewOutput (63-67)
  • truncateText (155-159)
  • normalizeClarifyingQuestions (167-197)
autogpt_platform/frontend/src/app/(platform)/copilot/tools/RunBlock/helpers.tsx (2)
  • formatMaybeJson (169-176)
  • getAccordionMeta (178-237)
autogpt_platform/frontend/src/app/(platform)/copilot/tools/RunAgent/helpers.tsx (2)
  • formatMaybeJson (183-190)
  • getAccordionMeta (192-248)
autogpt_platform/frontend/src/app/(platform)/copilot/components/AgentSavedCard/AgentSavedCard.tsx (1)
  • AgentSavedCard (16-61)
autogpt_platform/frontend/src/app/(platform)/copilot/tools/CreateAgent/components/ClarificationQuestionsCard.tsx (1)
  • ClarificationQuestionsCard (22-230)
autogpt_platform/frontend/src/app/(platform)/copilot/tools/EditAgent/EditAgent.tsx (4)
autogpt_platform/frontend/src/app/(platform)/copilot/tools/CreateAgent/helpers.tsx (6)
  • formatMaybeJson (146-153)
  • isClarificationNeededOutput (77-83)
  • isAgentSavedOutput (69-75)
  • isAgentPreviewOutput (63-67)
  • truncateText (155-159)
  • normalizeClarifyingQuestions (167-197)
autogpt_platform/frontend/src/app/(platform)/copilot/tools/EditAgent/helpers.tsx (5)
  • formatMaybeJson (135-142)
  • isClarificationNeededOutput (73-79)
  • isAgentSavedOutput (65-71)
  • isAgentPreviewOutput (59-63)
  • truncateText (144-148)
autogpt_platform/frontend/src/app/(platform)/copilot/components/ToolAccordion/ToolAccordion.tsx (1)
  • ToolAccordion (21-102)
autogpt_platform/frontend/src/app/(platform)/copilot/tools/CreateAgent/components/ClarificationQuestionsCard.tsx (1)
  • ClarificationQuestionsCard (22-230)
autogpt_platform/frontend/src/app/(platform)/copilot/components/ToolErrorCard/ToolErrorCard.tsx (2)
autogpt_platform/frontend/src/components/atoms/Text/Text.tsx (1)
  • Text (16-36)
autogpt_platform/backend/backend/util/logging.py (1)
  • error (49-51)
πŸ”‡ Additional comments (1)
autogpt_platform/frontend/src/app/(platform)/copilot/tools/CreateAgent/helpers.tsx (1)

167-197: Normalization helper is well-implemented.

Keyword normalization, deduplication, and optional example sanitization are handled cleanly.

@0ubbe 0ubbe merged commit 7469107 into dev Feb 25, 2026
25 checks passed
@0ubbe 0ubbe deleted the fix/better-credentials-input-asking-2 branch February 25, 2026 11:13
@github-project-automation github-project-automation bot moved this to Done in Frontend Feb 25, 2026
@github-project-automation github-project-automation bot moved this from πŸ‘πŸΌ Mergeable to βœ… Done in AutoGPT development kanban Feb 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

platform/frontend AutoGPT Platform - Front end size/xl

Projects

Status: βœ… Done
Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants