codeant-ai-for-open-source[bot] commented on PR #38827:
URL: https://github.com/apache/superset/pull/38827#issuecomment-4118008673
## **Sequence Diagram**
This PR changes the generate dashboard tool to bypass the command wrapper
and create dashboards directly in the tool session. It re-queries user and
chart objects in that same session to prevent cross-session ORM attachment
failures.
```mermaid
sequenceDiagram
participant Client
participant MCPTool
participant Database
Client->>MCPTool: Request dashboard creation with chart IDs
MCPTool->>Database: Fetch charts and prepare layout and title
MCPTool->>Database: Re-query current user and charts in tool session
MCPTool->>Database: Create dashboard with owners and charts then commit
MCPTool->>Database: Reload dashboard with related data for response
MCPTool-->>Client: Return dashboard details and dashboard URL
```
---
*Generated by [CodeAnt AI](https://codeant.ai)*
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]