Repository navigation
Keep sidebar windowed rows from getting stuck blank - #4064
Merged
Merged
Conversation
ymichael
force-pushed
the
bb/explain-blank-sidebar-rows-thr_vunwn374ej
branch
from
September 22, 2026 05:36
249d95f to
75ec9b7
Compare
Compose realized-key updates against live state, re-observe wrappers on list changes, and connect the observer once a zero-height scroll container gains height. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
ymichael
force-pushed
the
bb/explain-blank-sidebar-rows-thr_vunwn374ej
branch
from
September 22, 2026 17:57
75ec9b7 to
8f92df4
Compare
ymichael
pushed a commit
that referenced
this pull request
Dec 2, 2026
## Human comments ## What was wrong The provider-literal ratchet walked the file system, so files that a test run leaves in the tree counted as core code. `bb-app`'s managed-json-process test bundles into `packages/bb-app/.managed-json-cli-*`. When turbo cancels that test, the bundle stays, and the ratchet fails until someone deletes it. This is the third artifact of the kind. The first two got a path exclusion each (#4064, #4976). ## What changed - `scripts/check-provider-literal-ratchet.mjs`: `scanTree` lists files with `git ls-files -z`, so untracked files never count. The same `isIncluded` filter applies. The file walk is removed, together with the exclusions that only skipped untracked artifacts (`.packaged-plugin-build-`, `.runtime-test-`, `.wrangler`). Git tracks no file under them. A new core file now counts locally after `git add`. CI scans the committed tree, so the merge check is unchanged. - `packages/scripts/test/provider-literal-ratchet.test.mjs`: each fixture is a temporary git repository. `write()` stages the file, and artifacts are written untracked. A case for `packages/bb-app/.managed-json-cli-*/bb-app.mjs` is added. - `.gitignore`: ignores `packages/bb-app/.managed-json-cli-*` and `packages/plugin-sdk/.runtime-test-*`, like `apps/cli/.packaged-plugin-build-*`, so `git add -A` cannot commit a leaked bundle. - `docs/debugging-and-qa.md`: says that the ratchet counts git-tracked files. Why not one more exclusion: it would fix only this artifact. Filtering on git fixes the class and removes about 20 lines. ## How you verified | check | main | this PR | |---|---|---| | `node scripts/check-provider-literal-ratchet.mjs --base origin/main` (CI command), untracked `.managed-json-cli-PROBE/bb-app.mjs` present | `FAILED vs origin/main`, exit 1 | exit 0 | | same, clean tree | exit 0 | exit 0 | | git-tracked scan vs file walk on the clean repo | - | identical: 13 references in 6 files | | new test "does not count the untracked artifact packages/bb-app/.managed-json-cli-…" | fails | passes (25/25) | `turbo run typecheck lint test --filter=@bb/scripts` and `oxlint -c .oxlintrc.type-aware.json scripts .github ./*.ts` pass. Fixes #8527 > AGENT GENERATED
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.
Human comments
What was wrong
Sidebar rows could remain blank when a list update discarded a concurrent observer promotion, a wrapper lost its observation, or the scroll container initially had zero height. Separately, the packages CI job failed because the provider-literal ratchet scanned temporary CLI bundles produced by another test and counted their generated provider references as new core source references.
What changed
Compose realized-row updates against current state, re-attach missing observations with idempotent observe calls when the list changes, and retry observer setup when an initially zero-height container receives a size. Exclude
apps/cli/.packaged-plugin-build-*generated output from the provider-literal ratchet while continuing to scan CLI source.How you verified
pnpm exec turbo run typecheck lint test --filter=bb-plugin-thread-list --filter=@bb/scriptspassed: 309 thread-list tests and 143 scripts tests, with both package typechecks passing.git diff --checkpassed.origin/mainat4e0f9442fwithout conflicts.Production Chromium benchmark: 3 alternating rounds × 40 measured updates at 100/500/2,000 rows. At 2,000 rows, median synchronous update time was 2.4–2.5 ms on the base, 2.7 ms in the original PR, and 2.4 ms after removing unnecessary unobserve calls and restoring the realized-row geometry-read skip. Observer entries per list update dropped from 2,000 to 2, matching the base. Revised/base p95 differences were at most 0.1 ms across the tested cases. These component measurements do not establish iOS or whole-app frame performance. Sidebar tests/typecheck passed again after the optimization.