Skip to content

Conversation

@Abhi1992002
Copy link
Contributor

@Abhi1992002 Abhi1992002 commented Dec 29, 2025

Fixes #11686

Changes 🏗️

This PR upgrades the React JSON Schema Form (RJSF) library from v5 to v6 and introduces a complete rewrite of the form rendering system with improved architecture and new features.

Core Library Updates

  • Upgraded @rjsf/core from 5.24.13 to 6.1.2
  • Upgraded @rjsf/utils from 5.24.13 to 6.1.2
  • Added @radix-ui/react-slider 1.3.6 for new slider components

New Form Renderer Architecture

  • Base Templates: Created modular base templates for arrays, objects, and standard fields
  • AnyOf Support: Implemented AnyOfField component with type selector for union types
  • Array Fields: New ArrayFieldTemplate, ArrayFieldItemTemplate, and ArraySchemaField with context provider
  • Object Fields: Enhanced ObjectFieldTemplate with better support for additional properties via WrapIfAdditionalTemplate
  • Field Templates: New TitleField, DescriptionField, and FieldTemplate with improved styling
  • Custom Widgets: Implemented TextWidget, SelectWidget, CheckboxWidget, FileWidget, DateWidget, TimeWidget, and DateTimeWidget
  • Button Components: Custom AddButton, RemoveButton, and CopyButton components

Node Handle System Refactor

  • Split NodeHandle into InputNodeHandle and OutputNodeHandle for better separation of concerns
  • Refactored handle ID generation logic in helpers.ts with new generateHandleIdFromTitleId function
  • Improved handle connection detection using edge store
  • Added support for nested output handles (objects within outputs)

Edge Store Improvements

  • Added removeEdgesByHandlePrefix method for bulk edge removal
  • Improved isInputConnected with handle ID cleanup
  • Optimized updateEdgeBeads to only update when changes occur
  • Better edge management with applyEdgeChanges

Node Store Enhancements

  • Added syncHardcodedValuesWithHandleIds method to maintain consistency between form data and handle connections
  • Better handling of additional properties in objects
  • Improved path parsing with parseHandleIdToPath and ensurePathExists

Draft Recovery Improvements

  • Added diff calculation with calculateDraftDiff to show what changed
  • New formatDiffSummary to display changes in a readable format (e.g., "+2/-1 blocks, +3 connections")
  • Better visual feedback for draft changes

UI/UX Enhancements

  • Fixed node container width to 350px for consistency
  • Improved field error display with inline error messages
  • Better spacing and styling throughout forms
  • Enhanced tooltip support for field descriptions
  • Improved array item controls with better button placement
  • Context-aware field sizing (small/large)

Output Handler Updates

  • Recursive rendering of nested output properties
  • Better type display with color coding
  • Improved handle connections for complex output schemas

Migration & Cleanup

  • Updated RunInputDialog to use new FormRenderer
  • Updated FormCreator to use new FormRenderer
  • Moved OAuth callback types to separate file
  • Updated import paths from input-renderer to InputRenderer
  • Removed unused console.log statements
  • Added type="button" to buttons to prevent form submission

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:
    • Test form rendering with various field types (text, number, boolean, arrays, objects)
    • Test anyOf field type selector functionality
    • Test array item addition/removal
    • Test nested object fields with additional properties
    • Test input/output node handle connections
    • Test draft recovery with diff display
    • Verify backward compatibility with existing agents
    • Test field validation and error display
    • Verify handle ID generation for complex schemas

Summary by CodeRabbit

  • New Features

    • Improved form field rendering with enhanced support for optional types, arrays, and nested objects.
    • Enhanced draft recovery display showing detailed difference tracking (added, removed, modified items).
    • Better OAuth popup callback handling with structured message types.
  • Bug Fixes

    • Improved node handle ID normalization and synchronization.
    • Enhanced edge management for complex field changes.
    • Fixed styling consistency across form components.
  • Dependencies

    • Updated React JSON Schema Form library to version 6.1.2.
    • Added Radix UI slider component support.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 29, 2025

Walkthrough

This PR reorganizes the InputRenderer component architecture, extracting and refactoring form rendering logic from @rjsf/core into local components. It introduces new base registry components for arrays, objects, fields, and widgets; refactors OAuth callback handling; enhances draft recovery with diff tracking; and refactors flow editor handle ID generation and edge management.

Changes

Cohort / File(s) Summary
Package & Build Dependencies
package.json
Upgraded @rjsf/core and @rjsf/utils from 5.24.13 to 6.1.2; added @radix-ui/react-slider 1.3.6
OAuth Callback Handling
src/app/(platform)/auth/integrations/oauth_callback/route.ts, types.ts
Introduced OAuthPopupResultMessage type as discriminated union for OAuth popup results; updated import path to use local types module
Draft Recovery & Diff Tracking
src/app/(platform)/build/components/DraftRecoveryDialog/DraftRecoveryPopup.tsx, useDraftRecoveryPopup.tsx
src/app/(platform)/build/components/FlowEditor/Flow/useDraftManager.ts
src/lib/dexie/draft-utils.ts
Added DraftDiff interface and calculateDraftDiff function; threaded diff through draft recovery state; added formatting helper for diff display
Flow Editor Handle & Edge Refactoring
src/app/(platform)/build/components/FlowEditor/handlers/NodeHandle.tsx, helpers.ts
src/app/(platform)/build/components/FlowEditor/edges/useCustomEdge.ts
src/app/(platform)/build/stores/edgeStore.ts, nodeStore.ts
Split monolithic NodeHandle into InputNodeHandle and OutputNodeHandle; replaced multi-type ID handling with title-based approach; consolidated edge change logic; added handle prefix removal and hardcoded value synchronization
Node Rendering & Styling
src/app/(platform)/build/components/FlowEditor/nodes/CustomNode/\*
src/app/(platform)/build/components/FlowEditor/nodes/OutputHandler.tsx, helpers.ts
Updated import paths (casing fixes); refactored node title preprocessing and header styling; refactored output handler with recursive property rendering; added hexColor field to type display info; modified container widths and border colors
Input Renderer Core Reorganization
src/components/renderers/InputRenderer/\*
Created new local registry structure replacing @rjsf imports; established base/, custom/, and registry/ subdirectories with generateBaseFields/Templates/Widgets factories; added constants for schema flags and ID prefixes; introduced ExtendedFormContextType and helper utilities
Base Registry Components
src/components/renderers/InputRenderer/base/array/\*
src/components/renderers/InputRenderer/base/object/\*
src/components/renderers/InputRenderer/base/standard/\*
New array templates (ArrayFieldTemplate, ArrayFieldItemTemplate), object templates (ObjectFieldTemplate, WrapIfAdditionalTemplate), field/title/description/error templates, and button components; added context provider for array item tracking
Base Widget Components
src/components/renderers/InputRenderer/base/standard/widgets/\*
Extracted and renamed widget components (TextWidget, SelectWidget, CheckboxWidget, DateWidget, TimeWidget, DateTimeWidget, FileWidget); updated SelectWidget to accept className; updated TextWidget import paths
AnyOf Field Handling
src/components/renderers/InputRenderer/base/anyof/\*
New AnyOfField component with type selector, AnyOfFieldTitle component, useAnyOfField hook, and helpers for optional type detection and type index selection
Custom Field Registry
src/components/renderers/InputRenderer/custom/\*
New custom field registry with CredentialsField and GoogleDrivePickerField; moved credential provider helpers to custom/CredentialField/helpers
Form Rendering Migration
src/components/renderers/InputRenderer/FormRenderer.tsx
src/components/renderers/InputRenderer/registry/Form.tsx
Replaced external Form import with local registry-based Form; updated props to use ExtendedFormContextType; added idPrefix="agpt" and idSeparator="_%_"; removed legacy fields/templates/widgets wiring
Schema & Helper Utilities
src/components/renderers/InputRenderer/helpers.ts, utils/\*
New UI schema updating, handle ID cleaning, path parsing, and path existence utilities; added schema validation helpers and Tailwind class composition utility
Import Path Updates
src/app/(platform)/\*, src/components/renderers/\*
Updated multiple import paths to reflect InputRenderer reorganization (casing fixes and module restructuring)
Removed Legacy Code
src/components/renderers/input-renderer/\*
Removed old credential modals (APIKeyCredentialModal, OAuthCredentialModal, PasswordCredentialModal, HostScopedCredentialsModal), old field implementations (AnyOfField, CredentialsField, ObjectField), old templates and widgets registries, and architecture documentation
Button Type Attributes
src/app/(platform)/\*, src/components/contextual/GoogleDrivePicker.tsx
Added explicit type="button" attributes to prevent form submission behavior

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Possibly related PRs

Suggested labels

Review effort 4/5

Suggested reviewers

  • kcze
  • Swiftyos

Poem

🐰 A rabbit hops through forms with glee,
New registries built, now clean and free!
Arrays and objects, fields reborn—
The renderer awakens, shiny and sworn.
With diffs that track and handles that shine,
The builder's refactor? Quite divine!

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 7.69% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the main change: upgrading RJSF to v6 and implementing a new FormRenderer system. This accurately reflects the primary scope of the PR.
Linked Issues check ✅ Passed The PR addresses issue #11686 regarding optional input handling in Builder. Changes to the anyOf field handling, new field templates, and array/object field templates support proper required/optional semantics and improved UI for optional inputs.
Out of Scope Changes check ✅ Passed The PR focuses on RJSF v6 upgrade and FormRenderer rewrite. Minor changes include button type attributes, import path corrections, styling tweaks, and debug log removal—all directly supporting the core migration and feature implementation. No unrelated features detected.
✨ 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 Dec 29, 2025
@AutoGPT-Agent
Copy link

Thank you for your contribution! Your PR appears to implement RJSF v6 theme features and upgrade the form rendering capabilities. However, there are a few issues that need to be addressed before this can be merged:

Required Changes

  1. PR Title: Please update the title to follow conventional commit format. For example: feat(frontend): Implement RJSF v6 theme features

  2. PR Description:

    • Fill out the "Changes" section with a clear description of what changes you've made
    • List the key components you've modified/created
    • Explain the purpose of upgrading RJSF from v5 to v6 and what benefits it brings
  3. Checklist: Please complete the checklist in the PR description:

    • Check that you've clearly listed your changes
    • Create and document a test plan for these changes
    • Execute the test plan and check it off
  4. Test Plan: Since this is a UI component change, your test plan should include:

    • Testing different form types with the new renderer
    • Verifying that form validation works as expected
    • Checking that the new node handles work correctly in the flow editor
    • Ensuring backward compatibility with existing forms

Your changes look promising - implementing the RJSF v6 features with custom array handling and improved UI. Once the above items are addressed, this PR will be ready for another review.

@Abhi1992002 Abhi1992002 changed the title Try rfjs theme features Upgrade RJSF to v6 and implement new FormRenderer2 system Dec 29, 2025
@AutoGPT-Agent
Copy link

Thank you for your work on upgrading RJSF and implementing the new FormRenderer2 system! Before we can merge this PR, there are several items that need to be addressed:

PR Format Issues

  1. Title format: Please update your PR title to follow the conventional commit format with type and scope. For example: feat(platform/frontend): Upgrade RJSF to v6 and implement new FormRenderer2 system

  2. Description is incomplete: Please fill out the "Changes" section in your PR description to concisely describe all of the changes made in this pull request.

  3. Checklist not completed: The checklist in your PR description must be completely filled out. Please check off all applicable items, particularly:

    • The changes description
    • Confirmation that you've made a test plan
    • Details about how you've tested your changes

Missing Test Plan

Please provide a specific test plan that explains how you've verified these changes work correctly. Since this is a significant frontend change to form rendering, your test plan should cover different form scenarios to ensure backward compatibility and proper functionality.

Once you've addressed these items, we'll be happy to review your PR again. The code changes themselves look reasonable for the scope, but we need the proper documentation to proceed with the review process.

@AutoGPT-Agent
Copy link

Thanks for submitting this PR with the comprehensive library upgrade and new form rendering system! Here's some feedback to get this ready for merging:

Title Format

The PR title needs to follow conventional commit format. Please update it to include a type and scope, for example:

feat(platform/frontend): Upgrade RJSF to v6 and implement new FormRenderer2 system

Checklist Completion

You've provided a good test plan with specific items, but they're not checked off yet. Please either:

  • Check off all the items in your test plan to indicate you've completed the testing, or
  • Add notes about which test items have been completed and which are still pending

The implementation looks solid - I can see you've created a comprehensive new form rendering system with support for anyOf schemas, array fields, and improved node handles. Once the above items are addressed, this should be ready for review and merging.

@AutoGPT-Agent
Copy link

Thank you for this comprehensive PR to upgrade RJSF and implement the new form rendering system. The changes look well-structured and the new form renderer implementation seems thorough. However, there are a couple of items that need to be addressed before this can be merged:

  1. Test Plan Completion: You've outlined a good test plan with specific test cases (form rendering with various field types, anyOf field selector functionality, etc.), but the checklist indicates these tests have not been executed yet. Please complete the testing according to your plan and check off those items.

  2. PR Title Format: The PR title needs to follow our conventional commit format. Please update it to include the type and scope, for example:

    feat(platform/frontend): Upgrade RJSF to v6 and implement new FormRenderer2 system
    

The changes themselves look solid and well-organized. I particularly like how you've:

  • Created a modular approach with the new input-renderer-2 directory
  • Split the NodeHandle into InputNodeHandle and OutputNodeHandle for better separation
  • Added support for anyOf schemas with type selector
  • Enhanced array field handling with the new context system

Once the testing is completed and the title is updated, this PR should be ready for another review.

@AutoGPT-Agent
Copy link

Thank you for this comprehensive PR upgrading RJSF to v6 and implementing the new FormRenderer2 system. I appreciate the detailed breakdown of changes in your description.

Before we can merge this PR, there are a couple of items that need to be addressed:

  1. Checklist Completion: You've provided a test plan but haven't checked off the items. Please mark the test items in your checklist as completed once you've verified them.

  2. PR Title Format: The PR title needs to follow our conventional commit format with a type and scope. Please update the title to something like: feat(platform/frontend): Upgrade RJSF to v6 and implement new FormRenderer2 system

The changes themselves look well-structured - I like how you've organized the new form rendering system with clear separation of components and concerns. The migration from NodeHandle to separate InputNodeHandle and OutputNodeHandle components is a good architectural improvement.

Once you've addressed the checklist and title format issues, we should be good to proceed with this PR.

@AutoGPT-Agent
Copy link

Thank you for your detailed PR with a clear description of the changes involved in upgrading RJSF to v6 and implementing the new FormRenderer2 system.

Before this PR can be merged, there are two issues that need to be addressed:

  1. Incomplete Checklist: The test plan items in the PR description checklist are not checked off, indicating that you haven't completed testing according to your plan. Please conduct the tests as outlined and check off each test case once verified.

  2. PR Title Format: The title needs to follow our conventional commit format with a type and scope. Please update it to something like:

    feat(platform/frontend): Upgrade RJSF to v6 and implement new FormRenderer2 system
    

The code changes themselves look well-structured and align with what you've described in the PR description. The organization of the new form renderer components with separation of concerns (array fields, error handling, etc.) is good.

Once you've completed the test plan and updated the PR title, this should be ready for review again.

@AutoGPT-Agent
Copy link

Thank you for your detailed PR! You've put significant work into upgrading RJSF and implementing a new form rendering system. Here are some issues that need to be addressed before this can be merged:

  1. PR Title Format: Your title needs to follow the conventional commit format with a type and scope. Please update it to something like:

    feat(platform/frontend): Upgrade RJSF to v6 and implement new FormRenderer2 system
    
  2. Incomplete Checklist: You've created a good test plan, but the checkboxes aren't marked as completed, indicating you haven't fully tested the changes. Please complete the testing according to your plan and check off those boxes.

Your changes look technically sound, with a clean implementation of the new form renderer system and proper dependency management. The code is well-organized with a modular approach to form components. Once you address these two issues, this PR should be ready for review again.

@AutoGPT-Agent
Copy link

Thank you for your PR to upgrade RJSF to v6 and implement the new FormRenderer2 system. Here's what needs to be addressed before this can be merged:

Required Changes

  1. Complete the Checklist: Please make sure to complete your test plan checklist by checking off all the test items. The test plan itself looks good, but it needs to be marked as completed to confirm you've verified all functionality works correctly.

  2. PR Title Format: Please update your PR title to follow our conventional commit format. It should include both the type and scope, for example:

    feat(frontend): Upgrade RJSF to v6 and implement new FormRenderer2 system
    

Additional Notes

The implementation itself looks comprehensive and well-structured. I particularly like how you've:

  • Created a modular form rendering system with separate components for different field types
  • Improved the handling of arrays and anyOf schemas
  • Split the NodeHandle into separate Input and Output components for better separation of concerns

Once you've addressed the checklist and title format, this PR should be ready for merging.

@AutoGPT-Agent
Copy link

Thank you for the detailed PR to upgrade RJSF to v6 and implement the new FormRenderer2 system. The implementation looks well-structured with modular components and clean separation of concerns.

However, there are a couple of issues that need to be addressed before this can be merged:

  1. Checklist Completion: Please complete the checklist in the PR description. You've only checked off the first item, but all items in the checklist need to be completed. The test plan you've outlined looks good - please execute those tests and check them off when completed.

  2. PR Title Format: The title needs to follow our conventional commit format. Please update it to include the type and scope, such as:

    feat(frontend): Upgrade RJSF to v6 and implement new FormRenderer2 system
    

Also, a few observations about the code:

  • I noticed some debugging console.log statements in the InputNodeHandle component. These should be removed before merging.
  • The node width has been fixed to 350px for consistency, which is good.
  • The new anyOf schema support looks like a valuable improvement.

Once you've addressed these items, the PR will be ready for another review.

@AutoGPT-Agent
Copy link

Thank you for your PR implementing the RJSF v6 upgrade and the new FormRenderer2 system. The changes look comprehensive and well-structured, but there are a couple of items that need to be addressed before we can merge this PR:

  1. Test Plan Execution: You've created a detailed test plan, but the checkboxes indicating that you've tested the changes according to this plan are unchecked. Please complete the testing and check off these items in the PR description.

  2. PR Title Format: Your PR title needs to follow our conventional commit message format with an explicit type prefix. Please update the title to something like:

    feat(platform/frontend): Upgrade RJSF to v6 and implement new FormRenderer2 system
    

Additionally, I noticed a console.log statement in the InputNodeHandle component that should be removed before merging:

console.log("handleId", handleId);

Once these items are addressed, the PR should be ready for merging. The changes look well-implemented, and the migration to the new form renderer system seems thorough.

@AutoGPT-Agent
Copy link

Thanks for the detailed PR! The implementation of the new FormRenderer2 system looks solid and well-organized. A few things to address before merging:

  1. PR Title: Please update the title to follow our conventional commit format, including the proper scope. For example: feat(frontend/library): Upgrade RJSF to v6 and implement new FormRenderer2 system

  2. Test Plan: The test plan items are defined but not checked as completed. Please make sure to execute the tests according to the plan and check them off:

    • Test form rendering with various field types
    • Test anyOf field type selector functionality
    • Test array item addition/removal
    • Test input expansion modal
    • Test node handle connections
    • Verify backward compatibility with existing agents

The changes themselves look good, especially the modular approach to the form renderer system and the improved node handle implementation. The separation of InputNodeHandle and OutputNodeHandle is a nice improvement for better code organization.

@AutoGPT-Agent
Copy link

Thank you for the detailed PR description and comprehensive implementation of the RJSF v6 upgrade. Before this can be merged, a few issues need to be addressed:

  1. PR Title Format: Please update the PR title to follow conventional commit format, with type and scope. It should be something like: feat(platform/frontend): Upgrade RJSF to v6 and implement new FormRenderer2 system

  2. Incomplete Testing: The test plan is well-defined, but the checklist items are not checked off. Please complete the testing according to the outlined test plan and check off each item when verified.

  3. Test Coverage Confirmation: Please confirm you've tested:

    • Form rendering with various field types (text, number, boolean, arrays, objects)
    • AnyOf field type selector functionality
    • Array item addition/removal
    • Input expansion modal
    • Node handle connections
    • Backward compatibility with existing agents

Once these items are addressed, this PR should be ready for review and potential merge. The implementation looks comprehensive and well-structured.

@AutoGPT-Agent
Copy link

Thank you for the detailed PR! Your implementation of the new FormRenderer2 system looks well-structured. Here are some suggestions to get this PR ready for merging:

Title Format

Please update your PR title to follow the conventional commit format. It should include a type and scope, for example:

refactor(platform/frontend): Upgrade RJSF to v6 and implement new FormRenderer2 system

Checklist

Your test plan is defined but not checked off. Please complete the testing according to the plan and mark the checkboxes as completed:

  • Test form rendering with various field types (text, number, boolean, arrays, objects)
  • Test anyOf field type selector functionality
  • Test array item addition/removal
  • Test input expansion modal
  • Test node handle connections
  • Verify backward compatibility with existing agents

Technical Observations

  1. The node handle system has been refactored to split into InputNodeHandle and OutputNodeHandle, which seems like a good separation of concerns.
  2. The form renderer upgrade looks comprehensive with support for complex schema types like anyOf.
  3. Consider adding a brief upgrade guide or notes for other developers working with the new FormRenderer2 system.

Once you've updated the title format and completed the checklist, this PR should be ready for review.

@AutoGPT-Agent
Copy link

Thank you for this comprehensive PR that upgrades the RJSF library and implements the new FormRenderer2 system. The changes look well-structured and the implementation appears thorough.

However, there are a couple of items that need to be addressed before merging:

  1. Test Plan: The test plan items in your checklist are not checked off, suggesting that testing hasn't been completed. Before merging, please complete the testing steps you've outlined (form rendering with various field types, anyOf selector functionality, array operations, node handle connections, etc.) and check them off in the PR description.

  2. PR Title Format: The current title doesn't follow our required conventional commit format. Please update it to follow the pattern: feat(frontend/library): upgrade RJSF to v6 and implement FormRenderer2 system

  3. Debug Code: There's a console.log in the InputNodeHandle component and another in useAnyOfField that should be removed before merging.

The implementation itself looks good - I particularly like the modular approach with the new input-renderer-2 directory structure and the separation of input/output node handles for better component design. The enhanced form field templates and support for more complex schemas (like anyOf) will improve the user experience significantly.

@AutoGPT-Agent
Copy link

Thanks for this detailed PR to upgrade RJSF and implement the new form rendering system! The changes look well-structured with a clear separation of concerns in the new architecture.

A few things to address before we can merge:

  1. Please update your PR title to follow our conventional commit format with a proper scope: feat(platform/frontend): Upgrade RJSF to v6 and implement new FormRenderer2 system

  2. You need to complete the test plan checklist - either execute all the tests listed and check them off, or modify the test plan to better match what you've actually tested.

  3. It looks like you've carefully migrated components to use the new FormRenderer2, but make sure you've verified backward compatibility with existing agents as mentioned in your test plan.

  4. I notice you're introducing several new UI components and patterns - it would be helpful to have a brief summary of any breaking changes or migration considerations for other developers working with the codebase.

Overall, this looks like a substantial improvement to the form rendering system with better separation of field types and improved handle connection detection. Please complete the checklist items so we can proceed with merging.

@AutoGPT-Agent
Copy link

Thank you for this well-documented PR implementing the RJSF v6 upgrade and new FormRenderer2 system. Your description is thorough and explains the changes clearly.

There are two issues that need to be addressed before this PR can be merged:

  1. Incomplete Test Plan: While you've created a good test plan, the checkboxes are unchecked, indicating testing has not been completed or verified. Please complete the testing according to your plan and check off each item.

  2. PR Title Format: The PR title needs to follow our conventional commit format with type and scope. Please update it to follow this pattern:
    feat(platform/frontend): Upgrade RJSF to v6 and implement new FormRenderer2 system

The implementation itself looks solid - you've systematically upgraded the dependencies, created a new modular form rendering system, and migrated the necessary components. The attention to detail in handling the edge cases (like anyOf schemas and array field handling) is particularly good.

Once you've addressed these two issues, this PR should be ready for approval.

@AutoGPT-Agent
Copy link

Thanks for this substantial upgrade to the form rendering system! This looks like a well-organized implementation that will improve our form handling capabilities. I have a couple of items that need to be addressed before we can merge this PR:

  1. Checklist Status: Your test plan is detailed and appropriate, but you haven't confirmed that you've executed these tests. Please complete the test plan section by checking off the items that you've tested.

  2. PR Title Format: The title needs to follow our conventional commit format. Please update it to include the proper type and scope, for example:

    feat(platform/frontend): Upgrade RJSF to v6 and implement new FormRenderer2 system
    

The code changes themselves look well-structured. I appreciate how you've modularized the new form renderer system and carefully handled the migration from the old system. The separation of input and output node handles is also a nice improvement.

Once you've addressed these two items, we can proceed with the merge.

@AutoGPT-Agent
Copy link

Thank you for this detailed PR! The implementation looks solid, but there are a couple of things to address before this can be merged:

  1. The PR title needs to follow our conventional commit format. Please update it to include the proper type and scope, e.g., feat(platform/frontend): Upgrade RJSF to v6 and implement new FormRenderer2 system

  2. Please complete the checklist by either:

    • Testing your changes according to the test plan and checking off those items
    • Or explaining why certain tests couldn't be completed (if applicable)

Once these items are addressed, this PR should be ready for another review. The implementation itself looks well-structured and the documentation of changes is excellent.

@AutoGPT-Agent
Copy link

Thanks for this PR to upgrade RJSF and implement the new FormRenderer2 system. The changes look comprehensive and well-structured.

Before we can merge this, there are a couple of items that need to be addressed:

  1. Incomplete checklist: You've marked that you've listed your changes, but the test plan section is not checked off. Please complete the test plan items to verify that all the functionality works correctly. This is especially important for a UI component change of this magnitude.

  2. PR title format: Your PR title needs to follow our conventional commit format. It should start with a type (e.g., feat, fix, refactor) and include a scope in parentheses. For example: feat(frontend): Upgrade RJSF to v6 and implement new FormRenderer2 system

The changes themselves look good - I can see you've done a thorough job with the upgrade and implementation. The new component structure seems more modular and the handle improvements should make connections more reliable. The work to support anyOf schemas with type selectors is particularly valuable.

Once you address the checklist and title format, this should be ready for review.

@AutoGPT-Agent
Copy link

Thanks for this thorough PR that upgrades RJSF to v6 and implements the new FormRenderer2 system. The changes look well-structured and comprehensive.

However, I have a few concerns before we can merge this:

Required Changes

  1. Incomplete Test Plan: You've marked that you've clearly listed changes but haven't completed testing those changes. Since this is a major library upgrade with substantial system changes, we need to ensure thorough testing before merging.

    • Please complete the test plan items you've outlined
    • Indicate which tests have been performed and their results
  2. PR Title Format: Your title needs to follow our conventional commit format with type and scope. Please update it to something like:
    feat(frontend): Upgrade RJSF to v6 and implement new FormRenderer2 system

  3. Code Clean-up: There's a console.log statement in useAnyOfField.ts that should be removed before merging.

The changes themselves look well-implemented, with a good separation of concerns in the new form renderer system. I particularly like the modular approach with separate components for different field types.

Once you've addressed these items, we should be good to proceed with the review process.

@AutoGPT-Agent
Copy link

Thank you for your comprehensive PR implementing the new FormRenderer2 system and upgrading RJSF to v6! The changes look well-structured with a thoughtful implementation of the new form rendering architecture.

However, there are a couple of issues that need to be addressed before this PR can be merged:

  1. Checklist Completion: Please complete the checklist in your PR description. Currently, only the first item is checked off. Either check off all items in the checklist or remove sections that aren't applicable.

  2. PR Title Format: Your title needs to follow our conventional commit format. It should start with a type (like feat: or refactor:) followed by a scope. Based on the content, something like:

    feat(platform/frontend): Upgrade RJSF to v6 and implement FormRenderer2 system
    

    would be appropriate.

The actual changes look solid and well-implemented. I particularly like how you've separated the form rendering logic into more modular components and improved the node handle system. Once you address the above issues, this PR should be ready for another review.

@AutoGPT-Agent
Copy link

Thank you for submitting this PR to upgrade RJSF to v6 and implement the new FormRenderer2 system. The changes look thorough and well-structured.

Here are a few items that need addressing before this can be merged:

  1. PR Title Format: Please update your PR title to include the proper scope following conventional commit format. It should be feat(platform/frontend): Upgrade RJSF to v6 and implement new FormRenderer2 system

  2. Checklist Completion: You've listed your test plan but haven't actually checked the boxes in the checklist. Please make sure to check off the items in your checklist or mark them as N/A if not applicable.

  3. Test Results: Have you run through the test plan listed in the description? Please update the PR description to indicate the results of your testing.

Overall, this is a substantial improvement that will enhance form handling in the platform. The separation of input and output node handles and the implementation of the new form renderer system with better support for complex schemas (anyOf, arrays) are valuable additions. I particularly like how you've created a more modular approach with the new FormRenderer2 system.

@AutoGPT-Agent
Copy link

Thank you for your detailed PR! This looks like a significant upgrade to the form rendering system. I have a couple of items that need to be addressed before this can be merged:

  1. PR Title Format: The title needs to follow the conventional commit message format with a type and scope. Please update it to something like:

    feat(frontend): Upgrade RJSF to v6 and implement new FormRenderer2 system
    
  2. Checklist: The checklist items need to be completely checked off. You've outlined an excellent test plan, but you need to check the boxes for:

    • "I have made a test plan"
    • "I have tested my changes according to the test plan"

Once these two items are addressed, this PR should be ready for review. The changes themselves look well-structured with a clear migration path from the old FormRenderer to the new FormRenderer2 system.

Great work on this substantial improvement to the form rendering system!

@Abhi1992002 Abhi1992002 requested review from 0ubbe and removed request for Swiftyos and majdyz January 6, 2026 12:27
@qodo-code-review
Copy link

PR Reviewer Guide 🔍

Here are some key observations to aid the review process:

⏱️ Estimated effort to review: 5 🔵🔵🔵🔵🔵
🧪 No relevant tests
🔒 No security concerns identified
⚡ Recommended focus areas for review

Debug Log

A stray console log is left in the anyOf option change handler; this can leak internal IDs to the console and create noise in production. Remove the log or guard it behind a dev-only check.

//   When we change the option, we need to clean the form data
let newFormData = schemaUtils.sanitizeDataForNewSchema(
  newOption,
  oldOption,
  formData,
);

const handlePrefix = cleanUpHandleId(field_id);
console.log("handlePrefix", handlePrefix);
useEdgeStore
  .getState()
  .removeEdgesByHandlePrefix(registry.formContext.nodeId, handlePrefix);
Handle ID Mismatch

Input-connection checks now compare a cleaned handle ID against stored edge target handles, but edge creation/storage may still use uncleaned IDs. Validate that handle IDs are consistently normalized across edge creation, persistence, and lookups; otherwise connections may appear disconnected or fail to be detected.

isInputConnected: (nodeId, handle) => {
  const cleanedHandle = cleanUpHandleId(handle);
  return get().edges.some(
    (e) => e.target === nodeId && e.targetHandle === cleanedHandle,
  );
},
Data Mutation Defaults

Path creation for missing values defaults leaf nodes to empty strings and auto-expands arrays with empty strings/objects. This can introduce unexpected form data types (e.g., string where schema expects number/object/null) and may affect validation or backend payloads. Consider deriving defaults from schema/type hints (or using undefined/null) and ensure behavior matches the expected API contract.

/**
 * Ensure a path exists in an object, creating intermediate objects/arrays as needed
 * Returns true if any modifications were made
 */
export function ensurePathExists(
  obj: Record<string, any>,
  segments: PathSegment[],
): boolean {
  if (segments.length === 0) return false;

  let current = obj;
  let modified = false;

  for (let i = 0; i < segments.length; i++) {
    const segment = segments[i];
    const isLast = i === segments.length - 1;
    const nextSegment = segments[i + 1];

    const getDefaultValue = () => {
      if (isLast) {
        return "";
      }
      if (nextSegment?.type === "item") {
        return [];
      }
      return {};
    };

    if (segment.type === "item" && segment.index !== undefined) {
      if (!Array.isArray(current)) {
        return modified;
      }

      while (current.length <= segment.index) {
        current.push(isLast ? "" : {});
        modified = true;
      }

      if (!isLast) {
        if (
          current[segment.index] === undefined ||
          current[segment.index] === null
        ) {
          current[segment.index] = getDefaultValue();
          modified = true;
        }
        current = current[segment.index];
      }
    } else {
      if (!(segment.key in current)) {
        current[segment.key] = getDefaultValue();
        modified = true;
      } else if (!isLast && current[segment.key] === undefined) {
        current[segment.key] = getDefaultValue();
        modified = true;
      }

      if (!isLast) {
        current = current[segment.key];
      }
    }
  }

  return modified;

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: 5

Note

Due to the large number of review comments, Critical severity comments were prioritized as inline comments.

Caution

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

⚠️ Outside diff range comments (3)
autogpt_platform/frontend/src/components/renderers/InputRenderer/base/standard/widgets/DateTimeInput/DateTimeWidget.tsx (1)

22-22: Remove unsafe type assertion.

The as any type assertion bypasses TypeScript's type safety. The DateTimeInput component should accept the calculated inputSize value, or you should use a proper type guard.

🔎 Verify DateTimeInput's size prop type
#!/bin/bash
# Description: Check the DateTimeInput component's size prop type definition

ast-grep --pattern $'export $_ DateTimeInput = ($$$) => {
  $$$
}'

rg -A 10 'type.*DateTimeInputProps|interface.*DateTimeInputProps' --type=ts --type=tsx
autogpt_platform/frontend/src/components/renderers/InputRenderer/base/standard/widgets/DateInput/DateWidget.tsx (1)

4-34: Use function declaration instead of arrow function for component.

The component uses an arrow function assignment (export const DateWidget = (props: WidgetProps) => { ... }), which violates the guideline: "Use function declarations (not arrow functions) for components and handlers in frontend."

As per coding guidelines, components should use function declarations.

🔎 Recommended fix: Convert to function declaration
-export const DateWidget = (props: WidgetProps) => {
+export function DateWidget(props: WidgetProps) {
   const {
     value,
     onChange,
     disabled,
     readonly,
     placeholder,
     autofocus,
     id,
     formContext,
   } = props;
   const { size = "small" } = formContext || {};
 
   // Determine input size based on context
   const inputSize = size === "large" ? "default" : "small";
 
   return (
     <DateInput
       size={inputSize as any}
       id={id}
       hideLabel={true}
       label={""}
       value={value}
       onChange={onChange}
       placeholder={placeholder}
       disabled={disabled}
       readonly={readonly}
       autoFocus={autofocus}
     />
   );
-};
+}
autogpt_platform/frontend/src/app/(platform)/auth/integrations/oauth_callback/route.ts (1)

12-12: Remove console.debug statements.

These debug logging statements should be removed before merge, as multiple reviewers have flagged debug/logging statements throughout the PR for removal.

🔎 Suggested cleanup
-  console.debug("OAuth callback received:", { code, state });
-
   const message: OAuthPopupResultMessage =
-  console.debug("Sending message to opener:", message);
-
   // Return a response with the message as JSON and a script to close the window

Also applies to: 23-23

🤖 Fix all issues with AI Agents
In @autogpt_platform/frontend/package.json:
- Around line 55-57: Update the @rjsf/validator-ajv8 dependency to v6 to match
@rjsf/core and @rjsf/utils: change the version string for "@rjsf/validator-ajv8"
in package.json from "5.24.13" to the compatible v6 release (e.g., "6.x.x"),
then run pnpm install to refresh the lockfile and ensure all rjsf packages are
aligned.

In
@autogpt_platform/frontend/src/components/renderers/InputRenderer/base/anyof/AnyOfField.tsx:
- Line 9: The component AnyOfField is defined as an arrow function; change it to
a function declaration to follow project coding guidelines by replacing the
arrow export const AnyOfField = (props: FieldProps) => { ... } with an exported
function declaration export function AnyOfField(props: FieldProps) { ... } and
keep the same props type, return value and internal logic (no other behavior
changes).

In
@autogpt_platform/frontend/src/components/renderers/InputRenderer/base/anyof/components/AnyOfFieldTitle.tsx:
- Line 21: The component AnyOfFieldTitle is declared as a const arrow function;
update it to a named function declaration to follow coding guidelines. Replace
"export const AnyOfFieldTitle = (props: customFieldProps) => { ... }" with a
function declaration "export function AnyOfFieldTitle(props: customFieldProps) {
... }", keeping the same props type, body, and exported name so references to
AnyOfFieldTitle remain unchanged.
- Line 52: Rename the typo'd local variable shoudlShowType to shouldShowType in
the AnyOfFieldTitle component and update all its usages in that file (e.g.,
where shoudlShowType is read to conditionally render the type label); ensure the
new identifier is referenced consistently and adjust imports/exports if any.

In
@autogpt_platform/frontend/src/components/renderers/InputRenderer/base/anyof/useAnyOfField.ts:
- Line 66: Remove the debug console.log in useAnyOfField (the statement logging
"handlePrefix", handlePrefix) — delete that line from the useAnyOfField.ts file
and ensure no other stray console.log debug statements remain in the same module
or related functions before merging.

In
@autogpt_platform/frontend/src/components/renderers/InputRenderer/base/array/index.ts:
- Around line 1-7: Delete this barrel index.ts that re-exports
ArrayFieldTemplate, ArrayFieldItemTemplate, ArraySchemaField, ArrayItemProvider
and useIsArrayItem; remove the file and update all import sites that currently
import from the directory (e.g., import { ArrayFieldTemplate } from "./array")
to import directly from the implementation modules (e.g.,
"./ArrayFieldTemplate", "./ArrayFieldItemTemplate", "./ArraySchemaField", and
"./context/array-item-context") so each consumer imports the specific symbol
directly instead of via the barrel.

In
@autogpt_platform/frontend/src/components/renderers/InputRenderer/base/object/ObjectFieldTemplate.tsx:
- Around line 72-73: Replace the constant conditional that always evaluates to
optionalDataControl in the JSX prop (currently written as true ?
optionalDataControl : undefined) with the intended runtime flag
showOptionalDataControlInTitle so the prop becomes conditional on that variable;
update the prop expression for optionalDataControl in ObjectFieldTemplate (the
component rendering that prop) to use showOptionalDataControlInTitle ?
optionalDataControl : undefined.

In
@autogpt_platform/frontend/src/components/renderers/InputRenderer/base/object/OptionalDataControlsTemplate.tsx:
- Line 2: Replace the lucide-react icon import with the Phosphor Icons
equivalent: remove the import of PlusCircle from "lucide-react" and import the
matching Phosphor icon (e.g., PlusCircle or Plus from "@phosphor-icons/react")
wherever PlusCircle is used in OptionalDataControlsTemplate; update any prop
names if necessary to match Phosphor's API so the component uses the
project-standard @phosphor-icons/react icon component instead of lucide-react.

In
@autogpt_platform/frontend/src/components/renderers/InputRenderer/base/object/WrapIfAdditionalTemplate.tsx:
- Around line 38-39: The call to isInputConnected(nodeId, handleId) can receive
undefined because uiOptions.handleId may be missing; update
WrapIfAdditionalTemplate.tsx to guard handleId before use (e.g., check if
handleId is truthy or pass a safe fallback like '' via handleId ?? '') so that
cleanUpHandleId() always receives a string; locate the variables nodeId and
handleId and the isInputConnected(...) invocation and apply the same
null-check/fallback pattern used in AnyOfFieldTitle.tsx and FieldTemplate.tsx.
- Around line 61-67: In handleBlur (the React.FocusEvent handler), replace the
loose equality check e.target.value == "" with a strict equality e.target.value
=== "" so the empty-string branch reliably triggers; leave calls to
onRemoveProperty() and onKeyRenameBlur(e) unchanged.

In
@autogpt_platform/frontend/src/components/renderers/InputRenderer/base/standard/buttons/IconButton.tsx:
- Line 8: The IconButton component currently imports ChevronDown, ChevronUp, and
Copy from lucide-react; update the imports to use Phosphor icons instead by
replacing ChevronDown with CaretDown, ChevronUp with CaretUp, and Copy with Copy
from @phosphor-icons/react, then update all usages inside IconButton (and any
exported constants inside that file) to render the Phosphor components
(CaretDown, CaretUp, Copy) with the same props/props spread as before so
behavior and styling remain unchanged.

In
@autogpt_platform/frontend/src/components/renderers/InputRenderer/base/standard/DescriptionField.tsx:
- Line 17: In the DescriptionField component update the div that currently has
className="0 inline w-fit" (the element with id={id}) to remove the stray "0"
and use a valid Tailwind class string such as "inline w-fit" (or "inline-block
w-fit" if block-like behavior is desired); locate the div in
DescriptionField.tsx and replace the className accordingly.

In
@autogpt_platform/frontend/src/components/renderers/InputRenderer/base/standard/errors/ErrorList.tsx:
- Line 2: Replace the lucide-react import and usage with the Phosphor Icons
equivalent: change the import of AlertCircle from "lucide-react" to import {
WarningCircle } from "@phosphor-icons/react", then replace any usage of the
AlertCircle component in ErrorList (e.g., JSX on line 15) with <WarningCircle />
preserving existing props (className, size, weight) or map lucide props to
Phosphor equivalents so styling remains consistent.

In
@autogpt_platform/frontend/src/components/renderers/InputRenderer/base/standard/errors/index.ts:
- Line 1: Delete the barrel re-export file index.ts that exports ErrorList and
replace all imports that reference the barrel with direct imports to the
ErrorList component; search for imports that reference the errors directory (or
import from .../errors) and change them to import ErrorList directly from
ErrorList (e.g., import ErrorList from ".../errors/ErrorList"), then remove the
now-unused index.ts file and run a quick TypeScript build to ensure no broken
imports remain.

In
@autogpt_platform/frontend/src/components/renderers/InputRenderer/base/standard/FieldTemplate.tsx:
- Around line 110-124: The description rendering uses rawDescription in the
condition but outputs description, causing mismatches; change the conditional to
check description instead of rawDescription and, for consistency with
ObjectFieldTemplate, replace the inline span with the DescriptionFieldTemplate
component (use DescriptionFieldTemplate with appropriate props) alongside
TitleFieldTemplate, ensuring the guard uses shouldDisplayLabel && description.

In
@autogpt_platform/frontend/src/components/renderers/InputRenderer/base/standard/index.ts:
- Around line 1-3: Delete the barrel file index.ts that re-exports
FieldTemplate, TitleField, and DescriptionField; remove the exports
"FieldTemplate", "TitleField", and "DescriptionField" from the frontend and
update all import sites that reference the directory barrel (imports that pull
from ".../standard") to import each component directly from its file (e.g.,
import FieldTemplate from ".../standard/FieldTemplate", import TitleField from
".../standard/TitleField", import DescriptionField from
".../standard/DescriptionField"); ensure no other code relies on the index.ts
re-export and remove the now-unused index.ts file.

In
@autogpt_platform/frontend/src/components/renderers/InputRenderer/base/standard/widgets/CheckboxInput/index.ts:
- Line 1: Remove the barrel re-export in the CheckboxInput index.ts that exports
CheckboxWidget and delete this index file; update all consumers to import
CheckboxWidget directly from the implementation module (CheckBoxWidget) instead
of from the directory barrel (i.e., replace imports that reference the
CheckboxInput folder with imports that reference CheckBoxWidget).

In
@autogpt_platform/frontend/src/components/renderers/InputRenderer/base/standard/widgets/DateInput/index.ts:
- Line 1: The file index.ts is a forbidden barrel re-export that exposes
DateWidget; remove this re-export by deleting the index.ts that contains "export
{ DateWidget } from './DateWidget'"; then update all usage sites that import
DateWidget from the directory (e.g., import { DateWidget } from '.../DateInput')
to import directly from the implementation file (import { DateWidget } from
'.../DateInput/DateWidget'), ensuring no other index.ts re-exports remain for
this component.

In
@autogpt_platform/frontend/src/components/renderers/InputRenderer/base/standard/widgets/DateTimeInput/index.ts:
- Line 1: Remove the barrel re-export file that exports DateTimeWidget; delete
this index.ts and update all import sites to import the component directly from
"./DateTimeWidget" (replace any occurrences of importing from the directory path
that relied on the index.ts with direct imports of DateTimeWidget). Ensure no
other barrel-style index.ts files remain for this component and run the project
build/tests to confirm no broken imports referencing the removed file.

In
@autogpt_platform/frontend/src/components/renderers/InputRenderer/base/standard/widgets/FileInput/index.ts:
- Line 1: Delete the barrel re-export index.ts that only exports FileWidget and
update all consumers to import the FileWidget symbol directly from its
FileWidget source module (replace any imports that reference the directory
barrel with direct imports of the FileWidget module), ensuring no index.ts
re-exports remain for this widget.

In
@autogpt_platform/frontend/src/components/renderers/InputRenderer/base/standard/widgets/SelectInput/index.ts:
- Line 1: Delete the barrel file index.ts that re-exports SelectWidget (the
export line "export { SelectWidget } from \"./SelectWidget\";") and update all
consumers to import SelectWidget directly from the implementation module (change
imports from ".../SelectInput" to ".../SelectInput/SelectWidget"); ensure no
other re-exports remain in the SelectInput folder and run a project-wide
search/replace for imports referencing the SelectInput directory to fix any
broken imports.

In
@autogpt_platform/frontend/src/components/renderers/InputRenderer/base/standard/widgets/SelectInput/SelectWidget.tsx:
- Line 16: The SelectWidget component is defined as an arrow function; change it
to a function declaration to follow the guideline. Replace "export const
SelectWidget = (props: WidgetProps) => { ... }" with an exported function
declaration "export function SelectWidget(props: WidgetProps) { ... }",
preserving all props handling, return JSX, and any default exports/imports that
reference SelectWidget so behavior and type annotations remain unchanged. Ensure
the component name and WidgetProps type are unchanged and run type checks.

In
@autogpt_platform/frontend/src/components/renderers/InputRenderer/base/standard/widgets/TextInput/index.ts:
- Around line 1-2: Remove the barrel export: delete the index.ts that re-exports
TextWidget and InputExpanderModal, then update all import sites that currently
import from the TextInput folder root to import the components directly (use
TextWidget from the TextWidget module and InputExpanderModal from
TextInputExpanderModal). Search for any imports like `.../TextInput` and replace
them with explicit paths to the respective modules so no index re-exports are
used.

In
@autogpt_platform/frontend/src/components/renderers/InputRenderer/base/standard/widgets/TextInput/TextWidget.tsx:
- Around line 50-54: The htmlType for InputType.INTEGER in TextWidget.tsx is set
to the invalid value "account"; change that htmlType to "number" so the input
uses a numeric HTML input and aligns with the handleChange conversion
(InputType.INTEGER, htmlType property, and handleChange: (v: string) => (v ===
"" ? undefined : Number(v)) should all refer to a numeric input).

In
@autogpt_platform/frontend/src/components/renderers/InputRenderer/base/standard/widgets/TimeInput/index.ts:
- Line 1: Remove the barrel re-export index.ts that exposes TimeWidget; delete
the file
autogpt_platform/frontend/src/components/renderers/InputRenderer/base/standard/widgets/TimeInput/index.ts
and update all consumers to import TimeWidget directly from ./TimeWidget (e.g.,
change any imports from ".../TimeInput" to ".../TimeInput/TimeWidget"), ensuring
no other index.ts re-exports remain in the frontend path.

In
@autogpt_platform/frontend/src/components/renderers/InputRenderer/custom/CredentialField/components/CredentialFieldTitle.tsx:
- Around line 37-42: The component reads hard-coded values non-reactively via
useNodeStore.getState().getHardCodedValues(nodeId), so updates won't trigger
re-renders; change that to use the hook with a selector (e.g., call
useNodeStore(state => state.getHardCodedValues(nodeId))) and use that reactive
value when calling getCredentialProviderFromSchema in CredentialFieldTitle
(retain schema as BlockIOCredentialsSubSchema and the
toDisplayName/getCredentialProviderFromSchema usage) so credentialProvider
updates when hardcoded values change.
- Around line 44-46: The component CredentialFieldTitle incorrectly uses the
imported global uiSchema instead of its passed-in prop; update the call to
updateUiOption to pass the uiOptions prop (uiOptions) rather than the global
uiSchema so the component respects the passed-in UI schema and matches other
renderers; locate the updateUiOption call in CredentialFieldTitle and replace
the uiSchema argument with uiOptions.

In
@autogpt_platform/frontend/src/components/renderers/InputRenderer/custom/GoogleDrivePickerField/GoogleDrivePickerField.tsx:
- Around line 5-21: The component GoogleDrivePickerField is declared as a const
arrow function but should be a function declaration per frontend guidelines;
replace the const export (export const GoogleDrivePickerField = (props:
FieldProps) => { ... }) with an exported function declaration (export function
GoogleDrivePickerField(props: FieldProps) { ... }), preserving the body logic
and the usage of schema, uiSchema, onChange, fieldPathId, formData, uiOptions,
config and the GoogleDrivePickerInput props (value, onChange calling
onChange(value, fieldPathId.path), className, showRemoveButton).

In
@autogpt_platform/frontend/src/components/renderers/InputRenderer/docs/HEIRARCHY.md:
- Line 1: The file name contains a typo: rename the markdown file from
HEIRARCHY.md to HIERARCHY.md and update any references to it (imports, README
links, documentation indexes, or components that import this doc) so they point
to the new filename; ensure version control preserves the rename (git mv) to
avoid duplicate files and update any CI/docs config that lists the old filename.

In @autogpt_platform/frontend/src/components/renderers/InputRenderer/index.ts:
- Around line 1-3: Delete this barrel index.ts that re-exports FormRenderer,
Form (from registry) and ExtendedFormContextType; remove any references to
"@/components/renderers/InputRenderer" in consumers and update their imports to
the concrete modules: import { FormRenderer } from
"@/components/renderers/InputRenderer/FormRenderer"; import Form from
"@/components/renderers/InputRenderer/registry"; import type {
ExtendedFormContextType } from "@/components/renderers/InputRenderer/types";
finally commit the deleted index.ts so no re-exports remain.

In
@autogpt_platform/frontend/src/components/renderers/InputRenderer/registry/index.ts:
- Around line 1-10: This file is a forbidden barrel re-export; remove this
index.ts and stop re-exporting default and generateForm (from "./Form"),
generateBaseFields / generateBaseTemplates / generateBaseWidgets (from
"../base/base-registry"), and generateCustomFields / findCustomFieldId (from
"../custom/custom-registry"); instead update all consumers to import those
symbols directly from their source modules ("./Form", "../base/base-registry",
"../custom/custom-registry") and delete this registry/index.ts to comply with
the frontend guideline forbidding barrel files.
🟠 Major comments (19)
autogpt_platform/frontend/package.json-55-57 (1)

55-57: Upgrade @rjsf/validator-ajv8 to v6 to match core and utils.

The @rjsf/validator-ajv8 package remains at version 5.24.13 while @rjsf/core and @rjsf/utils have been upgraded to 6.1.2. This version mismatch between packages in the same library family can cause type incompatibilities, runtime errors, and unexpected behavior.

🔎 Proposed fix
     "@rjsf/core": "6.1.2",
     "@rjsf/utils": "6.1.2",
-    "@rjsf/validator-ajv8": "5.24.13",
+    "@rjsf/validator-ajv8": "6.1.2",

After applying this change, run pnpm install to update the lockfile.

autogpt_platform/frontend/src/components/renderers/InputRenderer/base/standard/widgets/SelectInput/SelectWidget.tsx-16-16 (1)

16-16: Convert to function declaration to follow coding guidelines.

This component uses an arrow function pattern, which violates the guideline: "Use function declarations for components and handlers (not arrow functions). Only arrow functions for small inline lambdas."

As per coding guidelines, frontend components should use function declarations.

🔎 Proposed refactor
-export const SelectWidget = (props: WidgetProps) => {
+export function SelectWidget(props: WidgetProps) {
   const {
     options,
     value,
autogpt_platform/frontend/src/components/renderers/InputRenderer/base/standard/widgets/FileInput/index.ts-1-1 (1)

1-1: Remove barrel file - violates frontend coding guidelines.

This index.ts re-export violates the explicit guideline: "No barrel files or index.ts re-exports in frontend". Components should be imported directly from their source files (e.g., from "./FileWidget") rather than through barrel exports.

Based on learnings, frontend code should avoid index.ts re-export patterns.

🔎 Recommended fix

Delete this file and update imports throughout the codebase to reference FileWidget directly:

-export { FileWidget } from "./FileWidget";

Update consumer imports:

// Instead of:
import { FileWidget } from "@/components/renderers/InputRenderer/base/standard/widgets/FileInput";

// Use:
import { FileWidget } from "@/components/renderers/InputRenderer/base/standard/widgets/FileInput/FileWidget";

Committable suggestion skipped: line range outside the PR's diff.

autogpt_platform/frontend/src/components/renderers/InputRenderer/base/standard/buttons/IconButton.tsx-8-8 (1)

8-8: Use only Phosphor Icons as per coding guidelines.

The code imports icons from both lucide-react (ChevronDown, ChevronUp, Copy) and @phosphor-icons/react (TrashIcon). According to the coding guidelines: "Only use Phosphor Icons (@phosphor-icons/react) for icon components in frontend."

As per coding guidelines, replace Lucide icons with their Phosphor equivalents:

  • ChevronDownCaretDown from @phosphor-icons/react
  • ChevronUpCaretUp from @phosphor-icons/react
  • CopyCopy from @phosphor-icons/react
🔎 Proposed fix
 import {
   FormContextType,
   IconButtonProps,
   RJSFSchema,
   StrictRJSFSchema,
   TranslatableString,
 } from "@rjsf/utils";
-import { ChevronDown, ChevronUp, Copy } from "lucide-react";
 import type { VariantProps } from "class-variance-authority";

 import { Button } from "@/components/atoms/Button/Button";
 import { extendedButtonVariants } from "@/components/atoms/Button/helpers";
-import { TrashIcon } from "@phosphor-icons/react";
+import { TrashIcon, CaretDown, CaretUp, Copy } from "@phosphor-icons/react";
 import { cn } from "@/lib/utils";
 import { Text } from "@/components/atoms/Text/Text";

Then update the icon usage in each component accordingly.

Also applies to: 13-13

autogpt_platform/frontend/src/components/renderers/InputRenderer/base/standard/widgets/DateTimeInput/index.ts-1-1 (1)

1-1: Remove barrel file – violates frontend coding guidelines.

This index.ts re-export violates the explicit guideline: "No barrel files or index.ts re-exports in frontend." Components should be imported directly from their source files (e.g., from "./DateTimeWidget").

As per coding guidelines, barrel files are prohibited in the frontend codebase.

🔎 Recommended fix: Remove this file and update imports

Delete this index.ts file and update all imports to reference the component directly:

-import { DateTimeWidget } from "@/components/renderers/InputRenderer/base/standard/widgets/DateTimeInput"
+import { DateTimeWidget } from "@/components/renderers/InputRenderer/base/standard/widgets/DateTimeInput/DateTimeWidget"

Committable suggestion skipped: line range outside the PR's diff.

autogpt_platform/frontend/src/components/renderers/InputRenderer/base/standard/widgets/TimeInput/index.ts-1-1 (1)

1-1: Remove barrel file - violates frontend coding guidelines.

This index.ts re-export violates the coding guideline: "No barrel files or index.ts re-exports in frontend" (applies to autogpt_platform/frontend/src/**/*.{ts,tsx}). Components should import directly from ./TimeWidget.tsx instead.

Based on coding guidelines.

🔎 Recommended fix

Delete this file and update all imports to reference ./TimeWidget directly:

-export { TimeWidget } from "./TimeWidget";

Update consuming code to import directly:

// Instead of:
import { TimeWidget } from ".../TimeInput";
// Use:
import { TimeWidget } from ".../TimeInput/TimeWidget";
autogpt_platform/frontend/src/components/renderers/InputRenderer/base/standard/widgets/CheckboxInput/index.ts-1-1 (1)

1-1: Remove barrel file - violates frontend coding guidelines.

This index.ts re-export violates the coding guideline: "No barrel files or index.ts re-exports in frontend" (applies to autogpt_platform/frontend/src/**/*.{ts,tsx}). Components should import directly from ./CheckBoxWidget.tsx instead.

Based on coding guidelines and learnings.

🔎 Recommended fix

Delete this file and update all imports to reference ./CheckBoxWidget directly:

-export { CheckboxWidget } from "./CheckBoxWidget";

Update consuming code to import directly:

// Instead of:
import { CheckboxWidget } from ".../CheckboxInput";
// Use:
import { CheckboxWidget } from ".../CheckboxInput/CheckBoxWidget";

Committable suggestion skipped: line range outside the PR's diff.

autogpt_platform/frontend/src/components/renderers/InputRenderer/base/standard/widgets/SelectInput/index.ts-1-1 (1)

1-1: Remove barrel file - violates frontend coding guidelines.

This index.ts re-export violates the coding guideline: "No barrel files or index.ts re-exports in frontend" (applies to autogpt_platform/frontend/src/**/*.{ts,tsx}). Components should import directly from ./SelectWidget.tsx instead.

Based on coding guidelines and learnings.

🔎 Recommended fix

Delete this file and update all imports to reference ./SelectWidget directly:

-export { SelectWidget } from "./SelectWidget";

Update consuming code to import directly:

// Instead of:
import { SelectWidget } from ".../SelectInput";
// Use:
import { SelectWidget } from ".../SelectInput/SelectWidget";
autogpt_platform/frontend/src/components/renderers/InputRenderer/base/standard/widgets/DateInput/index.ts-1-1 (1)

1-1: Remove barrel file - violates coding guidelines.

This index.ts re-export violates the project's coding guideline: "No barrel files or index.ts re-exports in frontend." Import DateWidget directly from ./DateWidget at usage sites instead.

As per coding guidelines, barrel files and index.ts re-exports are not allowed in the frontend codebase.

autogpt_platform/frontend/src/components/renderers/InputRenderer/base/standard/widgets/TextInput/index.ts-1-2 (1)

1-2: Remove barrel file; violates coding guidelines.

This index.ts file re-exports components, which violates the project's coding guidelines. Import these components directly at their usage sites instead.

Based on learnings, no barrel files or index.ts re-exports should be used in the frontend codebase.

🔎 Recommended approach

Delete this file and update all imports to reference the components directly:

// Instead of:
import TextWidget from ".../TextInput";
import { InputExpanderModal } from ".../TextInput";

// Use:
import TextWidget from ".../TextInput/TextWidget";
import { InputExpanderModal } from ".../TextInput/TextInputExpanderModal";
autogpt_platform/frontend/src/components/renderers/InputRenderer/base/standard/index.ts-1-3 (1)

1-3: Remove barrel file; violates coding guidelines.

This index.ts file re-exports components, which violates the project's coding guidelines. Import these components directly at their usage sites instead.

Based on learnings, no barrel files or index.ts re-exports should be used in the frontend codebase.

🔎 Recommended approach

Delete this file and update all imports to reference the components directly:

// Instead of:
import { FieldTemplate, TitleField } from ".../standard";

// Use:
import FieldTemplate from ".../standard/FieldTemplate";
import TitleField from ".../standard/TitleField";
autogpt_platform/frontend/src/components/renderers/InputRenderer/custom/GoogleDrivePickerField/GoogleDrivePickerField.tsx-5-21 (1)

5-21: Use function declaration instead of const expression.

The component uses a const arrow function expression, but the coding guidelines require function declarations for components.

Based on coding guidelines, use function declarations (not arrow functions) for components and handlers in frontend.

🔎 Proposed refactor
-export const GoogleDrivePickerField = (props: FieldProps) => {
+export function GoogleDrivePickerField(props: FieldProps) {
   const { schema, uiSchema, onChange, fieldPathId, formData } = props;
   const uiOptions = getUiOptions(uiSchema);
   const config: GoogleDrivePickerConfig = schema.google_drive_picker_config;
 
   return (
     <div>
       <GoogleDrivePickerInput
         config={config}
         value={formData}
         onChange={(value) => onChange(value, fieldPathId.path)}
         className={uiOptions.className}
         showRemoveButton={true}
       />
     </div>
   );
-};
+}
autogpt_platform/frontend/src/components/renderers/InputRenderer/index.ts-1-3 (1)

1-3: Remove barrel file - violates frontend coding guidelines.

This index.ts file is a barrel file that re-exports components, which directly violates the coding guidelines: "No barrel files or index.ts re-exports in frontend".

Instead of using this barrel file, consumers should import directly from the source files:

  • ./FormRenderer for FormRenderer
  • ./registry for Form
  • ./types for ExtendedFormContextType

Barrel files can lead to circular dependencies, slower build times, and make the module graph harder to understand.

Based on coding guidelines: "No barrel files or index.ts re-exports in frontend"

Migration path for consumers

Update imports in consuming files from:

import { FormRenderer, Form, ExtendedFormContextType } from "@/components/renderers/InputRenderer";

To:

import { FormRenderer } from "@/components/renderers/InputRenderer/FormRenderer";
import Form from "@/components/renderers/InputRenderer/registry";
import type { ExtendedFormContextType } from "@/components/renderers/InputRenderer/types";

Then delete this index.ts file.

autogpt_platform/frontend/src/components/renderers/InputRenderer/custom/CredentialField/components/CredentialFieldTitle.tsx-37-42 (1)

37-42: Non-reactive store access will not trigger re-renders.

Using useNodeStore.getState() directly in the component body is not reactive. If hardcodedValues change, this component will not re-render. Use the hook with a selector instead.

🔎 Suggested fix
+import { useShallow } from "zustand/react/shallow";
+
 export const CredentialFieldTitle = (props: {
   // ...
 }) => {
   const { registry, uiOptions, schema, fieldPathId } = props;
   const { nodeId } = registry.formContext;
 
+  const hardcodedValues = useNodeStore(
+    useShallow((state) => (nodeId ? state.getHardCodedValues(nodeId) : {})),
+  );
+
   // ...
 
   const credentialProvider = toDisplayName(
     getCredentialProviderFromSchema(
-      useNodeStore.getState().getHardCodedValues(nodeId),
+      hardcodedValues,
       schema as BlockIOCredentialsSubSchema,
     ) ?? "",
   );
autogpt_platform/frontend/src/components/renderers/InputRenderer/custom/CredentialField/components/CredentialFieldTitle.tsx-44-46 (1)

44-46: Use the passed uiOptions prop instead of the global uiSchema import.

The updateUiOption function safely spreads objects and doesn't mutate the original. However, CredentialFieldTitle receives a uiOptions prop but ignores it by using the global imported uiSchema instead. This breaks the component's interface and differs from the pattern in other renderers (FieldTemplate, ArraySchemaField, AnyOfField, etc.), which all use their passed uiSchema prop. Change line 44 to:

const updatedUiSchema = updateUiOption(uiOptions, {
  showHandles: false,
});
autogpt_platform/frontend/src/components/renderers/InputRenderer/registry/index.ts-1-10 (1)

1-10: Remove barrel file - violates frontend coding guidelines.

This index.ts file re-exports from multiple modules, creating a barrel file pattern. The frontend codebase explicitly prohibits this pattern.

Consumers should import directly from the source modules instead:

  • ./Form
  • ../base/base-registry
  • ../custom/custom-registry

Based on coding guidelines and learnings: "No barrel files or index.ts re-exports in frontend"

autogpt_platform/frontend/src/components/renderers/InputRenderer/base/object/OptionalDataControlsTemplate.tsx-2-2 (1)

2-2: Use Phosphor Icons instead of lucide-react.

The codebase standard requires Phosphor Icons (@phosphor-icons/react) for all icon components in the frontend.

🔎 Proposed fix
-import { PlusCircle } from "lucide-react";
+import { PlusCircle } from "@phosphor-icons/react";

Based on coding guidelines: "Only use Phosphor Icons (@phosphor-icons/react) for icon components in frontend; never use other icon libraries"

autogpt_platform/frontend/src/components/renderers/InputRenderer/base/anyof/AnyOfField.tsx-9-9 (1)

9-9: Use function declaration instead of arrow function for components.

The component is defined using an arrow function, which violates the coding guidelines.

As per coding guidelines, use function declarations for components and handlers, reserving arrow functions only for small inline lambdas (map, filter, etc.).

🔎 Proposed fix
-export const AnyOfField = (props: FieldProps) => {
+export default function AnyOfField(props: FieldProps) {
autogpt_platform/frontend/src/components/renderers/InputRenderer/base/anyof/components/AnyOfFieldTitle.tsx-21-21 (1)

21-21: Use function declaration instead of arrow function for components.

The component uses a const arrow function, but coding guidelines require function declarations for components.

🔎 Proposed fix
-export const AnyOfFieldTitle = (props: customFieldProps) => {
+export function AnyOfFieldTitle(props: customFieldProps) {

As per coding guidelines, use function declarations for components and handlers, reserving arrow functions only for small inline lambdas.

🟡 Minor comments (10)
autogpt_platform/frontend/src/components/renderers/InputRenderer/base/standard/errors/index.ts-1-1 (1)

1-1: Remove barrel export file—use direct imports instead.

This index.ts re-export violates the project's coding guideline: "No barrel files or index.ts re-exports in frontend." Consumers should import ErrorList directly from ./ErrorList.tsx instead of through this barrel file.

Based on learnings, barrel files should not be used in the frontend codebase.

🔎 Recommended fix

Remove this file entirely and update all imports to reference ErrorList.tsx directly:

-export { default as ErrorList } from "./ErrorList";

Then update consumers to import directly:

import ErrorList from "@/components/renderers/InputRenderer/base/standard/errors/ErrorList";

Committable suggestion skipped: line range outside the PR's diff.

autogpt_platform/frontend/src/components/renderers/InputRenderer/base/standard/errors/ErrorList.tsx-2-2 (1)

2-2: Use Phosphor Icons instead of lucide-react.

The project coding guidelines specify: "Only use Phosphor Icons (@phosphor-icons/react) for icon components in frontend." Replace AlertCircle from lucide-react with the equivalent Phosphor icon.

As per coding guidelines, all frontend icon components should use the Phosphor Icons library for consistency.

🔎 Proposed fix
-import { AlertCircle } from "lucide-react";
+import { WarningCircle } from "@phosphor-icons/react";

Then update the icon usage on line 15:

-      <AlertCircle className="h-4 w-4" />
+      <WarningCircle className="h-4 w-4" />

Committable suggestion skipped: line range outside the PR's diff.

autogpt_platform/frontend/src/components/renderers/InputRenderer/base/standard/DescriptionField.tsx-17-17 (1)

17-17: Fix suspicious className value.

The className contains "0 inline w-fit" where the leading 0 appears to be a typo or invalid value. This should be removed or replaced with a valid Tailwind CSS class.

🔎 Proposed fix
-    <div id={id} className="0 inline w-fit">
+    <div id={id} className="inline w-fit">
autogpt_platform/frontend/src/components/renderers/InputRenderer/docs/HEIRARCHY.md-1-1 (1)

1-1: Typo in filename: "HEIRARCHY" → "HIERARCHY".

The filename contains a spelling error. Consider renaming:

HEIRARCHY.md → HIERARCHY.md
autogpt_platform/frontend/src/components/renderers/InputRenderer/base/standard/TitleField.tsx-31-33 (1)

31-33: Potential undefined handleId passed to InputNodeHandle.

uiOptions.handleId may be undefined when this component renders, but InputNodeHandle expects handleId: string. This could cause runtime issues or type errors when the handle ID is not set in uiOptions.

🔎 Suggested fix
-      {showHandle !== false && (
-        <InputNodeHandle handleId={uiOptions.handleId} nodeId={nodeId} />
+      {showHandle !== false && uiOptions.handleId && (
+        <InputNodeHandle handleId={uiOptions.handleId as string} nodeId={nodeId} />
       )}
autogpt_platform/frontend/src/components/renderers/InputRenderer/base/standard/FieldTemplate.tsx-110-124 (1)

110-124: Fix inconsistent conditional check in description rendering.

Line 122 checks rawDescription but renders {description}, which creates a logic error: if rawDescription is truthy but description is empty, it renders an empty span. The condition should check description instead. Additionally, for consistency with ObjectFieldTemplate's approach, consider using the DescriptionFieldTemplate component instead of inline span rendering.

{shouldDisplayLabel && description && <span>{description}</span>}
autogpt_platform/frontend/src/components/renderers/InputRenderer/base/object/WrapIfAdditionalTemplate.tsx-61-67 (1)

61-67: Use strict equality for empty string check.

Using loose equality (==) can lead to unexpected coercion. Prefer strict equality (===).

🔎 Proposed fix
   const handleBlur = (e: React.FocusEvent<HTMLInputElement>) => {
-    if (e.target.value == "") {
+    if (e.target.value === "") {
       onRemoveProperty();
     } else {
       onKeyRenameBlur(e);
     }
   };
autogpt_platform/frontend/src/components/renderers/InputRenderer/base/anyof/useAnyOfField.ts-66-66 (1)

66-66: Remove debug console.log statement.

This console.log should be removed before merge, as explicitly requested in the PR review comments.

🔎 Proposed fix
     const handlePrefix = cleanUpHandleId(field_id);
-    console.log("handlePrefix", handlePrefix);
     useEdgeStore
autogpt_platform/frontend/src/components/renderers/InputRenderer/base/object/ObjectFieldTemplate.tsx-72-73 (1)

72-73: Fix constant condition - likely intended to use showOptionalDataControlInTitle.

The static analyzer correctly flags true ? optionalDataControl : undefined as a constant condition that always evaluates to optionalDataControl. Based on line 43 and line 87, you likely meant to use showOptionalDataControlInTitle:

🔎 Proposed fix
-            optionalDataControl={true ? optionalDataControl : undefined}
+            optionalDataControl={showOptionalDataControlInTitle ? optionalDataControl : undefined}
autogpt_platform/frontend/src/components/renderers/InputRenderer/base/anyof/components/AnyOfFieldTitle.tsx-52-52 (1)

52-52: Fix typo in variable name.

The variable name shoudlShowType contains a typo and should be shouldShowType.

🔎 Proposed fix
-  const shoudlShowType = isHandleConnected || (isOptional && type);
+  const shouldShowType = isHandleConnected || (isOptional && type);

And update the usage on line 64:

-      {shoudlShowType && (
+      {shouldShowType && (

Committable suggestion skipped: line range outside the PR's diff.

@github-project-automation github-project-automation bot moved this from 🆕 Needs initial review to 👍🏼 Mergeable in AutoGPT development kanban Jan 6, 2026
@Abhi1992002 Abhi1992002 added this pull request to the merge queue Jan 7, 2026
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jan 7, 2026
@Abhi1992002 Abhi1992002 added this pull request to the merge queue Jan 7, 2026
Merged via the queue into dev with commit e503126 Jan 7, 2026
34 of 36 checks passed
@Abhi1992002 Abhi1992002 deleted the try-rfjs-theme-features branch January 7, 2026 05:27
@github-project-automation github-project-automation bot moved this to Done in Frontend Jan 7, 2026
@github-project-automation github-project-automation bot moved this from 👍🏼 Mergeable to ✅ Done in AutoGPT development kanban Jan 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Done
Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants