Repository navigation
Description
Summary
When a plugin embeds experimental_NewThreadComposer without a defaultProjectId seed, the host resolves the picked project to the personal project (proj_personal: the picker shows "No project", and submitting records a personal-project thread). It never consults the remembered last-used new-thread project that the root compose surface keeps in localStorage, so every plugin-embedded composer is silently weaker than bb's own new-thread view. A second symptom in the same code region: a seeded project id the picker's project list does not (yet) contain is also silently resolved to proj_personal and submitted — a spawn is recorded against the personal project instead of failing loud or waiting for the list to settle.
This was found while investigating the Focus Board plugin's "New thread" button (filed plugin-side: cristoslc/bb-plugin-focus-board#24) but lives in bb's composer code, not the plugin.
Versions and environment
- bb 0.46.0 (desktop app), macOS 26.2 — observed on the installed 0.46.0 webapp bundle and confirmed in source at tag
desktop-v0.46.0 - Focus Board plugin
[email protected]at commit92dd536(has the maximize hand-off; the seeding helper there is unchanged from its released 1.1.0) - ACP provider (
acp-opencode); worktree environment, bb Connect paired
Steps to reproduce
- Enable/serve the Focus Board plugin and open its board panel (a plugin app panel, not the root compose view). Leave the board unfiltered (its default view).
- Click New thread on the board toolbar. The composer dialog opens with the project picker on "No project" (the personal project) and the environment row on the default "Project checkout" kind.
- For contrast, open bb's own new-thread view (sidebar "New thread"): its picker starts on the remembered pick (
bb.root-compose.project-id, initialized fromPERSONAL_PROJECT_ID), not unconditionally on personal. - Closest faithful repro for the seed-downgrade sub-symptom (code-verified, not live-reproduced): render the plugin composer with
defaultProjectId: "<an id not in the project list>"and submit; the resolved request'sprojectIdisproj_personal.
Did not reproduce with: bb's own sidebar/root compose surface (that path remembers); the Focus Board maximize hand-off (it omits an undefined seed, so the main view applies its remembered pick — the divergence is what exposed this).
Expected vs actual
Expected: a composer embedded in a plugin resolves an absent or temporarily-unresolvable project seed to something derived from the operator's context (the remembered new-thread pick is the natural candidate), and a seeded id the picker cannot resolve either defers the spawn until the project list settles or fails loudly — never silently spawns into the personal project.
Actual (0.46.0, tag desktop-v0.46.0):
// apps/app/src/components/plugin/PluginNewThreadComposer.tsx#L29-L37
const [pickedProjectId, setPickedProjectId] = useState<string | null>(
defaultProjectId ?? null,
);
// ...
// apps/app/src/components/plugin/PluginNewThreadComposer.tsx#L62-L73
<NewThreadComposer
projectId={pickedProjectId}
onProjectChange={setPickedProjectId}
draftStorage={{ kind: "plugin-new-thread", key: composerKey }}
selectionScope="component-local"
seed={seed}
resetKey={defaultProjectId ?? null}
...
// apps/app/src/components/promptbox/NewThreadComposer.tsx#L512-L525
const requestedCandidate = requestedProjectId ?? PERSONAL_PROJECT_ID;
// ...
const projectId = useMemo(() => {
if (isProjectlessProjectId(requestedCandidate)) return PERSONAL_PROJECT_ID;
if (!projects || !replayKnowsCandidate) return requestedCandidate;
return candidateKnown ? requestedCandidate : PERSONAL_PROJECT_ID;
}, ...)
The unseeded pick becomes proj_personal; the picker trigger for the null state renders "No project" (apps/app/src/components/pickers/ProjectSelector.tsx#L118); a not-yet-known seeded id takes the same PERSONAL_PROJECT_ID branch; and the create path inserts the requested project id verbatim (apps/server/src/services/threads/thread-create.ts#L382), so a personal-project thread + personal workspace is recorded with no re-derivation. The root surface's remembered pick (bb.root-compose.project-id, apps/app/src/lib/root-compose-selection.ts#L12-L31, consumed only in apps/app/src/views/RootComposeView.tsx#L398-L433) is never read on the plugin-embedded path — the plugin mount runs selectionScope: "component-local", so it does not share the root's selection scope either.
Execution defaults are not affected: once any project is picked, the project's remembered execution defaults apply as documented. The gap is exactly the project pick.
Evidence
- Code permalinks at the tested tag: https://github.com/get-bb/bb/blob/desktop-v0.46.0/apps/app/src/components/plugin/PluginNewThreadComposer.tsx#L29-L37 and #L62-L73; https://github.com/get-bb/bb/blob/desktop-v0.46.0/apps/app/src/components/promptbox/NewThreadComposer.tsx#L512-L525; https://github.com/get-bb/bb/blob/desktop-v0.46.0/apps/app/src/components/pickers/ProjectSelector.tsx#L118; https://github.com/get-bb/bb/blob/desktop-v0.46.0/apps/app/src/lib/root-compose-selection.ts#L12-L31; https://github.com/get-bb/bb/blob/desktop-v0.46.0/apps/app/src/views/RootComposeView.tsx#L398-L433; https://github.com/get-bb/bb/blob/desktop-v0.46.0/apps/server/src/services/threads/thread-create.ts#L382
- Investigation thread in bb:
thr_kv6syqtv36(Focus Board projectproj_p4562js7v2; adversarial-verification childthr_dyxsymisdvre-based and re-verified the findings against the plugin's current dev tip). - Headless pin at the plugin level (Focus Board worktree): rendering
NewThreadModalwith no seed gives the composerdefaultProjectId === undefined; zeroStorage.getItemreads ofbb.root-compose.project-idoccur on open; full suitenpm test94 files / 1396 tests green at92dd536.
What you ruled out
- Not Setting: default project for new threads instead of the personal project #3429 — closed after PR Keep selected project when starting a thread in a section #4225 fixed only the section-button project reset; that PR's body explicitly states the server-backed default-project setting and the other entry-point changes were not implemented.
- Not Stale second tab reverts the root composer's project selection to personal via cross-tab localStorage sync #3190 — that is cross-tab localStorage sync reverting the ROOT composer; the plugin-embedded composer never joins that scope to begin with.
- Not CLI: bb thread spawn inside a thread errors with required option '--project' instead of inferring the calling thread's project #2223 — that is the CLI's missing
--projectinference inside a thread; different surface, same family of "project pick has no remembered fallback". - Not a composer-draft artifact — drafts restore prompt text and attachments only; picker state is component-local and re-seeded per prop change (verified in
PluginNewThreadComposer.tsx#L29-L37).
Suggested priority and effort
Low–Medium — hits any plugin embedding the composer without a seed (and any plugin seeding an id the picker cannot resolve); workaround exists (the plugin computes its own seed, as Focus Board is about to); no data loss; effort Low — either expose the remembered pick to plugin-embedded composers (a documented useRememberedProjectId()-style API or a "remembered" defaulting mode reusing root-compose-selection machinery), or resolve an undefined defaultProjectId through the remembered pick per selection-scope policy while keeping the explicit "Don't work in a project" as the personal id, and make an unresolvable SEED fail loud or defer instead of downgrading.
Checks
- Reproduced this on the latest release or on
main(observed on installed 0.46.0 =desktop-v0.46.0; the seed-downgrade sub-symptom is code-verified at that tag and marked as such above). - Searched open and closed issues for the same problem (Preserve provider selection in embedded NewThreadComposer #2974, Setting: default project for new threads instead of the personal project #3429, Stale second tab reverts the root composer's project selection to personal via cross-tab localStorage sync #3190, Add optional hostId to openNewThread so plugins can preselect the composer's machine #4323, Add optional environmentId to openNewThread #2842, CLI: bb thread spawn inside a thread errors with required option '--project' instead of inferring the calling thread's project #2223 reviewed; see "ruled out").
- If an agent wrote this, the body ends with
> AGENT GENERATED.
AGENT GENERATED — investigation thread
thr_kv6syqtv36in bb (Focus Board project), adversarial verificationthr_dyxsymisdv.
Activity
bb-slop-cop commentedon Oct 10, 2026
🚨 SLOP COP 🚨 ·
new-issue-autopilotui,plugins,confirmed-repro.e9ad6b0e34736).fix: seed a personal filter deliberately and label personal cards "No…
Make plugin surfaces prove they use core's path and delete four plugi…
Make plugin surfaces prove they use core's path and delete four plugi…
Make plugin surfaces prove they use core's path and delete four plugi…
Make plugin surfaces prove they use core's path and delete four plugi…
Make plugin surfaces prove they use core's path and delete four plugi…
Make plugin surfaces prove they use core's path and delete plugin-onl…