codeant-ai-for-open-source[bot] commented on PR #38591:
URL: https://github.com/apache/superset/pull/38591#issuecomment-4044246973
## **Sequence Diagram**
This PR primarily expands test coverage, but it also locks in two key
frontend failure behaviors: optimistic alert toggles now roll back when backend
updates fail, and report save failures propagate back to the modal after
showing a danger toast. The diagram highlights these core error-handling flows.
```mermaid
sequenceDiagram
participant User
participant Frontend
participant Backend
User->>Frontend: Toggle alert active switch
Frontend->>Frontend: Apply optimistic active state
Frontend->>Backend: Update alert active status
Backend-->>Frontend: Empty or failed response
Frontend->>Frontend: Restore original alert state
User->>Frontend: Submit report create or edit
Frontend->>Backend: Send save request through report action
Backend-->>Frontend: Save failure
Frontend->>Frontend: Dispatch danger toast and keep modal open
```
---
*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]