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

   ## **Sequence Diagram**
   
   The PR updates ensureAppRoot to return absolute (scheme://) and 
protocol-relative (//...) URLs unchanged while still prefixing relative paths 
with the application root. The diagram shows how Menu -> makeUrl -> 
ensureAppRoot handles both absolute and relative inputs.
   
   ```mermaid
   sequenceDiagram
       participant Menu
       participant makeUrl
       participant ensureAppRoot
       participant Bootstrap (applicationRoot)
   
       Menu->>makeUrl: resolve brandLogoHref (or path)
       makeUrl->>ensureAppRoot: ensureAppRoot(path)
       ensureAppRoot->>ensureAppRoot: check if path matches scheme:// or starts 
with //
       alt Absolute or protocol-relative URL
           ensureAppRoot-->>makeUrl: return original URL (no prefix)
       else Relative path
           ensureAppRoot->>Bootstrap: applicationRoot()
           Bootstrap-->>ensureAppRoot: "/superset/" (example)
           ensureAppRoot-->>makeUrl: return prefixed path ("/superset/…")
       end
       makeUrl-->>Menu: final href used in rendered link
   ```
   
   ---
   *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