codeant-ai-for-open-source[bot] commented on PR #38201:
URL: https://github.com/apache/superset/pull/38201#issuecomment-3948334737
## **Sequence Diagram**
Shows the import/evaluation path during Docusaurus SSG that previously
accessed window.console at module init (causing "window is not defined"), and
the updated logging.ts which now guards the window check and falls back to
globalThis.console so the SSG can proceed.
```mermaid
sequenceDiagram
participant SSG (Node)
participant AlertModule
participant Translator
participant LoggingModule
participant Console (globalThis)
SSG (Node)->>AlertModule: import Alert (SSG build)
AlertModule->>Translator: import translation → Translator
Translator->>LoggingModule: import Logger (module evaluated)
LoggingModule->>Console: typeof window !== 'undefined' ? window.console
: globalThis.console
Console-->>LoggingModule: return console API (fallback to globalThis in
Node)
LoggingModule-->>SSG (Node): export logger (safe for SSR)
SSG (Node)-->>AlertModule: continue static render with logger
```
---
*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]