SCAL-315058: isReadyForRenderPromise gate never resolves + null-safety in init path#545
Conversation
|
@copilot review the pr |
commit: |
There was a problem hiding this comment.
Code Review
This pull request refactors the initialization and pre-rendering lifecycle of the ThoughtSpot embed SDK, ensuring that iframe replacement waits for initialization to complete and that initialization status is correctly tracked as a boolean. It also adds comprehensive unit tests for these lifecycle states. The review feedback highlights two critical issues in src/embed/ts-embed.ts where initialization failures are handled unsafely: first, an unavailable embedConfig in afterInit is silently ignored rather than throwing an error, which leads to downstream crashes; second, the initialization promise chain swallows errors in its .catch block, allowing downstream processes to proceed with a broken state instead of properly rejecting.
Reviewed the current PR changes and I don’t see any actionable issues in the patch. I also ran targeted validation on the touched area: |
No description provided.