Skip to content

Accept an abort signal in experimental_discoverRpc - #5163

Merged
ymichael merged 1 commit into
mainfrom
bb/fix-discoverrpc-signal-thr_d457a39ns7
Oct 8, 2026
Merged

ymichael merged 1 commit into
mainfrom
bb/fix-discoverrpc-signal-thr_d457a39ns7

Conversation

@ymichael

@ymichael ymichael commented Oct 8, 2026

Copy link
Copy Markdown
Collaborator

Human comments

What was wrong

PluginsArea.experimental_discoverRpc accepted only the pluginId/method filters and called requestParsed without a signal, so discovery — a read that typically runs inside a React query or refresh loop — could not be cancelled, unlike the other read calls in the plugins area (part 3 of #4944).

What changed

  • packages/sdk/src/areas/plugins.ts: new PluginRpcDiscoveryArgs (the discovery query plus signal?: AbortSignal) and the signal is passed through to the request, same as callRpc. The server contract query type and the wire format are unchanged; the signal is stripped by the query schema parse.
  • docs/api_to_audit.md: discovery entry documents signal.
  • No plugin SDK bump in this PR: main already bumped @get-bb/plugin-sdk to 0.6.29 (not yet published), which will carry this type change.

Parts 1 (handler refusal status) and 2 (cross-plugin useRealtime) of #4944 are not addressed here.

How you verified

  • New test in packages/sdk/test/plugin-rpc-discovery.test.ts aborts an in-flight discovery request; it hangs and times out without the fix and passes with it.
  • pnpm exec turbo run test typecheck --filter=@bb/sdk (118 tests pass); typecheck lint on @bb/sdk, @get-bb/plugin-sdk, @bb/domain.
  • check-npm-version-guard.mjs passes.

Refs #4944

AGENT GENERATED

🤖 Generated with Claude Code

Discovery is a read that typically runs inside a React query or refresh
loop, but unlike the other read calls in the plugins area it could not be
cancelled. Pass an optional signal through to the request.

Refs #4944

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@ymichael
ymichael merged commit 127fb7d into main Oct 8, 2026
48 checks passed
@ymichael
ymichael deleted the bb/fix-discoverrpc-signal-thr_d457a39ns7 branch October 8, 2026 00:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant