Repository navigation
[codex] Track landing downloads server-side - #102
Merged
Merged
Conversation
SawyerHood
marked this pull request as ready for review
June 12, 2026 17:08
ymichael
added a commit
that referenced
this pull request
Aug 20, 2026
## What was wrong The first-run setup guide shipped behind the `newOnboarding` experiment, which defaults to false (`packages/domain/src/experiments.ts`) and was never enabled by default. Nobody saw the flow unless they turned the toggle on by hand, so its UI, its telemetry funnel, its persisted completion timestamp, and a dedicated host-daemon command existed to serve a surface that never ran — spread across seven packages. ## What changed Deleted the experiment and everything that existed only for it: - `OnboardingHost` / `OnboardingFlow` (828 lines) and their `App.tsx` mount. - The `newOnboarding` experiment key, its Settings → Experiments toggle (web and `apps/mobile`), and every config fixture that listed it. - `appSettingsSchema.onboardingCompletedAt`, the Settings → General "Setup guide" replay control, and `bb settings replay-onboarding`. No migration is needed: since #102 app settings are key/value rows read through `inArray(key, appSettingsKeys)`, so the retired key's row is ignored. The legacy wide `app_settings` table keeps its column, which is deliberately frozen for `seedKeepAwakePluginConfiguration`. - The five onboarding funnel telemetry events, `POST /system/onboarding/event`, and `sdk.system.onboardingEvent`. - `GET /system/onboarding/repos`, `sdk.system.onboardingRepos`, and — since nothing else sent it — the `workspace.discover_repos` daemon command with its 460-line handler. **Wire change: `HOST_DAEMON_PROTOCOL_VERSION` 137 → 138**, because a command left the protocol. The reason is recorded in the `protocol.ts` header. Docs and agent surfaces updated in the same change: `bb-guide-customization.md` (regenerated), the `bb-cli` SKILL and its `app-settings` reference, `bb-plugin-authoring`'s SDK method table, and `docs/configuration.md`. `getOnboardingAgentOverview` and `GET /system/onboarding/agents` deliberately stay. Despite the name they are not onboarding-only: the root composer resolves an unset provider selection through `useOnboardingAgents` (`useThreadCreationOptions.ts` ← `RootComposeView.tsx`), which ships unconditionally. Renaming that endpoint and its SDK method to match its real purpose is a follow-up, not part of a deletion. `useOnboardingAgents` does lose its `poll` option, which became constant once the flow's caller went away. Two test adjustments worth calling out, both because their subject was deleted rather than because they broke: - `apps/cli` had a test using `onboardingCompletedAt` as its nullable-string case for `bb settings general`. `appSettingsSchema` now holds only booleans, so that path has no live key to exercise; the test is trimmed to the unknown-key assertion it also covered. The generic value-parsing code in `updateGeneralSetting` is untouched and still accepts `null`. - `packages/db`'s key/value migration test no longer asserts a settings field that no longer exists. ## How you verified Nothing here is a behavior fix, so the evidence is that removing a never-enabled surface changes nothing else: - `pnpm exec turbo run typecheck` — 72/72 tasks green. - `pnpm exec turbo run test` for `@bb/app` (3037), `@bb/server` (1787), `@bb/mobile` (812), `@bb/host-daemon` (47 files), plus `@bb/db`, `@bb/domain`, `@bb/sdk`, `@bb/cli`, `@bb/desktop`, `@bb/server-contract`, `@bb/host-daemon-contract`, `@bb/templates`, `@get-bb/plugin-sdk` — all green. - `pnpm exec turbo run lint` — 0 errors (144 pre-existing react-compiler warnings in `@bb/app`, unchanged). - `packages/host-daemon-contract`'s protocol-version test pins 138, and its command-fixture map no longer accepts `workspace.discover_repos`, so a stray sender fails the contract test. - Repo-wide grep for `newOnboarding`, `onboardingCompletedAt`, `replay-onboarding`, `onboardingRepos`, `onboardingEvent`, and `discover_repos` returns only the `protocol.ts` changelog note. No CHANGELOG entry: per `docs/bb-release-process.md` those sections are written at release-prep time, and this removes nothing a user could see. Fixes: N/A — no linked issue. > AGENT GENERATED: by Claude Opus 5 Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
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.
Summary
/download/macosWorker redirect.landing_download_macos_clickedserver-side with PostHog before redirecting to the GitHub release URL.Why
Client-side PostHog download click events can be blocked by ad blockers because they load and send to PostHog domains from the browser. A first-party redirect lets the download continue normally while recording the click from the Worker runtime.
Validation
pnpm exec turbo run typecheck --filter=@bb/landingpnpm exec turbo run build --filter=@bb/landingpnpm exec turbo run lint --filter=@bb/landingpnpm --filter @bb/landing exec wrangler deploy --dry-run --outdir /tmp/bb-landing-worker-dry-rungit diff --check