Prefetch thread bootstrap on sidebar row pointerdown - #8
Merged
Conversation
This was referenced Sep 2, 2026
Guitaraholic
force-pushed
the
fix/prefetch-bootstrap-on-create
branch
from
September 2, 2026 19:19
ca973a2 to
725dd71
Compare
Sidebar clicks started GET /threads/:id?include=environment,host only after ThreadDetailView mounted. Primary-button pointerdown on a row now starts the same bootstrap query create already uses, so click joins in-flight work. Right-click does not prefetch. Phase-order tests record bootstrap-prefetch before click, and keep create's bootstrap-get before mutateAsync returns.
Guitaraholic
force-pushed
the
fix/prefetch-bootstrap-on-pointerdown
branch
from
September 2, 2026 19:20
85d0a90 to
64ee345
Compare
Guitaraholic
changed the base branch from
fix/prefetch-bootstrap-on-create
to
main
September 2, 2026 19:20
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.
Human comments
What was wrong
Create now prefetches bootstrap (Datahazed/bb#7). A sidebar click still started
GET /threads/:id?include=environment,hostonly afterThreadDetailViewmounted. That is the common “open a thread from the list” path, web and desktop.Related: get-bb/bb#1303.
What changed
pointerdownon a thread row callsprefetchThreadDetailBootstrap, the same helper create uses.pointerdown.Stacked on #7. No router change. No
HOST_DAEMON_PROTOCOL_VERSIONbump.Why this way
Pointerdown is the last moment we know the thread id before navigation (~one frame / ~100 ms before click). Hover prefetch would fire while scrolling a long list. Keyboard Enter still starts bootstrap on mount; that was not the measured stall.
We did not keep the previous thread view hidden, and we did not merge compose+thread. Those are identity changes; this is “start the GET we already own, earlier.”
Benefit to bb
Every thread open from the sidebar, web and desktop. Same product rule as #7: the thread view should join work already in flight. No extra API, no daemon update.
Harvest
Submit after #7 so get-bb reviews
prefetchThreadDetailBootstraponce. Copy this body onto a get-bb PR that targets a branch containing #7, or stack.Decision record: docs/perf-control-plane.md (PR #9).
How you verified
Phase-order tests (
apps/app/src/test/perf-phase.ts) fail if the slow order comes back:ThreadRow.test.tsx:bootstrap-prefetchbeforepointerdown-completebeforeclick-complete. 78 passed.thread-runtime-mutations.test.tsx:bootstrap-getbeforecreate-returned. 11 passed.ProjectRow.interactions.test.tsxafter adding QueryClient to the row harness. 9 passed.