Repository navigation
Conversation
…stry The thread-list plugin port (#4036) copied sidebar primitives instead of moving them, and the app and plugin copies drifted. Presentation primitives with no domain knowledge now have one home in packages/shared-ui, published to plugins through the registry: use-dialog-state, use-drag-click-suppression, use-reorder-dnd, use-sidebar-reorder-dnd, sortable-motion, compact-long-press-menu, action-menu-items, confirm-delete-dialog, rename-dialog, inline-rename, inline-rename-editor, sidebar-visibility-customize, sidebar-customize-panel, sidebar-row-classes, sidebar-hover-actions, context-selection and thread-list-empty-state. Where the app and plugin need different behaviour, the shared code takes it as a prop: each side passes its own touch sensor (the app's drawer-aware sensor, the plugin's deliberate long-press sensor, which now owns its 500 ms hold); the app renders the inline rename editor through its lazy split with field-sizing-content; the plugin keeps its shared rename session and compact rename dialog. MachineRenameDialog uses the shared RenameDialog shell, and the tasks plugin's confirm dialog is replaced by ConfirmDeleteDialog with className, size and confirmDisabled props. docs/forkable-plugins.md gains a "What belongs in shared-ui" section. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The thread-list plugin carried its own copy of bb's thread status glyph while the app still draws the glyph in the search palette, related threads, and mobile recents. The host now exposes it as experimental_ThreadStatusGlyph (indicator, archived, rowStatus, hideIdleDraftLabel, size); the app's ThreadStatusGlyph is that implementation and takes a resolved indicator, and the plugin renders its rows and collapsed rollups through it and deletes its copy. The plugin keeps resolving the indicator itself, so it can fold in collapsed children and client-local drafts. The SDK test fake exposes the requested indicator and row status as data attributes; plugin tests assert what the row asks for, and the icon, label, tone, and precedence checks moved to the app's ThreadStatusGlyph test. runtimeMember now types the runtime lookup at the installedApp boundary, which keeps PluginSdkApp under TypeScript's union complexity limit. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…bar keys Since the thread-list plugin took over the sidebar, bb's core sidebar.collapsed* UI preferences were only maintained by the app's useSidebarThreadReveal, and only sidebar.collapsedThreads still had a reader: mobile recents, which therefore synced its collapse state across devices by accident. Mobile recents now keeps collapsed thread ids in local storage (bb.mobileRecents.collapsedThreads). useMobileRecentsThreadReveal replaces the sidebar reveal hook and keeps the one behaviour recents used: navigating to a thread, or a thread becoming unread, opens its collapsed ancestors in recents. The six core keys (sidebar.collapsedSections, collapsedProjects, collapsedThreads, collapsedEnvironments, collapsedThreadSections, collapsedMachines) leave the UI preference registry, the demo server, and docs/configuration.md; the server already ignores stored rows for unknown keys. The thread-list plugin's one-time migration no longer reads them, so an install that has not started bb since 2026-09-21 starts with its sidebar groups expanded. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
ymichael
force-pushed
the
bb/finish-the-sidebar-move-dedupe-app-and-thread-li-thr_a4rgc4dg9y
branch
from
October 9, 2026 20:04
9227bda to
3d2e6be
Compare
ymichael
deleted the
bb/finish-the-sidebar-move-dedupe-app-and-thread-li-thr_a4rgc4dg9y
branch
October 9, 2026 20:41
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
When the sidebar row layer moved into the thread-list plugin (#4036), about seventeen components were copied instead of moved. The app and the plugin each kept a copy, and the copies drifted: different touch delays, a release-click fix only in the app, extra rename features only in the plugin, and a fourth confirm dialog in the tasks plugin. Separately, bb's core
sidebar.collapsed*UI preferences were left behind when the plugin migrated its own preferences. The app kept writing all six, onlysidebar.collapsedThreadsstill had a reader (mobile recents), and that made recents' collapse state sync across devices by accident.What changed
Three commits. Each component now has one home, placed by the rule now written down in
docs/forkable-plugins.md("What belongs in shared-ui"):packages/shared-uiand the plugin registry. These areuse-dialog-state,use-drag-click-suppression,use-reorder-dnd,use-sidebar-reorder-dnd,sortable-motion,compact-long-press-menu,action-menu-items,confirm-delete-dialog,rename-dialog,inline-rename,inline-rename-editor,sidebar-visibility-customize,sidebar-customize-panel,sidebar-row-classes,sidebar-hover-actions,context-selectionandthread-list-empty-state. Where the app and the plugin need different behaviour, the difference is a prop:MachineRenameDialoguses the sharedRenameDialogshell.ConfirmDialogis replaced byConfirmDeleteDialog, which gainsclassName,sizeandconfirmDisabledprops.experimental_ThreadStatusGlyph(indicator,archived,rowStatus,hideIdleDraftLabel,size), and the plugin deletes its copy. The plugin still resolves the indicator itself, which lets it fold in collapsed children and drafts.ThreadStatusGlyph.test.tsx.api_to_audit.mdentry and the Plugin Guide surface symbols.bb.mobileRecents.collapsedThreads.useMobileRecentsThreadRevealreplaces the app's sidebar reveal hook and keeps the one behaviour recents used: navigating to a thread, or a thread becoming unread, opens its collapsed ancestors. The sixsidebar.collapsed*keys leave the UI preference registry, the demo server anddocs/configuration.md. The server already ignores stored rows for unknown keys. The thread-list migration no longer reads them.No server/daemon wire changes. Net −1,769 non-test lines (+399 generated registry JSON).
User-visible differences:
MachineRenameDialognow returns focus to the opener after closing.How you verified
Ran with
pnpm exec turbo run typecheck lint teston the touched packages:All pass. The server UI preferences test file also passes (18 tests).
lazySecondaryPanelComponents.tsx:287), in a file this PR does not touch.pnpm check:plugin-forks plugins/thread-list plugins/taskspasses.check-plugin-sdk-version.mjspasses.🤖 Generated with Claude Code