Skip to content

LW-33 Patch for Tooltip undefined error on race condition - #61

Merged
gabeabrams merged 1 commit into
mainfrom
t/LW-33-Tooltip-dipose-race-cond-KD
Aug 4, 2026
Merged

LW-33 Patch for Tooltip undefined error on race condition#61
gabeabrams merged 1 commit into
mainfrom
t/LW-33-Tooltip-dipose-race-cond-KD

Conversation

@karendolan

Copy link
Copy Markdown
Member

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.

…t for sending header in request from client to server
@karendolan
karendolan requested review from gabeabrams and a lite review from Copilot and removed request for Copilot August 4, 2026 16:08

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 Tooltip to avoid constructing a Bootstrap tooltip after the child unmounts, and apply a defensive workaround during cleanup to prevent late callbacks from crashing.
  • Extend visitServerEndpoint to accept and forward optional custom request headers.
  • Update generated dist/* outputs and adjust package-lock.json accordingly.

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.

Comment thread src/helpers/visitServerEndpoint.tsx

@gabeabrams gabeabrams left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great!

@gabeabrams
gabeabrams merged commit 4e1a42c into main Aug 4, 2026
1 check passed
@gabeabrams
gabeabrams deleted the t/LW-33-Tooltip-dipose-race-cond-KD branch August 4, 2026 19:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants