mirror of
https://github.com/Significant-Gravitas/AutoGPT.git
synced 2026-01-09 15:17:59 -05:00
3f690ea7b8d3c622fa9b5fae2b1f4cdc042aadd9
7607 Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
3b092f34d8 |
feat(platform): Add Get Linear Issues Block (#11415)
Added the ability to get all issues for a given project. ### Changes 🏗️ - added api query - added new models - added new block that gets all issues for a given project ### 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] I have ensured the new block works in dev - [x] I have ensured the other linear blocks still work |
||
|
|
0921d23628 |
fix(block): Improve error handling of SendEmailBlock (#11420)
Currently if the smtp server is not configured currently it results in a platform error. This PR simplifies the error handling ### Changes 🏗️ - removed default value for smtp server host. - capture common errors and yield them as error ### 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] Checked all tests still pass |
||
|
|
0edc669874 | refactor(frontend): debug preview stealing dev | ||
|
|
e64d3d9b99 |
feat(frontend): implement agent outputs viewer and improve UI/UX in new builder (#11421)
This PR introduces several improvements to the new builder experience: **1. Agent Outputs Feature** ✨ - Implemented a new `AgentOutputs` component that displays execution outputs from OUTPUT blocks - Added a slide-out sheet UI to view agent outputs with proper formatting - Integrated with existing output renderers from the library view - Shows output block names, descriptions, and rendered values - Added beta badge to indicate feature is still experimental **2. UI/UX Improvements** 🎨 - Fixed graph loading spinner color from violet to neutral zinc for better consistency - Adjusted node shadow styling for better visual hierarchy (reduced shadow when not selected) - Fixed credential field button spacing to prevent layout overflow - Improved array editor widget delete button positioning - Added proper link handling for integration redirects (opens in new tab) - Fixed object editor to handle null values gracefully **3. Performance & State Management** 🚀 - Fixed race condition in run input dialog by awaiting execution before closing - Added proper history initialization after graph loads - Added `outputSchema` to graph store for tracking output blocks - Fixed search bar to maintain query state properly - Added automatic fit view on graph load for better initial viewport **4. Build Actions Bar** 🔧 - Reduced padding for more compact appearance - Enabled/disabled Agent Outputs button based on presence of output blocks - Removed loading icon from manual run button when not executing ### 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] Created and executed an agent with OUTPUT blocks to verify outputs display correctly - [x] Tested output viewer with different data types (text, JSON, images, etc.) - [x] Verified credential field layouts don't overflow in constrained spaces - [x] Tested array editor delete functionality and button positioning - [x] Confirmed graph loads with proper fit view and history initialization - [x] Tested run input dialog closes only after execution starts - [x] Verified integration links open in new tabs - [x] Tested object editor with null values |
||
|
|
41dc39b97d | fix(frontend): preview banner ammend | ||
|
|
80e573f33b |
feat(frontend): PR preview banner (#11412)
## Changes 🏗️ <img width="900" height="757" alt="Screenshot 2025-11-19 at 12 18 38" src="https://github.com/user-attachments/assets/e2c2a4cf-a05e-431e-853d-fb0a68729e54" /> When the dev environment is used for a PR preview, show a banner at the top of the page to indicate this. ### 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 PR preview against Dev - [x] Check it shows the banner once this is merged - [x] Or try locally with the env var set ### For configuration changes: `NEXT_PUBLIC_PREVIEW_STEALING_DEV` is set programmatically via our Infra CI. |
||
|
|
06d20e7e4c |
chore(backend/deps-dev): bump the development-dependencies group across 1 directory with 3 updates (#11411)
Bumps the development-dependencies group with 3 updates in the /autogpt_platform/backend directory: [pre-commit](https://github.com/pre-commit/pre-commit), [pyright](https://github.com/RobertCraigie/pyright-python) and [ruff](https://github.com/astral-sh/ruff). Updates `pre-commit` from 4.3.0 to 4.4.0 <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/pre-commit/pre-commit/releases">pre-commit's releases</a>.</em></p> <blockquote> <h2>pre-commit v4.4.0</h2> <h3>Features</h3> <ul> <li>Add <code>--fail-fast</code> option to <code>pre-commit run</code>. <ul> <li><a href="https://redirect.github.com/pre-commit/pre-commit/issues/3528">#3528</a> PR by <a href="https://github.com/JulianMaurin"><code>@JulianMaurin</code></a>.</li> </ul> </li> <li>Upgrade <code>ruby-build</code> / <code>rbenv</code>. <ul> <li><a href="https://redirect.github.com/pre-commit/pre-commit/issues/3566">#3566</a> PR by <a href="https://github.com/asottile"><code>@asottile</code></a>.</li> <li><a href="https://redirect.github.com/pre-commit/pre-commit/issues/3565">#3565</a> issue by <a href="https://github.com/MRigal"><code>@MRigal</code></a>.</li> </ul> </li> <li>Add <code>language: unsupported</code> / <code>language: unsupported_script</code> as aliases for <code>language: system</code> / <code>language: script</code> (which will eventually be deprecated). <ul> <li><a href="https://redirect.github.com/pre-commit/pre-commit/issues/3577">#3577</a> PR by <a href="https://github.com/asottile"><code>@asottile</code></a>.</li> </ul> </li> <li>Add support docker-in-docker detection for cgroups v2. <ul> <li><a href="https://redirect.github.com/pre-commit/pre-commit/issues/3535">#3535</a> PR by <a href="https://github.com/br-rhrbacek"><code>@br-rhrbacek</code></a>.</li> <li><a href="https://redirect.github.com/pre-commit/pre-commit/issues/3360">#3360</a> issue by <a href="https://github.com/JasonAlt"><code>@JasonAlt</code></a>.</li> </ul> </li> </ul> <h3>Fixes</h3> <ul> <li>Handle when docker gives <code>SecurityOptions: null</code>. <ul> <li><a href="https://redirect.github.com/pre-commit/pre-commit/issues/3537">#3537</a> PR by <a href="https://github.com/asottile"><code>@asottile</code></a>.</li> <li><a href="https://redirect.github.com/pre-commit/pre-commit/issues/3514">#3514</a> issue by <a href="https://github.com/jenstroeger"><code>@jenstroeger</code></a>.</li> </ul> </li> <li>Fix error context for invalid <code>stages</code> in <code>.pre-commit-config.yaml</code>. <ul> <li><a href="https://redirect.github.com/pre-commit/pre-commit/issues/3576">#3576</a> PR by <a href="https://github.com/asottile"><code>@asottile</code></a>.</li> </ul> </li> </ul> </blockquote> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/pre-commit/pre-commit/blob/main/CHANGELOG.md">pre-commit's changelog</a>.</em></p> <blockquote> <h1>4.4.0 - 2025-11-08</h1> <h3>Features</h3> <ul> <li>Add <code>--fail-fast</code> option to <code>pre-commit run</code>. <ul> <li><a href="https://redirect.github.com/pre-commit/pre-commit/issues/3528">#3528</a> PR by <a href="https://github.com/JulianMaurin"><code>@JulianMaurin</code></a>.</li> </ul> </li> <li>Upgrade <code>ruby-build</code> / <code>rbenv</code>. <ul> <li><a href="https://redirect.github.com/pre-commit/pre-commit/issues/3566">#3566</a> PR by <a href="https://github.com/asottile"><code>@asottile</code></a>.</li> <li><a href="https://redirect.github.com/pre-commit/pre-commit/issues/3565">#3565</a> issue by <a href="https://github.com/MRigal"><code>@MRigal</code></a>.</li> </ul> </li> <li>Add <code>language: unsupported</code> / <code>language: unsupported_script</code> as aliases for <code>language: system</code> / <code>language: script</code> (which will eventually be deprecated). <ul> <li><a href="https://redirect.github.com/pre-commit/pre-commit/issues/3577">#3577</a> PR by <a href="https://github.com/asottile"><code>@asottile</code></a>.</li> </ul> </li> <li>Add support docker-in-docker detection for cgroups v2. <ul> <li><a href="https://redirect.github.com/pre-commit/pre-commit/issues/3535">#3535</a> PR by <a href="https://github.com/br-rhrbacek"><code>@br-rhrbacek</code></a>.</li> <li><a href="https://redirect.github.com/pre-commit/pre-commit/issues/3360">#3360</a> issue by <a href="https://github.com/JasonAlt"><code>@JasonAlt</code></a>.</li> </ul> </li> </ul> <h3>Fixes</h3> <ul> <li>Handle when docker gives <code>SecurityOptions: null</code>. <ul> <li><a href="https://redirect.github.com/pre-commit/pre-commit/issues/3537">#3537</a> PR by <a href="https://github.com/asottile"><code>@asottile</code></a>.</li> <li><a href="https://redirect.github.com/pre-commit/pre-commit/issues/3514">#3514</a> issue by <a href="https://github.com/jenstroeger"><code>@jenstroeger</code></a>.</li> </ul> </li> <li>Fix error context for invalid <code>stages</code> in <code>.pre-commit-config.yaml</code>. <ul> <li><a href="https://redirect.github.com/pre-commit/pre-commit/issues/3576">#3576</a> PR by <a href="https://github.com/asottile"><code>@asottile</code></a>.</li> </ul> </li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href=" |
||
|
|
07b5fe859a |
feat(platform/backend): add gemini-3-pro-preview (#11413)
This adds gemini-3-pro-preview from openrouter https://openrouter.ai/google/gemini-3-pro-preview #### 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 the gemini 3 model in the llm blocks and it works |
||
|
|
746dbbac84 |
refactor(frontend): improve new builder performance and UX with position handling and store optimizations (#11397)
This PR introduces several performance and user experience improvements to the new builder, focusing on node positioning, state management optimizations, and visual enhancements. The new builder had several issues that impacted developer experience and runtime performance: - Inefficient store subscriptions causing unnecessary re-renders - No intelligent node positioning when adding blocks via clicking - useEffect dependencies causing potential stale closures - Width constraints missing on form fields affecting layout consistency ### Changes 🏗️ #### Performance Optimizations - **Store subscription optimization**: Added `useShallow` from zustand to prevent unnecessary re-renders in [NodeContainer](file:///app/(platform)/build/components/FlowEditor/nodes/CustomNode/components/NodeContainer.tsx) and [NodeExecutionBadge](file:///app/(platform)/build/components/FlowEditor/nodes/CustomNode/components/NodeExecutionBadge.tsx) - **useEffect cleanup**: Split combined useEffects in [useFlow](file:///app/(platform)/build/hooks/useFlow.ts) for clearer dependencies and better performance - **Memoization**: Added `memo` to [NewControlPanel](file:///app/(platform)/build/components/NewControlPanel/NewControlPanel.tsx) to prevent unnecessary re-renders - **Callback optimization**: Wrapped `onDrop` handler in `useCallback` to prevent recreation on every render #### UX Improvements - **Smart node positioning**: Implemented `findFreePosition` algorithm in [helper.ts](file:///app/(platform)/build/components/helper.ts) that: - Automatically finds non-overlapping positions for new nodes - Tries right, left, then below existing nodes - Falls back to far-right position if no space available - **Click-to-add blocks**: Added click handlers to blocks that: - Add the block at an intelligent position - Automatically pan viewport to center the new node with smooth animation - **Visual feedback**: Added loading state with spinner icon for agent blocks during fetch - **Form field width**: Added `max-w-[340px]` constraint to prevent overflow in [FieldTemplate](file:///components/renderers/input-renderer/templates/FieldTemplate.tsx) ### 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 from scratch and execute an agent with at least 3 blocks - [x] Test adding blocks via drag-and-drop ensures no overlapping - [x] Test adding blocks via click positions them intelligently - [x] Test viewport animation when adding blocks via click - [x] Import an agent from file upload, and confirm it executes correctly - [x] Test loading spinner appears when adding agents from "My Agents" - [x] Verify performance improvements by checking React DevTools for reduced re-renders |
||
|
|
901bb31e14 |
feat(backend): parameterize activity status generation with customizable prompts (#11407)
## Summary
Implement comprehensive parameterization of the activity status
generation system to enable custom prompts for admin analytics
dashboard.
## Changes Made
### Core Function Enhancement (`activity_status_generator.py`)
- **Extract hardcoded prompts to constants**: `DEFAULT_SYSTEM_PROMPT`
and `DEFAULT_USER_PROMPT`
- **Add prompt parameters**: `system_prompt`, `user_prompt` with
defaults to maintain backward compatibility
- **Template substitution system**: User prompt supports
`{{GRAPH_NAME}}` and `{{EXECUTION_DATA}}` placeholders
- **Skip existing flag**: `skip_existing` parameter allows admin to
force regeneration of existing data
- **Maintain manager compatibility**: All existing calls continue to
work with default parameters
### Admin API Enhancement (`execution_analytics_routes.py`)
- **Custom prompt fields**: `system_prompt` and `user_prompt` optional
fields in `ExecutionAnalyticsRequest`
- **Skip existing control**: `skip_existing` boolean flag for admin
regeneration option
- **Template documentation**: Clear documentation of placeholder system
in field descriptions
- **Backward compatibility**: All existing API calls work unchanged
### Template System Design
- **Simple placeholder replacement**: `{{GRAPH_NAME}}` → actual graph
name, `{{EXECUTION_DATA}}` → JSON execution data
- **No dependencies**: Uses simple `string.replace()` for maximum
compatibility
- **JSON safety**: Execution data properly serialized as indented JSON
- **Validation tested**: Template substitution verified to work
correctly
## Key Features
### For Regular Users (Manager Integration)
- **No changes required**: Existing manager.py calls work unchanged
- **Default behavior preserved**: Same prompts and logic as before
- **Feature flag compatibility**: LaunchDarkly integration unchanged
### For Admin Analytics Dashboard
- **Custom system prompts**: Admins can override the AI evaluation
criteria
- **Custom user prompts**: Admins can modify the analysis instructions
with execution data templates
- **Force regeneration**: `skip_existing=False` allows reprocessing
existing executions with new prompts
- **Complete model list**: Access to all LLM models from `llm.py` (70+
models including GPT, Claude, Gemini, etc.)
## Technical Validation
- ✅ Template substitution tested and working
- ✅ Default behavior preserved for existing code
- ✅ Admin API parameter validation working
- ✅ All imports and function signatures correct
- ✅ Backward compatibility maintained
## Use Cases Enabled
- **A/B testing**: Compare different prompt strategies on same execution
data
- **Custom evaluation**: Tailor success criteria for specific graph
types
- **Prompt optimization**: Iterate on prompt design based on admin
feedback
- **Bulk reprocessing**: Regenerate activity status with improved
prompts
## Testing
- Template substitution functionality verified
- Function signatures and imports validated
- Code formatting and linting passed
- Backward compatibility confirmed
## Breaking Changes
None - all existing functionality preserved with default parameters.
## Related Issues
Resolves the requirement to expose prompt customization on the frontend
execution analytics dashboard.
---------
Co-authored-by: Claude <noreply@anthropic.com>
|
||
|
|
9438817702 |
fix(platform): Capture Sentry Block Errors Correctly (#11404)
Currently we are capturing block errors via the scope only, this change captures the error directly. ### Changes 🏗️ - capture the error as well as the scope in the executor manager - Update the block error message to include additional details - remove the __str__ function from blockerror as it is no longer needed ### 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] Checked that errors are still captured in dev |
||
|
|
184a73de7d |
fix(frontend): Add custom validator to handle short-text and long-text formats in form renderer (#11395)
The rfjs library was throwing validation errors for our custom format types `short-text` and `long-text` because these are not standard JSON Schema formats. This was causing form validation to fail even though these formats are valid in our application context. <img width="792" height="85" alt="Screenshot 2025-11-18 at 9 39 08 AM" src="https://github.com/user-attachments/assets/c75c584f-b991-483c-8779-fc93877028e0" /> ### Changes 🏗️ - Created a custom validator using `@rjsf/validator-ajv8`'s `customizeValidator` function - Added support for `short-text` and `long-text` custom formats that accept any string value - Replaced the default validator with our custom validator in the FormRenderer component - Disabled strict mode and format validation in AJV options to prevent validation errors for non-standard formats ### 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 an agent with input blocks that use short-text format - [x] Create an agent with input blocks that use long-text format - [x] Execute the agent and verify no validation errors appear - [x] Verify that form submission works correctly with both formats - [x] Test that other standard formats (email, URL, etc.) still work as expected |
||
|
|
1154f86a5c |
feat(frontend): add inline node title editing with double-click (#11370)
- depends on https://github.com/Significant-Gravitas/AutoGPT/pull/11368 This PR adds the ability to rename nodes directly in the flow editor by double-clicking on their titles. https://github.com/user-attachments/assets/1de3fc5c-f859-425e-b4cf-dfb21c3efe3d ### Changes 🏗️ - **Added inline node title editing functionality:** - Users can now double-click on any node title to enter edit mode - Custom titles are saved on Enter key or blur, canceled on Escape key - Custom node names are persisted in the node's metadata as `customized_name` - Added tooltip to display full title when text is truncated - **Modified node data handling:** - Updated `nodeStore` to include `customized_name` in metadata when converting nodes - Modified `helper.ts` to pass metadata (including custom titles) to custom nodes - Added metadata property to `CustomNodeData` type - **UI improvements:** - Added hover cursor indication for editable titles - Implemented proper focus management during editing - Maintained consistent styling between display and edit 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] Double-click on various node types to enter edit mode - [x] Type new names and press Enter to save - [x] Press Escape to cancel editing and revert to original name - [x] Click outside the input field to save changes - [x] Verify custom names persist after page refresh - [x] Test with long node names to ensure tooltip appears - [x] Verify custom names are saved with the graph - [x] Test editing on all node types (standard, input, output, webhook, etc.) |
||
|
|
73c93cf554 |
fix(backend): resolve production failures with comprehensive token handling and conversation safety fixes (#11394)
## Summary Resolves multiple production failures including execution **6239b448-0434-4687-a42b-9ff0ddf01c1d** where AI Text Generator failed with `'NoneType' object is not iterable`. This implements comprehensive fixes addressing both the root cause (unrealistic token limits) and masking issues (Sentry SDK bug + conversation history null safety). ## Root Cause Analysis Three interconnected issues caused production failures: ### 1. Unrealistic Perplexity Token Limits ❌ - **PERPLEXITY_SONAR**: 127,000 max_output_tokens (equivalent to ~95,000 words!) - **PERPLEXITY_SONAR_DEEP_RESEARCH**: 128,000 max_output_tokens - **Problem**: Newsletter generation defaulted to 127K output tokens - **Result**: Exceeded OpenRouter's 128K total limit, causing API failures ### 2. Sentry SDK OpenAI Integration Bug 🐛 - **Location**: `sentry_sdk/integrations/openai.py:157` - **Bug**: `for choice in response.choices:` failed when `choices=None` - **Impact**: Masked real token limit errors with confusing TypeError ### 3. Conversation History Null Safety Issues ⚠️ - **Problem**: `get_pending_tool_calls()` expected non-null conversation_history - **Impact**: SmartDecisionMaker crashes when conversation_history is None - **Pattern**: Common in various LLM block scenarios ## Changes Made ### ✅ Fix 1: Realistic Perplexity Token Limits (`backend/blocks/llm.py`) ```python # Before (PROBLEMATIC) LlmModel.PERPLEXITY_SONAR: ModelMetadata("open_router", 127000, 127000) LlmModel.PERPLEXITY_SONAR_DEEP_RESEARCH: ModelMetadata("open_router", 128000, 128000) # After (FIXED) LlmModel.PERPLEXITY_SONAR: ModelMetadata("open_router", 127000, 8000) LlmModel.PERPLEXITY_SONAR_DEEP_RESEARCH: ModelMetadata("open_router", 128000, 16000) ``` **Rationale:** - **8K tokens** (SONAR): Matches industry standard, sufficient for long content (6K words) - **16K tokens** (DEEP_RESEARCH): Higher limit for research, supports very long content (12K words) - **Industry pattern**: 3-4% of context window (consistent with other OpenRouter models) ### ✅ Fix 2: Sentry SDK Upgrade (`pyproject.toml`) - **Upgrade**: `^2.33.2` → `^2.44.0` - **Result**: OpenAI integration bug fixed in SDK (no code changes needed) ### ✅ Fix 3: Conversation History Null Safety (`backend/blocks/smart_decision_maker.py`) ```python # Before def get_pending_tool_calls(conversation_history: list[Any]) -> dict[str, int]: # After def get_pending_tool_calls(conversation_history: list[Any] | None) -> dict[str, int]: if not conversation_history: return {} ``` - **Added**: Proper null checking for conversation_history parameter - **Prevents**: `'NoneType' object is not iterable` errors - **Impact**: Improves SmartDecisionMaker reliability across all scenarios ## Impact & Benefits ### 🎯 Production Reliability - ✅ **Prevents token limit errors** for realistic content generation - ✅ **Clear error handling** without masked Sentry TypeError crashes - ✅ **Better conversation safety** with proper null checking - ✅ **Multiple failure scenarios resolved** comprehensively ### 📈 User Experience - ✅ **Faster responses** (reasonable output lengths) - ✅ **Lower costs** (more focused content generation) - ✅ **More stable workflows** with better error handling - ✅ **Maintains flexibility** - users can override with explicit `max_tokens` ### 🔧 Technical Improvements - ✅ **Follows industry standards** - aligns with other OpenRouter models - ✅ **Breaking change risk: LOW** - users can override if needed - ✅ **Root cause resolution** - fixes error chain at source - ✅ **Defensive programming** - better null safety patterns ## Validation ### Industry Analysis ✅ - Large context models typically use 8K-16K output limits (not 127K) - Newsletter generation needs 650-10K tokens typically, not 127K tokens - Pattern analysis of 13 OpenRouter models confirms 3-4% context ratio ### Production Testing ✅ - **Before**: Newsletter generation → 127K tokens → API failure → Sentry crash - **After**: Newsletter generation → 8K tokens → successful completion - **Error handling**: Clear token limit errors instead of confusing TypeErrors - **Null safety**: Conversation history None/undefined handled gracefully ### Dependencies ✅ - **Sentry SDK**: Confirmed 2.44.0 fixes OpenAI integration crashes - **Poetry lock**: All dependencies updated successfully - **Backward compatibility**: Maintained for existing workflows ## Related Issues - Fixes flowExecutionID **6239b448-0434-4687-a42b-9ff0ddf01c1d** - Resolves AI Text Generator reliability issues - Improves overall platform token handling and conversation safety - Addresses multiple production failure patterns comprehensively ## Breaking Changes Assessment **Risk Level**: 🟡 **LOW-MEDIUM** - **Perplexity limits**: Users relying on 127K+ output would be limited (likely unintentional usage) - **Override available**: Users can explicitly set `max_tokens` for custom limits - **Conversation safety**: Only improves reliability, no breaking changes - **Most use cases**: Unaffected or improved by realistic defaults 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> --------- Co-authored-by: Claude <noreply@anthropic.com> |
||
|
|
02757d68f3 |
fix(backend): resolve marketplace agent access in get_graph_execution endpoint (#11396)
## Summary
Fixes critical issue where `GET
/graphs/{graph_id}/executions/{graph_exec_id}` failed for marketplace
agents with "Graph not found" errors due to incorrect version access
checking.
## Root Cause
The endpoint was checking access to the **latest version** of a graph
instead of the **specific version used in the execution**. This broke
marketplace agents when:
1. User executes a marketplace agent (e.g., v3)
2. Graph owner later publishes a new version (e.g., v4)
3. User tries to view execution details
4. **BUG**: Code checked access to latest version (v4) instead of
execution version (v3)
5. If v4 wasn't published to marketplace → access denied → "Graph not
found"
## Original Problematic Code
```python
# routers/v1.py - get_graph_execution (WRONG ORDER)
graph = await graph_db.get_graph(graph_id=graph_id, user_id=user_id) # ❌ Uses LATEST version
if not graph:
raise HTTPException(404, f"Graph #{graph_id} not found")
result = await execution_db.get_graph_execution(...) # Gets execution data
```
## Solution
**Reordered operations** to check access against the **execution's
specific version**:
```python
# NEW CODE (CORRECT ORDER)
result = await execution_db.get_graph_execution(...) # ✅ Get execution FIRST
if not await graph_db.get_graph(
graph_id=result.graph_id,
version=result.graph_version, # ✅ Use execution's version, not latest!
user_id=user_id,
):
raise HTTPException(404, f"Graph #{graph_id} not found")
```
### Key Changes Made
1. **Fixed version access logic** (routers/v1.py:1075-1095):
- Reordered operations to get execution data first
- Check access using `result.graph_version` instead of latest version
- Applied same fix to external API routes
2. **Enhanced `get_graph()` marketplace fallback**
(data/graph.py:919-935):
- Added proper marketplace lookup when user doesn't own the graph
- Supports version-specific marketplace access checking
- Maintains security by only allowing approved, non-deleted listings
3. **Activity status generator fix**
(activity_status_generator.py:139-144):
- Use `skip_access_check=True` for internal system operations
4. **Missing block handling** (data/graph.py:94-103):
- Added `_UnknownBlockBase` placeholder for graceful handling of deleted
blocks
## Example Scenario Fixed
1. **User**: Installs marketplace agent "Blog Writer" v3
2. **Owner**: Later publishes v4 (not to marketplace yet)
3. **User**: Runs the agent (executes v3)
4. **Before**: Viewing execution details fails because code checked v4
access
5. **After**: ✅ Viewing execution details works because code checks v3
access
## Impact
- ✅ **Marketplace agents work correctly**: Users can view execution
details for any marketplace agent version they've used
- ✅ **Backward compatibility**: Existing owned graphs continue working
- ✅ **Security maintained**: Only allows access to versions user
legitimately executed
- ✅ **Version-aware access control**: Proper access checking for
specific versions, not just latest
## Testing
- [x] Marketplace agents: Execution details now accessible for all
executed versions
- [x] Owned graphs: Continue working as before
- [x] Version scenarios: Access control works correctly for specific
versions
- [x] Missing blocks: Graceful handling without errors
**Root issue resolved**: Version mismatch between execution version and
access check version that was breaking marketplace agent execution
viewing.
---------
Co-authored-by: Claude <noreply@anthropic.com>
|
||
|
|
2569576d78 |
fix(frontend/builder): Fix save-and-run with no agent inputs (#11401)
- Resolves #11390 This unbreaks the last step of the Builder tutorial :) ### Changes 🏗️ - Give `isSaving` time to propagate before calling dependent callback `saveAndRun` ### 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 through Builder tutorial; Run (with implicit save) should work at once |
||
|
|
3b34c04a7a |
fix(frontend): logout console issues (#11400)
## Changes 🏗️ Fixed the logout errors by removing duplicate redirects. `serverLogout` was calling `redirect("/login")` (which throws `NEXT_REDIRECT`), and then `useSupabaseStore` was also calling `router.refresh()`, causing conflicts. Updated `serverLogout` to return a result object instead of redirecting, and moved the redirect to the client using `router.push("/login")` after logout completes. This removes the `NEXT_REDIRECT` error and ensures a single redirect. <img width="800" height="706" alt="Screenshot 2025-11-18 at 16 14 54" src="https://github.com/user-attachments/assets/38e0e55c-f48d-4b25-a07b-d4729e229c70" /> Also addressed 401 errors during logout. Hooks like `useCredits` were still making API calls after logout, causing "Authorization header is missing" errors. Added a check in `_makeClientRequest` to detect logout-in-progress and suppress authentication errors during that window. This prevents console noise and avoids unnecessary error handling. <img width="800" height="742" alt="Screenshot 2025-11-18 at 16 14 45" src="https://github.com/user-attachments/assets/6fb2270a-97a0-4411-9e5a-9b4b52117af3" /> ## 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] Log out of your account - [x] There are no errors showing up on the browser devtools |
||
|
|
34c9ecf6bc |
refactor(frontend): improve customNode reusability and add multi-block support (#11368)
This refactor improves developer experience (DX) by creating a more maintainable and extensible architecture. The previous `CustomNode` implementation had several issues: - Code was duplicated across different node types (StandardNodeBlock, OutputBlock, etc.) - Poor separation of concerns with all logic in a single component - Limited flexibility for handling different block types - Inconsistent handle display logic across different node types <img width="2133" height="831" alt="Screenshot 2025-11-12 at 9 25 10 PM" src="https://github.com/user-attachments/assets/02864bba-9ffe-4629-98ab-1c43fa644844" /> ## Changes 🏗️ - **Refactored CustomNode structure**: - Extracted reusable components: [`NodeContainer`](file:///Users/abhi/Documents/AutoGPT/autogpt_platform/frontend/src/app/(platform)/build/components/FlowEditor/nodes/CustomNode/components/NodeContainer.tsx), [`NodeHeader`](file:///Users/abhi/Documents/AutoGPT/autogpt_platform/frontend/src/app/(platform)/build/components/FlowEditor/nodes/CustomNode/components/NodeHeader.tsx), [`NodeAdvancedToggle`](file:///Users/abhi/Documents/AutoGPT/autogpt_platform/frontend/src/app/(platform)/build/components/FlowEditor/nodes/CustomNode/components/NodeAdvancedToggle.tsx), [`WebhookDisclaimer`](file:///Users/abhi/Documents/AutoGPT/autogpt_platform/frontend/src/app/(platform)/build/components/FlowEditor/nodes/CustomNode/components/WebhookDisclaimer.tsx) - Removed `StandardNodeBlock.tsx` and consolidated logic into [`CustomNode.tsx`](file:///Users/abhi/Documents/AutoGPT/autogpt_platform/frontend/src/app/(platform)/build/components/FlowEditor/nodes/CustomNode/CustomNode.tsx) - Moved [`StickyNoteBlock`](file:///Users/abhi/Documents/AutoGPT/autogpt_platform/frontend/src/app/(platform)/build/components/FlowEditor/nodes/CustomNode/components/StickyNoteBlock.tsx) to components folder for better organization - **Added BlockUIType-specific logic**: - Implemented conditional handle display based on block type (INPUT, WEBHOOK, WEBHOOK_MANUAL blocks don't show handles) - Added special handling for AGENT blocks with dynamic input/output schemas - Added webhook-specific disclaimer component with library agent integration - Fixed OUTPUT block's name field to not show input handle - **Enhanced FormCreator**: - Added `showHandles` prop for granular control - Added `className` prop for styling flexibility (used for webhook opacity) - **Improved nodeStore**: - Added `getNodeBlockUIType` method for retrieving node UI types - **UI/UX improvements**: - Fixed duplicate gap classes in [`BuilderActions`](file:///Users/abhi/Documents/AutoGPT/autogpt_platform/frontend/src/app/(platform)/build/components/BuilderActions/BuilderActions.tsx) - Added proper styling for webhook blocks (disabled state with reduced opacity) - Improved field template spacing for specific block types ## 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 and test a standard node block with input/output handles - [x] Create and test INPUT block (verify no input handles) - [x] Create and test OUTPUT block (verify name field has no handle) - [x] Create and test WEBHOOK block (verify disclaimer appears and form is disabled) - [x] Create and test AGENT block with custom schemas - [x] Create and test sticky note block - [x] Verify advanced toggle works for all node types - [x] Test node execution badges display correctly - [x] Verify node selection highlighting works |
||
|
|
a66219fc1f |
fix(platform): Remove un-runnable agents from schedule (#11374)
Currently when an agent fails validation during a scheduled run, we raise an error then try again, regardless of why. This change removed the agent schedule and notifies the user ### Changes 🏗️ - add schedule_id to the GraphExecutionJobArgs - add agent_name to the GraphExecutionJobArgs - Delete schedule on GraphValidationError - Notify the user with a message that include the agent name ### 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] I have ensured the scheduler tests work with these changes |
||
|
|
8b3a741f60 |
refactor(turnstile): Remove turnstile (#11387)
This PR removes turnstile from the platform. #### 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 to make sure that turnstile is gone, it will be. - [x] Test logging in with out turnstile to make sure it still works - [x] Test registering a new account with out turnstile and it worksautogpt-platform-beta-v0.6.37 |
||
|
|
7c48598f44 |
fix(frontend): Replace question mark icon with "Give Feedback" text button (#11381)
## Summary - Replaced the question mark icon with explicit "Give Feedback" text in the feedback button - Applied consistent styling to match the "Tutorial" button - Removed QuestionMarkCircledIcon dependency from TallyPopup component ## Motivation Users reported not knowing what the question mark icon was for, which prevented them from discovering the feedback feature. Making the button text-based and explicit removes this confusion. ## Changes - Removed `QuestionMarkCircledIcon` import and icon element - Changed button to display only "Give Feedback" text - Added consistent styling (height, rounded corners, background color) to match Tutorial button - Button text can wrap to two lines if needed for better readability #### 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] Check the UI to see that the question mark on the tally button has been replaced with "Give Feedback" Before <img width="618" height="198" alt="image" src="https://github.com/user-attachments/assets/0d4803eb-9a05-4a43-aaff-cc43b6d0cda4" /> After <img width="298" height="126" alt="image" src="https://github.com/user-attachments/assets/c1e1c3b5-94b4-4ad9-87e9-a0feca1143e3" /> --------- Co-authored-by: Abhimanyu Yadav <122007096+Abhi1992002@users.noreply.github.com> |
||
|
|
804e3b403a |
feat(frontend): add mobile warning banner to login and signup pages (#11383)
## Summary Adds a non-blocking warning banner to Login and Sign Up pages that alerts mobile users about potential limitations in the mobile experience. ## Changes - Created `MobileWarningBanner` component in `src/components/auth/` - Integrated banner into Login page (`/login`) - Integrated banner into Sign Up page (`/signup`) - Banner displays only on mobile devices (viewports < 768px) - Uses existing `useBreakpoint` hook for responsive detection ## Design Details - **Position**: Appears below the login/signup card (after the bottom "Sign up"/"Log in" links) - **Style**: Amber-themed warning banner with DeviceMobile icon - **Message**: - Title: "Heads up: AutoGPT works best on desktop" - Description: "Some features may be limited on mobile. For the best experience, consider switching to a desktop." - **Behavior**: Non-blocking, no user interaction required <img width="342" height="81" alt="image" src="https://github.com/user-attachments/assets/b6584299-b388-4d8d-b951-02bd95915566" /> #### 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] Verified banner appears on mobile viewports (< 768px) - [x] Verified banner is hidden on desktop viewports (≥ 768px) - [x] Tested on Login page - [x] Tested on Sign Up page <img width="342" height="758" alt="image" src="https://github.com/user-attachments/assets/077b3e0a-ab9c-41c7-83b7-7ee80a3396fd" /> <img width="342" height="759" alt="image" src="https://github.com/user-attachments/assets/77a64b28-748b-4d97-bd7c-67c55e5e9f22" /> --------- Co-authored-by: Abhimanyu Yadav <122007096+Abhi1992002@users.noreply.github.com> |
||
|
|
9c3f679f30 | fix(frontend): simplify login redirect | ||
|
|
9977144b3d | fix(frontend): onboarding fixes... (2) | ||
|
|
81d61a0c94 | fix(frontend): redirects improvements... | ||
|
|
e1e0fb7b25 |
fix(frontend): post login/signup/onboarding redirect clash (#11382)
## Changes 🏗️ ### Issue 1: login/signup redirect conflict There are 2 hooks, both on the login and signup pages, that attempt to call `router.push` once a user logs in or is created. The main offender seems to be this hook: ```tsx useEffect(() => { if (user) router.push("/"); }, [user]); ``` Which is in place on both pages to prevent logged-in users from accessing `/login` or `/signup`. What happens is when a user signs up or logs in, if they need onboarding, there is a `router.push` down the line to redirect them there, which conflicts with the one done in this hook. **Solution** I moved the logic from that hook to the `middleware.ts`, which is a better place for it... It won't conflict anymore with onboarding redirects done in those pages ### Issue 2: onboarding server redirects Potential race condition: both the server component and the client `<OnboardingProvider />` perform redirects. The server component redirects happen first, but if onboarding state changes after mount, the provider can redirect again, causing rapid mount/unmount cycles. **Solution** Make all onboarding redirects central in `/onboarding` which is now a client component do in client redirects only and displaying a spinner while it does so. ## 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 locally login/logout/signup and trying to access `/login` and `/signup` being logged in |
||
|
|
a054740aac |
dx(frontend): Fix source map upload configuration (#11378)
Source maps aren't being uploaded to Sentry, so debugging errors in production is really hard. ### Changes 🏗️ - Fix config so source maps are found and uploaded to Sentry - Disable deleting source maps after upload (so they are available in the browser) ### 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 locally |
||
|
|
f78a6df96c |
feat(frontend): add static style and beads in custom edge (#11364)
<!-- Clearly explain the need for these changes: --> This PR enhances the visual feedback in the flow editor by adding animated "beads" that travel along edges during execution. This provides users with clear, real-time visualization of data flow and execution progress through the graph, making it easier to understand which connections are active and track execution state. https://github.com/user-attachments/assets/df4a4650-8192-403f-a200-15f6af95e384 ### Changes 🏗️ <!-- Concisely describe all of the changes made in this pull request: --> - **Added new edge data types and structure:** - Added `CustomEdgeData` type with `isStatic`, `beadUp`, `beadDown`, and `beadData` properties - Created `CustomEdge` type extending XYEdge with custom data - **Implemented bead animation components:** - Added `JSBeads.tsx` - JavaScript-based animation component with real-time updates - Added `SVGBeads.tsx` - SVG-based animation component (for future consideration) - Added helper functions for path calculations and bead positioning - **Updated edge rendering:** - Modified `CustomEdge` component to display beads during execution - Added static edge styling with dashed lines (`stroke-dasharray: 6`) - Improved visual hierarchy with different stroke styles for selected/unselected states - **Refactored edge management:** - Converted `edgeStore` from using `Connection` type to `CustomEdge` type - Added `updateEdgeBeads` and `resetEdgeBeads` methods for bead state management - Updated `copyPasteStore` to work with new edge structure - **Added support for static outputs:** - Added `staticOutput` property to `CustomNodeData` - Static edges show continuous bead animation while regular edges show one-time animation ### 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 flow with multiple blocks and verify beads animate along edges during execution - [x] Test that beads increment when execution starts (`beadUp`) and decrement when completed (`beadDown`) - [x] Verify static edges display with dashed lines and continuous animation - [x] Confirm copy/paste operations preserve edge data and bead states - [x] Test edge animations performance with complex graphs (10+ nodes) - [x] Verify bead animations complete properly before disappearing - [x] Test that multiple beads can animate on the same edge for concurrent executions - [x] Verify edge selection/deletion still works with new visualization - [x] Test that bead state resets properly when starting new executions |
||
|
|
4d43570552 | Merge branch 'master' into dev | ||
|
|
d3d78660da |
fix(frontend/builder): Generate unique IDs for copied blocks (#11344)
## Changes 🏗️ - Clear backend_id when pasting blocks to prevent duplicate ID errors - Add copy/paste functionality to new FlowEditor - Ensure pasted blocks use newly generated UUIDs when saving Fixes issue where copying and pasting blocks would fail with 'Unique constraint failed' error because the old backend_id was being reused instead of the new node ID. ## 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 any block to the builder, save and run the graph and wait for it to finish, then copy and paste the first block and paste it, try to use it and it should now work and not have any issues/errors https://github.com/user-attachments/assets/c24f9a9a-8e4f-4988-8731-cddc34a0da13 --------- Co-authored-by: Reinier van der Leer <pwuts@agpt.co> |
||
|
|
749be06599 |
fix(blocks/ai): Make AI List Generator block more reliable (#11317)
- Resolves #11305 ### Changes 🏗️ Make `AIListGeneratorBlock` more reliable: - Leverage `AIStructuredResponseGenerator`'s robust prompt/retry/validate logic - Use JSON format instead of Python list format - Add `force_json_output` toggle - Fix output instructions in prompt (only string values allowed) ### 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] Works without `force_json_output` - [x] Works with `force_json_output` - [x] Retry mechanism works as intended |
||
|
|
27d886f05c |
feat(platform): WebSocket Onboarding notifications (#11335)
Use WebSocket notifications from the backend to display confetti. ### Changes 🏗️ - Send WebSocket notifications to the browser when new onboarding steps are completed - Handle WebSocket notifications events in the Wallet and use them instead of frontend-based logic to play confetti (fixes confetti appearing on every refresh) - Scroll to newly completed tasks when wallet opens just before confetti plays - Fix: make `Run again` button complete `RE_RUN_AGENT` task ### 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] Confetti are displayed when previously uncompleted tasks are completed - [x] Confetti do not appear on page refresh - [x] Wallet scrolls on open before confetti is displayed - [x] `Run again` button completes `RE_RUN_AGENT` task |
||
|
|
be01a1316a |
fix(tests/frontend): resolve flaky test due to duplicate heading elements on marketplace page (#11369)
This PR fixes a flaky test issue in the signup flow where Playwright's
strict mode was failing due to duplicate heading elements on the
marketplace page.
### Problem
The test was failing intermittently with the following error:
```
Error: strict mode violation: getByText('Bringing you AI agents designed by thinkers from around the world') resolved to 2 elements
```
This occurred because the marketplace page contains two identical `<h3>`
elements with the same text, causing Playwright's strict mode to throw
an error when trying to select a single element.
### 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 E2E tests locally multiple times to ensure no flakiness
- [x] Check CI pipeline runs successfully
|
||
|
|
32bb6705d1 |
fix(frontend/library): fix schedule display issues for recurring schedules (#11362)
Fixes two related bugs in the agent scheduling UI that caused confusion for users setting up recurring schedules: 1. **"on day nan of every month" display bug**: When scheduling an agent to repeat every N days (e.g., "every 2 days"), the schedule info panel incorrectly displayed "on day nan of every month" instead of the correct "Every N days at HH:MM" format. 2. **Confusing time picker for hourly intervals**: When setting up a schedule with "every N hours", the UI displayed a time picker labeled "at 9 o'clock" which was confusing because the time setting is ignored for hourly intervals. Users were unclear about what this setting meant or if it had any effect. ### Changes 🏗️ **Fixed `humanizeCronExpression` function** (`autogpt_platform/frontend/src/lib/cron-expression-utils.ts`): - Reordered cron expression parsing logic to handle day intervals (`*/N`) before monthly checks - Added `!dayOfMonth.startsWith("*/")` guard to monthly and yearly checks to prevent misinterpreting day intervals as monthly day lists - This ensures expressions like `0 9 */2 * *` (every 2 days at 9:00) are correctly displayed as "Every 2 days at 09:00" instead of "on day nan of every month" **Updated `CronScheduler` component** (`autogpt_platform/frontend/src/app/(platform)/library/agents/[id]/components/AgentRunsView/components/ScheduleAgentModal/components/CronScheduler/CronScheduler.tsx`): - Hide `TimeAt` component for custom intervals with unit "hours" (time is ignored for hourly intervals) - Pass context-aware label to `TimeAt`: "Starting at" for custom day intervals, "At" for other frequencies - This clarifies that the time setting is the starting time for day intervals and removes confusion for hourly intervals **Enhanced `TimeAt` component** (`autogpt_platform/frontend/src/app/(platform)/library/agents/[id]/components/AgentRunsView/components/ScheduleAgentModal/components/CronScheduler/TimeAt.tsx`): - Added optional `label` prop (defaults to "At") to allow context-aware labeling - Component now displays "Starting at" when used with custom day intervals for better clarity ### 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] Schedule an agent with "Custom" frequency, "Every 2 days" interval - verify it displays as "Every 2 days at HH:MM" in the schedule info panel (not "on day nan of every month") - [x] Schedule an agent with "Monthly" frequency - verify it displays correctly (e.g., "On day 1, 15 of every month at HH:MM") <img width="845" height="388" alt="image" src="https://github.com/user-attachments/assets/02ed0b73-bf5e-48fd-a7b0-6f4d4687eb13" /> <img width="839" height="374" alt="image" src="https://github.com/user-attachments/assets/be62eee2-3fdd-4b20-aecf-669c3c6c6fb2" /> |
||
|
|
536e2a5ec8 |
fix(blocks): Make Smart Decision Maker tool pin handling consistent and reliable (#11363)
- Resolves #11345 ### Changes 🏗️ - Move tool use routing logic from frontend to backend: routing info was being baked into graph links by the frontend, inconsistently, causing issues - Rework tool use routing to use target node ID instead of target block name - Add a bit of magic to `NodeOutputs` component to show tool node title instead of ID DX: - Removed `build` from `.prettierignore` -> re-enable formatting for builder components ### 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] Use SDM block in a graph; verify it works - [x] Use SDM block with agent executor block as tool; verify it works - Tests for `parse_execution_output` pass (checked by CI) |
||
|
|
a3e5f7fce2 |
fix(frontend): consolidate graph save logic to prevent duplicate event listeners (#11367)
## Summary
This PR fixes an issue where multiple keyboard save event listeners were
being registered when the same save hook was used in multiple
components, causing the graph to be saved multiple times (3x) when using
Ctrl/Cmd+S.
## Changes
- **Created a centralized `useSaveGraph` hook** in
`/hooks/useSaveGraph.ts` that encapsulates all graph saving logic
- **Refactored `useNewSaveControl`** to use the new centralized hook
instead of duplicating save logic
- **Updated `useRunGraph` and `useScheduleGraph`** to use the
centralized `useSaveGraph` hook directly
- **Simplified the save control component** by removing redundant logic
and using cleaner naming conventions
## Problem
The previous implementation had the save logic duplicated in
`useNewSaveControl`, and when this hook was used in multiple places
(NewSaveControl component, RunGraph, ScheduleGraph), each instance would
register its own keyboard event listener for Ctrl/Cmd+S. This caused:
- Multiple save requests being sent simultaneously
- "Unique constraint failed on the fields: ('id', 'version')" errors
from the backend
- Poor performance due to unnecessary re-renders
## Solution
By centralizing the save logic in a dedicated `useSaveGraph` hook:
- Save logic is now in one place, making it easier to maintain
- Components can use the save functionality without registering
duplicate event listeners
- The keyboard shortcut listener is only registered once in the
`useNewSaveControl` hook
- Other components (RunGraph, ScheduleGraph) can call `saveGraph`
directly without side effects
## Testing
- [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 Ctrl/Cmd+S saves the graph only once
- [x] Tested save functionality from Save Control popup
- [x] Confirmed Run Graph and Schedule Graph still save before execution
- [x] Verified no duplicate save requests in network tab
- [x] Checked that save toast notifications appear correctly
|
||
|
|
d674cb80e2 |
refactor(backend): Improve Block Error Handling (#11366)
We need a way to differentiate between serious errors that cause on call alerts and block errors. This PR address this need by ensuring all errors that occur during execution of a block are of Subtype BlockError ### Changes 🏗️ - Introduced BlockErrors and its subtypes - Updated current errors that are emitted by blocks to use BlockError - Update executor manager, to errors emitted when running a block that are not of type BlockError to BlockUnknownError ### 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] checked tests still work - [x] Ensured block error message is readable and useful |
||
|
|
c3a6235cee |
feat(frontend): integrate drag-and-drop functionality in new builder (#11341)
In this PR, I’ve added drag-and-drop functionality to the new builder using built-in HTML drag-and-drop. https://github.com/user-attachments/assets/b27c281e-6216-4131-9a89-e10b0dd56a8f ### Changes - Added ReactFlowProvider to manage flow state in BuilderPage and Flow components. - Implemented drag-and-drop support for blocks in the NewControlPanel, allowing users to drag blocks from the menu and drop them onto the canvas. - Enhanced the Block component to handle drag events and provide visual feedback during dragging. - Updated useFlow hook to include onDragOver and onDrop handlers for managing block placement. - Adjusted nodeStore to accept position parameters for added blocks, improving placement accuracy. ### 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] I’ve tried dragging and dropping multiple blocks, and it works perfectly as shown in the video. |
||
|
|
43638defa2 |
feat(frontend): add context menu in custom node (#11342)
- depends one https://github.com/Significant-Gravitas/AutoGPT/pull/11339 In this PR, I’ve added a dropdown menu to the custom node. This allows you to delete a node, copy a node, and if the node is an agent node, you can also navigate to that specific agent. <img width="633" height="403" alt="Screenshot 2025-11-08 at 7 24 38 PM" src="https://github.com/user-attachments/assets/89dd2906-95f5-40a5-82d1-de05075e4f30" /> ###Changes - Added context menu to custom nodes with copy, delete, and open agent options - Added performance optimization with memo for custom edge ### 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] All three buttons are working perfectly. - [x] The “Go to graph” option is only visible in the sub-graph node. |
||
|
|
9371528aab |
feat(frontend): add copy paste functionality in new builder (#11339)
In the new builder, I’ve added a copy-paste functionality using the keyboard. https://github.com/user-attachments/assets/3106ae86-3f47-4807-a598-9c0b166eaae9 ### Changes 🏗️ - Added useCopyPasteKeyboard hook for handling keyboard shortcuts - Created new copyPasteStore for state management - Implemented performance optimizations (memo on CustomEdge) - Updated nodeStore and edgeStore to support the 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: - [x] The copy-paste functionality is working correctly as you can see in the video. |
||
|
|
711c439642 |
fix(frontend): enable admin impersonation for server-side rendered requests (#11343)
## Summary Fix admin impersonation not working for graph execution requests that are server-side rendered. ## Problem - Build page uses SSR, so API calls go through _makeServerRequest instead of _makeClientRequest - Server-side requests cannot access sessionStorage where impersonation ID is stored - Graph execution requests were missing X-Act-As-User-Id header ## Simple Solution 1. **Store impersonation in cookie** (useAdminImpersonation.ts): - Set/clear cookie alongside sessionStorage for server access 2. **Read cookie on server** (_makeServerRequest in client.ts): - Check for impersonation cookie using Next.js cookies() API - Create fake Request with X-Act-As-User-Id header - Pass to existing makeAuthenticatedRequest flow ## Changes Made - useAdminImpersonation.ts: 2 lines to set/clear cookie - client.ts: 1 method to read cookie and create header - No changes to existing proxy/header/helpers logic ## Result - ✅ Graph execution requests now include impersonation header - ✅ Works for both client-side and server-side rendered requests - ✅ Minimal changes, leverages existing header forwarding logic - ✅ Backward compatible with all existing functionality 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> --------- Co-authored-by: Claude <noreply@anthropic.com> |
||
|
|
33989f09d0 |
feat(frontend): supabase + zustand for speed (#11333)
### Changes 🏗️ This change uses [Zustand](https://github.com/pmndrs/zustand) (a lightweight state management library) to centralize authentication state across the app. Previously, each component mounting `useSupabase()` would create its own local state, causing duplicate API calls and inconsistent user data. Now, user state is cached globally with Zustand - when multiple components need auth data, they share the same cached state instead of each fetching separately. This reduces server load and improves app responsiveness. **File structure:** ``` src/lib/supabase/hooks/ ├── useSupabase.ts # React hook interface (modified) ├── useSupabaseStore.ts # Zustand state management (new) └── helpers.ts # Pure business logic (new) ``` **What was extracted to helpers:** - `ensureSupabaseClient()` - Singleton client initialization - `fetchUser()` - User fetching with error handling - `validateSession()` - Session validation logic - `refreshSession()` - Session refresh logic - `handleStorageEvent()` - Cross-tab logout handling ### 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 no TypeScript errors in modified files - [x] Tested login flow works correctly - [x] Tested logout flow works correctly - [x] Verified session validation on tab focus/visibility - [x] Tested cross-tab logout synchronization - [x] Confirmed WebSocket disconnection on logout |
||
|
|
d6ee402483 |
feat(platform): Add execution analytics admin endpoint with feature flag bypass (#11327)
This PR adds a comprehensive execution analytics admin endpoint that generates AI-powered activity summaries and correctness scores for graph executions, with proper feature flag bypass for admin use. ### Changes 🏗️ **Backend Changes:** - Added admin endpoint: `/api/executions/admin/execution_analytics` - Implemented feature flag bypass with `skip_feature_flag=True` parameter for admin operations - Fixed async database client usage (`get_db_async_client`) to resolve async/await errors - Added batch processing with configurable size limits to handle large datasets - Comprehensive error handling and logging for troubleshooting - Renamed entire feature from "Activity Backfill" to "Execution Analytics" for clarity **Frontend Changes:** - Created clean admin UI for execution analytics generation at `/admin/execution-analytics` - Built form with graph ID input, model selection dropdown, and optional filters - Implemented results table with status badges and detailed execution information - Added CSV export functionality for analytics results - Integrated with generated TypeScript API client for proper authentication - Added proper error handling with toast notifications and loading states **Database & API:** - Fixed critical async/await issue by switching from sync to async database client - Updated router configuration and endpoint naming for consistency - Generated proper TypeScript types and API client integration - Applied feature flag filtering at API level while bypassing for admin operations ### 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: **Test Plan:** - [x] Admin can access execution analytics page at `/admin/execution-analytics` - [x] Form validation works correctly (requires graph ID, validates inputs) - [x] API endpoint `/api/executions/admin/execution_analytics` responds correctly - [x] Authentication works properly through generated API client - [x] Analytics generation works with different LLM models (gpt-4o-mini, gpt-4o, etc.) - [x] Results display correctly with appropriate status badges (success/failed/skipped) - [x] CSV export functionality downloads correct data - [x] Error handling displays appropriate toast messages - [x] Feature flag bypass works for admin users (generates analytics regardless of user flags) - [x] Batch processing handles multiple executions correctly - [x] Loading states show proper feedback during processing #### 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] No configuration changes required for this feature **Related to:** PR #11325 (base correctness score functionality) 🤖 Generated with [Claude Code](https://claude.ai/code) --------- Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com> Co-authored-by: Zamil Majdy <majdyz@users.noreply.github.com> |
||
|
|
08a4a6652d | fix(frontend): onboarding provider calls only when user is logged in | ||
|
|
58928b516b | fix(frontend): onboarding provider calls only when user is logged in | ||
|
|
18bb78d93e |
feat(platform): WebSocket-based notifications (#11297)
This enables real time notifications from backend to browser via WebSocket using Redis bus for moving notifications from REST process to WebSocket process. This is needed for (follow-up) backend-completion of onboarding tasks with instant notifications. ### Changes 🏗️ - Add new `AsyncRedisNotificationEventBus` to enable publishing notifications to the Redis event bus - Consume notifications in `ws_api.py` similarly to execution events and send them via WebSocket - Store WebSocket user connections in `ConnectionManager` - Add relevant tests and types ### 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] Notifications are sent to the frontend |
||
|
|
8058b9487b | feat(platform): Chat UI refinements with simplified tool status indicators (#11337) | ||
|
|
e68896a25a |
feat(backend): allow regex on CORS allowed origins (#11336)
## Changes 🏗️ Allow dynamic URLs in the CORS config, to match them via regex. This helps because currently we have Front-end preview deployments which are isolated ( _nice they don't pollute or overrride other domains_ ) like: ``` https://autogpt-git-{branch_name}-{commit}-significant-gravitas.vercel.app ``` The Front-end builds and works there, but as soon as you login, any API requests to endpoints that need auth will fail due to CORS, given our current CORS config does not support dynamically generated domains. ### Changes After these changes we can specify dynamic domains to be allowed under CORS. I also made `localhost` disabled if the API is in production for safety... ### Before ```yml cors: allowOrigin: "https://dev-builder.agpt.co" # could only specify full URL strings, not dyamic ones ``` ### After ```yml cors: allowOrigins: - "https://dev-builder.agpt.co" - "regex:https://autogpt-git-[a-z0-9-]+\\.vercel\\.app" # dynamic domains supported via regex ``` ### Files - add `build_cors_params` utility to parse literal/regex origins and block localhost in production (`backend/server/utils/cors.py`) - apply the helper in both `AgentServer` and `WebsocketServer` so CORS logic and validations remain consistent - add reusable `override_config` testing helper and update existing WebSocket tests to cover the shared CORS behavior - introduce targeted unit tests for the new CORS helper (`backend/server/utils/cors_test.py`) ## 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] We will know once we made the origin config changes on infra and test with this... |
||
|
|
dfed092869 |
dx(frontend): make preview deploys work + minor improvements (#11329)
## Changes 🏗️ Make sure we can login on preview deployments generated by Vercel to test Front-end changes. As of now, the Cloudflare CAPTCHA verification fails, we don't need to have it active there. ### Minor improvements <img width="1599" height="755" alt="Screenshot 2025-11-06 at 16 18 10" src="https://github.com/user-attachments/assets/0a3fb1f3-2d4d-49fe-885f-10f141dc0ce4" /> Prevent the following build error: ``` 15:58:01.507 at j (.next/server/app/(no-navbar)/onboarding/reset/page.js:1:5125) 15:58:01.507 at <unknown> (.next/server/chunks/5826.js:2:14221) 15:58:01.507 at b.handleCallbackErrors (.next/server/chunks/5826.js:43:43068) 15:58:01.507 at <unknown> (.next/server/chunks/5826.js:2:14194) { 15:58:01.507 description: "Route /onboarding/reset couldn't be rendered statically because it used `cookies`. See more info here: https://nextjs.org/docs/messages/dynamic-server-error", 15:58:01.507 digest: 'DYNAMIC_SERVER_USAGE' 15:58:01.507 } ``` by making the reset onboarding route a client one. I made a new component, `<LoadingSpinner />`, and that page will show it while onboarding it's being reset. ## 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] You can login/signup on the app and use it in the preview URL generated by Vercel |
||
|
|
5559d978d7 | fix(platform): chat duplicate messages (#11332) autogpt-platform-beta-v0.6.36 |