Skip to content

Fix React #185 when opening threads in split - #1249

Closed
ratulsarna wants to merge 1 commit into
get-bb:mainfrom
ratulsarna:codex/fix-1246-split-composer-loop
Closed

Fix React #185 when opening threads in split#1249
ratulsarna wants to merge 1 commit into
get-bb:mainfrom
ratulsarna:codex/fix-1246-split-composer-loop

Conversation

@ratulsarna

Copy link
Copy Markdown
Contributor

Fixes #1246.

Summary

  • measure the composer stack through one offsetHeight path
  • skip duplicate height updates before dispatching React state
  • cover the pending-transition failure that caused nested commits

Root cause

FollowUpPromptBox could 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 passed
  • pnpm exec turbo run typecheck --filter=@bb/app --force
  • ESLint, Prettier, and git diff --check
  • exact affected-thread QA: opening Kanban-bb in split kept both panes and composers visible with no console errors
  • independent Codex Sol xhigh and Claude Opus high reviews found no production-code issue

Known limitation

QA also found a separately rooted crash after closing and reopening a split pane. Its stack is in the PaneContext React-node publication loop and does not include FollowUpPromptBox. Fixing that safely requires a separate pane-registry design change; this patch does not claim close/reopen resilience.

@ratulsarna
ratulsarna marked this pull request as ready for review August 10, 2026 10:21
@ratulsarna ratulsarna closed this Aug 10, 2026
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.

Opening a thread can trigger React error #185 and leave a blank screen

1 participant