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

   ## **Sequence Diagram**
   
   The PR updates favorite-status thunks to ignore API responses unless the 
requested dashboard ID still matches the currently viewed dashboard, preventing 
stale state updates or error toasts after navigation.
   
   ```mermaid
   sequenceDiagram
       participant Dashboard UI
       participant Thunk
       participant Superset API
       participant Redux Store
   
       Dashboard UI->>Thunk: fetchFaveStar(id) / saveFaveStar(id, isStarred)
       Thunk->>Superset API: call favorite_status or favorites endpoint
       Superset API-->>Thunk: response (success or error)
   
       alt response for current dashboard (ids match)
           Thunk->>Redux Store: dispatch state update or addDangerToast
           Redux Store-->>Dashboard UI: updated favorite state or error toast
       else stale response (ids differ)
           Thunk-->>Thunk: silently ignore response (no dispatch)
           Note right of Thunk: prevents toasts/state changes for old dashboard
       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]

Reply via email to