Repository navigation
Conversation
ymichael
force-pushed
the
bb/load-pierre-diffs-lazily-in-the-plugin-runtime-thr_t333mnh7cv
branch
2 times, most recently
from
October 26, 2026 17:13
002d7a3 to
2667707
Compare
Base automatically changed from
bb/load-pierre-diffs-lazily-in-the-plugin-runtime-thr_t333mnh7cv
to
main
October 26, 2026 17:27
ymichael
force-pushed
the
bb/remove-new-thread-and-thread-startup-waterfalls-thr_6ma5cfm8uy
branch
from
October 26, 2026 17:28
2be2d0a to
835d8da
Compare
ymichael
deleted the
bb/remove-new-thread-and-thread-startup-waterfalls-thr_6ma5cfm8uy
branch
October 26, 2026 17:37
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
The plugin boot hook waited for system config before requesting the runtime and plugin list. Another route consumer already fetched the plugin list early; the measured route-level wait was the runtime download. Existing-thread execution defaults and queue data waited for bootstrap and the prompt-area module, while new-thread unscoped provider catalogs waited for the composer module. These requests already have enough scope to start earlier.
Rebased onto origin/main at cf8f870, which includes #6304 and #6295. This PR preserves their lazy runtime groups, priority bundle preloads, and existing route preparation.
What changed
docs/ui-code-splitting.mdwith observed request order and the separate onboarding gate consideration. No wire or public CLI/SDK changes in this PR. The SDK version bump and CLI metadata fixes are already in main.How you verified
After rebasing onto cf8f870: 43 focused startup/query tests pass across five files; app lint/typecheck, production rebuild, and bundle budgets pass. Restarted the isolated review server and confirmed server/daemon health and the existing scheduled fixture through the source BB CLI. The measurements and full-suite results below were collected before this rebase.
pnpm exec turbo run test lint typecheck --filter=@bb/app: lint/typecheck passed; all 6,315 assertions passed, but the initial full run reported two Sonner teardown errors in unchangedAppToaster.test.tsx. Focused rerun including that file passed (82 tests), thenpnpm exec turbo run test --filter=@bb/apppassed all 651 files / 6,315 tests without errors.Regression negative controls: restoring the prior config/route/bootstrap gates fails each corresponding test. Reverting the mount policy fails with two fetches instead of one. Tests cover unresolved prerequisites, disabled routes, late consumers, invalidation, and reopening.
Production build through
pnpm start:worktree --dryrunandpnpm start:worktree;node apps/app/scripts/check-bundle-budget.mjspasses. Brotli closures: boot 381.0 KiB, PluginFrontend 162.1 KiB beyond boot, ThreadPage 450.0 KiB, NewThreadPage 219.8 KiB. These are bundle sizes, not timing benchmarks.Real Chromium requests against a fresh isolated store, HTTP cache disabled, storage cleared except
bb.onboarding.seen=1, 390×844 viewport. Held config and destination module requests, plus bootstrap on the existing route, until approximately 2.6 seconds. New-thread catalogs started at 105 ms, list/runtime at 106 ms. Existing-thread defaults/queue started at 116 ms, bootstrap/list/runtime at 117 ms. Each relevant data request occurred once through composer mounting after release. Both composers rendered; the synthetic scheduled thread displayed its queue. No provider turns started. Browser/server stopped and marked data removed.Separate cold run without the recognized onboarding preference confirms routes still wait for config while plugin list/runtime download independently. Onboarding policy is deferred; this is request-order evidence under artificial holds, not a performance measurement or iOS Safari validation. Verification inventory also reports an unrelated pre-existing unmapped
diagnosticsCLI family.Direct baseline (
612383411c) versus follow-up under the same ~2.6-second prerequisite hold: new-thread runtime 2,616 → 106 ms; existing-thread runtime 2,607 → 117 ms; new-thread catalogs 2,932 → 105 ms; existing-thread defaults/queue 2,945 → 116 ms. Baseline plugin-list requests were already early (124/123 ms), so no measured benefit is claimed for that request. This demonstrates overlap under an artificial hold, not ordinary page-load savings.Same-toolchain Brotli bundle comparison: boot 378.2 → 381.0 KiB; PluginFrontend beyond boot 165.2 → 162.1 KiB; ThreadPage 452.7 → 450.0 KiB; NewThreadPage 223.0 → 219.8 KiB. Closures overlap; do not add their differences.