LW-33 Patch for Tooltip undefined error on race condition - #61
Merged
Conversation
…t for sending header in request from client to server
karendolan
requested review from
gabeabrams
and
a lite review from Copilot
and removed request for
Copilot
August 4, 2026 16:08
There was a problem hiding this comment.
Pull request overview
This PR addresses a Bootstrap Tooltip crash caused by a hide/dispose race condition (Bootstrap issue #37474) and extends the client request helper to support passing custom headers through visitServerEndpoint.
Changes:
- Add safety checks in
Tooltipto avoid constructing a Bootstrap tooltip after the child unmounts, and apply a defensive workaround during cleanup to prevent late callbacks from crashing. - Extend
visitServerEndpointto accept and forward optional custom request headers. - Update generated
dist/*outputs and adjustpackage-lock.jsonaccordingly.
Reviewed changes
Copilot reviewed 2 out of 10 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/helpers/visitServerEndpoint.tsx | Adds optional headers to the helper’s options and forwards them to the underlying sendRequest. |
| src/components/Tooltip.tsx | Adds guards around async Bootstrap import and a defensive cleanup workaround for Bootstrap’s tooltip race condition. |
| package-lock.json | Lockfile churn consistent with dependency metadata updates. |
| dist/index.d.ts | Updates published type declarations to include headers on visitServerEndpoint. |
| dist/esm/types/helpers/visitServerEndpoint.d.ts | Updates ESM type declarations to include headers. |
| dist/esm/index.js | Updates built ESM output with the tooltip workaround and header forwarding. |
| dist/cjs/types/helpers/visitServerEndpoint.d.ts | Updates CJS type declarations to include headers. |
| dist/cjs/index.js | Updates built CJS output with the tooltip workaround and header forwarding. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Patch for Tooltip undefined error during construct/deconstruct race condition. Known Tooltip issue twbs/bootstrap#37474
Satisfies dce-reactkit issue #50, and Jira tickets LW-33, UP-125
This pull includes small companion update to allow the client to send headers in the request from client to server to accommodate custom header params.