codeant-ai-for-open-source[bot] commented on PR #35021:
URL: https://github.com/apache/superset/pull/35021#issuecomment-3986975153
## **Sequence Diagram**
Shows the new flow where alert/report email links are rewritten to point to
a /redirect/ endpoint; the backend decides immediate redirect for internal
links or renders a React warning page for externals, and the frontend can
auto-redirect if the URL is trusted (localStorage) or let the user continue and
optionally persist trust.
```mermaid
sequenceDiagram
participant Emailer as Alert/Report Emailer
participant LinkUtil as LinkRedirect util
participant Recipient as Email Recipient (clicks link)
participant Backend as RedirectView
participant Frontend as RedirectWarning (React)
Emailer->>LinkUtil: process_html_links(description)
LinkUtil-->>Emailer: description with hrefs -> /redirect/?url={orig}
Emailer-->>Recipient: send email (contains rewritten /redirect/ links)
Recipient->>Backend: GET /redirect/?url={orig}
Backend->>Backend: validate feature flag & scheme; if internal ->
redirect to {orig}
alt Internal URL
Backend-->>Recipient: 302 redirect to {orig}
else External URL
Backend-->>Frontend: render warning app
Frontend->>Frontend: read target url, isAllowedScheme, isUrlTrusted
(localStorage)
alt URL trusted
Frontend-->>Recipient: navigate to {orig} (immediate)
else
Frontend-->>Recipient: show warning; on Continue optionally
trustUrl -> navigate to {orig}
end
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]