Skip to content

Add Thread Organizer example plugin - #2263

Open
brsbl wants to merge 10 commits into
bb/plugin-runtime-skill-slots-thr_eibej5m9xwfrom
bb/example-thread-organizer-thr_eibej5m9xw
Open

Add Thread Organizer example plugin#2263
brsbl wants to merge 10 commits into
bb/plugin-runtime-skill-slots-thr_eibej5m9xwfrom
bb/example-thread-organizer-thr_eibej5m9xw

Conversation

@brsbl

@brsbl brsbl commented Aug 21, 2026

Copy link
Copy Markdown
Collaborator

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; semantic phase changes did not keep titles current; the fullscreen action was too easy to trigger; and the settings description aligned its text box rather than the capital R ink edge to the rounded panel.

What changed

  • Add the Thread Organizer example with configurable workflow stages, protected Inbox routing, remembered-stage placement, native section icons/actions, CLI phase changes, and agent instructions.
  • Teach the organizer skill to re-evaluate at substantive task starts, resolved indirect kickoffs, scope changes, pre-implementation, implementation/validation transitions, failed validation, and handoff. The default/remembered stage is explicitly mechanical; update_plan does not move workflow stage, while bb organizer phase does.
  • Keep Inbox placement latched through read and unread changes after a thread enters Inbox. Only renewed agent work clears the latch and returns the thread to its remembered stage.
  • Include automation-origin root threads in organization.
  • On genuine non-Inbox semantic stage transitions, start an invisible title-reassessment worker that keeps an accurate title or applies a succinct replacement after rechecking that the thread and transition are still current.
  • Opt the example's fullscreen action into Core's Command/Ctrl-plus-click activation requirement.
  • Inset the settings description by the shared rounded-lg radius token and hang Inter's measured capital-R sidebearing so the visible ink edge lands on the corner tangent without an arbitrary pixel nudge.
  • Add the missing Turbo dependency from example typecheck to @get-bb/plugin-sdk#build:types.
  • Preserve PluginAgentConfiguration.skills as string[]; keep experimental_skillSlots optional and experimental; leave the inherited PLUGIN_SDK_VERSION unchanged at 0.4.14; and keep the planned engines.bbPluginSdk >=0.4.11 floor isolated to this example. No SDK 0.4.10 artifact is vendored or relabeled.

Before — exact parent PR head 7f85d7d45

Before — manual workflow has only Unorganized

After — exact head bcb110e54

After — Thread Organizer workflow sections and semantic icons

Exact-head settings evidence

Exact head — intent description aligned to the rounded panel tangent and sticky Inbox copy

Exact-head intentional activation evidence

Plain click leaves the full workflow visible:

Plain click — no fullscreen transition

Command/Ctrl activation focuses the chosen section:

Command/Ctrl activation — Planning fullscreen

How you verified

  • Node v22.22.1 arm64 with Turbo: all 47 focused example tests pass across core guidance, server behavior, app registration, sidebar actions, and controller state.
  • Turbo typecheck passes for bb-plugin-thread-organizer-example and upstream generation/build dependencies.
  • Built the exact head with the local source CLI: pnpm bb plugin build examples/plugins/thread-organizer.
  • Removed generated untracked examples/plugins/thread-organizer/types/ after the build and confirmed every product worktree is clean.
  • Focused skill coverage includes an indirect “read this brief” implementation kickoff and a Building → Testing / Deploy transition.
  • Fresh desktop lifecycle verification: Inbox → read stays Inbox → unread stays Inbox → agent active returns to Planning.
  • git diff --check 7f85d7d45a392dde5cc4dbd282fe9976bbf7c303..bcb110e541fa206b6900fa7b9c70cc984f15416a.
  • The exact parent/head visual pair used the same empty Thread Organizer QA project, / route, manual grouping mode, expanded first section, ready composer state, and 1093×768 native window bounds. The settings and activation captures also came only from exact-head desktop dev apps.

Fixes # — no linked issue.

BB-Thread-ID: thr_eibej5m9xw

AGENT GENERATED: by GPT-5.6-Sol

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
brsbl force-pushed the bb/example-thread-organizer-thr_eibej5m9xw branch from f1a913a to bcb110e Compare August 22, 2026 07:09
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