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

   ## **Sequence Diagram**
   
   Shows how Menu (brand link construction) delegates URL resolution to 
makeUrl/ensureAppRoot which now returns absolute and protocol-relative URLs 
unchanged, while still prefixing relative paths with the application root. This 
prevents double-prefixing absolute brand links in subdirectory deployments.
   
   ```mermaid
   sequenceDiagram
       participant Menu (component)
       participant PathUtils (makeUrl / ensureAppRoot)
       participant BootstrapData (applicationRoot)
       participant Browser
   
       Menu->>PathUtils: makeUrl(theme.brandLogoHref)
       PathUtils->>PathUtils: ensureAppRoot(path)
       alt path is absolute (scheme://) or protocol-relative (//...)
           PathUtils-->>Menu: return original absolute/protocol-relative URL
       else path is relative
           PathUtils->>BootstrapData: applicationRoot()
           BootstrapData-->>PathUtils: "/superset/" (example)
           PathUtils-->>Menu: return prefixed path ("/superset/..." )
       end
       Menu->>Browser: set link href to resolved URL
   ```
   
   ---
   *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