Add Thread Organizer example plugin - #2263
Open
brsbl wants to merge 18 commits into
Open
Conversation
ymichael
added a commit
that referenced
this pull request
Aug 21, 2026
## What was wrong `MachinesSettingsSection` loads host rows and sidebar project metadata through independent asynchronous queries. The test waited only for `MacBook Pro` from `sdk.hosts.list`, then synchronously queried for `2 projects` from the still-independent sidebar bootstrap. When the host query won that race, the rendered row still showed `0 projects`, producing the same `TestingLibraryElementError` in [PR #2262's app-1 job](https://github.com/get-bb/bb/actions/runs/32530493567) and [PR #2263's app-1 job](https://github.com/get-bb/bb/actions/runs/32530498050). ## What changed The project-count assertion now uses awaited `findByText`, synchronizing the test with the sidebar query that owns the value. The following `1 project` assertion remains synchronous because both counts are derived from the same resolved sidebar payload. No product behavior, assertion coverage, wire contract, CLI, or documentation surface changed. ## How you verified - Reproduced the exact failure before the fix by temporarily delaying only the sidebar response by 50 ms: the host row rendered with `0 projects`, and the test failed at the `2 projects` assertion. With the assertion fix under the same forced ordering, the test passed. The temporary delay is not committed. - `pnpm exec turbo run test --filter=@bb/app --force -- --run src/components/settings/MachinesSettingsSection.test.tsx` — 12/12 passed. - `pnpm exec turbo run test --filter=@bb/app --force` — 418 files passed; 3,244 tests passed and 3 skipped. - `pnpm exec turbo run typecheck --filter=@bb/app --force` — clean. - `pnpm exec turbo run build --filter=@bb/app --force` — clean. - `git diff --check` — clean. Fixes # — no linked issue. BB-Thread-ID: thr_qarynse2fs > AGENT GENERATED: by GPT-5.6-Sol
brsbl
force-pushed
the
bb/example-thread-organizer-thr_eibej5m9xw
branch
from
August 22, 2026 07:09
f1a913a to
bcb110e
Compare
brsbl
force-pushed
the
bb/example-thread-organizer-thr_eibej5m9xw
branch
from
August 24, 2026 20:06
bcb110e to
5a0313b
Compare
…xample-thread-organizer-thr_eibej5m9xw
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.
What was wrong
The repository had no complete reference consumer for plugin-owned thread workflows, leaving native section icons/actions, runtime skill slots, protected unread routing, and durable ordering as disconnected primitives. The remembered default stage was also easy to mistake for a semantic classification; Inbox placement could be undone by read/unread churn; automation-origin roots were excluded; and the settings description aligned its text box rather than the capital
Rink edge to the rounded panel.Title maintenance also had three gaps. It waited for a new hidden worker to become
idle, which could match the worker's transient initial state and stop it before its turn produced output. It ran only when a stage key changed, so substantially different work within the same stage could keep a stale title, and independently scheduled transitions each created their own worker. Finally, the stale-result guard preserved a title edited while a worker was running but then dropped the request instead of reconsidering the latest title against current work.What changed
update_plandoes not move workflow stage, whilebb organizer phasedoes.bb organizer phase <stage-key>call a title checkpoint, including a same-stage refresh that does not move the row or ask the user for permission.turn/completedevent before reading output so the initial-idle race cannot stop it prematurely.Focus SectionorShow all Sections; plain click focuses or restores the section list.rounded-lgradius token and hang Inter's measured capital-Rsidebearing so the visible ink edge lands on the corner tangent without an arbitrary pixel nudge.@get-bb/plugin-sdk#build:types.PluginAgentConfiguration.skillsasstring[]and keepexperimental_skillSlotsoptional and experimental. This example alone declaresengines.bbPluginSdk >=0.4.17, the first Core SDK containing all required APIs; it consumes the workspace SDK directly and does not vendor or relabel SDK0.4.10.Before — exact pre-rebase parent PR head
7f85d7d45After — exact pre-rebase UI head
bcb110e54Exact-head settings evidence
How you verified
v22.23.1arm64 with Turbo: all 53 focused example tests pass across core guidance, server behavior, app registration, direct sidebar actions, and controller state.turn/completed, a substantial same-stage autonomous refresh, two threads sharing one worker, and rename-during-worker → follow-up reassessment using the latest title.bb-plugin-thread-organizer-exampleand upstream generation/build dependencies.02de949f0403e3c40fcbbf9b0140dbc85fc8ffcfwith the local source CLI:pnpm bb:dev plugin build examples/plugins/thread-organizer.examples/plugins/thread-organizer/types/after the build and confirmed the worktree is clean.git diff --check fbd8a0a375288947515dbbd1fa1f573c086493b6..02de949f0403e3c40fcbbf9b0140dbc85fc8ffcf.Fixes # — no linked issue.
BB-Thread-ID: thr_eibej5m9xw