Repository navigation
Fix Add a machine RPC input validation - #834
Merged
SawyerHood merged 2 commits intoJul 21, 2026
Merged
SawyerHood merged 2 commits into
SawyerHood merged 2 commits into
Conversation
SawyerHood
force-pushed
the
bb/bb-76-fix-add-a-machine-rpc-input-validation-fai-thr_yqb7t42bya
branch
from
July 21, 2026 15:32
33db255 to
3c9af6f
Compare
SawyerHood
deleted the
bb/bb-76-fix-add-a-machine-rpc-input-validation-fai-thr_yqb7t42bya
branch
July 21, 2026 15:37
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.
Closes #833
Summary:
nullfor the connectcreateMachineCodeRPC, matching itsz.null()contract.not_paired.AddMachineDialogcoverage for both a paired machine-code command and the real unpaired error shape.Root cause:
The host Settings dialog calls plugin RPC through the generic
@bb/sdktransport, not the contract-typed pluginuseRpchook. A stale empty-object payload therefore compiled but was rejected by the server before the handler ran.Live QA also found that the intended unpaired fallback checked
BbHttpError.code === "not_paired", while plugin handler failures use envelope codehandler_errorand carrynot_pairedin the structured error message. The dialog now validates that boundary payload before using it.Validation:
pnpm exec turbo run test --filter=@bb/app --force -- src/components/dialogs/AddMachineDialog.test.tsxpnpm exec turbo run typecheck --filter=@bb/apppnpm exec turbo run test --filter=bb-plugin-connect --forcepnpm exec turbo run typecheck --filter=bb-plugin-connectpnpm exec turbo run build --filter=@bb/apppnpm exec turbo run lint --filter=@bb/app(passes with 129 existing warnings)