Repository navigation
Make composer popup switch focus coverage deterministic - #4775
Merged
Merged
Conversation
SawyerHood
marked this pull request as ready for review
October 2, 2026 22:50
Opening a second popup from inside the first kept the popup host open, so its focus effect never ran again and focus fell to the document body once the first popup's input unmounted. The popup switch test only passed when the first popup's pending animation frame fired after the switch, which slower Windows runners did not guarantee. Co-Authored-By: Claude Code <[email protected]>
SawyerHood
force-pushed
the
bb/composer-popup-focus-thr_g2ychqg7i9
branch
from
October 2, 2026 22:52
c6cc028 to
7954fcd
Compare
SawyerHood
added a commit
that referenced
this pull request
Oct 2, 2026
## Human comments ## What was wrong Windows CI ran only nine host package suites and application smoke checks, leaving the app, server, plugins, CLI, parity, and other package tests untested on Windows. Running those suites on actual runners exposed filesystem assumptions, process cleanup races, coarse CPU timing, and contention on four-vCPU machines. ## What changed Add seven Windows test shards for the app, server, plugins, and remaining packages. Run the test step under `cmd` with the runner temp directory, install Bun for the Pi plugin suite, and retain bounded OS-specific Turbo caches and timing artifacts. Serialize the process-heavy host shard and limit plugin and other-package concurrency. Fix the observed test portability failures: use an actual temporary log directory, disable Git text conversion in the clone fixture, increase the CPU measurement sample, retry asynchronous cleanup while child processes release directories, allow Windows stdin EPIPE during child exit, and use 15-second timeouts for process-spawning suites. Update the Windows coverage, platform support, and CI performance docs. This is layer 2 of 2, based on #4775. The equivalent popup focus fix landed in #4765; #4775 retains its deterministic regression test. Bump the Plugin SDK from 0.6.15 to 0.6.16 because the replay helper is bundled into its published provider testing entry point. No server/daemon wire fields change. ## How you verified - The Windows matrix and portability patch match the original branch validated by [all 30 CI jobs](https://github.com/get-bb/bb/actions/runs/37069591771). - The original investigation forced Windows shard execution across repeated real-runner trials; the final stress validation passed all 13 shard copies. - `pnpm exec turbo run build lint typecheck --filter=@get-bb/plugin-sdk --filter=@bb/provider-bridge-protocol`: passed. - `pnpm exec turbo run test --filter=@bb/provider-bridge-protocol`: passed. - `node packages/plugin-sdk/scripts/check-npm-version-guard.mjs`: passed after the patch bump. - `git diff --check`: passed. The [final PR workflow](https://github.com/get-bb/bb/actions/runs/37075661524) passed all 26 jobs on commit `2f26b6ca6112e74098a3875e3724bde15396b9fa`, including all seven new Windows test shards, Linux tests, Linux/macOS/Windows packaging smoke checks, lint, typechecks, and the npm version guard. The conditional compatibility and mobile E2E jobs were skipped. Seven additional Windows runners took approximately 3.8–5.3 minutes each in the original final run. Serializing the host shard avoids an unresolved integration-server close hang under contention; broader cleanup retries and short-path plugin validation remain follow-up work. > AGENT GENERATED --------- Co-authored-by: Claude Code <[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.
Human comments
What was wrong
The composer popup switch test could pass when the first popup’s pending focus animation frame ran after opening the second popup. That timing masked a focus-transfer regression: switching popup content while the host stayed open did not focus the new input.
What changed
Wait for the first popup to receive focus before opening the second, making the existing focus assertion reliably exercise switching after the initial animation frame has completed. The equivalent product fix already landed in #4765, which re-runs focus when the popup key changes; this PR adds its deterministic regression coverage.
This is layer 1 of 2, based on
main. Layer 2 is #4776, which extends Windows CI and needs reliable popup switching coverage.How you verified
pnpm exec turbo run test --filter=@bb/app -- src/components/promptbox/PromptBoxInternal.test.tsx: all 151 tests passed after resolving the overlap with Prepare bb-app 0.45.0 #4765.pnpm exec turbo run lint typecheck --filter=@bb/app: passed before the rebase; CI checks the final head.git diff --check: passed. This PR also runs the full CI workflow on its final head.