You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
sidebar-bootstrap ships 138KB and refetches wholesale on thread status changes #1302
Found while profiling the mobile web frontend against a seeded 1,200-thread database (pnpm seed:perf, #1300).
Numbers
GET /api/v1/sidebar-bootstrap returns 138 KB of JSON (11.7 KB gzip) for 131 unarchived threads: ~1.1 KB per thread across 29 fields, while the sidebar renders roughly 8 of them (title, status, project, unread, pinned, provider, branch, attention time).
Sending one message refetched the entire payload; it refires on thread lifecycle transitions. With several concurrently active threads, every turn start/stop reparses and re-renders the whole sidebar tree — this multiplies with the drawer mount cost in Large active thread lists keep all sidebar rows mounted #1261.
Server time is fine (~8 ms warm); the cost is wire size, JSON parse, and the re-render it triggers on mobile CPUs.
Repro
pnpm seed:perf on a dev instance.
Open the app with the network panel filtered to sidebar-bootstrap.
Send a message to any thread; watch the full payload refetch.
Suggested approach
Trim the wire shape to the fields the sidebar renders.
On status-change push events, patch the cached thread row instead of refetching the world; if a refetch is needed, scope it to the affected project.
The same push-driven patching would remove most of the ~10-request fan-out currently observed after a single send.
Supporting scale evidence from a production 0.37.0 install: 1,071 unarchived threads are present (985 idle, 86 error). Origins include 228 automation threads and 75 workflow threads.
Sidebar virtualization in 0.37.0 improves rendering, but it does not remove the payload/refetch invariant described here. At this scale, patching the affected thread row from lifecycle events is materially different from repeatedly transferring and parsing the full bootstrap. I support keeping payload reduction and incremental cache patching as the durable fix.
Root cause (short): status-changed realtime pushes carry no row data and the app's registry rule for them invalidates the single monolithic sidebarNavigation query (full ThreadListEntry for every visible thread of every project, ~1 KB/row) with an immediate flush, so every turn start/end re-downloads the whole 134 KB bootstrap instead of patching one row.
Proposed fix: (1) Add optional status/runtime to threadChangeMetadataSchema, have every notifyThread(["status-changed"]) caller include the post-transition values, and change the app's status-changed rule to patch the row in the thread-list and sidebar caches (mirroring the existing hasPendingInteraction patch path), falling back to the current dirtyThreadListQueries only when metadata is missing or the row is not cached; server<->app only, no daemon protocol bump. (2) Introduce a trimmed sidebarThreadEntrySchema for sidebar-bootstrap threads and drop per-project sources/defaultExecutionOptions from the boo…
The report has copy-paste repro steps, screenshots where the bug is visual, code permalinks at 16ceb3a54, and repro artifacts. It was independently re-run by a second agent (see its Verification section).
Activity
Virtualize the sidebar thread list and keep the mobile drawer mounted (…
amadad commentedon Aug 12, 2026
Supporting scale evidence from a production 0.37.0 install: 1,071 unarchived threads are present (985 idle, 86 error). Origins include 228 automation threads and 75 workflow threads.
Sidebar virtualization in 0.37.0 improves rendering, but it does not remove the payload/refetch invariant described here. At this scale, patching the affected thread row from lifecycle events is materially different from repeatedly transferring and parsing the full bootstrap. I support keeping payload reduction and incremental cache patching as the durable fix.
Virtualize the sidebar thread list and keep the mobile drawer mounted (…
SawyerHood commentedon Aug 18, 2026
Reproduction & root-cause report: https://get-bb.github.io/reports/issues/1302.html
The report has copy-paste repro steps, screenshots where the bug is visual, code permalinks at
16ceb3a54, and repro artifacts. It was independently re-run by a second agent (see its Verification section).Patch sidebar rows from status-changed pushes instead of refetching
Patch sidebar rows from status-changed pushes instead of refetching
Patch sidebar rows from status-changed pushes instead of refetching
Patch sidebar rows from status-changed pushes instead of refetching
Patch sidebar rows from status-changed pushes instead of refetching (#…