Automatically organizes the bb sidebar: threads
whose titles start with a task key — HOPS-5 · Pilot 4, TA-2 · Build the stash — are filed into a sidebar section named after the key's prefix
(HOPS, TA), creating the section on first use.
The bb tasks plugin names delegated threads exactly this way (KEY-n · title),
so with both plugins enabled every tasks project gets its own sidebar section
with zero manual dragging. Manually titled threads that follow the same
convention are filed too.
bb plugin install git:https://github.com/benegessarit/bb-plugin-auto-sections.git@mainOr from a local checkout while developing:
bb plugin install /path/to/bb-plugin-auto-sectionsRequires bb ≥ 0.36. No configuration.
- A thread is filed in exactly two title shapes: the tasks-plugin shape
KEY-1 · title(uppercase letter-first prefix of 1–10 characters, spaced middle dot), or a bare key as the entire title (TA-7, prefix of 2+ characters). Anything else —W-2: tax filing,COVID-19: research,HTTP-2 support, a bareF-16— is left alone. - Sections are matched by exact name; missing ones are created.
- Each thread is filed at most once. Drag a thread out of its section (or into a different one) and the plugin never moves it again.
- Already-sectioned threads are never touched. Archived and hidden threads are ignored.
- Runs on server start (catch-up sweep) and reacts live to new threads and renames, debounced a couple of seconds.
bb auto-sections sweep # file all unsectioned task-keyed threads now
bb auto-sections forget <thread-id> # clear one filed marker so it can be re-filed
bb auto-sections forget --all # clear all filed markersforget exists for the once-only rule: after clearing a marker, the next sweep
may file that thread again.
npm install
npm test # vitest unit tests (pure logic in core.ts)
npm run typecheck # tsc --noEmit
bb plugin install . # run it against your local bb
bb plugin dev # reload on saveserver.ts is thin wiring around the plugin API; the filing logic lives in
core.ts as pure functions so it tests without a bb server.
MIT
