Repository navigation
Labels
confirmed-reproBug reproduced again from a clean trusted checkout; see linked reportdesktopDesktop app, install, update, packagingperf
Description
Summary
- When bb starts with several saved windows, each window waits for the one before it to finish loading before it is even created. With 5 windows, startup takes 5 page loads back to back.
- The app menu is also rebuilt every time the server settings are checked, even when nothing in the menu changed.
- Expected: saved windows load at the same time, and the menu is rebuilt only when it changes.
Versions and environment
- bb 0.48.0 desktop app on macOS 26.6.2.
- Tests run from source at
3bacfac9ewith Node v26.0.0.
Steps to reproduce
Status: unverified in the live app. The repro is a set of tests at the exact code path.
- Open 4 or 5 bb windows, then quit bb.
- Start bb again. The windows appear one after another, each after the last one has loaded.
- Connect to a remote server, then switch to another app and back. Each switch rebuilds the menu. The menu is also rebuilt every 5 minutes and every time the connection to the server comes back.
To reproduce with tests, run the old code next to the fix:
git fetch https://github.com/nwlodychak/bb perf/desktop-window-open
git checkout FETCH_HEAD && pnpm install
cd apps/desktop && pnpm exec vitest run test/desktop-window-factory.test.ts test/menu.test.tsExpected vs actual
- Actual: in a test where each page takes 120 ms to load, opening 5 saved windows takes about 619 ms.
- Expected: about one page load (about 123 ms with the fix), with the windows still shown in their saved order.
- Actual: the menu is rebuilt on every settings check. Expected: it is rebuilt only when something in it changed.
Evidence
- Saved windows are opened in a loop that waits for each page to load: desktop-window-factory.ts#L424-L448
- Each settings check rebuilds the menu: main.ts#L1046-L1061, menu.ts#L359-L369
- Switching back to bb triggers a settings check: main.ts#L2885-L2888
- This was found during a local audit in bb thread
thr_bjq9893qei.
What you ruled out
- Add experimental_useServers to the plugin SDK #6532 already registers each window as soon as it is created, so that part is not in this issue.
- Still happens on
mainat3bacfac9e.
Suggested priority and effort
- Hits anyone who keeps more than one window open. There is no workaround, and no data is lost.
- The fix is small.
AGENT GENERATED
Metadata
Metadata
Assignees
Labels
confirmed-reproBug reproduced again from a clean trusted checkout; see linked reportdesktopDesktop app, install, update, packagingperf
Activity
bb-slop-cop commentedon Oct 29, 2026
🚨 SLOP COP 🚨 ·
new-issue-autopilotdesktop,perf.confirmed-repro.libglib-2.0.so.0. Live macOS behavior remains unverified.