Repository navigation
Run the hidden sidebar list test, add missing app tests, and shrink brittle setup - #6949
Merged
ymichael merged 2 commits intoNov 3, 2026
Merged
Conversation
…rittle setup - Move the hidden sidebar thread-list test out of the skipped bench file into PluginThreadList.hidden.test.tsx; both share src/test/fixtures/sidebar-thread-list.tsx. - Spy on HTMLElement.prototype.scrollIntoView in ThreadTimelineRows.actions so restoreAllMocks undoes it instead of leaking a mock to later tests. - Test the palette's archived-recents fetch gate and the realtime thread invalidation debounce/max-wait timing (fine and coarse pointers) by behaviour. - Compact the lifecycle-errors table and extract harness helpers in plugin-frontend-reload, ui-preferences-sync and ToolsView.plugin-detail. - Replace regex-over-markup class checks with DOM classList/role assertions, anchor theme-preview anatomy on class sets rather than exact strings, and derive the eager runtime slot list from RUNTIME_SLOT_BY_SPECIFIER. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ymichael
deleted the
bb/apps-app-test-follow-ups-from-the-audit-thr_btf3y7fweh
branch
November 3, 2026 22:11
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
@bb/apptest audit (#6940) found test problems it left for a follow-up:sidebar.bench.test.tsx, whichvitest.config.tsexcludes unlessBB_SIDEBAR_BENCH=1, so CI never ran it.ThreadTimelineRows.actions.test.tsxreplacedHTMLElement.prototype.scrollIntoViewwithObject.definePropertyand never put it back, so avi.fn()leaked into later tests in the same worker.ThreadSearchPaletteMode.tsx).What changed
PluginThreadList.hidden.test.tsx. Its fixture builders and render wrapper are now insrc/test/fixtures/sidebar-thread-list.tsx, shared with the bench. The test also now asserts that the recorder actually saw thread ids; before,every()over an empty array passed trivially.scrollIntoViewleak fixed.ThreadTimelineRows.actionsnow usesvi.spyOn(HTMLElement.prototype, "scrollIntoView"), which the existingrestoreAllMocksundoes.CommandPalette.test.tsx). Archived recents load only while Archived is selected and the trimmed query is empty.realtime-cache-effects.test.ts). For fine and coarse pointers, a single change flushes afterdebounceMs, and a continuous burst flushes atmaxWaitMs. To support the coarse case, the pointer cadence is now resolved whencreateRealtimeCacheEffectsruns instead of at module import.useWebSocketcreates the effects once per mount, so the app behaves the same. The test-onlyresolveThreadInvalidationDebounceexport is removed.lifecycle-errors.test.ts: tuple rows with per-code builders (−256 lines)plugin-frontend-reload.test.ts:reconcileHarnessand module/stylesheet helpers (−220)ToolsView.plugin-detail.test.tsx:renderPluginDetail(−189)ui-preferences-sync.test.ts:startSyncedHarness,holdNextWriteandresponseWithout(−46)classListand role queries instead of markup regexes inroute-loading-skeleton,scroll-to-bottom-button,bottom-anchored-scroll-body.grid,ProviderCliBanner,ThreadMachineStatusandThreadPromptContextBanner.theme-preview-fixture-anatomychecks that a class set appears in the file in any order, not exact substrings. It imports the real sidebar row state constants.RUNTIME_SLOT_BY_SPECIFIER. To make that importable from the app test,@bb/plugin-buildgains a./runtime-shimssubpath export; the package root pulls in node-only build code.No wire, CLI or protocol changes.
How you verified
pnpm exec turbo run typecheck lint --filter=@bb/app: passes, 0 lint errors, no warnings in changed files.retainThreadIdand in the bulk retain does not fail it, because no rows mount while hidden. The test had the same gap in the bench file.scrollIntoView: a trailing probe asserting it is not a mock fails on the old file and passes on the new one.lifecycle-errors: 6 mutations, including a severity flip, a title change,isSenderThreadand the hook-failed message. Each fails the old and new tests alike.ui-preferences-sync: 7 mutations (revision tracking, pending-write overwrite, conflict retry, queue merge and drain, default save, toast). Each fails the same tests old and new.plugin-frontend-reload: 6 mutations (deactivation cleanup, generation bump, stylesheet wait, stale module, abort signal, old stylesheet kept). Each fails the same tests old and new.ToolsView: 7 mutations, including Reload for degraded, capability rows, and ignoredonDelete,onOpenSource,openSourceDisabledandcatalogEntry. All fail.RUNTIME_SLOT_BY_SPECIFIER, or removingvaulfrominstallPluginRuntime, each fails the test.BB_SIDEBAR_BENCH=1 BB_SIDEBAR_BENCH_THREADS=300still runs the bench end to end.🤖 Generated with Claude Code