codeant-ai-for-open-source[bot] commented on PR #38416:
URL: https://github.com/apache/superset/pull/38416#issuecomment-4054186571
## **Sequence Diagram**
This PR adds a computed popularity_score to chart, dashboard, and dataset
list tools. The score is calculated only when requested, with a dedicated two
pass flow when sorting by popularity to rank results before pagination.
```mermaid
sequenceDiagram
participant Client
participant MCPListTool
participant DAO
participant PopularityModule
Client->>MCPListTool: List assets with filters and sort options
alt order_column is popularity_score
MCPListTool->>DAO: Fetch all matching asset IDs
MCPListTool->>PopularityModule: Compute scores and rank IDs
MCPListTool->>DAO: Fetch paged assets in ranked ID order
else popularity_score in select_columns only
MCPListTool->>DAO: Fetch paged assets with normal sorting
MCPListTool->>PopularityModule: Compute scores for returned asset IDs
end
MCPListTool-->>Client: Return asset list 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]