Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
Without matching wrapRootElement in both files, the SSR tree (no FloatingAssistantProvider wrapper) differed from the client tree (with wrapper), causing React hydration errors #418/#423 that broke all doc pages on deployment. FloatingAssistantProvider is now SSR-safe: all state initializes with static defaults; sessionStorage/browser APIs are only read in useEffect. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
wrapRootElement in gatsby-browser.js was the root cause of hydration errors #418/#423. Gatsby SSRs every page without the wrapper but the client added it, creating a tree structure mismatch. New approach: onClientEntry creates a separate div appended to body and mounts FloatingAssistantProvider + FloatingAssistant via ReactDOM.createRoot — completely outside Gatsby's tree. Gatsby never sees or hydrates this subtree, so there is no server/client mismatch. Document/index.tsx no longer uses useFloatingAssistant context — it fires the existing 'spotter-code-ask' CustomEvent instead, which the standalone FloatingAssistant already listens for. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@thoughtspot/radiant-react reads `window` at module load time. Top-level require() in gatsby-browser.js caused it to be evaluated during Gatsby's SSR build where window doesn't exist, corrupting hydration for all pages. Dynamic import() inside onClientEntry ensures radiant-react and FloatingAssistant are only loaded in the browser, never during SSR. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Restore .npmrc trailing newline (matches main) - Remove unnecessary .scss module declaration from src/index.d.ts - Move useState declarations before useEffect in FloatingAssistantContext Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…nescaping' Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.