mirror of
https://github.com/Significant-Gravitas/AutoGPT.git
synced 2026-02-15 17:25:04 -05:00
a55b2e02dccc19f8185195cb4dc6ac12e61a3cd2
504 Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
a55b2e02dc |
feat(frontend): enhance CredentialsInput and CredentialRow components with variant support (#11753)
### Changes 🏗️ - Added a new `variant` prop to `CredentialsInput` component with options "default" or "node" - Implemented compact styling for the "node" variant in `CredentialRow` component - Modified layout and overflow handling for credential display in node context - Added conditional rendering of masked key display based on variant - Passed the variant prop through the component hierarchy - Applied the "node" variant to the `CredentialsField` component with appropriate styling Before  After  ### Checklist 📋 #### For code changes: - [x] I have clearly listed my changes in the PR description - [x] I have made a test plan - [x] I have tested my changes according to the test plan: - [x] Verified credential selection works correctly in node context - [x] Confirmed compact styling is applied properly in node variant - [x] Tested overflow handling for long credential names - [x] Verified both default and node variants display correctly <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Credential input and selection components now support multiple configurable visual variants, enabling better text display handling, optimized layouts, and improved visual consistency across different application contexts and specific use cases. * **Style** * Credential field displays now feature enhanced text truncation and overflow management for a more polished and consistent user interface experience. <sub>✏️ Tip: You can customize this high-level summary in your review settings.</sub> <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
6b6648b290 |
feat(frontend): add Table component with TableField renderer for tabular data input (#11751)
### Changes 🏗️ - Added a new `Table` component for handling tabular data input - Created supporting hooks and helper functions for the Table component - Added Storybook stories to showcase different Table configurations - Implemented a custom `TableField` renderer for JSON Schema forms - Updated type display info to support the new "table" format - Added schema matcher to detect and render table fields appropriately   ### Checklist 📋 #### For code changes: - [x] I have clearly listed my changes in the PR description - [x] I have made a test plan - [x] I have tested my changes according to the test plan: - [x] Verified Table component renders correctly with various configurations - [x] Tested adding and removing rows in the Table - [x] Confirmed data changes are properly tracked and reported via onChange - [x] Verified TableField renderer works with JSON Schema forms - [x] Checked that table format is properly detected in the schema <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit ## Release Notes * **New Features** * Added a Table component for displaying and editing tabular data with support for adding/deleting rows, read-only mode, and customizable labels. * Added support for rendering array fields as tables in form inputs with configurable columns and values. * **Tests** * Added comprehensive Storybook stories demonstrating various Table configurations and behaviors. <sub>✏️ Tip: You can customize this high-level summary in your review settings.</sub> <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
c0a9c0410b |
feat(frontend): add MultiSelectField component and improve node title cursor styling (#11744)
## Changes 🏗️ - Added a new `MultiSelectField` component for handling multiple boolean selections in a dropdown format - Implemented `useMultiSelectField` hook to manage the state and logic of the multi-select component - Added support for custom fields in `AnyOfField` by checking if the option schema matches a custom field - Added `isMultiSelectSchema` utility function to detect schemas suitable for the multi-select component - Added hover cursor styling to node headers to indicate text editability  ### Checklist 📋 #### For code changes: - [x] I have clearly listed my changes in the PR description - [x] I have made a test plan - [x] I have tested my changes according to the test plan: - [x] Verified that multi-select fields render correctly in the UI - [x] Confirmed that selecting multiple options works as expected - [x] Tested that the node header shows the text cursor on hover - [x] Verified that AnyOf fields correctly use custom field renderers when applicable <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added a multi-select field allowing selection of multiple options with improved selection UI. * AnyOf options can now resolve and render custom field types, improving form composition when schemas map to custom controls. * **Style** * Tooltip header cursor updated for clearer hover feedback. <sub>✏️ Tip: You can customize this high-level summary in your review settings.</sub> <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
17a77b02c7 |
fix(frontend): exclude schemas with enum from anyOf detection (#11743)
### Changes 🏗️ Fixed the `isAnyOfSchema` function in schema-utils.ts to exclude schemas that have an `enum` property. This prevents incorrect schema processing for enums that also have anyOf definitions. Added a console.log statement in FormRenderer.tsx to help debug schema preprocessing. ### Checklist 📋 #### For code changes: - [x] I have clearly listed my changes in the PR description - [x] I have made a test plan - [x] I have tested my changes according to the test plan: - [x] Verified that forms with enum values render correctly - [x] Confirmed that anyOf schemas are properly identified and processed - [x] Tested with various schema combinations to ensure the fix doesn't break existing functionality <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit ## Bug Fixes * Improved validation logic for form field schemas to correctly handle edge cases when multiple constraint types are defined. <sub>✏️ Tip: You can customize this high-level summary in your review settings.</sub> <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
22ca8955c5 |
fix(backend): library agent creation and version update improvements (#11731)
## Summary
Fixes library agent creation and version update logic to properly handle
both user-created and marketplace agents.
## Changes
- **Remove useGraphIsActiveVersion filter** from
`update_agent_version_in_library` to allow both manual and auto updates
- **Set useGraphIsActiveVersion correctly**:
- `False` for marketplace agents (require manual updates to avoid
breaking workflows)
- `True` for user-created agents (can safely auto-update since user
controls source)
- Update function documentation to reflect new behavior
## Problem Solved
- Marketplace agents can now be updated manually via API
- User-created agents maintain auto-update capability
- Resolves Sentry error AUTOGPT-SERVER-722 about "Expected a record,
found none"
- Fixes store submission modal issues
## Test Plan
- [x] Verify marketplace agents are created with
`useGraphIsActiveVersion: False`
- [x] Verify user agents are created with `useGraphIsActiveVersion:
True`
- [x] Confirm `update_agent_version_in_library` works for both types
- [x] Test store submission flow works without modal issues
## Review Notes
This change ensures proper separation between user-controlled agents
(auto-update) and marketplace agents (manual update), while allowing the
API to service both use cases.
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
## Release Notes
* **New Features**
* Enhanced agent publishing workflow with improved version tracking and
change detection for marketplace updates
* **Bug Fixes**
* Improved error handling when updating agent versions in the library
* Better detection of unpublished changes before publishing agents
* **Improvements**
* Changes Summary field now supports longer descriptions (up to 500
characters) with multi-line editing capability
<sub>✏️ Tip: You can customize this high-level summary in your review
settings.</sub>
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
|
||
|
|
47a3a5ef41 |
feat(backend,frontend): optional credentials flag for blocks at agent level (#11716)
This feature allows agent makers to mark credential fields as optional.
When credentials are not configured for an optional block, the block
will be skipped during execution rather than causing a validation error.
**Use case:** An agent with multiple notification channels (Discord,
Twilio, Slack) where the user only needs to configure one - unconfigured
channels are simply skipped.
### Changes 🏗️
#### Backend
**Data Model Changes:**
- `backend/data/graph.py`: Added `credentials_optional` property to
`Node` model that reads from node metadata
- `backend/data/execution.py`: Added `nodes_to_skip` field to
`GraphExecutionEntry` model to track nodes that should be skipped
**Validation Changes:**
- `backend/executor/utils.py`:
- Updated `_validate_node_input_credentials()` to return a tuple of
`(credential_errors, nodes_to_skip)`
- Nodes with `credentials_optional=True` and missing credentials are
added to `nodes_to_skip` instead of raising validation errors
- Updated `validate_graph_with_credentials()` to propagate
`nodes_to_skip` set
- Updated `validate_and_construct_node_execution_input()` to return
`nodes_to_skip`
- Updated `add_graph_execution()` to pass `nodes_to_skip` to execution
entry
**Execution Changes:**
- `backend/executor/manager.py`:
- Added skip logic in `_on_graph_execution()` dispatch loop
- When a node is in `nodes_to_skip`, it is marked as `COMPLETED` without
execution
- No outputs are produced, so downstream nodes won't trigger
#### Frontend
**Node Store:**
- `frontend/src/app/(platform)/build/stores/nodeStore.ts`:
- Added `credentials_optional` to node metadata serialization in
`convertCustomNodeToBackendNode()`
- Added `getCredentialsOptional()` and `setCredentialsOptional()` helper
methods
**Credential Field Component:**
-
`frontend/src/components/renderers/input-renderer/fields/CredentialField/CredentialField.tsx`:
- Added "Optional - skip block if not configured" switch toggle
- Switch controls the `credentials_optional` metadata flag
- Placeholder text updates based on optional state
**Credential Field Hook:**
-
`frontend/src/components/renderers/input-renderer/fields/CredentialField/useCredentialField.ts`:
- Added `disableAutoSelect` parameter
- When credentials are optional, auto-selection of credentials is
disabled
**Feature Flags:**
- `frontend/src/services/feature-flags/use-get-flag.ts`: Minor refactor
(condition ordering)
### Checklist 📋
#### For code changes:
- [x] I have clearly listed my changes in the PR description
- [x] I have made a test plan
- [x] I have tested my changes according to the test plan:
- [x] Build an agent using smart decision maker and down stream blocks
to test this
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> Introduces optional credentials across graph execution and UI,
allowing nodes to be skipped (no outputs, no downstream triggers) when
their credentials are not configured.
>
> - Backend
> - Adds `Node.credentials_optional` (from node `metadata`) and computes
required credential fields in `Graph.credentials_input_schema` based on
usage.
> - Validates credentials with `_validate_node_input_credentials` →
returns `(errors, nodes_to_skip)`; plumbs `nodes_to_skip` through
`validate_graph_with_credentials`,
`_construct_starting_node_execution_input`,
`validate_and_construct_node_execution_input`, and `add_graph_execution`
into `GraphExecutionEntry`.
> - Executor: dispatch loop skips nodes in `nodes_to_skip` (marks
`COMPLETED`); `execute_node`/`on_node_execution` accept `nodes_to_skip`;
`SmartDecisionMakerBlock.run` filters tool functions whose
`_sink_node_id` is in `nodes_to_skip` and errors only if all tools are
filtered.
> - Models: `GraphExecutionEntry` gains `nodes_to_skip` field. Tests and
snapshots updated accordingly.
>
> - Frontend
> - Builder: credential field uses `custom/credential_field` with an
"Optional – skip block if not configured" toggle; `nodeStore` persists
`credentials_optional` and history; UI hides optional toggle in run
dialogs.
> - Run dialogs: compute required credentials from
`credentials_input_schema.required`; allow selecting "None"; avoid
auto-select for optional; filter out incomplete creds before execute.
> - Minor schema/UI wiring updates (`uiSchema`, form context flags).
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
|
||
|
|
ec00aa951a |
fix(frontend): agent favorites layout (#11733)
## Changes 🏗️ <img width="800" height="744" alt="Screenshot 2026-01-09 at 16 07 08" src="https://github.com/user-attachments/assets/034c97e2-18f3-441c-a13d-71f668ad672f" /> - Remove feature flag for agent favourites ( _keep it always visible_ ) - Fix the layout on the card so the ❤️ icon appears next to the `...` menu - Remove icons on toasts ## Checklist 📋 ### For code changes: - [x] I have clearly listed my changes in the PR description - [x] I have made a test plan - [x] I have tested my changes according to the test plan: - [x] Run the app locally and check the above <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Favorites now respond to the current search term and are available to all users (no feature-flag). * **UI/UX Improvements** * Redesigned Favorites section with simplified header, inline agent counts, updated spacing/dividers, and removal of skeleton placeholders. * Favorite button repositioned and visually simplified on agent cards. * Toast visuals simplified by removing per-type icons and adjusting close-button positioning. <sub>✏️ Tip: You can customize this high-level summary in your review settings.</sub> <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
36fb1ea004 |
fix(platform): store submission validation and marketplace improvements (#11706)
## Summary Major improvements to AutoGPT Platform store submission deletion, creator detection, and marketplace functionality. This PR addresses critical issues with submission management and significantly improves performance. ### 🔧 **Store Submission Deletion Issues Fixed** **Problems Solved**: - ❌ **Wrong deletion granularity**: Deleting entire `StoreListing` (all versions) when users expected to delete individual submissions - ❌ **"Graph not found" errors**: Cascade deletion removing AgentGraphs that were still referenced - ❌ **Multiple submissions deleted**: When removing one submission, all submissions for that agent were removed - ❌ **Deletion of approved content**: Users could accidentally remove live store content **Solutions Implemented**: - ✅ **Granular deletion**: Now deletes individual `StoreListingVersion` records instead of entire listings - ✅ **Protected approved content**: Prevents deletion of approved submissions to keep store content safe - ✅ **Automatic cleanup**: Empty listings are automatically removed when last version is deleted - ✅ **Simplified logic**: Reduced deletion function from 85 lines to 32 lines for better maintainability ### 🔧 **Creator Detection Performance Issues Fixed** **Problems Solved**: - ❌ **Inefficient API calls**: Fetching ALL user submissions just to check if they own one specific agent - ❌ **Complex logic**: Convoluted creator detection requiring multiple database queries - ❌ **Performance impact**: Especially bad for non-creators who would never need this data **Solutions Implemented**: - ✅ **Added `owner_user_id` field**: Direct ownership reference in `LibraryAgent` model - ✅ **Simple ownership check**: `owner_user_id === user.id` instead of complex submission fetching - ✅ **90%+ performance improvement**: Massive reduction in unnecessary API calls for non-creators - ✅ **Optimized data fetching**: Only fetch submissions when user is creator AND has marketplace listing ### 🔧 **Original Store Submission Validation Issues (BUILDER-59F)** Fixes "Agent not found for this user. User ID: ..., Agent ID: , Version: 0" errors: - **Backend validation**: Added Pydantic validation for `agent_id` (min_length=1) and `agent_version` (>0) - **Frontend validation**: Pre-submission validation with user-friendly error messages - **Agent selection flow**: Fixed `agentId` not being set from `selectedAgentId` - **State management**: Prevented state reset conflicts clearing selected agent ### 🔧 **Marketplace Display Improvements** Enhanced version history and changelog display: - Updated title from "Changelog" to "Version history" - Added "Last updated X ago" with proper relative time formatting - Display version numbers as "Version X.0" format - Replaced all hardcoded values with dynamic API data - Improved text sizes and layout structure ### 📁 **Files Changed** **Backend Changes**: - `backend/api/features/store/db.py` - Simplified deletion logic, added approval protection - `backend/api/features/store/model.py` - Added `listing_id` field, Pydantic validation - `backend/api/features/library/model.py` - Added `owner_user_id` field for efficient creator detection - All test files - Updated with new required fields **Frontend Changes**: - `useMarketplaceUpdate.ts` - Optimized creator detection logic - `MainDashboardPage.tsx` - Added `listing_id` mapping for proper type safety - `useAgentTableRow.ts` - Updated deletion logic to use `store_listing_version_id` - `usePublishAgentModal.ts` - Fixed state reset conflicts - Marketplace components - Enhanced version history display ### ✅ **Benefits** **Performance**: - 🚀 **90%+ reduction** in unnecessary API calls for creator detection - 🚀 **Instant ownership checks** (no database queries needed) - 🚀 **Optimized submissions fetching** (only when needed) **User Experience**: - ✅ **Granular submission control** (delete individual versions, not entire listings) - ✅ **Protected approved content** (prevents accidental store content removal) - ✅ **Better error prevention** (no more "Graph not found" errors) - ✅ **Clear validation messages** (user-friendly error feedback) **Code Quality**: - ✅ **Simplified deletion logic** (85 lines → 32 lines) - ✅ **Better type safety** (proper `listing_id` field usage) - ✅ **Cleaner creator detection** (explicit ownership vs inferred) - ✅ **Automatic cleanup** (empty listings removed automatically) ### 🧪 **Testing** - [x] Backend validation rejects empty agent_id and zero agent_version - [x] Frontend TypeScript compilation passes - [x] Store submission works from both creator dashboard and "become a creator" flows - [x] Granular submission deletion works correctly - [x] Approved submissions are protected from deletion - [x] Creator detection is fast and accurate - [x] Marketplace displays version history correctly **Breaking Changes**: None - All changes are additive and backwards compatible. Fixes critical submission deletion issues, improves performance significantly, and enhances user experience across the platform. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Agent ownership is now tracked and exposed across the platform. * Store submissions and versions now include a required listing_id to preserve listing linkage. * **Bug Fixes** * Prevent deletion of APPROVED submissions; remove empty listings after deletions. * Edits restricted to PENDING submissions with clearer invalid-operation messages. * **Improvements** * Stronger publish validation and UX guards; deduplicated images and modal open/reset refinements. * Version history shows relative "Last updated" times and version badges. * **Tests** * E2E tests updated to target pending-submission flows for edit/delete. <sub>✏️ Tip: You can customize this high-level summary in your review settings.</sub> <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Claude <noreply@anthropic.com> |
||
|
|
fc25e008b3 |
feat(frontend): update library agent cards to use DS (#11720)
## Changes 🏗️ <img width="700" height="838" alt="Screenshot 2026-01-07 at 16 11 04" src="https://github.com/user-attachments/assets/0b38d2e1-d4a8-4036-862c-b35c82c496c2" /> - Update the agent library cards to new designs - Update page to use Design System components - Allow to edit/delete/duplicate agents on the library list page - Add missing actions on library agent detail page ## Checklist 📋 ### For code changes: - [x] I have clearly listed my changes in the PR description - [x] I have made a test plan - [x] I have tested my changes according to the test plan: - [x] Run locally and test the above <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Marketplace info shown on agent cards and improved favoriting with optimistic UI and feedback. * Delete agent and delete schedule flows with confirmation dialogs. * **Refactor** * New composable form system, modernized upload dialog, streamlined search bar, and multiple library components converted to named exports with layout tweaks. * New agent card menu and favorite button UI. * **Chores** * Removed notification UI and dropped a drag-drop dependency. * **Tests** * Increased timeouts and stabilized upload/pagination flows. <sub>✏️ Tip: You can customize this high-level summary in your review settings.</sub> <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
b0855e8cf2 |
feat(frontend): context menu right click new builder (#11703)
## Changes 🏗️ <img width="250" height="504" alt="Screenshot 2026-01-06 at 17 53 26" src="https://github.com/user-attachments/assets/52013448-f49c-46b6-b86a-39f98270cbc3" /> <img width="300" height="544" alt="Screenshot 2026-01-06 at 17 53 29" src="https://github.com/user-attachments/assets/e6334034-68e4-4346-9092-3774ab3e8445" /> On the **New Builder**: - right-click on a node menu make it show the context menu - use the same menu for right-click and when clicking on `...` ## Checklist 📋 ### For code changes: - [x] I have clearly listed my changes in the PR description - [x] I have made a test plan - [x] I have tested my changes according to the test plan: - [x] Run locally and test the above <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added a custom right-click context menu for nodes with Copy, Open agent (when available), and Delete actions; browser default menu is suppressed while preserving zoom/drag/wiring. * Introduced reusable SecondaryMenu primitives for context and dropdown menus. * **Documentation** * Added Storybook examples demonstrating the context menu and dropdown menu usage. * **Style** * Updated menu styling and icons with improved consistency and dark-mode support. <sub>✏️ Tip: You can customize this high-level summary in your review settings.</sub> <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
5e2146dd76 |
feat(frontend): add CustomSchemaField wrapper for dynamic form field routing
(#11722) ### Changes 🏗️ This PR introduces automatic UI schema generation for custom form fields, eliminating manual field mapping. #### 1. **generateUiSchemaForCustomFields Utility** (`generate-ui-schema.ts`) - New File - Auto-generates `ui:field` settings for custom fields - Detects custom fields using `findCustomFieldId()` matcher - Handles nested objects and array items recursively - Merges with existing UI schema without overwriting #### 2. **FormRenderer Integration** (`FormRenderer.tsx`) - Imports and uses `generateUiSchemaForCustomFields` - Creates merged UI schema with `useMemo` - Passes merged schema to Form component - Enables automatic custom field detection #### 3. **Preprocessor Cleanup** (`input-schema-pre-processor.ts`) - Removed manual `$id` assignment for custom fields - Removed unused `findCustomFieldId` import - Simplified to focus only on type validation ### Why these changes? - Custom fields now auto-detect without manual `ui:field` configuration - Uses standard RJSF approach (UI schema) for field routing - Centralized custom field detection logic improves maintainability ### Checklist 📋 #### For code changes: - [x] I have clearly listed my changes in the PR description - [x] I have made a test plan - [x] I have tested my changes according to the test plan: - [x] Verify custom fields render correctly when present in schema - [x] Verify standard fields continue to render with default SchemaField - [x] Verify multiple instances of same custom field type have unique IDs - [x] Test form submission with custom fields <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Improved custom field rendering in forms by optimizing the UI schema generation process. <sub>✏️ Tip: You can customize this high-level summary in your review settings.</sub> <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
3ae08cd48e |
feat(frontend): use Google Drive Picker on new builder (#11702)
## Changes 🏗️ <img width="600" height="960" alt="Screenshot 2026-01-06 at 17 40 23" src="https://github.com/user-attachments/assets/61085ec5-a367-45c7-acaa-e3fc0f0af647" /> - So when using Google Blocks on the new builder, it shows Google Drive Picket 🏁 ## Checklist 📋 ### For code changes: - [x] I have clearly listed my changes in the PR description - [x] I have made a test plan - [x] Run app locally and test the above <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added a Google Drive picker field and widget for forms with an always-visible remove button and improved single/multi selection handling. * **Bug Fixes** * Better validation and normalization of selected files and consolidated error messaging. * Adjusted layout spacing around the picker and selected files for clearer display. <sub>✏️ Tip: You can customize this high-level summary in your review settings.</sub> <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
4db13837b9 |
Revert "extracted frontend changes out of the hackathon/copilot branch"
This reverts commit
|
||
|
|
df87867625 | extracted frontend changes out of the hackathon/copilot branch | ||
|
|
e503126170 |
feat(frontend): upgrade RJSF to v6 and implement new FormRenderer system
(#11677) 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: - [x] I have clearly listed my changes in the PR description - [x] I have made a test plan - [x] I have tested my changes according to the test plan: - [x] Test form rendering with various field types (text, number, boolean, arrays, objects) - [x] Test anyOf field type selector functionality - [x] Test array item addition/removal - [x] Test nested object fields with additional properties - [x] Test input/output node handle connections - [x] Test draft recovery with diff display - [x] Verify backward compatibility with existing agents - [x] Test field validation and error display - [x] Verify handle ID generation for complex schemas <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## 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. <sub>✏️ Tip: You can customize this high-level summary in your review settings.</sub> <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
01f443190e |
fix(frontend): allow empty values in number inputs and fix AnyOfField toggle (#11661)
<!-- ⚠️ Reminder: Think about your Changeset/Docs changes! --> <!-- If you are introducing new blocks or features, document them for users. --> <!-- Reference: https://github.com/Significant-Gravitas/AutoGPT/blob/dev/CONTRIBUTING.md --> ## Summary This PR fixes two related issues with number/integer inputs in the frontend: 1. **HTMLType typo fix**: INTEGER input type was incorrectly mapped to `htmlType: 'account'` (which is not a valid HTML input type) instead of `htmlType: 'number'`. 2. **AnyOfField toggle fix**: When a user cleared a number input field, the input would disappear because `useAnyOfField` checked for both `null` AND `undefined` in `isEnabled`. This PR changes it to only check for explicit `null` (set by toggle off), allowing `undefined` (empty input) to keep the field visible. ### Root cause analysis When a user cleared a number input: 1. `handleChange` returned `undefined` (because `v === "" ? undefined : Number(v)`) 2. In `useAnyOfField`, `isEnabled = formData !== null && formData !== undefined` became `false` 3. The input field disappeared ### Fix Changed `useAnyOfField.tsx` line 67: ```diff - const isEnabled = formData !== null && formData !== undefined; + const isEnabled = formData !== null; ``` This way: - When toggle is OFF → `formData` is `null` → `isEnabled` is `false` (input hidden) ✓ - When toggle is ON but input is cleared → `formData` is `undefined` → `isEnabled` is `true` (input visible) ✓ ## Test plan - [x] Verified INTEGER inputs now render correctly with `type="number"` - [x] Verified clearing a number input keeps the field visible - [x] Verified toggling the nullable switch still works correctly Fixes #11594 🤖 AI-assisted development disclaimer: This PR was developed with assistance from Claude Code. --------- Signed-off-by: majiayu000 <1835304752@qq.com> Co-authored-by: Abhimanyu Yadav <122007096+Abhi1992002@users.noreply.github.com> |
||
|
|
bdba0033de |
refactor(frontend): move NodeInput files (#11695)
## Changes 🏗️ Move the `<NodeInput />` component next to the old builder code where it is used. ## Checklist 📋 ### For code changes: - [x] I have clearly listed my changes in the PR description - [x] I have made a test plan - [x] I have tested my changes according to the test plan: - [x] Run app locally and click around, E2E is fine |
||
|
|
fba61c72ed |
feat(frontend): fix duplicate publish button and improve BuilderActionButton styling
(#11669) Fixes duplicate "Publish to Marketplace" buttons in the builder by adding a `showTrigger` prop to control modal trigger visibility. <img width="296" height="99" alt="Screenshot 2025-12-23 at 8 18 58 AM" src="https://github.com/user-attachments/assets/d5dbfba8-e854-4c0c-a6b7-da47133ec815" /> ### Changes 🏗️ **BuilderActionButton.tsx** - Removed borders on hover and active states for a cleaner visual appearance - Added `hover:border-none` and `active:border-none` to maintain consistent styling during interactions **PublishToMarketplace.tsx** - Pass `showTrigger={false}` to `PublishAgentModal` to hide the default trigger button - This prevents duplicate buttons when a custom trigger is already rendered **PublishAgentModal.tsx** - Added `showTrigger` prop (defaults to `true`) to conditionally render the modal trigger - Allows parent components to control whether the built-in trigger button should be displayed - Maintains backward compatibility with existing usage ### Checklist 📋 #### For code changes: - [x] I have clearly listed my changes in the PR description - [x] I have made a test plan - [x] I have tested my changes according to the test plan: - [x] Verify only one "Publish to Marketplace" button appears in the builder - [x] Confirm button hover/active states display correctly without border artifacts - [x] Verify modal can still be triggered programmatically without the trigger button |
||
|
|
66f0d97ca2 |
fix(frontend): hide better chat link if not enabled (#11648)
## Changes 🏗️ - Make `<Navbar />` a client component so its rendering is more predictable - Remove the `useMemo()` for the chat link to prevent the flash... - Make sure chat is added to the navbar links only after checking the flag is enabled - Improve logout with `useTransition` - Simplify feature flags setup ## Checklist 📋 ### For code changes: - [x] I have clearly listed my changes in the PR description - [x] I have made a test plan - [x] I have tested my changes according to the test plan: - [x] Run locally and test the above <!-- CURSOR_SUMMARY --> --- > [!NOTE] > Ensures the `Chat` nav item is hidden when the feature flag is off across desktop and mobile nav. > > - Inline-filters `loggedInLinks` to skip `Chat` when `Flag.CHAT` is false for both `NavbarLink` rendering and `MobileNavBar` menu items > - Removes `useMemo`/`linksWithChat` helper; maps directly over `loggedInLinks` and filters nulls in mobile, keeping icon mapping intact > - Cleans up unused `useMemo` import > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 79c42d87b4adb05155be684e1d0576073e872680. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY --> |
||
|
|
88731b1f76 |
feat(platform): marketplace update notifications with enhanced publishing workflow (#11630)
## Summary This PR implements a comprehensive marketplace update notification system that allows users to discover and update to newer agent versions, along with enhanced publishing workflows and UI improvements. <img width="1500" height="533" alt="image" src="https://github.com/user-attachments/assets/ee331838-d712-4718-b231-1f9ec21bcd8e" /> <img width="600" height="610" alt="image" src="https://github.com/user-attachments/assets/b881a7b8-91a5-460d-a159-f64765b339f1" /> <img width="1500" height="416" alt="image" src="https://github.com/user-attachments/assets/a2d61904-2673-4e44-bcc5-c47d36af7a38" /> <img width="1500" height="1015" alt="image" src="https://github.com/user-attachments/assets/2dd978c7-20cc-4230-977e-9c62157b9f23" /> ## Core Features ### 🔔 Marketplace Update Notifications - **Update detection**: Automatically detects when marketplace has newer agent versions than user's local copy - **Creator notifications**: Shows banners for creators with unpublished changes ready to publish - **Non-creator support**: Enables regular users to discover and update to newer marketplace versions - **Version comparison**: Intelligent logic comparing `graph_version` vs marketplace listing versions ### 📋 Enhanced Publishing Workflow - **Builder integration**: Added "Publish to Marketplace" button directly in the builder actions - **Unified banner system**: Consistent `MarketplaceBanners` component across library and marketplace pages - **Streamlined UX**: Fixed layout issues, improved button placement and styling - **Modal improvements**: Fixed thumbnail loading race conditions and infinite loop bugs ### 📚 Version History & Changelog - **Inline version history**: Added version changelog directly to marketplace agent pages - **Version comparison**: Clear display of available versions with current version highlighting - **Update mechanism**: Direct updates using `graph_version` parameter for accuracy ## Technical Implementation ### Backend Changes - **Database schema**: Added `agentGraphVersions` and `agentGraphId` fields to `StoreAgent` model - **API enhancement**: Updated store endpoints to expose graph version data for version comparison - **Data migration**: Fixed agent version field naming from `version` to `agentGraphVersions` - **Model updates**: Enhanced `LibraryAgentUpdateRequest` with `graph_version` field ### Frontend Architecture - **`useMarketplaceUpdate` hook**: Centralized marketplace update detection and creator identification - **`MarketplaceBanners` component**: Unified banner system with proper vertical layout and styling - **`AgentVersionChangelog` component**: Version history display for marketplace pages - **`PublishToMarketplace` component**: Builder integration with modal workflow ### Key Bug Fixes - **Thumbnail loading**: Fixed race condition where images wouldn't load on first modal open - **Infinite loops**: Used refs to prevent circular dependencies in `useThumbnailImages` hook - **Layout issues**: Fixed banner placement, removed duplicate breadcrumbs, corrected vertical layout - **Field naming**: Fixed `agent_version` vs `version` field inconsistencies across APIs ## Files Changed ### Backend - `autogpt_platform/backend/backend/server/v2/store/` - Enhanced store API with graph version data - `autogpt_platform/backend/backend/server/v2/library/` - Updated library API models - `autogpt_platform/backend/migrations/` - Database migrations for version fields - `autogpt_platform/backend/schema.prisma` - Schema updates for graph versions ### Frontend - `src/app/(platform)/components/MarketplaceBanners/` - New unified banner component - `src/app/(platform)/library/agents/[id]/components/` - Enhanced library views with banners - `src/app/(platform)/build/components/BuilderActions/` - Added marketplace publish button - `src/app/(platform)/marketplace/components/AgentInfo/` - Added inline version history - `src/components/contextual/PublishAgentModal/` - Fixed thumbnail loading and modal workflow ## User Experience Impact - **Better discovery**: Users automatically notified of newer agent versions - **Streamlined publishing**: Direct publish access from builder interface - **Reduced friction**: Fixed UI bugs, improved loading states, consistent design - **Enhanced transparency**: Inline version history on marketplace pages - **Creator workflow**: Better notifications for creators with unpublished changes ## Testing - ✅ Update banners appear correctly when marketplace has newer versions - ✅ Creator banners show for users with unpublished changes - ✅ Version comparison logic works with graph_version vs marketplace versions - ✅ Publish button in builder opens modal correctly with pre-populated data - ✅ Thumbnail images load properly on first modal open without infinite loops - ✅ Database migrations completed successfully with version field fixes - ✅ All existing tests updated and passing with new schema changes 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> --------- Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: Lluis Agusti <hi@llu.lu> Co-authored-by: Ubbe <hi@ubbe.dev> Co-authored-by: Reinier van der Leer <pwuts@agpt.co> |
||
|
|
08a60dcb9b |
refactor(frontend): Clean up React Query-related code (#11604)
- #11603 ### Changes 🏗️ Frontend: - Make `okData` infer the response data type instead of casting - Generalize infinite query utilities from `SidebarRunsList/helpers.ts` - Move to `@/app/api/helpers` and use wherever possible - Simplify/replace boilerplate checks and conditions with `okData` in many places - Add `useUserTimezone` hook to replace all the boilerplate timezone queries Backend: - Fix response type annotation of `GET /api/store/graph/{store_listing_version_id}` endpoint - Fix documentation and error behavior of `GET /api/review/execution/{graph_exec_id}` endpoint ### Checklist 📋 #### For code changes: - [x] I have clearly listed my changes in the PR description - [x] I have made a test plan - [x] I have tested my changes according to the test plan: - CI passes - [x] Clicking around the app manually -> no obvious issues - [x] Test Onboarding step 5 (run) - [x] Library runs list loads normally |
||
|
|
217e3718d7 |
feat(platform): implement HITL UI redesign with improved review flow (#11529)
## Summary • Redesigned Human-in-the-Loop review interface with yellow warning scheme • Implemented separate approved_data/rejected_data output pins for human_in_the_loop block • Added real-time execution status tracking to legacy flow for review detection • Fixed button loading states and improved UI consistency across flows • Standardized Tailwind CSS usage removing custom values <img width="1500" alt="image" src="https://github.com/user-attachments/assets/4ca6dd98-f3c4-41c0-a06b-92b3bca22490" /> <img width="1500" alt="image" src="https://github.com/user-attachments/assets/0afae211-09f0-465e-b477-c3949f13c876" /> <img width="1500" alt="image" src="https://github.com/user-attachments/assets/05d9d1ed-cd40-4c73-92b8-0dab21713ca9" /> ## Changes Made ### Backend Changes - Modified `human_in_the_loop.py` block to output separate `approved_data` and `rejected_data` pins instead of single reviewed_data with status - Updated block output schema to support better data flow in graph builder ### Frontend UI Changes - Redesigned PendingReviewsList with yellow warning color scheme (replacing orange) - Fixed button loading states to show spinner only on clicked button - Improved FloatingReviewsPanel layout removing redundant headers - Added real-time status tracking to legacy flow using useFlowRealtime hook - Fixed AgentActivityDropdown text overflow and layout issues - Enhanced Safe Mode toggle positioning and toast timing - Standardized all custom Tailwind values to use standard classes ### Design System Updates - Added yellow design tokens (25, 150, 600) for warning states - Unified REVIEW status handling across all components - Improved component composition patterns ## Test Plan - [x] Verify HITL blocks create separate output pins for approved/rejected data - [x] Test review flow works in both new and legacy flow builders - [x] Confirm button loading states work correctly (only clicked button shows spinner) - [x] Validate AgentActivityDropdown properly displays review status - [x] Check Safe Mode toggle positioning matches old flow - [x] Ensure real-time status updates work in legacy flow - [x] Verify yellow warning colors are consistent throughout 🤖 Generated with [Claude Code](https://claude.ai/code) --------- Co-authored-by: Lluis Agusti <hi@llu.lu> |
||
|
|
3dbc03e488 |
feat(platform): OAuth API & Single Sign-On (#11617)
We want to provide Single Sign-On for multiple AutoGPT apps that use the Platform as their backend. ### Changes 🏗️ Backend: - DB + logic + API for OAuth flow (w/ tests) - DB schema additions for OAuth apps, codes, and tokens - Token creation/validation/management logic - OAuth flow endpoints (app info, authorize, token exchange, introspect, revoke) - E2E OAuth API integration tests - Other OAuth-related endpoints (upload app logo, list owned apps, external `/me` endpoint) - App logo asset management - Adjust external API middleware to support auth with access token - Expired token clean-up job - Add `OAUTH_TOKEN_CLEANUP_INTERVAL_HOURS` setting (optional) - `poetry run oauth-tool`: dev tool to test the OAuth flows and register new OAuth apps - `poetry run export-api-schema`: dev tool to quickly export the OpenAPI schema (much quicker than spinning up the backend) Frontend: - Frontend UI for app authorization (`/auth/authorize`) - Re-redirect after login/signup - Frontend flow to batch-auth integrations on request of the client app (`/auth/integrations/setup-wizard`) - Debug `CredentialInputs` component - Add `/profile/oauth-apps` management page - Add `isOurProblem` flag to `ErrorCard` to hide action buttons when the error isn't our fault - Add `showTitle` flag to `CredentialsInput` to hide built-in title for layout reasons DX: - Add [API guide](https://github.com/Significant-Gravitas/AutoGPT/blob/pwuts/sso/docs/content/platform/integrating/api-guide.md) and [OAuth guide](https://github.com/Significant-Gravitas/AutoGPT/blob/pwuts/sso/docs/content/platform/integrating/oauth-guide.md) ### Checklist 📋 #### For code changes: - [x] I have clearly listed my changes in the PR description - [x] I have made a test plan - [x] I have tested my changes according to the test plan: - [x] Manually verify test coverage of OAuth API tests - Test `/auth/authorize` using `poetry run oauth-tool test-server` - [x] Works - [x] Looks okay - Test `/auth/integrations/setup-wizard` using `poetry run oauth-tool test-server` - [x] Works - [x] Looks okay - Test `/profile/oauth-apps` page - [x] All owned OAuth apps show up - [x] Enabling/disabling apps works - [ ] ~~Uploading logos works~~ can only test this once deployed to dev #### For configuration changes: - [x] `.env.default` is updated or already compatible with my changes - [x] `docker-compose.yml` is updated or already compatible with my changes - [x] I have included a list of my configuration changes in the PR description (under **Changes**) |
||
|
|
c5e8b0b08f |
fix(frontend): modal hidden overflow (#11642)
## Changes 🏗️ ### Before <img width="300" height="528" alt="Screenshot 2025-12-18 at 19 07 37" src="https://github.com/user-attachments/assets/6bedf02d-e1fd-4f87-956e-96fcd9996392" /> ### After <img width="300" height="576" alt="Screenshot 2025-12-18 at 19 02 12" src="https://github.com/user-attachments/assets/f3175b94-447c-41b0-83cf-4334c02d1378" /> ## Checklist 📋 ### For code changes: - [x] I have clearly listed my changes in the PR description - [x] I have made a test plan - [x] I have tested my changes according to the test plan: - [x] Run locally and check crop |
||
|
|
cd3e35df9e |
fix(frontend): small library/mobile improvements (#11626)
## Changes 🏗️ Adds the following improvements: ### Prevent credential row overflowing on mobile 📱 **Before** <img width="300" height="469" alt="Screenshot 2025-12-15 at 16 42 05" src="https://github.com/user-attachments/assets/0d27394c-cec9-45a4-be82-804827343212" /> **After** <img width="300" height="446" alt="Screenshot 2025-12-15 at 16 44 22" src="https://github.com/user-attachments/assets/0f19e220-500d-4488-955e-612d38704727" /> _Just hide the ****** on mobile..._ ### Make touch targets bigger on 📱 on the mobile menu **Before** <img width="300" height="607" alt="Screenshot 2025-12-15 at 16 58 28" src="https://github.com/user-attachments/assets/762b7d4e-5269-41a4-88d2-ea745c50324e" /> Touch targets were quite small on mobile, especially for people with big fingers... **After** <img width="300" height="589" alt="Screenshot 2025-12-15 at 16 54 02" src="https://github.com/user-attachments/assets/beede0c4-5439-47a9-8bec-143b44306c6b" /> ### New `<OverflowText />` component <img width="600" height="551" alt="Screenshot 2025-12-15 at 16 48 20" src="https://github.com/user-attachments/assets/a969223f-dd6a-497a-857e-18483aea28d7" /> A component that will render text like `<Text />`, but automatically displays `...` and the full text content on a tooltip if it detects there is no space for the full text length. Pretty useful for the type of dashboard we are building, where sometimes titles or user-generated content can be quite long, making the UI look whack. ### Google Drive Picker Only allow the removal of files if it is not in read-only mode. ## Checklist 📋 ### For code changes: - [x] I have clearly listed my changes in the PR description - [x] I have made a test plan - [x] I have tested my changes according to the test plan: - [x] Checkout branch locally - [x] Test the above |
||
|
|
e640d36265 |
feat(frontend): Add special handling for AGENT block type in form and output handlers (#11595)
<!-- Clearly explain the need for these changes: --> Agent blocks require different handling compared to standard blocks, particularly for: - Handle ID generation (using direct keys instead of generated IDs) - Form data storage structure (nested under `inputs` key) - Field ID parsing (filtering out schema path prefixes) This PR implements special handling for `BlockUIType.AGENT` throughout the form rendering and output handling components to ensure agents work correctly in the flow editor. ### Changes 🏗️ <!-- Concisely describe all of the changes made in this pull request: --> - **CustomNode.tsx**: Pass `uiType` prop to `OutputHandler` component - **FormCreator.tsx**: - Store agent form data in `hardcodedValues.inputs` instead of directly in `hardcodedValues` - Extract initial values from `hardcodedValues.inputs` for agent blocks - **OutputHandler.tsx**: - Accept `uiType` prop - Use direct key as handle ID for agents instead of `generateHandleId(key)` - **useMarketplaceAgentsContent.ts**: - Fetch full agent details using `getV2GetLibraryAgent` before adding to builder - Ensures agent schemas are properly populated (fixes issue where marketplace endpoint returns empty schemas) - **AnyOfField.tsx**: Generate handle IDs for agents by filtering out "root" and "properties" from schema path - **FieldTemplate.tsx**: Apply same handle ID generation logic for agent fields ### Checklist 📋 #### For code changes: - [x] I have clearly listed my changes in the PR description - [x] I have made a test plan - [x] I have tested my changes according to the test plan: - [x] Add an agent block from marketplace and verify it renders correctly - [x] Connect inputs/outputs to/from an agent block and verify connections work - [x] Fill in form fields for an agent block and verify data persists correctly - [x] Verify agent blocks work in both new and existing flows - [x] Test that non-agent blocks still work as before (regression test) |
||
|
|
e8d37ab116 |
feat(frontend): add nice scrollable tabs on Selected Run view (#11596)
## Changes 🏗️ https://github.com/user-attachments/assets/7e49ed5b-c818-4aa3-b5d6-4fa86fada7ee When the content of Summary + Outputs + Inputs is long enough, it will show in this new `<ScrollableTabs />` component, which auto-scrolls the content as you click on a tab. ## Checklist 📋 ### For code changes - [x] I have clearly listed my changes in the PR description - [x] I have made a test plan - [x] I have tested my changes according to the test plan: - [x] Run the app locally - [x] Check the new page with scrollable tabs |
||
|
|
7f7ef6a271 |
feat(frontend): imporve agent inputs read-only (#11621)
## Changes 🏗️ The main goal of this PR is to improve how we display inputs used for a given task. Agent inputs can be of many types (text, long text, date, select, file, etc.). Until now, we have tried to display them as text, which has not always worked. Given we already have `<RunAgentInputs />`, which uses form elements to display the inputs ( _prefilled with data_ ), most of the time it will look better and less buggy than text. ### Before <img width="800" height="614" alt="Screenshot 2025-12-14 at 17 45 44" src="https://github.com/user-attachments/assets/3d851adf-9638-46c1-adfa-b5e68dc78bb0" /> ### After <img width="800" height="708" alt="Screenshot 2025-12-14 at 17 45 21" src="https://github.com/user-attachments/assets/367f32b4-2c30-4368-8d63-4cad06e32437" /> ### Other improvements - 🗑️ Removed `<EditInputsModal />` - it is not used given the API does not support editing inputs for a schedule yt - Made `<InformationTooltip />` icon size customisable ### Checklist 📋 #### For code changes: - [x] I have clearly listed my changes in the PR description - [x] I have made a test plan - [x] I have tested my changes according to the test plan: - [x] Run the app locally - [x] Check the new view tasks use the form elements instead of text to display inputs |
||
|
|
f8afc6044e |
fix(frontend): prevent file upload buttons from triggering form submission (#11576)
<!-- Clearly explain the need for these changes: --> In the File Widget, the upload button was incorrectly behaving like a submit button. When users clicked it, the rjsf library immediately triggered form validation and displayed validation errors, even though the user was only trying to upload a file. This happened because HTML buttons inside a form default to `type="submit"`, which triggers form submission on click. By explicitly setting `type="button"` on all file-related buttons, we prevent them from submitting the form while still allowing them to trigger the file input dialog. ### Changes 🏗️ <!-- Concisely describe all of the changes made in this pull request: --> - Added `type="button"` attribute to the clear button in the compact variant - Added `type="button"` attribute to the upload button in the compact variant - Added `type="button"` attribute to the "Browse File" button in the default variant This ensures that clicking any of these buttons only triggers the intended file selection/upload action without causing unwanted form validation or submission. ### Checklist 📋 #### For code changes: - [x] I have clearly listed my changes in the PR description - [x] I have made a test plan - [x] I have tested my changes according to the test plan: - [x] Tested clicking the upload button in a form with File Widget - form should not submit or show validation errors - [x] Tested clicking the clear button - should clear the file without triggering form validation - [x] Tested clicking the "Browse File" button - should open file dialog without triggering form validation - [x] Verified file upload functionality still works correctly after selecting a file |
||
|
|
c9681f5d44 |
fix(frontend): library page adjustments (#11587)
## Changes 🏗️ ### Adjust layout and styles on mobile 📱 <img width="448" height="843" alt="Screenshot 2025-12-09 at 22 53 14" src="https://github.com/user-attachments/assets/159bdf4f-e6b2-42f5-8fdf-25f8a62c62d1" /> ### Make the sidebar cards have contextual actions <img width="486" height="243" alt="Screenshot 2025-12-09 at 22 53 27" src="https://github.com/user-attachments/assets/2f530168-3217-47c4-b08d-feccbb9e9152" /> Depending on the card type, different type of actions are shown... ### Make buttons in "About agent" card do something <img width="344" height="346" alt="Screenshot 2025-12-09 at 22 54 01" src="https://github.com/user-attachments/assets/47181f80-1f68-4ef1-aecc-bbadc7cc9c44" /> ### Other - Hide `Schedule` button for agents with trigger run type - Adjust secondary button background colour... - Make drawer content scrollable on mobile ## Checklist 📋 #### For code changes: - [x] I have clearly listed my changes in the PR description - [x] I have made a test plan - [x] I have tested my changes according to the test plan: - [x] Run locally and test the above Co-authored-by: Abhimanyu Yadav <122007096+Abhi1992002@users.noreply.github.com> |
||
|
|
1305325813 |
fix(frontend): preserve button shape in credential select when content is long (#11577)
<!-- Clearly explain the need for these changes: --> When the content inside the credential select dropdown becomes too long, the adjacent link buttons lose their rounded shape and appear squarish. This happens when the text stretches the container or affects the layout of the buttons. The issue occurs because the button's width can shrink below its intended size when the flex container is stretched by long credential names. By adding an explicit minimum width constraint with `!min-w-8`, we ensure the button maintains its proper dimensions and rounded appearance regardless of the select dropdown's content length. ### Changes 🏗️ <!-- Concisely describe all of the changes made in this pull request: --> - Added `!min-w-8` to the external link button's className in `SelectCredential` component to enforce a minimum width of 2rem (8 * 0.25rem) - This ensures the button maintains its rounded shape even when the adjacent select dropdown contains long credential names ### Checklist 📋 #### For code changes: - [x] I have clearly listed my changes in the PR description - [x] I have made a test plan - [x] I have tested my changes according to the test plan: - [x] Tested credential select with short credential names - button should maintain rounded shape - [x] Tested credential select with very long credential names (e.g., long provider names, usernames, and hosts) - button should maintain rounded shape |
||
|
|
aaa8dcc5a8 |
feat(frontend): design updates run agent modal (#11570)
## Changes 🏗️ <img width="500" height="927" alt="Screenshot 2025-12-08 at 16 30 04" src="https://github.com/user-attachments/assets/97170302-50ae-4750-99e1-275861ee9e08" /> <img width="500" height="897" alt="Screenshot 2025-12-08 at 16 30 10" src="https://github.com/user-attachments/assets/0a7ac828-ebea-40de-a19e-fbf77b0c2eb7" /> Update the new **Run Agent Modal** as a new view. From now on, sections ( inputs, credentials, etc... ) are enclosed. Refactor all the existing code to be more readable and [adhere to code conventions](https://github.com/Significant-Gravitas/AutoGPT/blob/master/autogpt_platform/frontend/CONTRIBUTING.md). ### Other improvements - Refactor `<CredentialInputs />`: - to adhere to code conventions - to show all existing credentials for a given provider - to allow deletion of a given credential - to allow to select/switch credentials for a given task - Run Graph Errors: - when the run fails, show the errors nicely on the toast and link to the builder for further debugging - Design System: - secondary button colour has been updated - labels size for form fields has been updated ## Checklist 📋 ### For code changes: - [x] I have clearly listed my changes in the PR description - [x] I have made a test plan - [x] I have tested my changes according to the test plan: - [x] Run the app locally - [x] Test the above updates running agents from the new library page |
||
|
|
a46976decd |
fix(frontend): allow to close toasts (#11550)
## Changes 🏗️ <img width="795" height="275" alt="Screenshot 2025-12-04 at 21 05 55" src="https://github.com/user-attachments/assets/e7572635-3976-4822-89ea-3e5e26196ab8" /> Allow to close toasts 🍞 ## Checklist 📋 #### For code changes: - [x] I have clearly listed my changes in the PR description - [x] I have made a test plan - [x] I have tested my changes according to the test plan: - [x] Run Storybook locally - [x] Toast have a close button top-right --------- Co-authored-by: Abhimanyu Yadav <122007096+Abhi1992002@users.noreply.github.com> |
||
|
|
e4d0dbc283 |
feat(platform): add Agent Output Demo field to marketplace submission form (#11538)
## Summary - Add Agent Output Demo field to marketplace agent submission form, positioned below the Description field - Store agent output demo URLs in database for future CoPilot integration - Implement proper video/image ordering on marketplace pages - Add shared YouTube URL validation utility to eliminate code duplication ## Changes Made ### Frontend - **Agent submission form**: Added Agent Output Demo field with YouTube URL validation - **Edit agent form**: Added Agent Output Demo field for existing submissions - **Marketplace display**: Implemented proper video/image ordering: 1. YouTube/Overview video (if exists) 2. First image (hero) 3. Agent Output Demo (if exists) 4. Additional images - **Shared utilities**: Created `validateYouTubeUrl` function in `src/lib/utils.ts` ### Backend - **Database schema**: Added `agentOutputDemoUrl` field to `StoreListingVersion` model - **Database views**: Updated `StoreAgent` view to include `agent_output_demo` field - **API models**: Added `agent_output_demo_url` to submission requests and `agent_output_demo` to responses - **Database migration**: Added migration to create new column and update view - **Test files**: Updated all test files to include the new required field ## Test Plan - [x] Frontend form validation works correctly for YouTube URLs - [x] Database migration applies successfully - [x] Backend API accepts and returns the new field - [x] Marketplace displays videos in correct order - [x] Both frontend and backend formatting/linting pass - [x] All test files include required field to prevent failures 🤖 Generated with [Claude Code](https://claude.ai/code) --------- Co-authored-by: Claude <noreply@anthropic.com> |
||
|
|
c880db439d |
feat(platform): Backend completion of Onboarding tasks (#11375)
Make onboarding task completion backend-authoritative which prevents cheating (previously users could mark all tasks as completed instantly and get rewards) and makes task completion more reliable. Completion of tasks is moved backend with exception of introductory onboarding tasks and visit-page type tasks. ### Changes 🏗️ - Move incrementing run counter backend and make webhook-triggered and scheduled task execution count as well - Use user timezone for calculating run streak - Frontend task completion is moved from update onboarding state to separate endpoint and guarded so only frontend tasks can be completed - Graph creation, execution and add marketplace agent to library accept `source`, so appropriate tasks can be completed - Replace `client.ts` api calls with orval generated and remove no longer used functions from `client.ts` - Add `resolveResponse` helper function that unwraps orval generated call result to 2xx response Small changes&bug fixes: - Make Redis notification bus serialize all payload fields - Fix confetti when group is finished - Collapse finished group when opening Wallet - Play confetti only for tasks that are listed in the Wallet UI ### Checklist 📋 #### For code changes: - [x] I have clearly listed my changes in the PR description - [x] I have made a test plan - [x] I have tested my changes according to the test plan: - [x] Onboarding can be finished - [x] All tasks can be finished and work properly - [x] Confetti works properly |
||
|
|
f7a8e372dd |
feat(frontend): implement new actions sidebar + summary (#11545)
## Changes 🏗️ <img width="800" height="767" alt="Screenshot 2025-12-04 at 17 40 10" src="https://github.com/user-attachments/assets/37036246-bcdb-46eb-832c-f91fddfd9014" /> <img width="800" height="492" alt="Screenshot 2025-12-04 at 17 40 16" src="https://github.com/user-attachments/assets/ba547e54-016a-403c-9ab6-99465d01af6b" /> On the new Agent Library page: - Implement the new actions sidebar ( main change... ) - Refactor the layout/components to accommodate that - Implement the missing "Summary" functionality - Update icon buttons in Design system with new designs ## Checklist 📋 ### For code changes: - [x] I have clearly listed my changes in the PR description - [x] I have made a test plan - [x] I have tested my changes according to the test plan: - [x] Run the app locally and test it |
||
|
|
3ccc712463 |
feat(frontend): add host-scoped credentials support to CredentialField (#11546)
### Changes 🏗️ This PR adds support for `host_scoped` credential type in the new builder's `CredentialField` component. This enables blocks that require sensitive headers for custom API endpoints to configure host-scoped credentials directly from the credential field. <img width="745" height="843" alt="Screenshot 2025-12-04 at 4 31 09 PM" src="https://github.com/user-attachments/assets/d076b797-64c4-4c31-9c88-47a064814055" /> <img width="418" height="180" alt="Screenshot 2025-12-04 at 4 36 02 PM" src="https://github.com/user-attachments/assets/b4fa6d8d-d8f4-41ff-ab11-7c708017f8fd" /> **Key changes:** - **Added `HostScopedCredentialsModal` component** (`models/HostScopedCredentialsModal/`) - Modal dialog for creating host-scoped credentials with host pattern, optional title, and dynamic header pairs (key-value) - Auto-populates host from discriminator value (URL field) when available - Supports adding/removing multiple header pairs with validation - **Enhanced credential filtering logic** (`helpers.ts`) - Updated `filterCredentialsByProvider` to accept `schema` and `discriminatorValue` parameters - Added intelligent filtering for: - Credential types supported by the block - OAuth credentials with sufficient scopes - Host-scoped credentials matched by host from discriminator value - Extracted `getDiscriminatorValue` helper function for reusability - **Updated `CredentialField` component** - Added `supportsHostScoped` check in `useCredentialField` hook - Conditionally renders `HostScopedCredentialsModal` when `supportsHostScoped && discriminatorValue` is true - Exports `discriminatorValue` for use in child components - **Updated `useCredentialField` hook** - Calculates `discriminatorValue` using new `getDiscriminatorValue` helper - Passes `schema` and `discriminatorValue` to enhanced `filterCredentialsByProvider` function - Returns `supportsHostScoped` and `discriminatorValue` for component consumption **Technical details:** - Host extraction uses `getHostFromUrl` utility to parse host from discriminator value (URL) - Header pairs are managed as state with add/remove functionality - Form validation uses `react-hook-form` with `zod` schema - Credential creation integrates with existing API endpoints and query invalidation ### Checklist 📋 - [x] I have clearly listed my changes in the PR description - [x] I have made a test plan - [x] I have tested my changes according to the test plan: - [x] Verify `HostScopedCredentialsModal` appears when block supports `host_scoped` credentials and discriminator value is present - [x] Test host auto-population from discriminator value (URL field) - [x] Test manual host entry when discriminator value is not available - [x] Test adding/removing multiple header pairs - [x] Test form validation (host required, empty header pairs filtered out) - [x] Test credential creation and successful toast notification - [x] Verify credentials list refreshes after creation - [x] Test host-scoped credential filtering matches credentials by host from URL - [x] Verify existing credential types (api_key, oauth2, user_password) still work correctly - [x] Test OAuth scope filtering still works as expected - [x] Verify modal only shows when `supportsHostScoped && discriminatorValue` conditions are met |
||
|
|
4e87f668e3 |
feat(frontend): add file input widget with variants and base64 support (#11533)
<!-- Clearly explain the need for these changes: --> This PR enhances the FileInput component to support multiple variants and modes, and integrates it into the form renderer as a file widget. The changes enable a more flexible file input experience with both server upload and local base64 conversion capabilities. ### Compact one <img width="354" height="91" alt="Screenshot 2025-12-03 at 8 05 51 PM" src="https://github.com/user-attachments/assets/1295a34f-4d9f-4a65-89f2-4b6516f176ff" /> <img width="386" height="96" alt="Screenshot 2025-12-03 at 8 06 11 PM" src="https://github.com/user-attachments/assets/3c10e350-8ddc-43ff-bf0a-68b23f8db394" /> ## Default one <img width="671" height="165" alt="Screenshot 2025-12-03 at 8 05 08 PM" src="https://github.com/user-attachments/assets/bd17c5f1-8cdb-4818-9850-a9e61252d8c1" /> <img width="656" height="141" alt="Screenshot 2025-12-03 at 8 05 21 PM" src="https://github.com/user-attachments/assets/1edf260f-6245-44b9-bd3e-dd962f497413" /> ### Changes 🏗️ #### FileInput Component Enhancements - **Added variant support**: Introduced `default` and `compact` variants - `default`: Full-featured UI with drag & drop, progress bar, and storage note - `compact`: Minimal inline design suitable for tight spaces like node inputs - **Added mode support**: Introduced `upload` and `base64` modes - `upload`: Uploads files to server (requires `onUploadFile` and `uploadProgress`) - `base64`: Converts files to base64 locally without server upload - **Improved type safety**: Refactored props using discriminated unions (`UploadModeProps | Base64ModeProps`) to ensure type-safe usage - **Enhanced file handling**: Added `getFileLabelFromValue` helper to extract file labels from base64 data URIs or file paths - **Better UX**: Added `showStorageNote` prop to control visibility of storage disclaimer #### FileWidget Integration - **Replaced legacy Input**: Migrated from legacy `Input` component to new `FileInput` component - **Smart variant selection**: Automatically selects `default` or `compact` variant based on form context size - **Base64 mode**: Uses base64 mode for form inputs, eliminating need for server uploads in builder context - **Improved accessibility**: Better disabled/readonly state handling with visual feedback #### Form Renderer Updates - **Disabled validation**: Added `noValidate={true}` and `liveValidate={false}` to prevent premature form validation #### Storybook Updates - **Expanded stories**: Added comprehensive stories for all variant/mode combinations: - `Default`: Default variant with upload mode - `Compact`: Compact variant with base64 mode - `CompactWithUpload`: Compact variant with upload mode - `DefaultWithBase64`: Default variant with base64 mode - **Improved documentation**: Updated component descriptions to clearly explain variants and modes ### Checklist 📋 #### For code changes: - [x] I have clearly listed my changes in the PR description - [x] I have made a test plan - [x] I have tested my changes according to the test plan: - [x] Test FileInput component in Storybook with all variant/mode combinations - [x] Test file upload flow in default variant with upload mode - [x] Test base64 conversion in compact variant with base64 mode - [x] Test file widget in form renderer (node inputs) - [x] Test file type validation (accept prop) - [x] Test file size validation (maxFileSize prop) - [x] Test error handling for invalid files - [x] Test disabled and readonly states - [x] Test file clearing/removal functionality - [x] Verify compact variant renders correctly in tight spaces - [x] Verify default variant shows storage note only in upload mode - [x] Test drag & drop functionality in default variant |
||
|
|
729400dbe1 |
feat(frontend): display graph validation errors inline on node fields (#11524)
When running a graph in the new builder, validation errors were only displayed in toast notifications, making it difficult for users to identify which specific fields had errors. Users needed to see validation errors directly next to the problematic fields within each node for better UX and faster debugging. <img width="1319" height="953" alt="Screenshot 2025-12-03 at 12 48 15 PM" src="https://github.com/user-attachments/assets/d444bc71-9bee-4fa7-8b7f-33339bd0cb24" /> ### Changes 🏗️ - **Error handling in graph execution** (`useRunGraph.ts`): - Added detection for graph validation errors using `ApiError.isGraphValidationError()` - Parse and store node-level errors from backend validation response - Clear all node errors on successful graph execution - Enhanced toast messages to guide users to fix validation errors on highlighted nodes - **Node store error management** (`nodeStore.ts`): - Added `errors` field to node data structure - Implemented `updateNodeErrors()` to set errors for a specific node - Implemented `clearNodeErrors()` to remove errors from a specific node - Implemented `getNodeErrors()` to retrieve errors for a specific node - Implemented `setNodeErrorsForBackendId()` to set errors by backend ID (supports matching by `metadata.backend_id` or node `id`) - Implemented `clearAllNodeErrors()` to clear all node errors across the graph - **Visual error indication** (`CustomNode.tsx`, `NodeContainer.tsx`): - Added error detection logic to identify both configuration errors and output errors - Applied error styling to nodes with validation errors (using `FAILED` status styling) - Nodes with errors now display with red border/ring to visually indicate issues - **Field-level error display** (`FieldTemplate.tsx`): - Fetch node errors from store for the current node - Match field IDs with error keys (handles both underscore and dot notation) - Display field-specific error messages below each field in red text - Added helper function `getFieldErrorKey()` to normalize field IDs for error matching - **Utility helpers** (`helpers.ts`): - Created `getFieldErrorKey()` function to extract field key from field ID (removes `root_` prefix) ### Checklist 📋 #### For code changes: - [x] I have clearly listed my changes in the PR description - [x] I have made a test plan - [x] I have tested my changes according to the test plan: - [x] Create a graph with multiple nodes and intentionally leave required fields empty - [x] Run the graph and verify that validation errors appear in toast notification - [x] Verify that nodes with errors are highlighted with red border/ring styling - [x] Verify that field-specific error messages appear below each problematic field in red text - [x] Verify that error messages handle both underscore and dot notation in field keys - [x] Fix validation errors and run graph again - verify errors are cleared - [x] Verify that successful graph execution clears all node errors - [x] Test with nodes that have `backend_id` in metadata vs nodes without - [x] Verify that nodes without errors don't show error styling - [x] Test with nested fields and array fields to ensure error matching works correctly |
||
|
|
f6608e99c8 |
feat(frontend): add expandable text input modal for better editing experience (#11510)
Text inputs in the form builder can be difficult to edit when dealing with longer content. Users need a way to expand text inputs into a larger, more comfortable editing interface, especially for multi-line text, passwords, and longer string values. https://github.com/user-attachments/assets/443bf4eb-c77c-4bf6-b34c-77091e005c6d ### Changes 🏗️ - **Added `InputExpanderModal` component**: A new modal component that provides a larger textarea (300px min-height) for editing text inputs with the following features: - Copy-to-clipboard functionality with visual feedback (checkmark icon) - Toast notification on successful copy - Auto-focus on open for better UX - Proper state management to reset values when modal opens/closes - **Enhanced `TextInputWidget`**: - Added expand button (ArrowsOutIcon) with tooltip for text, password, and textarea input types - Button appears inline next to the input field - Integrated the new `InputExpanderModal` component - Improved layout with flexbox to accommodate the expand button - Added padding-right to input when expand button is visible to prevent text overlap - **Refactored file structure**: - Moved `TextInputWidget.tsx` into `TextInputWidget/` directory - Updated import path in `widgets/index.ts` - **UX improvements**: - Expand button only shows for applicable input types (text, password, textarea) - Number and integer inputs don't show expand button (not needed) - Modal preserves schema title, description, and placeholder for context ### Checklist 📋 #### For code changes: - [x] I have clearly listed my changes in the PR description - [x] I have made a test plan - [x] I have tested my changes according to the test plan: - [x] Test expand button appears for text input fields - [x] Test expand button appears for password input fields - [x] Test expand button appears for textarea fields - [x] Test expand button does NOT appear for number/integer inputs - [x] Test clicking expand button opens modal with current value - [x] Test editing text in modal and saving updates the input field - [x] Test cancel button closes modal without saving changes - [x] Test copy-to-clipboard button copies text and shows success state - [x] Test toast notification appears on successful copy - [x] Test modal resets to original value when reopened - [x] Test modal auto-focuses textarea on open - [x] Test expand button tooltip displays correctly - [x] Test input field layout with expand button (no text overlap) |
||
|
|
113df689dc |
feat(platform): Improve Google Sheets/Drive integration with unified credentials (#11520)
Simplifies and improves the Google Sheets/Drive integration by merging
credentials with the file picker and using narrower OAuth scopes.
### Changes 🏗️
- Merge Google credentials and file picker into a single unified input
field for better UX
- Create spreadsheets using Drive API instead of Sheets API for proper
scope support
- Simplify Google Drive OAuth scope to only use `drive.file` (narrowest
permission needed)
- Clean up unused imports (NormalizedPickedFile)
### Checklist 📋
#### For code changes:
- [x] I have clearly listed my changes in the PR description
- [x] I have made a test plan
- [x] I have tested my changes according to the test plan:
- [x] Test creating a new Google Spreadsheet with
GoogleSheetsCreateSpreadsheetBlock
- [x] Test reading from existing spreadsheets with GoogleSheetsReadBlock
- [x] Test writing to spreadsheets with GoogleSheetsWriteBlock
- [x] Verify OAuth flow works with simplified scopes
- [x] Verify file picker works with merged credentials field
#### For configuration changes:
- [x] `.env.default` is updated or already compatible with my changes
- [x] `docker-compose.yml` is updated or already compatible with my
changes
- [x] I have included a list of my configuration changes in the PR
description (under **Changes**)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> Unifies Google Drive picker and credentials with auto-credentials
across backend and frontend, updates all Sheets blocks and execution to
use it, and adds Drive-based spreadsheet creation plus supporting tests
and UI fixes.
>
> - **Backend**:
> - **Google Drive model/field**: Introduce `GoogleDriveFile` (with
`_credentials_id`) and `GoogleDriveFileField()` for unified auth+picker
(`backend/blocks/google/_drive.py`).
> - **Sheets blocks**: Replace `GoogleDrivePickerField` and explicit
credentials with `GoogleDriveFileField` across all Sheets blocks;
preserve and emit credentials for chaining; add Drive service; create
spreadsheets via Drive API then manage via Sheets API.
> - **IO block**: Add `AgentGoogleDriveFileInputBlock` providing a Drive
picker input.
> - **Execution**: Support auto-generated credentials via
`BlockSchema.get_auto_credentials_fields()`; acquire/release multiple
credential locks; pass creds by `credentials_kwarg`
(`executor/manager.py`, `data/block.py`, `util/test.py`).
> - **Tests**: Add validation tests for duplicate/unique
`auto_credentials.kwarg_name` and defaults.
> - **Frontend**:
> - **Picker**: Enhance Google Drive picker to require/use saved
platform credentials, pass `_credentials_id`, validate scopes, and
manage dialog z-index/interaction; expose `requirePlatformCredentials`.
> - **UI**: Update dialogs/CSS to keep Google picker on top and prevent
overlay interactions.
> - **Types**: Extend `GoogleDrivePickerConfig` with `auto_credentials`
and related typings.
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
|
||
|
|
b4a69c49a1 |
feat(frontend): use websockets on new library page + fixes (#11526)
## Changes 🏗️ <img width="800" height="614" alt="Screenshot 2025-12-03 at 14 52 46" src="https://github.com/user-attachments/assets/c7012d7a-96d4-4268-a53b-27f2f7322a39" /> - Create a new `useExecutionEvents()` hook that can be used to subscribe to agent executions - now both the **Activity Dropdown** and the new **Library Agent Page** use that - so subscribing to executions is centralised on a single place - Apply a couple of design fixes - Fix not being able to select the new templates tab ## Checklist 📋 ### For code changes: - [x] I have clearly listed my changes in the PR description - [x] I have made a test plan - [x] I have tested my changes according to the test plan: - [x] Run the app locally and verify the above |
||
|
|
e62a8fb572 |
feat(frontend): design updates on new library page... (#11522)
## Changes 🏗️ ### Design updates Design updates on the new Library page. New empty views with illustration and overall changes on the sidebar and selected run sections... <img width="800" height="871" alt="Screenshot 2025-12-03 at 14 03 45" src="https://github.com/user-attachments/assets/6970af99-dda8-4cd8-a9b5-97fe5ee2032e" /> <img width="800" height="844" alt="Screenshot 2025-12-03 at 14 03 52" src="https://github.com/user-attachments/assets/92e6af79-db9f-4098-961f-9ae3b3300ffa" /> <img width="800" height="816" alt="Screenshot 2025-12-03 at 14 03 57" src="https://github.com/user-attachments/assets/7e23e612-b446-4c53-8ea2-f0e2b1574ec3" /> <img width="800" height="862" alt="Screenshot 2025-12-03 at 14 04 07" src="https://github.com/user-attachments/assets/e3398232-e74b-4a06-8702-30a96862dc00" /> ### Architecture - Make selected tabs/items synced with the URL via `?activeTab=` and `?activeItem=`, so it is easy and predictable to change their state... - Some minor updates on the design system I missed on previous PRs ... ## Checklist 📋 ### For code changes: - [x] I have clearly listed my changes in the PR description - [x] I have made a test plan - [x] I have tested my changes according to the test plan: - [x] Run the app locally and check the new page ( still wip ) |
||
|
|
f987937046 |
fix(frontend): prune empty values from node inputs and fix object editor connection detection (#11507)
This PR addresses two issues: 1. **Empty values being sent to backend**: Node inputs were including empty strings, null, and undefined values when converting to backend format, causing unnecessary data to be sent. 2. **Incorrect connection detection in ObjectEditor**: The component was checking if the parent field was connected instead of checking individual key-value pairs, causing incorrect UI state for dynamic properties. ### Changes 🏗️ <!-- Concisely describe all of the changes made in this pull request: --> - **nodeStore.ts**: Added `pruneEmptyValues` utility to remove empty/null/undefined values from `hardcodedValues` before converting nodes to backend format. This ensures only meaningful input values are sent to the backend API. - **ObjectEditorWidget.tsx**: - Removed unused `fieldKey` prop from component interface - Fixed connection detection logic to check individual key-value handle IDs instead of the parent field key, ensuring correct connection state for each dynamic property in object editors ### Checklist 📋 #### For code changes: - [x] I have clearly listed my changes in the PR description - [x] I have made a test plan - [x] I have tested my changes according to the test plan: - [x] Create a node with object input fields and verify empty values are not sent to backend - [x] Add multiple key-value pairs to an object editor widget - [x] Connect individual key-value pairs via handles and verify connection state is correctly displayed - [x] Disconnect a key-value pair and verify the input field becomes editable - [x] Save and reload an agent with object inputs to verify empty values are pruned correctly - [x] Verify that non-empty values are still correctly preserved and sent to backend |
||
|
|
7b951c977e |
feat(platform): implement graph-level Safe Mode toggle for HITL blocks (#11455)
## Summary This PR implements a graph-level Safe Mode toggle system for Human-in-the-Loop (HITL) blocks. When Safe Mode is ON (default), HITL blocks require manual review before proceeding. When OFF, they execute automatically. ## 🔧 Backend Changes - **Database**: Added `metadata` JSON column to `AgentGraph` table with migration - **API**: Updated `execute_graph` endpoint to accept `safe_mode` parameter - **Execution**: Enhanced execution context to use graph metadata as default with API override capability - **Auto-detection**: Automatically populate `has_human_in_the_loop` for graphs containing HITL blocks - **Block Detection**: HITL block ID: `8b2a7b3c-6e9d-4a5f-8c1b-2e3f4a5b6c7d` ## 🎨 Frontend Changes - **Component**: New `FloatingSafeModeToggle` with dual variants: - **White variant**: For library pages, integrates with action buttons - **Black variant**: For builders, floating positioned - **Integration**: Added toggles to both new/legacy builders and library pages - **API Integration**: Direct graph metadata updates via `usePutV1UpdateGraphVersion` - **Query Management**: React Query cache invalidation for consistent UI updates - **Conditional Display**: Toggle only appears when graph contains HITL blocks ## 🛠 Technical Implementation - **Safe Mode ON** (default): HITL blocks require manual review before proceeding - **Safe Mode OFF**: HITL blocks execute automatically without intervention - **Priority**: Backend API `safe_mode` parameter takes precedence over graph metadata - **Detection**: Auto-populates `has_human_in_the_loop` metadata field - **Positioning**: Proper z-index and responsive positioning for floating elements ## 🚧 Known Issues (Work in Progress) ### High Priority - [ ] **Toggle state persistence**: Always shows "ON" regardless of actual state - query invalidation issue - [ ] **LibraryAgent metadata**: Missing metadata field causing TypeScript errors - [ ] **Tooltip z-index**: Still covered by some UI elements despite high z-index ### Medium Priority - [ ] **HITL detection**: Logic needs improvement for reliable block detection - [ ] **Error handling**: Removing HITL blocks from graph causes save errors - [ ] **TypeScript**: Fix type mismatches between GraphModel and LibraryAgent ### Low Priority - [ ] **Frontend API**: Add `safe_mode` parameter to execution calls once OpenAPI is regenerated - [ ] **Performance**: Consider debouncing rapid toggle clicks ## 🧪 Test Plan - [ ] Verify toggle appears only when graph has HITL blocks - [ ] Test toggle persistence across page refreshes - [ ] Confirm API calls update graph metadata correctly - [ ] Validate execution behavior respects safe mode setting - [ ] Check styling consistency across builder and library contexts ## 🔗 Related - Addresses requirements for graph-level HITL configuration - Builds on existing FloatingReviewsPanel infrastructure - Integrates with existing graph metadata system 🤖 Generated with [Claude Code](https://claude.ai/code) |
||
|
|
b4e95dba14 |
feat(frontend): update empty task view designs (#11498)
## Changes 🏗️ Update the new library agent page, empty view to look like: <img width="900" height="1060" alt="Screenshot 2025-12-01 at 14 12 10" src="https://github.com/user-attachments/assets/e6a22a4f-35f4-434e-bbb1-593390034b9a" /> Now we display an **About this agent** card on the left when the agent is published on the marketplace. I expanded the: ``` /api/library/agents/{id} ``` endpoint to return as well the following: ```js { // ... created_at: "timestamp", marketplace_listing: { creator: { name: "string", "slug": string, id: "string" }, name: "string", slug: "string", id: "string" } } ``` To be able to display this extra information on the card and link to the creator and marketplace pages. Also: - design system updates regarding navbar and colors ## Checklist 📋 ### For code changes: - [x] I have clearly listed my changes in the PR description - [x] I have made a test plan - [x] I have tested my changes according to the test plan: - [x] Run locally and see the new page for an agent with no runs |
||
|
|
6db18b8445 |
feat(frontend): design system tokens update (#11501)
## Changes 🏗️ Update tokens of the design system with new values 🖌️ 🎨 ## Checklist 📋 ### For code changes: - [x] I have clearly listed my changes in the PR description - [x] I have made a test plan - [x] I have tested my changes according to the test plan: - [x] Storybook build passes, no type errors |
||
|
|
a37b527744 |
refactor(frontend): agent runs view folder structure (#11475)
## Changes 🏗️ Re-arrange the folder structure of the new Library page sub-components so they are grouped by location: ### Before <img width="238" height="506" alt="Screenshot 2025-11-27 at 23 45 27" src="https://github.com/user-attachments/assets/429fda6e-bf74-4d80-9306-028365789ca1" /> All components where on a single level, which works fine for simpler pages without that many sub-components, but on this one which has so much functionality it ends up messier... ### After <img width="226" height="517" alt="Screenshot 2025-11-27 at 23 45 46" src="https://github.com/user-attachments/assets/99c098ea-ff11-4779-bad8-7d524bf91605" /> ### Imports order I edited some files, and the linter/formatter automatically sorted import order as per the lint plugin. ### Checklist 📋 #### For code changes: - [x] I have clearly listed my changes in the PR description - [x] I have made a test plan - [x] I have tested my changes according to the test plan: - [x] Run the new library agent page locally and click around |
||
|
|
3d08c22dd5 |
feat(platform): add Human In The Loop block with review workflow (#11380)
## Summary This PR implements a comprehensive Human In The Loop (HITL) block that allows agents to pause execution and wait for human approval/modification of data before continuing. https://github.com/user-attachments/assets/c027d731-17d3-494c-85ca-97c3bf33329c ## Key Features - Added WAITING_FOR_REVIEW status to AgentExecutionStatus enum - Created PendingHumanReview database table for storing review requests - Implemented HumanInTheLoopBlock that extracts input data and creates review entries - Added API endpoints at /api/executions/review for fetching and reviewing pending data - Updated execution manager to properly handle waiting status and resume after approval ## Frontend Components - PendingReviewCard for individual review handling - PendingReviewsList for multiple reviews - FloatingReviewsPanel for graph builder integration - Integrated review UI into 3 locations: legacy library, new library, and graph builder ## Technical Implementation - Added proper type safety throughout with SafeJson handling - Optimized database queries using count functions instead of full data fetching - Fixed imports to be top-level instead of local - All formatters and linters pass ## Test plan - [ ] Test Human In The Loop block creation in graph builder - [ ] Test block execution pauses and creates pending review - [ ] Test review UI appears in all 3 locations - [ ] Test data modification and approval workflow - [ ] Test rejection workflow - [ ] Test execution resumes after approval 🤖 Generated with [Claude Code](https://claude.ai/code) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added Human-In-The-Loop review workflows to pause executions for human validation. * Users can approve or reject pending tasks, optionally editing submitted data and adding a message. * New "Waiting for Review" execution status with UI indicators across run lists, badges, and activity views. * Review management UI: pending review cards, list view, and a floating reviews panel for quick access. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Claude <noreply@anthropic.com> |
||
|
|
02f8a69c6a |
feat(platform): add Google Drive Picker field type for enhanced file selection (#11311)
### 🏗️ Changes This PR adds a Google Drive Picker field type to enhance the user experience of existing Google blocks, replacing manual file ID entry with a visual file picker. #### Backend Changes - **Added and types** in : - Configurable picker field with OAuth scope management - Support for multiselect, folder selection, and MIME type filtering - Proper access token handling for file downloads - **Enhanced Gmail blocks**: Updated attachment fields to use Google Drive Picker for better UX - **Enhanced Google Sheets blocks**: Updated spreadsheet selection to use picker instead of manual ID entry - **Added utility**: Async file download with virus scanning and 100MB size limit #### Frontend Changes - **Enhanced GoogleDrivePicker component**: Improved UI with folder icon and multiselect messaging - **Integrated picker in form renderers**: Auto-renders for fields with format - **Added shared GoogleDrivePickerInput component**: Eliminates code duplication between NodeInputs and RunAgentInputs - **Added type definitions**: Complete TypeScript support for picker schemas and responses #### Key Features - 🎯 **Visual file selection**: Replace manual Google Drive file ID entry with intuitive picker - 📁 **Flexible configuration**: Support for documents, spreadsheets, folders, and custom MIME types - 🔒 **Minimal OAuth scopes**: Uses scope for security (only access to user-selected files) - ⚡ **Enhanced UX**: Seamless integration in both block configuration and agent run modals - 🛡️ **Security**: Virus scanning and file size limits for downloaded attachments #### Migration Impact - **Backward compatible**: Existing blocks continue to work with manual ID entry - **Progressive enhancement**: New picker fields provide better UX for the same functionality - **No breaking changes**: all existing blocks should be unaffected This enhancement improves the user experience of Google blocks without introducing new systems or breaking existing functionality. ### Checklist 📋 #### For code changes: - [x] I have clearly listed my changes in the PR description - [x] I have made a test plan - [x] I have tested my changes according to the test plan: <!-- Put your test plan here: --> - [x]Test multiple of the new blocks [of note is that the create spreadsheet block should be not used for now as it uses api not drive picker] - [x] chain the blocks together and pass values between them --------- Co-authored-by: Lluis Agusti <hi@llu.lu> Co-authored-by: Zamil Majdy <zamil.majdy@agpt.co> Co-authored-by: Claude <noreply@anthropic.com> |