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

   ## **Sequence Diagram**
   
   The PR stops making a separate theme API call and instead passes the inline 
theme object returned by the dashboard API into CrudThemeProvider, which 
synchronously creates and applies the dashboard theme (or falls back to the 
global theme on invalid/missing data). This prevents 403-triggered infinite 
loading for non-admin users.
   
   ```mermaid
   sequenceDiagram
       participant DashboardAPI
       participant DashboardPage
       participant CrudThemeProvider
       participant ThemeLib as Theme.fromConfig
       participant GlobalTheme
   
       DashboardAPI-->>DashboardPage: returns dashboard (includes theme {id, 
json_data})
       DashboardPage->>CrudThemeProvider: provide theme (full object)
       CrudThemeProvider->>ThemeLib: parse json_data & Theme.fromConfig
       alt valid theme
           ThemeLib-->>CrudThemeProvider: Theme (SupersetThemeProvider)
           CrudThemeProvider-->>DashboardPage: wrap children with 
SupersetThemeProvider
       else invalid/missing
           CrudThemeProvider-->>GlobalTheme: use global theme (no fetch)
           CrudThemeProvider-->>DashboardPage: render children with global theme
   ```
   
   ---
   *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