Fix React #185 when opening threads in split - #1249
Closed
ratulsarna wants to merge 1 commit into
Closed
Conversation
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.
Fixes #1246.
Summary
offsetHeightpathRoot cause
FollowUpPromptBoxcould dispatch a stack-height update while the same measurement was already pending during split-pane mounting. Its layout effect and resize observer also used different box measurements. Because that height controls the editor's minimum height, the repeated synchronous commits could reach React error #185 and blank the route.The layout effect and observer now share one measurement function. It records an accepted height before dispatching state, so nested entry cannot accept the same height twice.
Validation
FollowUpPromptBox.test.tsx: 23 tests passedpnpm exec turbo run typecheck --filter=@bb/app --forcegit diff --checkKanban-bbin split kept both panes and composers visible with no console errorsKnown limitation
QA also found a separately rooted crash after closing and reopening a split pane. Its stack is in the
PaneContextReact-node publication loop and does not includeFollowUpPromptBox. Fixing that safely requires a separate pane-registry design change; this patch does not claim close/reopen resilience.