Repository navigation
Surface active pull request status - #185
Merged
Merged
Conversation
ymichael
force-pushed
the
bb/inspect-thread-work-thr_yav8x4nauy
branch
from
June 17, 2026 03:17
f5129b2 to
2c5ec93
Compare
ymichael
force-pushed
the
bb/inspect-thread-work-thr_yav8x4nauy
branch
from
June 17, 2026 18:24
2c5ec93 to
0fdd5af
Compare
ymichael
marked this pull request as ready for review
June 17, 2026 19:00
SawyerHood
added a commit
that referenced
this pull request
Jun 17, 2026
…read-cancel #199) Resolve conflicts and reconcile our automations migration with main's hand-authored thread-search migrations: - Backfill drizzle snapshots for main's hand-authored 0039_thread_search and 0040_thread_search_rowid_fts (replayed via drizzle-kit against main's schema, preserving main's FTS SQL); regenerate our automations migration as 0041_add_automations with its own snapshot. Full snapshot chain now intact. - migration-journal.test.ts: add a CI guard that every journal entry has a snapshot and the prevId chain is unbroken (prevents snapshot-less hand-authored migrations from recurring). - migrate.test.ts: keep both cleanup paths in the thread-provenance rewind; add resetMigrationsAfterThreadSearch so the thread-search replay tests stay valid now that a migration (automations) lands after thread search. - AppSidebar.tsx / ProjectList.tsx: keep both main's thread-search UI and our Automations nav entry. - CLI timeline fixtures: add systemMessageKind/systemMessageSubject (required on the user conversation row since #192). - pnpm install for main's new remark-breaks dependency. Verified: turbo build typecheck lint test --force --continue -> 69/69 tasks pass. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
This was referenced Aug 10, 2026
SawyerHood
pushed a commit
that referenced
this pull request
Aug 10, 2026
Fixes #1246. Fixes #1250. ## What changed - Keep the selected merge-base branch local to each thread view instead of sharing it across split panes. - Keep pending file and commit diff actions with the pane that requested them. - Deduplicate composer stack-height measurements before scheduling React state updates. ## Why Split panes could have different merge-base branches while reading and writing the same global selection. Each pane then restored its own value, causing the values to alternate and the panes to rerender until React threw error #185 and blanked the route. ## Verification - Full @bb/app suite: 326 files, 2,456 tests passed. - Turbo typecheck passed for @bb/app. - Regression tests cover two simultaneous merge-base owners, environment changes, delayed pane-local diff actions, and stale-action cleanup. - Installable bb-app tarball smoke test passed. - Packaged browser QA passed on the affected thread: initial split, two close/reopen cycles, and persisted split reload. Both panes and composers remained visible, with no React #185 or merge-base request loop.
amadad
pushed a commit
to amadad/bb
that referenced
this pull request
Aug 14, 2026
Fixes get-bb#1246. Fixes get-bb#1250. ## What changed - Keep the selected merge-base branch local to each thread view instead of sharing it across split panes. - Keep pending file and commit diff actions with the pane that requested them. - Deduplicate composer stack-height measurements before scheduling React state updates. ## Why Split panes could have different merge-base branches while reading and writing the same global selection. Each pane then restored its own value, causing the values to alternate and the panes to rerender until React threw error get-bb#185 and blanked the route. ## Verification - Full @bb/app suite: 326 files, 2,456 tests passed. - Turbo typecheck passed for @bb/app. - Regression tests cover two simultaneous merge-base owners, environment changes, delayed pane-local diff actions, and stale-action cleanup. - Installable bb-app tarball smoke test passed. - Packaged browser QA passed on the affected thread: initial split, two close/reopen cycles, and persisted split reload. Both panes and composers remained visible, with no React get-bb#185 or merge-base request loop.
ymichael
added a commit
that referenced
this pull request
Aug 18, 2026
## Summary - deduplicate composer history resets before React state dispatch - mark history sessions active before recall updates and inactive before reset updates ## Problem Opening a bb thread could fail with React error #185 (`Maximum update depth exceeded`). The production stack pointed to `PromptBoxInternal`'s history reset effect and `resetHistorySession`. ## Root cause Callers may recreate an empty `history` object while React is processing overlapping transition and synchronous updates. Each effect pass unconditionally dispatched three `null` state updates. With another update lane already pending, React could not always take its eager same-value bailout, so the redundant passive-effect commit could feed another render and eventually hit the nested update limit. ## Fix The reset now uses a ref as the accepted session-transition marker. History recall marks the session active before state dispatch. Reset marks it inactive before dispatching its three clears, so inactive sessions perform no state updates and re-entrant effects cannot enqueue the same reset twice. ## User impact Thread composers no longer risk blanking the route with React #185 when empty history props are recreated during concurrent rendering. Normal history recall and reset behavior is preserved. ## Validation - `pnpm exec turbo run test --filter=@bb/app --force -- src/components/promptbox/PromptBoxInternal.test.tsx` — 97 passed - `pnpm exec turbo run typecheck --filter=@bb/app --force` — passed > AGENT GENERATED: by GPT-5.6 --------- Co-authored-by: Michael Yong <[email protected]>
Closed
3 tasks done
SawyerHood
added a commit
that referenced
this pull request
Aug 19, 2026
## What was wrong The crash in #1830 is a feedback loop in the sidebar section-thread drag (`useSectionThreadDnd`, the multi-container sorter in `ProjectRow`), not a defect in dnd-kit's `useRect`. `handleDragOver` re-projects the dragged row into whatever list dnd-kit reports as `over`. That projection re-renders the row into another list, so its droppable re-registers and dnd-kit re-measures every container in the same commit chain. When the sidebar is scrolled and the row is projected into a section above the viewport, the browser's scroll anchoring moves `scrollTop` to keep the visible rows still, but dnd-kit offsets its measured rects by that scroll delta even though nothing moved on screen. `over` then resolves to the source list under a pointer that never moved, the row is un-projected, `over` flips again, and each hop is a layout-effect or synchronously flushed passive-effect update. React counts them as nested updates and aborts with error #185; the thrower is whichever `setState` runs 51st, which is why the packaged stack lands on dnd-kit's `setRect`. Reproduced on this branch with a headless Chromium script: manual sidebar mode, a 520px-tall viewport so the sidebar scrolls, scroll to the bottom, drag a section thread to the bottom edge and then to the top edge, hold. Every attempt logged `Maximum update depth exceeded` and `[bb] the app crashed`; the per-`over` log shows the projection flipping Alpha → Beta → Alpha with `scrollTop` alternating 172 ↔ 203 and the raw pointer fixed at y=160. The same script no longer crashes with this fix (3/3 runs), and reverting the fix crashes again. ## What changed - `apps/app/src/components/sidebar/useSectionThreadDnd.ts`: `SectionThreadProjectionGate` allows each projection target at most once per user input (pointer move, touch move, wheel, key press). A revert that arrives without new input is our own render feeding back and is dropped. The hook tracks input with capture listeners on `document` from drag start until end, cancel, or unmount. - `apps/app/src/app.css`: `overflow-anchor: none` on the sidebar scroller while `body[data-sidebar-dragging="true"]`, so a projection cannot move `scrollTop` and desynchronize dnd-kit's rects from the pointer. Either change alone stops the reproduced crash; the gate is the general guard against the feedback loop, the CSS removes the geometry trigger. - No wire or CLI changes. ## How you verified - New `useSectionThreadDnd.projection.test.tsx`: renders the hook, drags a thread over section B, then reports `over` on the source section with no input. Fails before (`expected null to be 'chronological::b'`), passes after. Also covers that unvisited targets stay allowed, that input reopens targets, that listeners are removed on cancel/unmount, and the gate itself. - `pnpm exec turbo run typecheck --filter=@bb/app` and `pnpm exec turbo run test --filter=@bb/app` (360 files, 2862 tests) pass. - Manual: headless Chromium repro above crashes on `main` and does not crash with the fix; a normal drag from Alpha into Beta still projects and drops (thread `sectionId` updated). Fixes #1830 > AGENT GENERATED: by Claude Opus 5 Co-authored-by: Claude <[email protected]>
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.
Summary
Validation
Notes