Repository navigation
Widen the plugin sidebar thread DTO with the columns bb's list reads - #4023
Merged
Merged
Conversation
SawyerHood
force-pushed
the
thread-list/1a-dto-columns
branch
from
September 21, 2026 23:37
3eddf34 to
e7862f3
Compare
The plugin-facing copy of ThreadListEntry dropped status, runtime status, queued work, pin sort key, visibility, lineage, and the environment path and worktree flag, all of which the built-in sidebar reads to sort, group, and filter. Add them so a replaced list can reproduce bb's behavior, and report queued-failed and queued-waiting as indicators instead of coercing them to none. Also adds the thread-list plugin plan. Co-Authored-By: Claude Fable 5.1 <[email protected]>
Co-Authored-By: Claude Fable 5.1 <[email protected]>
SawyerHood
force-pushed
the
thread-list/1a-dto-columns
branch
from
September 21, 2026 23:56
e7862f3 to
553d67a
Compare
SawyerHood
marked this pull request as ready for review
September 22, 2026 00:15
SawyerHood
added a commit
that referenced
this pull request
Sep 22, 2026
…ns (#4024) ## Human comments ## What was wrong A thread carried `sectionId`, but `experimental_useSidebarThreads()` dropped the sections list that rides on the same bootstrap payload, so a plugin list could not name "Later" or "Slop Cop". `openNewThread` had no way to file the new thread under a section or reuse an environment, both of which bb's own list does through router state. Opening a thread from a plugin row also skipped the collapse-reset side effect bb's row performs on the secondary panel. ## What changed - `PluginSidebarThreadsState.sections` (`PluginSidebarSection`: id, name, createdAt, updatedAt) from the same query, no extra request. - `openNewThread` accepts `sectionId` and `environmentId`, carried as `sectionId` and `reuseEnvironmentId` router state exactly as `ProjectList` and `useCreateThreadInEnvironment` do. - `open` sets the thread's conversation-collapsed atom to false before navigating, matching `ThreadRow`. - Testing harness accepts `sidebarThreads.sections`. Guide, API index, audit entry, and surfaces updated. Prerequisite: #4023. ## How you verified Hook tests for sections passthrough and loading state, the three `openNewThread` state shapes, the no-state case, the open side effect against the jotai default store, and unknown-thread `open`. Same typecheck/test filters as #4023 plus `packages/plugin-api-map`. 🤖 Generated with [Claude Code](https://claude.com/claude-code) > AGENT GENERATED --------- Co-authored-by: Claude Fable 5.1 <[email protected]>
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.
Human comments
What was wrong
The plugin-facing thread DTO (
PluginSidebarThread) is a hand-picked copy of the internalThreadListEntry. The copy dropped nine columns the built-in sidebar reads to sort, group, and filter: execution status, runtime display status, queued work, pin sort key, visibility, lifecycle owner, fork source, environment path, and the worktree flag. It also coerced the queued-waiting and queued-failed indicators tonone. A plugin list built on the DTO could not reproduce bb's own behavior, which blocks moving the sidebar into a plugin (plan, added in this PR).What changed
packages/plugin-sdk/src/app-contract.ts:PluginSidebarThreadgainsstatus,runtimeStatus,queuedWork,pinSortKey,isHidden,lifecycleOwnerThreadId,sourceThreadId, andenvironment.path/environment.isWorktree.PluginSidebarThreadIndicatorgainsqueued-failedandqueued-waiting. Every enum field documents its treat-unknown fallback.apps/app/src/lib/plugin-sidebar-threads.ts: the mapper fills the new fields and stops coercing queued indicators.This is layer 1 of a stack; nothing depends on it below.
How you verified
New mapper tests cover status and lineage, hidden threads, and queued indicators with their labels and precedence. Ran:
🤖 Generated with Claude Code