Repository navigation
Conversation
ymichael
deleted the
bb/ci-flake-fix-tasks-stale-label-preference-render-thr_ayy4adsskd
branch
August 21, 2026 01:06
SawyerHood
added a commit
that referenced
this pull request
Aug 21, 2026
## What was wrong The codebase carried a lot of code that nothing reached: symbols and files with no consumer, options that no caller passes, branches the types make impossible, feature flags that graduated but kept their `if` guards, pass-through wrappers that only forward arguments, barrel files that re-export hundreds of names nobody imports through them, and the same small helper copied into many files. This code has no effect on behavior, but every reader must still parse it. ## What changed Net −16k lines across 1,732 files. No behavior change. Four commits, two per pass: 1. **Remove dead code, pass-through wrappers, and stale barrels** — unused symbols and files, dead branches, unused params/options, single-use wrappers inlined, dead barrel lines, tests and stories that existed only for deleted code. Drops the unused `cronstrue` dependency from `apps/app`. 2. **Drop export from module-private symbols** — ~900 declarations that were exported but only used inside their own file. 3. **Remove more dead code, duplicate helpers, and unused options** — second pass over the same ground plus repo-wide sweeps for duplicate helpers and legacy/compat paths. Folds byte-identical helper copies into one shared module where the consumer already depends on it (e.g. `describeError` ×11, `createDeferred` ×15 → `@bb/test-helpers`, `DelayedLoading` ×4 → `@bb/shared-ui`). Removes unused `ws`/`@types/ws`/`tsx` devDependencies from `apps/connect` and an unused `@radix-ui/react-slot` from `apps/web`. 4. **Drop export from more module-private symbols** — ~700 more. Out of scope on purpose: `@get-bb/plugin-sdk` and `@bb/sdk` exports (public API), CLI commands and flags, server routes, DB schema and migrations, generated code, wire payload shapes between the server and host daemon (`HOST_DAEMON_PROTOCOL_VERSION` is unchanged), and parsers for persisted or legacy data. Every removal was found by one agent, adversarially verified by a second agent that searched the whole repo (including strings, configs, docs, `.ladle`, and stories) for any remaining reference, and then applied by a third. 41 proposals were rejected at verification or apply time, and I reverted 2 more by hand. ## How you verified - `pnpm exec turbo run typecheck` — 74/74 packages pass - `pnpm exec turbo run lint` — passes - `pnpm exec turbo run build` for `@bb/app`, `@bb/server`, `@bb/host-daemon`, `@bb/cli`, and all `plugins/*` — passes - `pnpm exec turbo run test` — all packages pass except `internal-skill-trees.test.ts`, which fails identically on `main` on this machine (local umask 0002; passes in CI) - Rebased onto `main` after #2125, #2132, #2128, #2126, #2112 landed; re-ran typecheck, lint, and tests for the touched packages Fixes # > AGENT GENERATED: by Claude Opus 5 --------- Co-authored-by: Claude <[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.
What was wrong
The stale-label persistence test waited only until the mock RPC handler recorded a
listTasksinvocation with emptylabelIds. That recording happens synchronously at handler entry, before the response crosses the async query path and React commits the empty result, so a loaded CI runner could complete the wait while the prior unfilteredALP-1row was still in the DOM. This produced the exact failures seen in run 32429333291 and run 32429304373; the production stale-label behavior itself was correct.What changed
Kept the RPC assertion that proves stale label names resolve to an active empty ID filter, then made the existing
ALP-1andALP-2absence assertions wait for the observable DOM result. This changes no production or wire behavior, does not increase a timeout, and does not weaken the assertions.How you verified
ALP-1assertion failure. With the fix, the same controlled delay passed; the probe was then removed.pnpm exec turbo run test --filter=bb-plugin-tasks --force -- --run views/list/list-preference.persistence.test.tsx— 7 passed.pnpm exec turbo run test --filter=bb-plugin-tasks --force— 35 files and 359 tests passed.pnpm exec turbo run typecheck --filter=bb-plugin-tasks --force— passed with the plugin SDK type-generation dependency.pnpm exec turbo run build --filter=bb-plugin-tasks --force— passed with the plugin SDK build dependency.git diff --check— passed.