Skip to content

Conversation

@Abhi1992002
Copy link
Contributor

@Abhi1992002 Abhi1992002 commented Jan 19, 2026

Changes πŸ—οΈ

  • Refactored the credentials input handling in the RunInputDialog to use the shared CredentialsGroupedView component
  • Moved CredentialsGroupedView from agent library to a shared component location for reuse
  • Fixed source name handling in edge creation to properly handle tool source names
  • Improved node output UI by replacing custom expand/collapse with Accordion component
  • Fixed timing of hardcoded values synchronization with handle IDs to ensure proper loading
  • Enabled NEW_FLOW_EDITOR and BUILDER_VIEW_SWITCH feature flags by default

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:
    • Verified credentials input works in both agent run dialog and builder run dialog
    • Confirmed node output accordion works correctly
    • Tested flow editor with tools to ensure source name handling works properly
    • Verified hardcoded values sync correctly with handle IDs

For configuration changes:

  • .env.default is updated or already compatible with my changes
  • docker-compose.yml is updated or already compatible with my changes
  • I have included a list of my configuration changes in the PR description (under Changes)

…tegration

### Summary
This commit refactors the `RunInputDialog` component to utilize the new `CredentialsGroupedView` for improved credential management.

### Key Changes
1. **Integration of `CredentialsGroupedView`**: Replaces the previous credential handling logic with a more structured view that displays credential fields and manages their state.
2. **Updated State Management**: Introduces new handlers for credential field changes and updates the way credentials are processed within the dialog.
3. **Removed Legacy Code**: Cleans up unused credential schema handling and related UI components, streamlining the codebase.

### Benefits
- **Improved User Experience**: The new layout provides a clearer and more organized way to manage credentials.
- **Enhanced Code Maintainability**: By consolidating credential handling into a dedicated component, the code is easier to maintain and extend in the future.

### Testing
- Verified that the `RunInputDialog` correctly displays and manages credentials using the new `CredentialsGroupedView`.
- Ensured that all existing functionality remains intact and that no regressions were introduced.
…seFlow

### Summary
This commit refactors the `useFlow` hook to ensure that hardcoded values remain in sync with handle IDs when custom nodes are present.

### Key Changes
1. **Moved Sync Logic**: The logic to synchronize hardcoded values with handle IDs has been moved into a new `useEffect` that triggers when both `customNodes` and `graph.links` are available.
2. **Removed Redundant Code**: The previous inline synchronization logic has been removed to streamline the code and improve readability.

### Benefits
- **Improved Code Clarity**: The separation of concerns enhances the maintainability of the `useFlow` hook.
- **Consistent State Management**: Ensures that hardcoded values are consistently updated based on the current state of custom nodes and graph links.

### Testing
- Verified that the synchronization logic works as intended without introducing regressions in the flow editor functionality.
…d cleanup logic

### Summary
This commit refactors the `NodeOutput` component to improve its user interface and streamline the handling of source names.

### Key Changes
1. **Accordion Integration**: Replaced the previous expandable section with an accordion layout for better organization of node output data.
2. **Source Name Cleanup**: Introduced utility functions to clean up source names, ensuring consistency in how tool source names are displayed.
3. **Code Simplification**: Removed unnecessary state management for expansion, simplifying the component's logic.

### Benefits
- **Improved User Experience**: The accordion layout enhances readability and interaction with node output data.
- **Cleaner Code**: The refactor reduces complexity and improves maintainability of the `NodeOutput` component.

### Testing
- Verified that the accordion functionality works as intended and that source names are displayed correctly without regressions in the node output display.
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 19, 2026

Walkthrough

The PR refactors credential handling in the frontend by converting CredentialsGroupedView from context-based state management to accepting external props (inputCredentials, inputValues, onCredentialChange). RunInputDialog and RunAgentModal components are updated to use this new API. Additionally, NodeOutput replaces manual expand/collapse logic with the Accordion component.

Changes

Cohort / File(s) Summary
Credential API Refactoring
autogpt_platform/frontend/src/app/(platform)/build/components/BuilderActions/components/RunInputDialog/RunInputDialog.tsx, autogpt_platform/frontend/src/app/(platform)/build/components/BuilderActions/components/RunInputDialog/useRunInputDialog.ts, autogpt_platform/frontend/src/components/contextual/CredentialsInput/components/CredentialsGroupedView/CredentialsGroupedView.tsx, autogpt_platform/frontend/src/app/(platform)/library/agents/[id]/components/NewAgentLibraryView/components/modals/RunAgentModal/components/ModalRunSection/ModalRunSection.tsx
Updated credential handling from context-based to props-based API. CredentialsGroupedView now accepts inputCredentials, inputValues, and onCredentialChange callback. RunInputDialog and ModalRunSection refactored to derive credentialFields and requiredCredentials and pass them to CredentialsGroupedView.
NodeOutput UI Refactoring
autogpt_platform/frontend/src/app/(platform)/build/components/FlowEditor/nodes/CustomNode/components/NodeOutput/NodeOutput.tsx, autogpt_platform/frontend/src/app/(platform)/build/components/FlowEditor/nodes/CustomNode/components/NodeOutput/useNodeOutput.tsx
Replaced manual expand/collapse mechanism with Accordion component. Removed isExpanded state and CaretDownIcon toggle logic. Reorganized layout to position copy actions and data viewers in horizontal groups.
Flow Editor & Helper Updates
autogpt_platform/frontend/src/app/(platform)/build/components/FlowEditor/Flow/useFlow.ts, autogpt_platform/frontend/src/app/(platform)/build/components/helper.ts, autogpt_platform/frontend/src/components/contextual/CredentialsInput/components/CredentialsGroupedView/helpers.ts
Extracted hardcoded value synchronization into separate effect in useFlow. Added internal helpers isToolSourceName and cleanupSourceName for source handle normalization. Updated import paths for helper modules.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested labels

Review effort 3/5

Suggested reviewers

  • ntindle
  • 0ubbe

Poem

🐰 Credentials now flow through props so free,
No context chains, just callbacks we see!
Accordions fold where outputs hide,
The UI refactored, logic verified! ✨

πŸš₯ Pre-merge checks | βœ… 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% 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 accurately describes the main refactoring work: consolidating credentials input handling through a unified CredentialsGroupedView component shared across the frontend.
Description check βœ… Passed The description comprehensively covers all significant changes including credentials refactoring, component relocation, edge handling fixes, UI improvements, feature flag updates, and verification testing performed.

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

✨ Finishing touches
  • πŸ“ Generate docstrings

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.

@github-actions github-actions bot added the platform/frontend AutoGPT Platform - Front end label Jan 19, 2026
@Abhi1992002 Abhi1992002 changed the title feat(frontend): enhance RunInputDialog with CredentialsGroupedView integration feat(frontend): refactor credentials input with unified CredentialsGroupedView component Jan 19, 2026
Copy link
Contributor Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@Abhi1992002 Abhi1992002 requested a review from 0ubbe January 19, 2026 06:35
@Abhi1992002 Abhi1992002 marked this pull request as ready for review January 19, 2026 06:35
@Abhi1992002 Abhi1992002 requested a review from a team as a code owner January 19, 2026 06:35
@Abhi1992002 Abhi1992002 requested review from ntindle and removed request for a team January 19, 2026 06:35
…nd builder view switch

### Summary
This commit modifies the mock feature flags in `use-get-flag.ts` to set both `NEW_FLOW_EDITOR` and `BUILDER_VIEW_SWITCH` to false.

### Key Changes
- Updated `mockFlags` to disable `NEW_FLOW_EDITOR` and `BUILDER_VIEW_SWITCH`.

### Benefits
- Ensures that these features are not enabled by default during development and testing.

### Testing
- Verified that the changes do not affect existing functionality and that the flags are correctly set to false.
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: 2

πŸ€– Fix all issues with AI agents
In
`@autogpt_platform/frontend/src/components/contextual/CredentialsInput/components/CredentialsGroupedView/CredentialsGroupedView.tsx`:
- Around line 96-102: The code casts savedCredential.type to CredentialsType
without validation; add a type guard function (e.g., isCredentialsType(value):
value is CredentialsType) that checks savedCredential.type against the allowed
literals ("api_key", "oauth2", "user_password") and use it in
CredentialsGroupedView before calling onCredentialChange so you only pass a
validated CredentialsType; if the guard fails, handle gracefully (skip calling
onCredentialChange, set a safe default, or log an error) rather than blindly
casting.

In
`@autogpt_platform/frontend/src/components/contextual/CredentialsInput/components/CredentialsGroupedView/index.ts`:
- Around line 1-2: Delete this barrel re-export file and update all imports to
reference the concrete module files directly: remove index.ts that re-exports
CredentialsGroupedView and the CredentialField type, then change any import
locations to import { CredentialsGroupedView } from "./CredentialsGroupedView"
(pointing to CredentialsGroupedView.tsx) and import type { CredentialField }
from "./helpers" (pointing to helpers.ts). Ensure no other code depends on the
barrel by searching for imports from the folder path and replacing them with the
explicit file paths.
🧹 Nitpick comments (6)
autogpt_platform/frontend/src/app/(platform)/build/components/FlowEditor/nodes/CustomNode/components/NodeOutput/NodeOutput.tsx (2)

41-68: Consider adding a null check for inputData and accessibility label for the copy button.

  1. The inputData is rendered without a null/undefined check. If the execution result lacks input data, this could pass undefined to ContentRenderer.

  2. The copy button contains only an icon without an aria-label, which impacts screen reader accessibility.

Suggested improvements
-              <div className="space-y-2">
-                <Text variant="small-medium">Input</Text>
-
-                <ContentRenderer value={inputData} shortContent={false} />
-
-                <div className="mt-1 flex justify-end gap-1">
+              {inputData != null && (
+                <div className="space-y-2">
+                  <Text variant="small-medium">Input</Text>
+
+                  <ContentRenderer value={inputData} shortContent={false} />
+
+                  <div className="mt-1 flex justify-end gap-1">
                   <NodeDataViewer
                     data={inputData}
                     pinName="Input"
                     execId={executionResultId}
                   />
                   <Button
                     variant="secondary"
                     size="small"
                     onClick={() => handleCopy("input", inputData)}
+                    aria-label={copiedKey === "input" ? "Copied" : "Copy input data"}
                     className={cn(
                       "h-fit min-w-0 gap-1.5 border border-zinc-200 p-2 text-black hover:text-slate-900",
                       copiedKey === "input" &&
                         "border-green-400 bg-green-100 hover:border-green-400 hover:bg-green-200",
                     )}
                   >
                     {copiedKey === "input" ? (
                       <CheckIcon size={12} className="text-green-600" />
                     ) : (
                       <CopyIcon size={12} />
                     )}
                   </Button>
+                  </div>
                 </div>
-              </div>
+              )}

106-121: Add aria-label for accessibility on per-pin copy buttons.

Consistent with the input copy button, these icon-only buttons should include an aria-label for screen reader users.

Suggested fix
                          <Button
                            variant="secondary"
                            size="small"
                            onClick={() => handleCopy(key, value)}
+                           aria-label={copiedKey === key ? "Copied" : `Copy ${beautifyString(key)} data`}
                            className={cn(
                              "h-fit min-w-0 gap-1.5 border border-zinc-200 p-2 text-black hover:text-slate-900",
                              copiedKey === key &&
                                "border-green-400 bg-green-100 hover:border-green-400 hover:bg-green-200",
                            )}
                          >
autogpt_platform/frontend/src/app/(platform)/build/components/BuilderActions/components/RunInputDialog/useRunInputDialog.ts (1)

122-147: Prefer a named function in the handler per frontend style rules.
If you want to keep the memoization, swap the arrow for a named function to align with β€œfunction declarations for handlers.”

♻️ Suggested tweak
-  const handleCredentialFieldChange = useCallback(
-    (key: string, value?: CredentialsMetaInput) => {
+  const handleCredentialFieldChange = useCallback(function handleCredentialFieldChange(
+    key: string,
+    value?: CredentialsMetaInput,
+  ) {
       setCredentialValues((prev) => {
         if (value) {
           return { ...prev, [key]: value };
         } else {
           const next = { ...prev };
           delete next[key];
           return next;
         }
       });
-    },
-    [],
-  );
+  }, []);
As per coding guidelines, prefer function declarations for handlers.
autogpt_platform/frontend/src/components/contextual/CredentialsInput/components/CredentialsGroupedView/CredentialsGroupedView.tsx (1)

76-115: Auto-select effect is correctly guarded but consider cleanup.

The hasAttemptedAutoSelect ref prevents repeated auto-selection, which is appropriate. However, if credentialFields changes (e.g., different nodes selected), the ref won't reset, potentially skipping auto-selection for new fields.

Consider whether the ref should reset when credentialFields identity changes, if that's a valid use case for this component.

autogpt_platform/frontend/src/app/(platform)/build/components/BuilderActions/components/RunInputDialog/RunInputDialog.tsx (1)

69-69: Consider simplifying the dual condition.

The condition hasCredentials() && credentialFields.length > 0 may be redundant if hasCredentials() is derived from whether credential fields exist. If they're always in sync, you could simplify to just credentialFields.length > 0.

However, if hasCredentials() checks graph-level metadata while credentialFields is a derived/filtered list, the dual check provides defense-in-depth against rendering an empty section.

#!/bin/bash
# Check what hasCredentials() returns and if it's related to credentialFields
echo "=== hasCredentials implementation in graphStore ==="
rg -n "hasCredentials" --type=ts -A5 | head -40
autogpt_platform/frontend/src/app/(platform)/library/agents/[id]/components/NewAgentLibraryView/components/modals/RunAgentModal/components/ModalRunSection/ModalRunSection.tsx (1)

33-35: Consider memoizing requiredCredentials Set.

The new Set(...) is created on every render, which creates a new object reference each time. While CredentialsGroupedView uses this in dependency arrays for useMemo and useEffect, the changing reference could trigger unnecessary recalculations.

♻️ Proposed fix to memoize the Set
+ const requiredCredentials = useMemo(
+   () =>
+     new Set(
+       (agent.credentials_input_schema?.required as string[]) || [],
+     ),
+   [agent.credentials_input_schema?.required],
+ );
- const requiredCredentials = new Set(
-   (agent.credentials_input_schema?.required as string[]) || [],
- );
πŸ“œ Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

πŸ“₯ Commits

Reviewing files that changed from the base of the PR and between 1b56ff1 and cb964ee.

πŸ“’ Files selected for processing (10)
  • autogpt_platform/frontend/src/app/(platform)/build/components/BuilderActions/components/RunInputDialog/RunInputDialog.tsx
  • autogpt_platform/frontend/src/app/(platform)/build/components/BuilderActions/components/RunInputDialog/useRunInputDialog.ts
  • autogpt_platform/frontend/src/app/(platform)/build/components/FlowEditor/Flow/useFlow.ts
  • autogpt_platform/frontend/src/app/(platform)/build/components/FlowEditor/nodes/CustomNode/components/NodeOutput/NodeOutput.tsx
  • autogpt_platform/frontend/src/app/(platform)/build/components/FlowEditor/nodes/CustomNode/components/NodeOutput/useNodeOutput.tsx
  • autogpt_platform/frontend/src/app/(platform)/build/components/helper.ts
  • autogpt_platform/frontend/src/app/(platform)/library/agents/[id]/components/NewAgentLibraryView/components/modals/RunAgentModal/components/ModalRunSection/ModalRunSection.tsx
  • autogpt_platform/frontend/src/components/contextual/CredentialsInput/components/CredentialsGroupedView/CredentialsGroupedView.tsx
  • autogpt_platform/frontend/src/components/contextual/CredentialsInput/components/CredentialsGroupedView/helpers.ts
  • autogpt_platform/frontend/src/components/contextual/CredentialsInput/components/CredentialsGroupedView/index.ts
🧰 Additional context used
πŸ““ Path-based instructions (10)
autogpt_platform/frontend/**/*.{ts,tsx}

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

autogpt_platform/frontend/**/*.{ts,tsx}: Always run pnpm install before frontend development, then use pnpm dev to start development server on port 3000
For frontend code formatting and linting, always run pnpm format

If adding protected frontend routes, update frontend/lib/supabase/middleware.ts

autogpt_platform/frontend/**/*.{ts,tsx}: Use generated API hooks from @/app/api/__generated__/endpoints/ for data fetching in frontend
Use function declarations (not arrow functions) for components and handlers in frontend
Only use Phosphor Icons in frontend; never use other icon libraries
Never use src/components/__legacy__/* or deprecated BackendAPI in frontend

Files:

  • autogpt_platform/frontend/src/app/(platform)/build/components/helper.ts
  • autogpt_platform/frontend/src/app/(platform)/build/components/FlowEditor/Flow/useFlow.ts
  • autogpt_platform/frontend/src/components/contextual/CredentialsInput/components/CredentialsGroupedView/index.ts
  • autogpt_platform/frontend/src/app/(platform)/build/components/BuilderActions/components/RunInputDialog/useRunInputDialog.ts
  • autogpt_platform/frontend/src/components/contextual/CredentialsInput/components/CredentialsGroupedView/CredentialsGroupedView.tsx
  • autogpt_platform/frontend/src/app/(platform)/build/components/FlowEditor/nodes/CustomNode/components/NodeOutput/useNodeOutput.tsx
  • autogpt_platform/frontend/src/app/(platform)/build/components/FlowEditor/nodes/CustomNode/components/NodeOutput/NodeOutput.tsx
  • autogpt_platform/frontend/src/app/(platform)/build/components/BuilderActions/components/RunInputDialog/RunInputDialog.tsx
  • autogpt_platform/frontend/src/components/contextual/CredentialsInput/components/CredentialsGroupedView/helpers.ts
  • autogpt_platform/frontend/src/app/(platform)/library/agents/[id]/components/NewAgentLibraryView/components/modals/RunAgentModal/components/ModalRunSection/ModalRunSection.tsx
autogpt_platform/frontend/**/*.{ts,tsx,json}

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

Use Node.js 21+ with pnpm package manager for frontend development

Files:

  • autogpt_platform/frontend/src/app/(platform)/build/components/helper.ts
  • autogpt_platform/frontend/src/app/(platform)/build/components/FlowEditor/Flow/useFlow.ts
  • autogpt_platform/frontend/src/components/contextual/CredentialsInput/components/CredentialsGroupedView/index.ts
  • autogpt_platform/frontend/src/app/(platform)/build/components/BuilderActions/components/RunInputDialog/useRunInputDialog.ts
  • autogpt_platform/frontend/src/components/contextual/CredentialsInput/components/CredentialsGroupedView/CredentialsGroupedView.tsx
  • autogpt_platform/frontend/src/app/(platform)/build/components/FlowEditor/nodes/CustomNode/components/NodeOutput/useNodeOutput.tsx
  • autogpt_platform/frontend/src/app/(platform)/build/components/FlowEditor/nodes/CustomNode/components/NodeOutput/NodeOutput.tsx
  • autogpt_platform/frontend/src/app/(platform)/build/components/BuilderActions/components/RunInputDialog/RunInputDialog.tsx
  • autogpt_platform/frontend/src/components/contextual/CredentialsInput/components/CredentialsGroupedView/helpers.ts
  • autogpt_platform/frontend/src/app/(platform)/library/agents/[id]/components/NewAgentLibraryView/components/modals/RunAgentModal/components/ModalRunSection/ModalRunSection.tsx
autogpt_platform/frontend/src/**/*.{ts,tsx}

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

autogpt_platform/frontend/src/**/*.{ts,tsx}: Use generated API hooks from @/app/api/__generated__/endpoints/ (generated via Orval from backend OpenAPI spec). Pattern: use{Method}{Version}{OperationName} (e.g., useGetV2ListLibraryAgents). Regenerate with: pnpm generate:api. Never use deprecated BackendAPI or src/lib/autogpt-server-api/*
Use function declarations for components and handlers (not arrow functions). Only arrow functions for small inline lambdas (map, filter, etc.)
Use PascalCase for components, camelCase with use prefix for hooks
No barrel files or index.ts re-exports in frontend
For frontend render errors, use component. For mutation errors, display with toast notifications. For manual exceptions, use Sentry.captureException()
Default to client components (use client). Use server components only for SEO or extreme TTFB needs. Use React Query for server state via generated hooks. Co-locate UI state in components/hooks

Files:

  • autogpt_platform/frontend/src/app/(platform)/build/components/helper.ts
  • autogpt_platform/frontend/src/app/(platform)/build/components/FlowEditor/Flow/useFlow.ts
  • autogpt_platform/frontend/src/components/contextual/CredentialsInput/components/CredentialsGroupedView/index.ts
  • autogpt_platform/frontend/src/app/(platform)/build/components/BuilderActions/components/RunInputDialog/useRunInputDialog.ts
  • autogpt_platform/frontend/src/components/contextual/CredentialsInput/components/CredentialsGroupedView/CredentialsGroupedView.tsx
  • autogpt_platform/frontend/src/app/(platform)/build/components/FlowEditor/nodes/CustomNode/components/NodeOutput/useNodeOutput.tsx
  • autogpt_platform/frontend/src/app/(platform)/build/components/FlowEditor/nodes/CustomNode/components/NodeOutput/NodeOutput.tsx
  • autogpt_platform/frontend/src/app/(platform)/build/components/BuilderActions/components/RunInputDialog/RunInputDialog.tsx
  • autogpt_platform/frontend/src/components/contextual/CredentialsInput/components/CredentialsGroupedView/helpers.ts
  • autogpt_platform/frontend/src/app/(platform)/library/agents/[id]/components/NewAgentLibraryView/components/modals/RunAgentModal/components/ModalRunSection/ModalRunSection.tsx
autogpt_platform/frontend/**/*.{js,ts,jsx,tsx}

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

Format frontend code using pnpm format

Files:

  • autogpt_platform/frontend/src/app/(platform)/build/components/helper.ts
  • autogpt_platform/frontend/src/app/(platform)/build/components/FlowEditor/Flow/useFlow.ts
  • autogpt_platform/frontend/src/components/contextual/CredentialsInput/components/CredentialsGroupedView/index.ts
  • autogpt_platform/frontend/src/app/(platform)/build/components/BuilderActions/components/RunInputDialog/useRunInputDialog.ts
  • autogpt_platform/frontend/src/components/contextual/CredentialsInput/components/CredentialsGroupedView/CredentialsGroupedView.tsx
  • autogpt_platform/frontend/src/app/(platform)/build/components/FlowEditor/nodes/CustomNode/components/NodeOutput/useNodeOutput.tsx
  • autogpt_platform/frontend/src/app/(platform)/build/components/FlowEditor/nodes/CustomNode/components/NodeOutput/NodeOutput.tsx
  • autogpt_platform/frontend/src/app/(platform)/build/components/BuilderActions/components/RunInputDialog/RunInputDialog.tsx
  • autogpt_platform/frontend/src/components/contextual/CredentialsInput/components/CredentialsGroupedView/helpers.ts
  • autogpt_platform/frontend/src/app/(platform)/library/agents/[id]/components/NewAgentLibraryView/components/modals/RunAgentModal/components/ModalRunSection/ModalRunSection.tsx
autogpt_platform/frontend/**

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

autogpt_platform/frontend/**: Install frontend dependencies using pnpm i instead of npm
Generate API client from OpenAPI spec using pnpm generate:api
Regenerate API client hooks using pnpm generate:api when OpenAPI spec changes

Files:

  • autogpt_platform/frontend/src/app/(platform)/build/components/helper.ts
  • autogpt_platform/frontend/src/app/(platform)/build/components/FlowEditor/Flow/useFlow.ts
  • autogpt_platform/frontend/src/components/contextual/CredentialsInput/components/CredentialsGroupedView/index.ts
  • autogpt_platform/frontend/src/app/(platform)/build/components/BuilderActions/components/RunInputDialog/useRunInputDialog.ts
  • autogpt_platform/frontend/src/components/contextual/CredentialsInput/components/CredentialsGroupedView/CredentialsGroupedView.tsx
  • autogpt_platform/frontend/src/app/(platform)/build/components/FlowEditor/nodes/CustomNode/components/NodeOutput/useNodeOutput.tsx
  • autogpt_platform/frontend/src/app/(platform)/build/components/FlowEditor/nodes/CustomNode/components/NodeOutput/NodeOutput.tsx
  • autogpt_platform/frontend/src/app/(platform)/build/components/BuilderActions/components/RunInputDialog/RunInputDialog.tsx
  • autogpt_platform/frontend/src/components/contextual/CredentialsInput/components/CredentialsGroupedView/helpers.ts
  • autogpt_platform/frontend/src/app/(platform)/library/agents/[id]/components/NewAgentLibraryView/components/modals/RunAgentModal/components/ModalRunSection/ModalRunSection.tsx
autogpt_platform/frontend/**/*.{ts,tsx,css}

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

Use only Tailwind CSS for styling in frontend, with design tokens and Phosphor Icons

Files:

  • autogpt_platform/frontend/src/app/(platform)/build/components/helper.ts
  • autogpt_platform/frontend/src/app/(platform)/build/components/FlowEditor/Flow/useFlow.ts
  • autogpt_platform/frontend/src/components/contextual/CredentialsInput/components/CredentialsGroupedView/index.ts
  • autogpt_platform/frontend/src/app/(platform)/build/components/BuilderActions/components/RunInputDialog/useRunInputDialog.ts
  • autogpt_platform/frontend/src/components/contextual/CredentialsInput/components/CredentialsGroupedView/CredentialsGroupedView.tsx
  • autogpt_platform/frontend/src/app/(platform)/build/components/FlowEditor/nodes/CustomNode/components/NodeOutput/useNodeOutput.tsx
  • autogpt_platform/frontend/src/app/(platform)/build/components/FlowEditor/nodes/CustomNode/components/NodeOutput/NodeOutput.tsx
  • autogpt_platform/frontend/src/app/(platform)/build/components/BuilderActions/components/RunInputDialog/RunInputDialog.tsx
  • autogpt_platform/frontend/src/components/contextual/CredentialsInput/components/CredentialsGroupedView/helpers.ts
  • autogpt_platform/frontend/src/app/(platform)/library/agents/[id]/components/NewAgentLibraryView/components/modals/RunAgentModal/components/ModalRunSection/ModalRunSection.tsx
autogpt_platform/frontend/src/components/**/*.{ts,tsx}

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

autogpt_platform/frontend/src/components/**/*.{ts,tsx}: Separate render logic from data/behavior in components
Structure frontend components as ComponentName/ComponentName.tsx plus useComponentName.ts hook plus helpers.ts file

Files:

  • autogpt_platform/frontend/src/components/contextual/CredentialsInput/components/CredentialsGroupedView/index.ts
  • autogpt_platform/frontend/src/components/contextual/CredentialsInput/components/CredentialsGroupedView/CredentialsGroupedView.tsx
  • autogpt_platform/frontend/src/components/contextual/CredentialsInput/components/CredentialsGroupedView/helpers.ts
autogpt_platform/frontend/src/components/**/*.tsx

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

autogpt_platform/frontend/src/components/**/*.tsx: Separate frontend component render logic from data/behavior. Structure: ComponentName/ComponentName.tsx + useComponentName.ts + helpers.ts. Small components (3-4 lines) can be inline. Render-only components can be direct files without folders
Use Tailwind CSS utilities only for styling in frontend. Use design system components from src/components/ (atoms, molecules, organisms). Never use src/components/legacy/*
Only use Phosphor Icons (@phosphor-icons/react) for icon components in frontend
Prefer design tokens over hardcoded values in frontend styling

Files:

  • autogpt_platform/frontend/src/components/contextual/CredentialsInput/components/CredentialsGroupedView/CredentialsGroupedView.tsx
autogpt_platform/frontend/src/**/*.tsx

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

Use design system components from src/components/ (atoms, molecules, organisms) in frontend

Files:

  • autogpt_platform/frontend/src/components/contextual/CredentialsInput/components/CredentialsGroupedView/CredentialsGroupedView.tsx
  • autogpt_platform/frontend/src/app/(platform)/build/components/FlowEditor/nodes/CustomNode/components/NodeOutput/useNodeOutput.tsx
  • autogpt_platform/frontend/src/app/(platform)/build/components/FlowEditor/nodes/CustomNode/components/NodeOutput/NodeOutput.tsx
  • autogpt_platform/frontend/src/app/(platform)/build/components/BuilderActions/components/RunInputDialog/RunInputDialog.tsx
  • autogpt_platform/frontend/src/app/(platform)/library/agents/[id]/components/NewAgentLibraryView/components/modals/RunAgentModal/components/ModalRunSection/ModalRunSection.tsx
autogpt_platform/frontend/src/app/**/*.tsx

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

Create frontend pages in src/app/(platform)/feature-name/page.tsx with corresponding usePageName.ts hook and local components/ subfolder

Files:

  • autogpt_platform/frontend/src/app/(platform)/build/components/FlowEditor/nodes/CustomNode/components/NodeOutput/useNodeOutput.tsx
  • autogpt_platform/frontend/src/app/(platform)/build/components/FlowEditor/nodes/CustomNode/components/NodeOutput/NodeOutput.tsx
  • autogpt_platform/frontend/src/app/(platform)/build/components/BuilderActions/components/RunInputDialog/RunInputDialog.tsx
  • autogpt_platform/frontend/src/app/(platform)/library/agents/[id]/components/NewAgentLibraryView/components/modals/RunAgentModal/components/ModalRunSection/ModalRunSection.tsx
🧠 Learnings (8)
πŸ“š Learning: 2025-11-25T08:49:03.583Z
Learnt from: CR
Repo: Significant-Gravitas/AutoGPT PR: 0
File: autogpt_platform/CLAUDE.md:0-0
Timestamp: 2025-11-25T08:49:03.583Z
Learning: Applies to autogpt_platform/frontend/src/components/**/*.{ts,tsx} : Structure frontend components as `ComponentName/ComponentName.tsx` plus `useComponentName.ts` hook plus `helpers.ts` file

Applied to files:

  • autogpt_platform/frontend/src/app/(platform)/build/components/helper.ts
  • autogpt_platform/frontend/src/components/contextual/CredentialsInput/components/CredentialsGroupedView/index.ts
  • autogpt_platform/frontend/src/components/contextual/CredentialsInput/components/CredentialsGroupedView/helpers.ts
πŸ“š Learning: 2025-11-25T08:48:33.246Z
Learnt from: CR
Repo: Significant-Gravitas/AutoGPT PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-25T08:48:33.246Z
Learning: Applies to autogpt_platform/frontend/src/**/*.{ts,tsx} : Use PascalCase for components, camelCase with use prefix for hooks

Applied to files:

  • autogpt_platform/frontend/src/app/(platform)/build/components/helper.ts
πŸ“š Learning: 2025-11-25T08:48:33.246Z
Learnt from: CR
Repo: Significant-Gravitas/AutoGPT PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-25T08:48:33.246Z
Learning: Applies to autogpt_platform/frontend/src/components/**/*.tsx : Separate frontend component render logic from data/behavior. Structure: ComponentName/ComponentName.tsx + useComponentName.ts + helpers.ts. Small components (3-4 lines) can be inline. Render-only components can be direct files without folders

Applied to files:

  • autogpt_platform/frontend/src/app/(platform)/build/components/helper.ts
  • autogpt_platform/frontend/src/components/contextual/CredentialsInput/components/CredentialsGroupedView/index.ts
  • autogpt_platform/frontend/src/app/(platform)/build/components/FlowEditor/nodes/CustomNode/components/NodeOutput/NodeOutput.tsx
πŸ“š Learning: 2025-11-25T08:49:03.583Z
Learnt from: CR
Repo: Significant-Gravitas/AutoGPT PR: 0
File: autogpt_platform/CLAUDE.md:0-0
Timestamp: 2025-11-25T08:49:03.583Z
Learning: Applies to autogpt_platform/frontend/src/app/**/*.tsx : Create frontend pages in `src/app/(platform)/feature-name/page.tsx` with corresponding `usePageName.ts` hook and local `components/` subfolder

Applied to files:

  • autogpt_platform/frontend/src/app/(platform)/build/components/helper.ts
πŸ“š Learning: 2025-11-25T08:49:03.583Z
Learnt from: CR
Repo: Significant-Gravitas/AutoGPT PR: 0
File: autogpt_platform/CLAUDE.md:0-0
Timestamp: 2025-11-25T08:49:03.583Z
Learning: Frontend workflow builder uses visual graph editor with xyflow/react

Applied to files:

  • autogpt_platform/frontend/src/app/(platform)/build/components/FlowEditor/Flow/useFlow.ts
πŸ“š Learning: 2025-11-25T08:48:33.246Z
Learnt from: CR
Repo: Significant-Gravitas/AutoGPT PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-25T08:48:33.246Z
Learning: Applies to autogpt_platform/frontend/src/**/*.{ts,tsx} : No barrel files or index.ts re-exports in frontend

Applied to files:

  • autogpt_platform/frontend/src/components/contextual/CredentialsInput/components/CredentialsGroupedView/index.ts
πŸ“š Learning: 2025-11-25T08:49:03.583Z
Learnt from: CR
Repo: Significant-Gravitas/AutoGPT PR: 0
File: autogpt_platform/CLAUDE.md:0-0
Timestamp: 2025-11-25T08:49:03.583Z
Learning: Applies to autogpt_platform/frontend/src/**/*.tsx : Use design system components from `src/components/` (atoms, molecules, organisms) in frontend

Applied to files:

  • autogpt_platform/frontend/src/app/(platform)/build/components/FlowEditor/nodes/CustomNode/components/NodeOutput/NodeOutput.tsx
  • autogpt_platform/frontend/src/components/contextual/CredentialsInput/components/CredentialsGroupedView/helpers.ts
πŸ“š Learning: 2025-11-25T08:49:03.583Z
Learnt from: CR
Repo: Significant-Gravitas/AutoGPT PR: 0
File: autogpt_platform/CLAUDE.md:0-0
Timestamp: 2025-11-25T08:49:03.583Z
Learning: Applies to autogpt_platform/frontend/src/components/**/*.{ts,tsx} : Separate render logic from data/behavior in components

Applied to files:

  • autogpt_platform/frontend/src/app/(platform)/build/components/FlowEditor/nodes/CustomNode/components/NodeOutput/NodeOutput.tsx
🧬 Code graph analysis (3)
autogpt_platform/frontend/src/app/(platform)/build/components/helper.ts (1)
autogpt_platform/frontend/src/app/(platform)/build/components/FlowEditor/edges/CustomEdge.tsx (1)
  • CustomEdge (24-24)
autogpt_platform/frontend/src/app/(platform)/build/components/FlowEditor/nodes/CustomNode/components/NodeOutput/NodeOutput.tsx (6)
autogpt_platform/frontend/src/app/(platform)/build/components/FlowEditor/nodes/CustomNode/components/NodeOutput/useNodeOutput.tsx (1)
  • useNodeOutput (6-45)
autogpt_platform/frontend/src/app/(platform)/build/components/FlowEditor/nodes/CustomNode/components/NodeOutput/components/ContentRenderer.tsx (1)
  • ContentRenderer (20-51)
autogpt_platform/frontend/src/app/(platform)/build/components/FlowEditor/nodes/CustomNode/components/NodeOutput/components/NodeDataViewer/NodeDataViewer.tsx (1)
  • NodeDataViewer (32-168)
autogpt_platform/frontend/src/components/atoms/Button/Button.tsx (1)
  • Button (12-152)
autogpt_platform/frontend/src/lib/utils.ts (1)
  • beautifyString (147-156)
autogpt_platform/frontend/src/app/(platform)/build/components/FlowEditor/nodes/CustomNode/components/NodeOutput/components/ViewMoreData.tsx (1)
  • ViewMoreData (12-141)
autogpt_platform/frontend/src/app/(platform)/build/components/BuilderActions/components/RunInputDialog/RunInputDialog.tsx (1)
autogpt_platform/frontend/src/components/contextual/CredentialsInput/components/CredentialsGroupedView/CredentialsGroupedView.tsx (1)
  • CredentialsGroupedView (31-188)
⏰ 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). (4)
  • GitHub Check: test
  • GitHub Check: types
  • GitHub Check: Seer Code Review
  • GitHub Check: Check PR Status
πŸ”‡ Additional comments (17)
autogpt_platform/frontend/src/app/(platform)/build/components/FlowEditor/nodes/CustomNode/components/NodeOutput/NodeOutput.tsx (3)

1-14: LGTM!

Clean import structure using Phosphor Icons and design system components from atoms/molecules as per coding guidelines.


16-22: LGTM!

Good use of function declaration for the component and clean simplification of the hook return values by delegating expansion state to the Accordion component.


29-30: Verify: Accordion starts expanded by default.

The defaultValue="node-output" causes the accordion to render expanded on initial load. The previous implementation used manual isExpanded state. Please confirm this UX change (starting expanded) is intentional, as users may prefer the node output to be collapsed initially to reduce visual clutter.

If collapsed-by-default is desired, remove the defaultValue prop.

autogpt_platform/frontend/src/components/contextual/CredentialsInput/components/CredentialsGroupedView/helpers.ts (1)

2-2: Import path refactor looks good.
Keeps helper resolution consistent after the shared move.

autogpt_platform/frontend/src/app/(platform)/build/components/BuilderActions/components/RunInputDialog/useRunInputDialog.ts (1)

179-187: Return shape updates look good.
Exposing the new credential fields and handler keeps the hook aligned with the new grouped view.

autogpt_platform/frontend/src/app/(platform)/build/components/FlowEditor/Flow/useFlow.ts (1)

154-160: LGTM β€” sync timing is clearer now.
Running the hardcoded-values sync after nodes and links are ready should prevent early misses.

autogpt_platform/frontend/src/app/(platform)/build/components/FlowEditor/nodes/CustomNode/components/NodeOutput/useNodeOutput.tsx (1)

39-42: LGTM β€” streamlined return values fit the Accordion refactor.
No issues with the updated hook output shape.

autogpt_platform/frontend/src/app/(platform)/build/components/helper.ts (1)

64-78: Confirm the backend's expectations for source_name when receiving tools vs. the full tools_^_{node_id}_~_{field} format.

The concern about data loss is valid: customEdgeToLink writes edge.sourceHandle directly to source_name after cleanup, discarding the original tool-specific routing information. Backend code shows that tools_^_{node_id}_~_{field_name} format is used for dynamic field routing during execution.

When the graph is saved via getBackendLinks(), only the cleaned "tools" value (without the node ID and field routing info) is sent to the backend. Verify whether:

  1. The backend can reconstruct the full routing format from other link data (source_id, sink_id, sink_name), or
  2. The backend relies on the complete source_name format and this causes routing failures for tool-connected nodes

If the backend requires the full format, preserve the original source_name in CustomEdge.data as suggested in the original comment.

autogpt_platform/frontend/src/components/contextual/CredentialsInput/components/CredentialsGroupedView/CredentialsGroupedView.tsx (3)

23-29: Props interface is well-defined for controlled component pattern.

The component now properly accepts external state management props (inputCredentials, inputValues, onCredentialChange), enabling reuse across different contexts (RunInputDialog, ModalRunSection). This is a clean controlled component API.


117-141: User credentials section renders correctly.

The mapping over userCredentialFields and passing props to CredentialsInput is clean. The onCredentialChange callback is correctly wired.


144-185: System credentials Accordion section looks good.

The collapsible Accordion for system credentials with the missing indicator is a good UX pattern. Icon usage follows guidelines (Phosphor Icons).

autogpt_platform/frontend/src/app/(platform)/build/components/BuilderActions/components/RunInputDialog/RunInputDialog.tsx (3)

13-13: Import path updated to shared location.

The import correctly points to the new shared CredentialsGroupedView location, aligning with the refactoring goal of making this component reusable.


28-39: Hook API updated for credential field handling.

The destructured values (credentialFields, requiredCredentials, handleCredentialFieldChange) align with the new CredentialsGroupedView API. This cleanly separates state management (in the hook) from rendering (in the component).


77-83: CredentialsGroupedView props are correctly wired.

The prop mappings are appropriate:

  • credentialValues β†’ inputCredentials (consistent naming)
  • handleCredentialFieldChange β†’ onCredentialChange (callback pattern)
autogpt_platform/frontend/src/app/(platform)/library/agents/[id]/components/NewAgentLibraryView/components/modals/RunAgentModal/components/ModalRunSection/ModalRunSection.tsx (3)

2-2: Import updated to shared component location.

Correctly imports from the new centralized path, ensuring both RunInputDialog and ModalRunSection use the same component.


10-24: Context consumption is well-structured.

The component cleanly consumes modal context for credential state management. The separation between inputValues (form inputs) and inputCredentials (credential selections) is clear.


104-110: Verify setInputCredentialsValue callback signature matches expected type.

The onCredentialChange prop expects (key: string, value?: CredentialsMetaInput) => void, but setInputCredentialsValue from the context is typed as (key: string, value: any | undefined) => void. While TypeScript allows any to be assigned to CredentialsMetaInput, the context should use the specific CredentialsMetaInput type instead of any for proper type safety.

✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.

@Abhi1992002 Abhi1992002 changed the title feat(frontend): refactor credentials input with unified CredentialsGroupedView component refactor(frontend): refactor credentials input with unified CredentialsGroupedView component Jan 19, 2026
### Summary
This commit refactors the import paths for the `CredentialsGroupedView` component across multiple files to ensure consistency and correct referencing.

### Key Changes
- Updated import statements in `RunInputDialog.tsx` and `ModalRunSection.tsx` to point to the correct file path for `CredentialsGroupedView`.
- Removed the now obsolete index file for `CredentialsGroupedView`.

### Benefits
- **Improved Code Clarity**: Ensures that the component is imported from the correct location, reducing potential errors.
- **Streamlined Imports**: Consolidates the import structure for better maintainability.

### Testing
- Verified that the components render correctly with the updated import paths and that no functionality was broken by these changes.
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: 2

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)/build/components/helper.ts (1)

70-80: Restore the full tools_^_ pattern when converting edges back to backend format.

When sending edges to the backend via customEdgeToLink(), the source_name field loses the tools_^_{node_id}_~_{field} routing information because linkToCustomEdge() only stores the cleaned handle ID ("tools"). Multiple tool outputs on the same node cannot be distinguished, causing incorrect routing in backend execution.

The frontend must either:

  1. Store the full source name pattern separately in edge data during conversion, or
  2. Reconstruct the original pattern from edge metadata when converting back to backend format

This affects any workflow using Smart Decision Maker or other blocks that emit tool outputs.

πŸ€– Fix all issues with AI agents
In
`@autogpt_platform/frontend/src/app/`(platform)/build/components/FlowEditor/nodes/CustomNode/components/NodeOutput/NodeOutput.tsx:
- Around line 40-67: The copy buttons are icon-only and lack accessible labels;
update the Button elements that invoke handleCopy (e.g., the Button with
onClick={() => handleCopy("input", inputData)} and the analogous output Button
around lines 100-122) to include an aria-label prop like aria-label={`Copy
input`} or aria-label={`Copy output`} (update dynamically based on the pin
name), and ensure the label remains accurate when using copiedKey state (e.g.,
aria-label={`Copied input`} when copiedKey === "input") so screen readers
describe the action.

In
`@autogpt_platform/frontend/src/components/contextual/CredentialsInput/components/CredentialsGroupedView/CredentialsGroupedView.tsx`:
- Around line 8-11: The file imports deprecated types CredentialsMetaInput and
CredentialsType from "@/lib/autogpt-server-api/*"; replace those occurrences in
CredentialsGroupedView.tsx by importing the same type definitions from the
approved shared types module or the generated API types (e.g., shared/types or
api/generated/types), update the import statement(s) to point to the new module,
and remove the deprecated import; ensure you update any references inside the
CredentialsGroupedView component to use the newly imported symbols and run type
checks to confirm no remaining references to the deprecated module.
♻️ Duplicate comments (2)
autogpt_platform/frontend/src/app/(platform)/build/components/helper.ts (1)

64-68: Data loss in cleanupSourceName collapses all tool outputs to a single handle.

This issue was previously flagged. The function discards the unique tool identifier from source names like tools_^_tool_a_~_output1, mapping them all to "tools". This causes:

  1. Edge collisions when multiple tool outputs exist on the same node
  2. Round-trip data loss since customEdgeToLink (line 86) will convert the edge back with source_name: "tools" instead of the original value
πŸ› Proposed fix to preserve unique tool identifiers
-const isToolSourceName = (sourceName: string): boolean =>
-  sourceName.startsWith("tools_^_");
-
-const cleanupSourceName = (sourceName: string): string =>
-  isToolSourceName(sourceName) ? "tools" : sourceName;
+const TOOL_SOURCE_PREFIX = "tools_^_";
+
+const isToolSourceName = (sourceName: string): boolean =>
+  sourceName.startsWith(TOOL_SOURCE_PREFIX);
+
+/**
+ * Converts tool source names to a handle-compatible format while preserving uniqueness.
+ * e.g., "tools_^_tool_a_~_output1" -> "tools_tool_a_output1"
+ */
+const cleanupSourceName = (sourceName: string): string =>
+  isToolSourceName(sourceName)
+    ? sourceName.replace(TOOL_SOURCE_PREFIX, "tools_").replace(/_\^_|_~_/g, "_")
+    : sourceName;
autogpt_platform/frontend/src/components/contextual/CredentialsInput/components/CredentialsGroupedView/CredentialsGroupedView.tsx (1)

96-101: Validate savedCredential.type before casting.

Still casting a string to CredentialsType without a guard; please ensure only allowed literals pass through before calling onCredentialChange.

🧹 Nitpick comments (1)
autogpt_platform/frontend/src/app/(platform)/build/components/BuilderActions/components/RunInputDialog/useRunInputDialog.ts (1)

173-177: Consider documenting the difference between credential change handlers.

Both handleCredentialChange (replaces all credentials) and handleCredentialFieldChange (updates single field) are exported. If both are needed for different consumers, consider adding JSDoc comments to clarify their intended use cases.

πŸ“œ Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

πŸ“₯ Commits

Reviewing files that changed from the base of the PR and between cb964ee and e1ace3d.

πŸ“’ Files selected for processing (7)
  • autogpt_platform/frontend/src/app/(platform)/build/components/BuilderActions/components/RunInputDialog/RunInputDialog.tsx
  • autogpt_platform/frontend/src/app/(platform)/build/components/BuilderActions/components/RunInputDialog/useRunInputDialog.ts
  • autogpt_platform/frontend/src/app/(platform)/build/components/FlowEditor/Flow/useFlow.ts
  • autogpt_platform/frontend/src/app/(platform)/build/components/FlowEditor/nodes/CustomNode/components/NodeOutput/NodeOutput.tsx
  • autogpt_platform/frontend/src/app/(platform)/build/components/helper.ts
  • autogpt_platform/frontend/src/app/(platform)/library/agents/[id]/components/NewAgentLibraryView/components/modals/RunAgentModal/components/ModalRunSection/ModalRunSection.tsx
  • autogpt_platform/frontend/src/components/contextual/CredentialsInput/components/CredentialsGroupedView/CredentialsGroupedView.tsx
🧰 Additional context used
πŸ““ Path-based instructions (10)
autogpt_platform/frontend/**/*.{ts,tsx}

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

autogpt_platform/frontend/**/*.{ts,tsx}: Always run pnpm install before frontend development, then use pnpm dev to start development server on port 3000
For frontend code formatting and linting, always run pnpm format

If adding protected frontend routes, update frontend/lib/supabase/middleware.ts

autogpt_platform/frontend/**/*.{ts,tsx}: Use generated API hooks from @/app/api/__generated__/endpoints/ for data fetching in frontend
Use function declarations (not arrow functions) for components and handlers in frontend
Only use Phosphor Icons in frontend; never use other icon libraries
Never use src/components/__legacy__/* or deprecated BackendAPI in frontend

Files:

  • autogpt_platform/frontend/src/app/(platform)/build/components/BuilderActions/components/RunInputDialog/RunInputDialog.tsx
  • autogpt_platform/frontend/src/app/(platform)/build/components/BuilderActions/components/RunInputDialog/useRunInputDialog.ts
  • autogpt_platform/frontend/src/app/(platform)/build/components/helper.ts
  • autogpt_platform/frontend/src/components/contextual/CredentialsInput/components/CredentialsGroupedView/CredentialsGroupedView.tsx
  • autogpt_platform/frontend/src/app/(platform)/build/components/FlowEditor/Flow/useFlow.ts
  • autogpt_platform/frontend/src/app/(platform)/build/components/FlowEditor/nodes/CustomNode/components/NodeOutput/NodeOutput.tsx
  • autogpt_platform/frontend/src/app/(platform)/library/agents/[id]/components/NewAgentLibraryView/components/modals/RunAgentModal/components/ModalRunSection/ModalRunSection.tsx
autogpt_platform/frontend/**/*.{ts,tsx,json}

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

Use Node.js 21+ with pnpm package manager for frontend development

Files:

  • autogpt_platform/frontend/src/app/(platform)/build/components/BuilderActions/components/RunInputDialog/RunInputDialog.tsx
  • autogpt_platform/frontend/src/app/(platform)/build/components/BuilderActions/components/RunInputDialog/useRunInputDialog.ts
  • autogpt_platform/frontend/src/app/(platform)/build/components/helper.ts
  • autogpt_platform/frontend/src/components/contextual/CredentialsInput/components/CredentialsGroupedView/CredentialsGroupedView.tsx
  • autogpt_platform/frontend/src/app/(platform)/build/components/FlowEditor/Flow/useFlow.ts
  • autogpt_platform/frontend/src/app/(platform)/build/components/FlowEditor/nodes/CustomNode/components/NodeOutput/NodeOutput.tsx
  • autogpt_platform/frontend/src/app/(platform)/library/agents/[id]/components/NewAgentLibraryView/components/modals/RunAgentModal/components/ModalRunSection/ModalRunSection.tsx
autogpt_platform/frontend/src/**/*.{ts,tsx}

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

autogpt_platform/frontend/src/**/*.{ts,tsx}: Use generated API hooks from @/app/api/__generated__/endpoints/ (generated via Orval from backend OpenAPI spec). Pattern: use{Method}{Version}{OperationName} (e.g., useGetV2ListLibraryAgents). Regenerate with: pnpm generate:api. Never use deprecated BackendAPI or src/lib/autogpt-server-api/*
Use function declarations for components and handlers (not arrow functions). Only arrow functions for small inline lambdas (map, filter, etc.)
Use PascalCase for components, camelCase with use prefix for hooks
No barrel files or index.ts re-exports in frontend
For frontend render errors, use component. For mutation errors, display with toast notifications. For manual exceptions, use Sentry.captureException()
Default to client components (use client). Use server components only for SEO or extreme TTFB needs. Use React Query for server state via generated hooks. Co-locate UI state in components/hooks

Files:

  • autogpt_platform/frontend/src/app/(platform)/build/components/BuilderActions/components/RunInputDialog/RunInputDialog.tsx
  • autogpt_platform/frontend/src/app/(platform)/build/components/BuilderActions/components/RunInputDialog/useRunInputDialog.ts
  • autogpt_platform/frontend/src/app/(platform)/build/components/helper.ts
  • autogpt_platform/frontend/src/components/contextual/CredentialsInput/components/CredentialsGroupedView/CredentialsGroupedView.tsx
  • autogpt_platform/frontend/src/app/(platform)/build/components/FlowEditor/Flow/useFlow.ts
  • autogpt_platform/frontend/src/app/(platform)/build/components/FlowEditor/nodes/CustomNode/components/NodeOutput/NodeOutput.tsx
  • autogpt_platform/frontend/src/app/(platform)/library/agents/[id]/components/NewAgentLibraryView/components/modals/RunAgentModal/components/ModalRunSection/ModalRunSection.tsx
autogpt_platform/frontend/**/*.{js,ts,jsx,tsx}

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

Format frontend code using pnpm format

Files:

  • autogpt_platform/frontend/src/app/(platform)/build/components/BuilderActions/components/RunInputDialog/RunInputDialog.tsx
  • autogpt_platform/frontend/src/app/(platform)/build/components/BuilderActions/components/RunInputDialog/useRunInputDialog.ts
  • autogpt_platform/frontend/src/app/(platform)/build/components/helper.ts
  • autogpt_platform/frontend/src/components/contextual/CredentialsInput/components/CredentialsGroupedView/CredentialsGroupedView.tsx
  • autogpt_platform/frontend/src/app/(platform)/build/components/FlowEditor/Flow/useFlow.ts
  • autogpt_platform/frontend/src/app/(platform)/build/components/FlowEditor/nodes/CustomNode/components/NodeOutput/NodeOutput.tsx
  • autogpt_platform/frontend/src/app/(platform)/library/agents/[id]/components/NewAgentLibraryView/components/modals/RunAgentModal/components/ModalRunSection/ModalRunSection.tsx
autogpt_platform/frontend/**

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

autogpt_platform/frontend/**: Install frontend dependencies using pnpm i instead of npm
Generate API client from OpenAPI spec using pnpm generate:api
Regenerate API client hooks using pnpm generate:api when OpenAPI spec changes

Files:

  • autogpt_platform/frontend/src/app/(platform)/build/components/BuilderActions/components/RunInputDialog/RunInputDialog.tsx
  • autogpt_platform/frontend/src/app/(platform)/build/components/BuilderActions/components/RunInputDialog/useRunInputDialog.ts
  • autogpt_platform/frontend/src/app/(platform)/build/components/helper.ts
  • autogpt_platform/frontend/src/components/contextual/CredentialsInput/components/CredentialsGroupedView/CredentialsGroupedView.tsx
  • autogpt_platform/frontend/src/app/(platform)/build/components/FlowEditor/Flow/useFlow.ts
  • autogpt_platform/frontend/src/app/(platform)/build/components/FlowEditor/nodes/CustomNode/components/NodeOutput/NodeOutput.tsx
  • autogpt_platform/frontend/src/app/(platform)/library/agents/[id]/components/NewAgentLibraryView/components/modals/RunAgentModal/components/ModalRunSection/ModalRunSection.tsx
autogpt_platform/frontend/src/**/*.tsx

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

Use design system components from src/components/ (atoms, molecules, organisms) in frontend

Files:

  • autogpt_platform/frontend/src/app/(platform)/build/components/BuilderActions/components/RunInputDialog/RunInputDialog.tsx
  • autogpt_platform/frontend/src/components/contextual/CredentialsInput/components/CredentialsGroupedView/CredentialsGroupedView.tsx
  • autogpt_platform/frontend/src/app/(platform)/build/components/FlowEditor/nodes/CustomNode/components/NodeOutput/NodeOutput.tsx
  • autogpt_platform/frontend/src/app/(platform)/library/agents/[id]/components/NewAgentLibraryView/components/modals/RunAgentModal/components/ModalRunSection/ModalRunSection.tsx
autogpt_platform/frontend/src/app/**/*.tsx

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

Create frontend pages in src/app/(platform)/feature-name/page.tsx with corresponding usePageName.ts hook and local components/ subfolder

Files:

  • autogpt_platform/frontend/src/app/(platform)/build/components/BuilderActions/components/RunInputDialog/RunInputDialog.tsx
  • autogpt_platform/frontend/src/app/(platform)/build/components/FlowEditor/nodes/CustomNode/components/NodeOutput/NodeOutput.tsx
  • autogpt_platform/frontend/src/app/(platform)/library/agents/[id]/components/NewAgentLibraryView/components/modals/RunAgentModal/components/ModalRunSection/ModalRunSection.tsx
autogpt_platform/frontend/**/*.{ts,tsx,css}

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

Use only Tailwind CSS for styling in frontend, with design tokens and Phosphor Icons

Files:

  • autogpt_platform/frontend/src/app/(platform)/build/components/BuilderActions/components/RunInputDialog/RunInputDialog.tsx
  • autogpt_platform/frontend/src/app/(platform)/build/components/BuilderActions/components/RunInputDialog/useRunInputDialog.ts
  • autogpt_platform/frontend/src/app/(platform)/build/components/helper.ts
  • autogpt_platform/frontend/src/components/contextual/CredentialsInput/components/CredentialsGroupedView/CredentialsGroupedView.tsx
  • autogpt_platform/frontend/src/app/(platform)/build/components/FlowEditor/Flow/useFlow.ts
  • autogpt_platform/frontend/src/app/(platform)/build/components/FlowEditor/nodes/CustomNode/components/NodeOutput/NodeOutput.tsx
  • autogpt_platform/frontend/src/app/(platform)/library/agents/[id]/components/NewAgentLibraryView/components/modals/RunAgentModal/components/ModalRunSection/ModalRunSection.tsx
autogpt_platform/frontend/src/components/**/*.tsx

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

autogpt_platform/frontend/src/components/**/*.tsx: Separate frontend component render logic from data/behavior. Structure: ComponentName/ComponentName.tsx + useComponentName.ts + helpers.ts. Small components (3-4 lines) can be inline. Render-only components can be direct files without folders
Use Tailwind CSS utilities only for styling in frontend. Use design system components from src/components/ (atoms, molecules, organisms). Never use src/components/legacy/*
Only use Phosphor Icons (@phosphor-icons/react) for icon components in frontend
Prefer design tokens over hardcoded values in frontend styling

Files:

  • autogpt_platform/frontend/src/components/contextual/CredentialsInput/components/CredentialsGroupedView/CredentialsGroupedView.tsx
autogpt_platform/frontend/src/components/**/*.{ts,tsx}

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

autogpt_platform/frontend/src/components/**/*.{ts,tsx}: Separate render logic from data/behavior in components
Structure frontend components as ComponentName/ComponentName.tsx plus useComponentName.ts hook plus helpers.ts file

Files:

  • autogpt_platform/frontend/src/components/contextual/CredentialsInput/components/CredentialsGroupedView/CredentialsGroupedView.tsx
🧠 Learnings (9)
πŸ“š Learning: 2025-11-25T08:49:03.583Z
Learnt from: CR
Repo: Significant-Gravitas/AutoGPT PR: 0
File: autogpt_platform/CLAUDE.md:0-0
Timestamp: 2025-11-25T08:49:03.583Z
Learning: Applies to autogpt_platform/frontend/src/components/**/*.{ts,tsx} : Structure frontend components as `ComponentName/ComponentName.tsx` plus `useComponentName.ts` hook plus `helpers.ts` file

Applied to files:

  • autogpt_platform/frontend/src/app/(platform)/build/components/helper.ts
πŸ“š Learning: 2025-11-25T08:48:33.246Z
Learnt from: CR
Repo: Significant-Gravitas/AutoGPT PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-25T08:48:33.246Z
Learning: Applies to autogpt_platform/frontend/src/**/*.{ts,tsx} : Use PascalCase for components, camelCase with use prefix for hooks

Applied to files:

  • autogpt_platform/frontend/src/app/(platform)/build/components/helper.ts
πŸ“š Learning: 2025-11-25T08:49:03.583Z
Learnt from: CR
Repo: Significant-Gravitas/AutoGPT PR: 0
File: autogpt_platform/CLAUDE.md:0-0
Timestamp: 2025-11-25T08:49:03.583Z
Learning: Applies to autogpt_platform/frontend/src/app/**/*.tsx : Create frontend pages in `src/app/(platform)/feature-name/page.tsx` with corresponding `usePageName.ts` hook and local `components/` subfolder

Applied to files:

  • autogpt_platform/frontend/src/app/(platform)/build/components/helper.ts
πŸ“š Learning: 2025-11-25T08:48:33.246Z
Learnt from: CR
Repo: Significant-Gravitas/AutoGPT PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-25T08:48:33.246Z
Learning: Applies to autogpt_platform/frontend/src/**/*.{ts,tsx} : Use function declarations for components and handlers (not arrow functions). Only arrow functions for small inline lambdas (map, filter, etc.)

Applied to files:

  • autogpt_platform/frontend/src/app/(platform)/build/components/helper.ts
πŸ“š Learning: 2025-11-25T08:48:33.246Z
Learnt from: CR
Repo: Significant-Gravitas/AutoGPT PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-25T08:48:33.246Z
Learning: Applies to autogpt_platform/frontend/src/components/**/*.tsx : Separate frontend component render logic from data/behavior. Structure: ComponentName/ComponentName.tsx + useComponentName.ts + helpers.ts. Small components (3-4 lines) can be inline. Render-only components can be direct files without folders

Applied to files:

  • autogpt_platform/frontend/src/app/(platform)/build/components/helper.ts
  • autogpt_platform/frontend/src/app/(platform)/build/components/FlowEditor/nodes/CustomNode/components/NodeOutput/NodeOutput.tsx
πŸ“š Learning: 2025-11-25T08:49:03.583Z
Learnt from: CR
Repo: Significant-Gravitas/AutoGPT PR: 0
File: autogpt_platform/CLAUDE.md:0-0
Timestamp: 2025-11-25T08:49:03.583Z
Learning: Applies to autogpt_platform/frontend/**/*.{ts,tsx} : Use function declarations (not arrow functions) for components and handlers in frontend

Applied to files:

  • autogpt_platform/frontend/src/app/(platform)/build/components/helper.ts
πŸ“š Learning: 2025-11-25T08:49:03.583Z
Learnt from: CR
Repo: Significant-Gravitas/AutoGPT PR: 0
File: autogpt_platform/CLAUDE.md:0-0
Timestamp: 2025-11-25T08:49:03.583Z
Learning: Frontend workflow builder uses visual graph editor with xyflow/react

Applied to files:

  • autogpt_platform/frontend/src/app/(platform)/build/components/FlowEditor/Flow/useFlow.ts
πŸ“š Learning: 2025-11-25T08:49:03.583Z
Learnt from: CR
Repo: Significant-Gravitas/AutoGPT PR: 0
File: autogpt_platform/CLAUDE.md:0-0
Timestamp: 2025-11-25T08:49:03.583Z
Learning: Applies to autogpt_platform/frontend/src/**/*.tsx : Use design system components from `src/components/` (atoms, molecules, organisms) in frontend

Applied to files:

  • autogpt_platform/frontend/src/app/(platform)/build/components/FlowEditor/nodes/CustomNode/components/NodeOutput/NodeOutput.tsx
πŸ“š Learning: 2025-11-25T08:49:03.583Z
Learnt from: CR
Repo: Significant-Gravitas/AutoGPT PR: 0
File: autogpt_platform/CLAUDE.md:0-0
Timestamp: 2025-11-25T08:49:03.583Z
Learning: Applies to autogpt_platform/frontend/src/components/**/*.{ts,tsx} : Separate render logic from data/behavior in components

Applied to files:

  • autogpt_platform/frontend/src/app/(platform)/build/components/FlowEditor/nodes/CustomNode/components/NodeOutput/NodeOutput.tsx
🧬 Code graph analysis (4)
autogpt_platform/frontend/src/app/(platform)/build/components/BuilderActions/components/RunInputDialog/RunInputDialog.tsx (1)
autogpt_platform/frontend/src/components/contextual/CredentialsInput/components/CredentialsGroupedView/CredentialsGroupedView.tsx (1)
  • CredentialsGroupedView (31-189)
autogpt_platform/frontend/src/app/(platform)/build/components/helper.ts (1)
autogpt_platform/frontend/src/app/(platform)/build/components/FlowEditor/edges/CustomEdge.tsx (1)
  • CustomEdge (24-24)
autogpt_platform/frontend/src/components/contextual/CredentialsInput/components/CredentialsGroupedView/CredentialsGroupedView.tsx (2)
autogpt_platform/frontend/src/components/contextual/CredentialsInput/components/CredentialsGroupedView/helpers.ts (1)
  • CredentialField (4-4)
autogpt_platform/frontend/src/lib/autogpt-server-api/types.ts (1)
  • CredentialsType (205-209)
autogpt_platform/frontend/src/app/(platform)/build/components/FlowEditor/nodes/CustomNode/components/NodeOutput/NodeOutput.tsx (6)
autogpt_platform/frontend/src/app/(platform)/build/components/FlowEditor/nodes/CustomNode/components/NodeOutput/useNodeOutput.tsx (1)
  • useNodeOutput (6-45)
autogpt_platform/frontend/src/components/atoms/Text/Text.tsx (1)
  • Text (15-35)
autogpt_platform/frontend/src/app/(platform)/build/components/FlowEditor/nodes/CustomNode/components/NodeOutput/components/ContentRenderer.tsx (1)
  • ContentRenderer (20-51)
autogpt_platform/frontend/src/app/(platform)/build/components/FlowEditor/nodes/CustomNode/components/NodeOutput/components/NodeDataViewer/NodeDataViewer.tsx (1)
  • NodeDataViewer (32-168)
autogpt_platform/frontend/src/lib/utils.ts (1)
  • beautifyString (147-156)
autogpt_platform/frontend/src/app/(platform)/build/components/FlowEditor/nodes/CustomNode/components/NodeOutput/components/ViewMoreData.tsx (1)
  • ViewMoreData (12-141)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)
  • GitHub Check: types
  • GitHub Check: test
  • GitHub Check: chromatic
  • GitHub Check: Seer Code Review
  • GitHub Check: Check PR Status
  • GitHub Check: Analyze (python)
πŸ”‡ Additional comments (13)
autogpt_platform/frontend/src/app/(platform)/build/components/FlowEditor/Flow/useFlow.ts (1)

153-159: LGTM! Clean separation of sync logic into a dedicated effect.

Moving the hardcoded values synchronization into its own effect improves readability and ensures proper timingβ€”running after both nodes and links are loaded. The pattern is consistent with other effects in this file (e.g., line 201).

One minor observation: if performance becomes a concern with large graphs, consider tracking which node IDs actually changed rather than syncing all nodes on every customNodes reference change.

autogpt_platform/frontend/src/app/(platform)/build/components/BuilderActions/components/RunInputDialog/useRunInputDialog.ts (5)

10-14: LGTM!

The new imports for useCallback and CredentialField type are appropriate for the added functionality.


128-131: LGTM!

The requiredCredentials memo correctly creates a Set for efficient O(1) lookups when checking if a credential field is required.


133-147: LGTM!

The handleCredentialFieldChange callback is well-implemented:

  • Uses functional state update to avoid stale closures
  • Properly handles both setting and clearing credential values
  • Empty dependency array is correct since setCredentialValues is stable

179-191: LGTM!

The return statement properly exposes both the new granular handleCredentialFieldChange callback and the existing handleCredentialChange for full object updates, providing flexibility for different consumer use cases.


122-126: The implementation is correctly typed and type-safe. CredentialField is defined as [string, any], which is fully compatible with the [string, T][] tuple array returned by Object.entries(). The early return of [] for missing schema properties is also type-safe. No changes needed.

autogpt_platform/frontend/src/components/contextual/CredentialsInput/components/CredentialsGroupedView/CredentialsGroupedView.tsx (1)

23-37: Props-based credential wiring looks good.

Externalizing inputCredentials/inputValues/onCredentialChange improves reuse and keeps state ownership clear.

autogpt_platform/frontend/src/app/(platform)/build/components/BuilderActions/components/RunInputDialog/RunInputDialog.tsx (1)

69-83: Nice consolidation to the shared CredentialsGroupedView.

The new guard (credentialFields.length > 0) and prop wiring make the credentials section safer and more reusable.

autogpt_platform/frontend/src/app/(platform)/library/agents/[id]/components/NewAgentLibraryView/components/modals/RunAgentModal/components/ModalRunSection/ModalRunSection.tsx (3)

2-2: LGTM!

The import path correctly references the centralized CredentialsGroupedView component location, following the no-barrel-files guideline with a direct import.


22-24: LGTM!

The new context values inputCredentials and setInputCredentialsValue are properly destructured, enabling external credential state management consistent with the refactored CredentialsGroupedView API.


104-110: Props correctly match the CredentialsGroupedView component signature.

All five props (credentialFields, requiredCredentials, inputCredentials, inputValues, onCredentialChange) align with the component's interface, and the callback is properly wired to setInputCredentialsValue.

autogpt_platform/frontend/src/app/(platform)/build/components/FlowEditor/nodes/CustomNode/components/NodeOutput/NodeOutput.tsx (2)

3-39: Accordion-based Node Output layout looks cohesive.

The Accordion integration and the hook-driven data wiring read clean and consistent with the new structure.


71-99: Output pin rendering + β€œView more” behavior is intact.

Limiting initial pins while delegating overflow to ViewMoreData keeps the panel compact without losing access to full output.

Also applies to: 129-134

✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.

@Abhi1992002 Abhi1992002 enabled auto-merge January 19, 2026 08:02
@Abhi1992002 Abhi1992002 added this pull request to the merge queue Jan 20, 2026
@github-project-automation github-project-automation bot moved this from πŸ†• Needs initial review to πŸ‘πŸΌ Mergeable in AutoGPT development kanban Jan 20, 2026
Merged via the queue into dev with commit 7756e2d Jan 20, 2026
28 checks passed
@Abhi1992002 Abhi1992002 deleted the abhi/replace-new-builder-credential-form-with-new-one branch January 20, 2026 12:43
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/l

Projects

Status: βœ… Done
Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants