Repository navigation
Fix misplaced plugin SDK harness doc comments and record unprefixed sidebar row hooks - #7208
Merged
Merged
Conversation
…idebar row hooks The RenderedSlotBehaviorDrivers and FakePluginInspectionState doc comments sat on the field after the one they describe. Each comment now sits on its field, and experimental_invalidateRpc, experimental_onRpcInvalidation and experimental_rpcInvalidations get comments of their own. useSidebarThreadDraft, useSidebarThreadDraftIds, useSidebarThreadRowStatus, useSidebarThreadRowStatuses and useSidebarThreadShortcut shipped unprefixed in #4025 and marketplace plugins depend on the names, so they get an api_to_audit entry with behavior, core callers and stabilization criteria. Bumps @get-bb/plugin-sdk to 0.6.133. Co-Authored-By: Claude Opus 5.5 <[email protected]>
ymichael
added a commit
that referenced
this pull request
Nov 7, 2026
…#7215) ## Human comments ## What was wrong `ThreadActionsMenu.test.tsx` › "coalesces rows that mount a moment apart into one change" failed on a Windows CI run of #7208 and passed on rerun. The thread-id subscription debounce in `thread-action-registry.tsx` flushes after 32 ms with no new rows (100 ms max wait). The test mounted two rows, slept 20 ms on a real timer, then added a third. On a slow runner the sleep can last longer than 32 ms, so the first two ids flush on their own and the test sees an extra change. ## What changed Only the test changed. The `thread action data input` describe block now uses `vi.useFakeTimers()`. Vitest 4 fakes `setTimeout` and `performance.now()` by default, so this controls both the quiet window and the max wait. Real sleeps and `waitFor` polling were replaced with `act(() => vi.advanceTimersByTimeAsync(ms))`. The other three tests in the block used the same real-timer `settle` (150 ms), so they were converted too. Their assertions are unchanged; each `waitFor` is now a `settle()` followed by the same `expect`. No other test in the file relies on real-time delays. ## How you verified - `pnpm exec turbo run test --filter=@bb/app -- src/components/thread/ThreadActionsMenu.test.tsx`: 64 passed, 1 skipped. - Ran the file 5 more times: 2 runs in a row, then 3 at the same time to add load. All passed. - Mutation check: with `THREAD_IDS_QUIET_MS` lowered to 10, the coalescing test fails, so it still checks the debounce. - `turbo run typecheck --filter=@bb/app`, oxlint and prettier: all clean. > AGENT GENERATED 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 5.5 <[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
Two doc comments in the plugin SDK testing harness sat one field too early. In
RenderedSlotBehaviorDrivers, the comment foremitRealtime("Push a realtime event…") was onexperimental_invalidateRpc. InFakePluginInspectionState, the comment forrealtimeSignals("Everybb.realtime.publish…") was onexperimental_onRpcInvalidation. Plugin authors saw the wrong description for four harness members.Separately,
useSidebarThreadDraft,useSidebarThreadDraftIds,useSidebarThreadRowStatus,useSidebarThreadRowStatusesanduseSidebarThreadShortcutshipped as public@get-bb/plugin-sdk/appexports without theexperimental_prefix (#4025), anddocs/api_to_audit.mdhad no entry for them. About ten marketplace plugins use them, and Michael decided to keep the names.What changed
packages/plugin-sdk/src/testing/app.tsx: the realtime comment now sits onemitRealtime.experimental_invalidateRpchas its own comment: it invalidates the plugin'suseRpcreads tagged with any oftags(nullinvalidates all of them) inside act, withpluginIddefaulting to the rendered plugin.packages/plugin-sdk/src/testing/fake-plugin-host.ts: the realtime comment now sits onrealtimeSignals.experimental_onRpcInvalidationandexperimental_rpcInvalidationshave comments of their own: the first calls a listener on every invalidate or invalidateAll call, and the second records the tags of each invalidation, withnullfor invalidateAll.docs/api_to_audit.md: a new entry for the five hooks, placed after theexperimental_useSidebarThreadsentry. It records that they skipped the prefix and must not be renamed without runtime aliases, and it describes each hook's behavior. It names the core callers: the bundled Thread list plugin'sThreadRowand group rollups, and the core primitives thatplugin-sidebar-hooks.tswraps. It lists five audit items to settle before the hooks count as stable.scripts/bump-plugin-sdk.mjs --patch. The testing declarations are published, so the comment changes ship to npm.There are no wire, CLI or runtime behavior changes.
How you verified
pnpm exec turbo run typecheck --filter=@get-bb/plugin-sdkpasses.node .github/workflows/check-plugin-sdk-version.mjspasses. It reports the guarded surface as unchanged, because the testing files are not in its list. The bump is still needed for the npm publish guard.invalidateTags/pluginTagScopeintesting/app.tsx, therpc.experimental_invalidate*fakes,apps/app/src/lib/plugin-sidebar-hooks.ts,plugins/thread-list/app/rows/ThreadRow.tsxandplugins/thread-list/app/list/*.CI runs the remaining suites.
🤖 Generated with Claude Code