Repository navigation
Give plugin question forms core's host, and make Cancel end the request everywhere with a Back control in the child threads card - #8071
Merged
ymichael merged 4 commits intoNov 24, 2026
Conversation
ymichael
force-pushed
the
bb/question-forms-give-plugin-forms-core-s-host-and-thr_9b7yp6zqn2
branch
2 times, most recently
from
November 24, 2026 06:02
f7ee5a4 to
3a34869
Compare
Plugin pending-interaction forms now get the same question-form host as bb's own forms, through the public experimental_useQuestionFormHost: ExperimentalQuestionFormHost gains density, promptShownAbove and closeInline. Core's shared QuestionForm reads the host through that hook (the app binds shared-ui's SDK imports to the runtime's own members), and the private runtime slot that bundled plugins used, plus the registry flavor that hardcoded the inline fields, are gone. Cancel for core and plugin forms now runs one implementation. In a parent thread's Active child threads card it only closes the card, as core's form always did; a plugin form's cancel there used to stop the child's turn or cancel its request. PluginPendingInteractionProps.cancel and submit are documented. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…d its own Back Cancel on a pending interaction form now means one thing wherever the form renders: it cancels a plugin request or stops the turn of a provider request. The Active child threads card leaves a question without answering through its Back control, now shown for a single child too, and Escape. closeInline leaves the public ExperimentalQuestionFormHost and the inline context, since no form needs to know how to close the card. Codex's MCP form labels its fallback Stop turn in both places again, and the Secrets overview drops the card-only Cancel note. Co-Authored-By: Claude Opus 5.5 <[email protected]>
ymichael
force-pushed
the
bb/question-forms-give-plugin-forms-core-s-host-and-thr_9b7yp6zqn2
branch
from
November 24, 2026 19:52
4b9679b to
50a0a27
Compare
ymichael
deleted the
bb/question-forms-give-plugin-forms-core-s-host-and-thr_9b7yp6zqn2
branch
November 24, 2026 20:09
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
In a parent thread's Active child threads card, Cancel meant two different things:
bb's form behaved differently because it could tell it was in the card. A private runtime slot (
__bbPluginRuntime.questionFormHost) gave itdensity,promptShownAboveandcloseInline. Plugins only got the publicExperimentalQuestionFormHost, which lacked those fields; the registry's flavor hardcoded them to defaults.The card's "close" meaning came from #5422/#5423. With a single child the card had no Back control, so Cancel doubled as Back.
This closes audit a-thread F2 and the blocker named for core-contributions rank 15.
What changed
One Cancel, one meaning. Cancel on a pending interaction form ends the request wherever the form renders: it cancels a plugin request, or stops the turn for a provider request.
usePendingInteractionCancelis the only implementation. Core'sUserQuestionAnswerFormuses it, and so does thecancelprop thatPluginPendingInteractionComposerpasses to plugin forms.QuestionFormno longer turns Cancel into "close the card".The card owns Back.
ThreadPromptContextBannershows the ‹ Active child threads back header whenever a question is open, including with a single child.Public API (
@get-bb/plugin-sdk0.6.196):ExperimentalQuestionFormHostgainsdensity: "default" | "compact"andpromptShownAbove: string | null. These are the layout fields core's host already had.closeInlinestays private and is removed from the inline context, because no form needs to close the card.PluginPendingInteractionProps.submit()andcancel()get JSDoc.cancelis documented as placement-independent.Core and plugins read the host the same way:
QuestionForm(also the registry item) reads the host throughexperimental_useQuestionFormHost.vite-core-plugin-sdk-app.tsbinds shared-ui's@get-bb/plugin-sdk/appimports tosrc/lib/shared-ui-plugin-sdk-app.ts.core-plugin-sdk-app.test.tschecks that binding's members are the plugin runtime's own.question-form-host-context.ts).Removed:
questionFormHostruntime slot,SHARED_UI_QUESTION_FORM_HOST_SPECIFIER, the build rewrite and the export-manifest entry.question-form-hostflavor and itspluginFlavorsentry.provider-codexandprovider-pitsconfig paths to that flavor.Docs:
docs/api_to_audit.md: core callers, consumers, and a new audit item on the two inline fields.ExperimentalQuestionFormHost.frontend-hooks-and-ui.mdandbackend-cli-agents.md.docs/forkable-plugins.md.Community callers: brsbl's content-calendar and thread-organizer, and koenvg's pi-subagents, keep main's Cancel behaviour. pi-subagents can now read
densityandpromptShownAbovefrom the public type.How you verified
Tests. Each fails on the previous behaviour and passes on the branch.
PluginPendingInteractionComposer.test.tsx: a four-row table (plugin or provider origin, in the card or in the thread's own composer).cancel()cancels the request or stops the turn in every row, and the form readsdensityandpromptShownAbovefromexperimental_useQuestionFormHost().ThreadPromptContextBanner.child-questions.test.tsx:core-plugin-sdk-app.test.tsalso covers the shared-ui binding.Live, on
pnpm start:worktree, mainf1b65545c3avs this branch, driven with the devbbCLI. Fixtures: a Claude Code child asking with AskUserQuestion, andbb secret requestrun against a child thread.pending, childactiveidle, nothing pending: turn stoppedpendingSecret request cancelled (user).Secret request cancelled (user).experimental_useQuestionFormHost, not thequestionFormHostslotCommands (after rebasing on
af25b0b5a60, SDK 0.6.196):pnpm exec turbo run typecheck lint testfor @bb/app, @bb/shared-ui, @get-bb/plugin-sdk, @bb/plugin-registry, @bb/plugin-build, provider-codex, provider-pi, ask-user-question, secrets, bb-guide and plugin-api-docs: 38/38 tasks; app 7471 tests in 706 files.🤖 Generated with Claude Code