Repository navigation
Description
The workflow
We ship bb as a downstream distribution: a thin launcher package pins [email protected] as an ordinary npm dependency, applies our default settings (telemetry off, connect disabled, loopback only), and is itself installed and upgraded through our own packaging. Users open Settings → Updates to see the state of their machine.
What happens today
The first row ("bb-app 0.42.1") is produced by createAppVersionService, which has two hardcoded constants and no configuration surface:
bb/apps/server/src/services/system/app-version.ts
Lines 6 to 9 in 6cdb4ba
const NPM_LATEST_URL = "https://registry.npmjs.org/bb-app/latest"; const NPM_LATEST_TIMEOUT_MS = 5_000; const NPM_LATEST_CACHE_TTL_MS = 60 * 60 * 1000; const UPGRADE_COMMAND = "npx bb-app@latest";
const NPM_LATEST_URL = "https://registry.npmjs.org/bb-app/latest";
const UPGRADE_COMMAND = "npx bb-app@latest";Every hour the server fetches the public npm registry, and the response is:
$ curl -s http://127.0.0.1:38899/api/v1/system/version
{"currentVersion":"0.42.1","latestVersion":"0.42.1","source":"npm","updateAvailable":false,"isDevelopment":false,"upgradeCommand":"npx bb-app@latest"}
Two problems for a downstream distribution:
- The moment upstream publishes 0.43.0, the row flips to "Update available" and tells the user to run
npx bb-app@latest— the one path our distribution exists to avoid. The pinned version is intentional; the user cannot act on the advice, and following it would install an unmanaged second copy. - The check itself is unconditional egress to
registry.npmjs.org. The only way to suppress it isconfig.isDevelopment(), which is derived fromif (config.isDevelopment) { NODE_ENV !== "production"— andbb-appforcesNODE_ENV=productionon its children. Even if it could be set,isDevelopmentalso changes error verbosity, unhandled-provider-event display, and dev app-port proxying, so it is not a usable lever.
What you would expect
Two server environment variables, read where ServerRuntimeConfig is built and passed into createAppVersionService:
BB_UPDATE_CHECK—on(default) oroff. When off, skip the npm fetch and returnlatestVersion: null, updateAvailable: false. The Updates row then shows the current version with no action, exactly like a development build does today.BB_UPGRADE_COMMAND— overrides the string returned asupgradeCommand, so a distribution can show its own instruction (e.g.brew upgrade bb) when it does keep the check on.
Both are additive and default to today's behavior. The desktop app and npx users see no change. Roughly 20 lines plus a test in app-version.test.ts covering the off path and the override.
Context and alternatives
- Workaround today: none that is not a hack. Hiding the row from a plugin's app bundle leaves the hourly fetch in place; blocking the URL at the network layer masks real errors elsewhere.
- Related: npx install pins bb to one minor line, so the update button silently does nothing #1747 ("npx install pins bb to one minor line, so the update button silently does nothing") is about the desktop updater; this is the server-side row and the CLI
bb updates statusoutput. - Not a duplicate of the "externally managed provider CLIs" request filed alongside this one (Provider CLI maintenance should recognize externally managed executables and defer to their package manager #3166) — that covers provider rows; this covers the bb-app row.
- Affects anyone packaging bb via a package manager or a downstream distribution.
Checks
- I searched open and closed issues for the same request.
- If an agent wrote this, the body ends with
> AGENT GENERATED.
AGENT GENERATED
Activity
bb-slop-cop commentedon Sep 6, 2026
🚨 SLOP COP 🚨 ·
new-issue-autopilotClassification:
desktop,cliNo reproduction report or pull request was created because the verified Type is Feature, and this rule only reports or fixes Bugs.