Skip to content

Desktop: saved windows open one at a time on startup, and the menu rebuilds when nothing changed #6541

Closed

Description

@nwlodychak

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 3bacfac9e with 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.

  1. Open 4 or 5 bb windows, then quit bb.
  2. Start bb again. The windows appear one after another, each after the last one has loaded.
  3. 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.ts

Expected 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

What you ruled out

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

Activity

  1. added theissue type on Oct 29, 2026
  2. added
    desktop
    confirmed-repro
    on Oct 29, 2026
  3. bb-slop-cop commented on Oct 29, 2026

    @bb-slop-cop
    Contributor

    🚨 SLOP COP 🚨 · new-issue-autopilot

    • Classification: Bug · Priority: Medium · Effort: Low; desktop, perf.
    • Report: https://get-bb.github.io/reports/issues/6541.html — REPRODUCED, high root-cause confidence; confirmed-repro.
    • Root cause: saved-window restoration waits for each navigation before starting the next; settings refreshes replace the native menu even when its contents are unchanged.
    • Ready fix: Restore saved desktop windows concurrently #6550 — 271 changed text lines across four desktop files. Not merged.
    • Verification: both regressions fail on trusted main in two checkouts; 87 relevant tests and typechecking pass after the fix. One unrelated full-suite packaging check fails on both baseline and fixed code because this host lacks libglib-2.0.so.0. Live macOS behavior remains unverified.

    AGENT GENERATED

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    confirmed-reprodesktopperf

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions