Skip to content

Delete the built-in thread list and show the placeholder while the plugin loads - #4041

Merged
SawyerHood merged 2 commits into
thread-list/3b-list-assemblyfrom
thread-list/4-flip
Sep 22, 2026
Merged

SawyerHood merged 2 commits into
thread-list/3b-list-assemblyfrom
thread-list/4-flip

Conversation

@SawyerHood

@SawyerHood SawyerHood commented Sep 22, 2026 •

Copy link
Copy Markdown
Collaborator

Layer 12 of the thread-list plugin stack, stacked on #4039 (list assembly). This is the flip.

Human comments

What was wrong

The sidebar rendered bb's built-in list first and swapped in the plugin list once its bundle arrived, which showed as a flicker on every load. Keeping two lists had no purpose once the bundled thread-list plugin reached parity (#4039): the plugin is bb's list now.

What changed

  • apps/app/src/components/sidebar/PluginThreadList.tsx mounts the resolved plugin directly through PluginSlotMount. With no plugin it renders ThreadListPlaceholder: skeleton rows until the existing usePluginFrontendsSettled hook (light plugin-frontend-boot-state.ts, no loader import, so the boot payload does not grow) reports the deferred boot done, then "No thread list plugin is enabled" with a link to Plugins. A crash shows " stopped working" with a Reload button that calls resetCrashedPluginSlots and remounts, plus one toast.
  • AppSidebar.tsx no longer builds a built-in list and drops the unused quick-create controller.
  • ProjectList and everything only it reached are deleted from apps/app (about 12,900 lines including tests and stories). SidebarPrimaryActions.tsx keeps the New thread and Search actions the navigation region still renders; SectionSidebar takes its button class from sidebarRowClasses. Row and drag modules that other surfaces import (mobile recents, section move provider, settings) stay.
  • Settings → Appearance → Sidebar offers Automatic and the registered providers; ReplacementProviderSetting only adds the built-in option when a description is passed. A stored __builtin__ value for sidebar.threadListProvider is read as Automatic (threadListProvider.ts); the preference description in @bb/domain and docs/configuration.md say so.
  • PluginThreadListProps loses Original and experimental_Original (nothing to delegate to). Plugin SDK 0.5.7. The guide (frontend-registration.md), docs/api_to_audit.md, docs/plugin-sidebar-thread-list.md, the API map summary, the docs-parity prop list, the plugin's own test fixture, and the replacement-lab-beta example are updated.
  • The benchmark keeps only the plugin scenario; the built-in numbers stay recorded in plans/thread-list-plugin.md.

No wire changes.

How you verified

  • New PluginThreadList.test.tsx: loading placeholder until boot settles then missing state; plugin receives the host props and no Original; crash shows the crashed placeholder and toast, and Reload remounts a recovered list.
  • SidebarThreadListSetting.test.tsx: no built-in menu item; pinning a plugin stores its key.
  • pnpm exec turbo run typecheck --filter=@bb/app --filter=bb-plugin-thread-list --filter=@get-bb/plugin-sdk --filter=@bb/domain --filter=bb-plugin-replacement-lab-beta
  • apps/app: sidebar, settings, layout, plugin, views, and plugin-* lib suites: 154 files, 1501 tests pass.
  • @get-bb/plugin-sdk (346), @bb/plugin-api-map (82), bb-plugin-thread-list (297), server plugin docs-parity and builtin-plugin tests (57) pass.
  • Provider-literal ratchet OK. Local pnpm build plus check-bundle-budget.mjs: boot payload within budget (numbers below).
  • Dev instance with 160 seeded threads, headless Chromium on bee sampling the sidebar every 30 ms after a warm reload: host loading placeholder from 94 ms, plugin root mounted at 320 ms rendering the same two skeleton rows, thread rows at 700 ms. No built-in list at any point. Cold Vite compile: placeholder until the bundle lands at about 7 s, then rows.

🤖 Generated with Claude Code

AGENT GENERATED

@SawyerHood
SawyerHood added this pull request to stack #4028 September 22, 2026 01:49
@SawyerHood
SawyerHood marked this pull request as ready for review September 22, 2026 01:51
@SawyerHood
SawyerHood force-pushed the thread-list/4-flip branch 3 times, most recently from ae9259e to 503eb95 Compare September 22, 2026 02:06
SawyerHood and others added 2 commits September 21, 2026 19:43
…ugin loads

The sidebar rendered bb's built-in list first and swapped in the plugin
list once its bundle arrived, which showed as a flicker on every load.
There is no reason to keep two lists: the bundled thread-list plugin is
bb's list now.

PluginThreadList mounts the resolved plugin directly. With no plugin it
shows skeleton rows until plugin frontends have booted, then "No thread
list plugin is enabled" with a link to Plugins. A crash shows "stopped
working" with a Reload button that resets the crashed slot and remounts.
ProjectList and everything only it reached are deleted from apps/app;
SidebarPrimaryActions keeps the New thread and Search actions the
navigation region still renders. Row and drag modules that other
surfaces import stay.

The thread list setting offers Automatic and the registered providers;
a stored __builtin__ preference is read as Automatic. PluginThreadListProps
loses Original and experimental_Original because there is nothing to
delegate to, so the SDK moves to 0.5.7 and the guide, audit, and design
docs describe the placeholder model.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
@SawyerHood
SawyerHood merged commit 3bcba17 into main Sep 22, 2026
21 of 30 checks passed
@SawyerHood
SawyerHood deleted the thread-list/4-flip branch September 22, 2026 03:11
albrand pushed a commit to alb-hold/bb that referenced this pull request Sep 22, 2026
Upstream get-bb#4041 deleted the built-in thread list, and with it the fork's
sidebar New project button; the plugin that replaced it has no project
creation at all, leaving the welcome screen as the only route.

Adds experimental_useSidebarProjectActions, binding a plugin's own button to
the host quick-create flow, and restores the button on the top-level threads
header.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
benwaffle added a commit to benwaffle/bb that referenced this pull request Sep 22, 2026
In project organization mode the Personal project's threads rendered twice:
once under a "Personal" project section and once under the built-in "Threads"
section, which is by construction the Personal project's threads. The built-in
thread list that the bundled plugin replaced in get-bb#4041 read only the standard
projects, so this appeared when the list moved into the plugin.

ProjectModeSections now drops the personal project when it derives its project
rows. Project sections, their ids, their groups and the "More" visibility list
all come from projectRows, so the "Personal" heading disappears from each,
while the threads themselves still reach the "Threads" section through
threadsByProject, which keys off thread.projectId rather than the project list.

Filtering in the plugin rather than in the host's SDK bridge is deliberate.
Dropping personalProject from allProjects in plugin-sidebar-hooks.ts, as looks
natural, removes the threads from the sidebar entirely: the plugin buckets the
SDK thread array into its projects array and then flattens it back out, so a
Personal project with no entry leaves its threads with no bucket. Measured on
this fixture, that route yields headings ["App"] and zero Personal rows, not
the intended one. PluginSidebarProject.isPersonal is also public SDK surface
that third-party sidebar plugins read, so the host array keeps its shape.

This is a temporary fork-local patch for upstream get-bb#4093. Drop this
commit when upstream fixes that issue; the fix there may well land in a
different place, and upstream must also decide whether project mode should
show a "Personal" heading at all.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
benwaffle added a commit to benwaffle/bb that referenced this pull request Sep 23, 2026
In project organization mode the Personal project's threads rendered twice:
once under a "Personal" project section and once under the built-in "Threads"
section, which is by construction the Personal project's threads. The built-in
thread list that the bundled plugin replaced in get-bb#4041 read only the standard
projects, so this appeared when the list moved into the plugin.

ProjectModeSections now drops the personal project when it derives its project
rows. Project sections, their ids, their groups and the "More" visibility list
all come from projectRows, so the "Personal" heading disappears from each,
while the threads themselves still reach the "Threads" section through
threadsByProject, which keys off thread.projectId rather than the project list.

Filtering in the plugin rather than in the host's SDK bridge is deliberate.
Dropping personalProject from allProjects in plugin-sidebar-hooks.ts, as looks
natural, removes the threads from the sidebar entirely: the plugin buckets the
SDK thread array into its projects array and then flattens it back out, so a
Personal project with no entry leaves its threads with no bucket. Measured on
this fixture, that route yields headings ["App"] and zero Personal rows, not
the intended one. PluginSidebarProject.isPersonal is also public SDK surface
that third-party sidebar plugins read, so the host array keeps its shape.

This is a temporary fork-local patch for upstream get-bb#4093. Drop this
commit when upstream fixes that issue; the fix there may well land in a
different place, and upstream must also decide whether project mode should
show a "Personal" heading at all.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
benwaffle added a commit to benwaffle/bb that referenced this pull request Sep 24, 2026
In project organization mode the Personal project's threads rendered twice:
once under a "Personal" project section and once under the built-in "Threads"
section, which is by construction the Personal project's threads. The built-in
thread list that the bundled plugin replaced in get-bb#4041 read only the standard
projects, so this appeared when the list moved into the plugin.

ProjectModeSections now drops the personal project when it derives its project
rows. Project sections, their ids, their groups and the "More" visibility list
all come from projectRows, so the "Personal" heading disappears from each,
while the threads themselves still reach the "Threads" section through
threadsByProject, which keys off thread.projectId rather than the project list.

Filtering in the plugin rather than in the host's SDK bridge is deliberate.
Dropping personalProject from allProjects in plugin-sidebar-hooks.ts, as looks
natural, removes the threads from the sidebar entirely: the plugin buckets the
SDK thread array into its projects array and then flattens it back out, so a
Personal project with no entry leaves its threads with no bucket. Measured on
this fixture, that route yields headings ["App"] and zero Personal rows, not
the intended one. PluginSidebarProject.isPersonal is also public SDK surface
that third-party sidebar plugins read, so the host array keeps its shape.

This is a temporary fork-local patch for upstream get-bb#4093. Drop this
commit when upstream fixes that issue; the fix there may well land in a
different place, and upstream must also decide whether project mode should
show a "Personal" heading at all.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
SawyerHood added a commit that referenced this pull request Sep 25, 2026
## Human comments

## What was wrong

When the sidebar moved into the thread-list and navigation plugins
(#4036, #4041, #4117, #4140), the old app and client-core copies stayed
behind. Nothing in the shipped app renders or calls them, but their
tests kept them compiling and passing. The shipped plugin copies have
their own tests. A few other app tests could not fail: they restated
constants or asserted a flag inside a block that only runs when the flag
has that value. Others were near-duplicates of a stronger test.

## What changed

Found by a read-only test audit using the repo `test-audit` skill
(#4361).

- Deletes dead code that nothing in the shipped app calls, and the tests
that only exercised it:
- `ThreadArchiveQuickAction` and `ThreadActionsContextMenu` (the plugin
copies ship)
- `SidebarRenameProvider`, the app's sidebar row state classes, the
drop-animation constant and the sidebar lifecycle atom
- `useSystemProviderUsageLimits` and its query key (unused since #3449),
and `getAppCommandMetadata`
- client-core's environment grouping, sort policy and pinned-root
ordering. The only live callers read `effectivePinnedThreadIds` or pass
their own comparator.
- the unused `hasRunningPluginStatus` parameter, and the plugin copy of
`arrangeByStoredOrder`
- The theme-preview anatomy anchor now points at
`plugins/thread-list/app/rows/sidebarRowClasses.ts`, the file that
actually renders the rows.
- Folds duplicate suites into table tests at their owners: bundle
budget, command ordering, `isRowExpandable`, steer rendering and child
activity.
- Deletes tests that restate constants or cannot fail.
- Adds two tests after coverage verification:
  - an unpinned parent stays out of `effectivePinnedThreadIds`;
- the terminal enables xterm's proposed API, which the Unicode 11 addon
requires. This builds a real `Terminal`.

Production +59/−706, tests +476/−1618.

## How you verified

- `pnpm exec turbo run test lint typecheck` passes for `@bb/app`,
`@bb/client-core`, `@bb/thread-view`, `bb-plugin-thread-list` and
`bb-plugin-theme-preview`, plus typecheck of every client-core and
thread-view dependent.
- An independent verifier used before and after worktrees on 175d5ac
and 55 mutations. For each of the 75 removed or merged tests, it wrote
the bug that test catches as a production change and checked that the
old test fails and a remaining test also fails.
- Result: 64 OK, 10 with no unique failure mode, 1 lost. The lost
assertion is restored above.
- The live callers `RootComposeMobileRecents` and
`useSidebarThreadReveal` still fail on sort or pin mutations.
- Known gap, not caused by this change: the rename-cancel effect in
`useSidebarRename` was untested before and after.

> AGENT GENERATED

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 5.5 <[email protected]>
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