codeant-ai-for-open-source[bot] commented on PR #38384:
URL: https://github.com/apache/superset/pull/38384#issuecomment-4001809995
## **Sequence Diagram**
The PR stops fetching a theme by ID (which required Theme read permission)
and instead uses the full theme object returned by the dashboard API. The
dashboard passes the inline json_data to CrudThemeProvider, which creates a
Theme synchronously via Theme.fromConfig and applies it; if creation fails it
falls back to the global theme to avoid infinite loading.
```mermaid
sequenceDiagram
participant Client
participant DashboardPage
participant CrudThemeProvider
participant Theme
Client->>DashboardPage: GET dashboard (response includes theme object
with json_data)
DashboardPage->>CrudThemeProvider: provide full theme object (theme)
CrudThemeProvider->>Theme: Theme.fromConfig(theme.json_data)
Theme-->>CrudThemeProvider: SupersetThemeProvider
alt Valid theme created
CrudThemeProvider-->>Client: Render children wrapped with
SupersetThemeProvider (dashboard theme applied)
else Invalid or missing theme
CrudThemeProvider-->>Client: Render children with global theme (no
spinner / no extra API call)
end
```
---
*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]