codeant-ai-for-open-source[bot] commented on PR #38416:
URL: https://github.com/apache/superset/pull/38416#issuecomment-4054552315

   ## **Sequence Diagram**
   
   This PR adds a lazy computed popularity_score to chart, dashboard, and 
dataset list tools. The flow now branches between a two-pass ranking path for 
popularity sorting and a lightweight attach-only path when the score is merely 
selected.
   
   ```mermaid
   sequenceDiagram
       participant Client
       participant MCPListTool
       participant DAO
       participant PopularityModule
   
       Client->>MCPListTool: List assets with filters and options
       alt order column is popularity score
           MCPListTool->>DAO: Fetch matching asset ids
           MCPListTool->>PopularityModule: Compute scores and rank ids
           MCPListTool->>DAO: Fetch paged assets in ranked order
           MCPListTool->>MCPListTool: Attach popularity score to results
       else popularity score requested in selected columns
           MCPListTool->>DAO: Fetch paged assets normally
           MCPListTool->>PopularityModule: Compute scores for returned ids
           MCPListTool->>MCPListTool: Attach popularity score to results
       end
       MCPListTool-->>Client: Return paginated assets with optional popularity 
score
   ```
   
   ---
   *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]

Reply via email to