Repository navigation
Give plugin thread lists the per-row client state bb's rows read - #4025
Merged
SawyerHood merged 2 commits intoSep 22, 2026
Merged
Conversation
SawyerHood
force-pushed
the
thread-list/1d-row-hooks
branch
from
September 21, 2026 23:37
0e3d192 to
8176509
Compare
SawyerHood
force-pushed
the
thread-list/1d-row-hooks
branch
from
September 21, 2026 23:57
8176509 to
ae115b7
Compare
Composer drafts, another plugin's row status, and the jump shortcut pill are client-local, so they cannot ride on the thread array. Expose them as four per-row hooks backed by the same stores the built-in row uses, with fakes in the testing harness. Co-Authored-By: Claude Fable 5.1 <[email protected]>
Co-Authored-By: Claude Fable 5.1 <[email protected]>
SawyerHood
force-pushed
the
thread-list/1d-row-hooks
branch
from
September 22, 2026 00:08
ae115b7 to
ae772c7
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
… for plugin lists (#4026) ## Human comments ## What was wrong Thread titles contain `@project:`, `@section:`, and `@thread:` mentions that bb's row renders as chips and resolves to names for sorting and accessible labels. A plugin got the raw string. The DTO also told plugins to resolve `environment.providerId` against the environment provider catalog but gave them no way to reach it. ## What changed - `PluginSidebarThread.displayTitle`: title, else fallback, else short id, with mentions resolved through `resolveThreadTitleDisplayText`. The mapper cache now keys on the mention resources as well as the host names. - `ThreadTitle` component (`apps/app/src/components/plugin/PluginThreadTitle.tsx`) renders `ThreadTitleMentions` for a thread id. - `useEnvironmentProviders()` → `{ status, providers }` narrowed to id, display name, description, icon, logo, plugin, and machine provider. - Harness fakes, guide, API index, and surfaces updated. Prerequisite: #4025. ## How you verified Mapper tests for the three display-title rules and a mention-bearing title; a component test that renders the chip and hides the raw mention; a hook test for the loading and ready shapes. Full typecheck and test filters as in the lower PRs. 🤖 Generated with [Claude Code](https://claude.com/claude-code) > AGENT GENERATED --------- Co-authored-by: Claude Fable 5.1 <[email protected]>
This was referenced Nov 6, 2026
ymichael
added a commit
that referenced
this pull request
Nov 6, 2026
…audit (#7207) ## Human comments ## What was wrong The 2026-11-06 marketplace audit (§3.3) found three drifts. I checked each against the code and the 423 cloned marketplace repos: - `experimental_ImageLightbox` is a public `@get-bb/plugin-sdk/app` export, shipped in #6122. Neither doc named it. The composer entry mentioned "the image lightbox" only in passing, and `surfaces.ts` did not list it. - `experimental_useSidebarThreads` was described as having no consumers. It appears in the sources of 79 repos (bb-office among them), and 29 of those replace the thread list. - `experimental_newThreadPanelAction` was "deferred until an external plugin adopts it". 16 repos register it, taskboard among them. The entry also still compared the slot to the retired `threadPanelAction`. A sweep of every public entry point's bundled types turned up more of the same: - Six more stale consumer claims: `NewThreadComposer`, `useCodeTheme`, `usePluginId`, `useQuestionFormHost`, `VoiceInputTextarea`, and host signals/watches. Worktree and Project checkout use host signals in-repo. - A gap that was already fixed but still listed as open: the sidebar draft indicator, closed by `useSidebarThreadDraft` in #4025. - About 35 prefixed SDK members not named in `api_to_audit.md`, and about 60 prefixed value exports missing from `surfaces.ts`. ## What changed `docs/api_to_audit.md` - New `experimental_ImageLightbox` entry: behavior, core callers, outside callers and stabilization items. - The composer entry now names each of its host components. - Updated consumer counts in the nine entries above. The `newThreadPanelAction` entry now says item 5 can proceed and compares the slot against `experimental_tab`. The `useSidebarThreads` entry marks item 5 as decided. - Named the remaining prefixed members: - the provider-bridge testing kit - the native-roots Zod schemas - `ExperimentalHostRpcContext.experimental_paths` / `emitSignal` / `watch` - test-harness members: RPC invalidation, `renderSlot`'s `experimental_rpcContract` and `experimental_fixedTabTarget`, and the internal tunnel fakes `plugins/plugin-api-docs/src/surfaces.ts` - `apiSymbols` additions: - the composer and host-component exports, including the lightbox - the provider-bridge toolkit, presentation builders and testing kit - `experimental_makePanelController` and the unprefixed testing fixtures - `PLUGIN_CLI_OUTPUT_MAX_BYTES` - `PluginAppSlots.experimental_newThreadPanelAction` Left out on purpose: - The ~150 unprefixed provider-bridge wire schemas. The provider-bridge authoring entry covers that subpath. - `definePluginApp`, the entry point every surface uses. No SDK source, wire or CLI changes. ## How you verified - Rebuilt the bundled types (`turbo run build:types --filter=@get-bb/plugin-sdk`) and walked every non-internal entry point's exports with the TypeScript checker. Every `experimental_`/`internal_DO_NOT_USE_` identifier in the public declarations now appears in `api_to_audit.md`. Every prefixed value export, and every root/app/testing value export except `definePluginApp`, now appears in `surfaces.ts`. - Consumer counts come from `grep -rlw` over the audit's marketplace clones. The search excluded `node_modules`, `dist`, vendored tooling, `.d.ts`, tests and Markdown. I spot-checked the hits for real call sites, and analyzer string tables don't count as registrations. - `turbo run test typecheck --filter=bb-plugin-plugin-api-docs` passed (75 tests). The SDK's `provider-bridge-scheduled-removals` test, which reads `api_to_audit.md`, passed. `oxfmt --check` is clean on both files. > AGENT GENERATED 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 5.5 <[email protected]>
ymichael
added a commit
that referenced
this pull request
Nov 6, 2026
…idebar row hooks (#7208) ## Human comments ## What was wrong Two doc comments in the plugin SDK testing harness sat one field too early. In `RenderedSlotBehaviorDrivers`, the comment for `emitRealtime` ("Push a realtime event…") was on `experimental_invalidateRpc`. In `FakePluginInspectionState`, the comment for `realtimeSignals` ("Every `bb.realtime.publish`…") was on `experimental_onRpcInvalidation`. Plugin authors saw the wrong description for four harness members. Separately, `useSidebarThreadDraft`, `useSidebarThreadDraftIds`, `useSidebarThreadRowStatus`, `useSidebarThreadRowStatuses` and `useSidebarThreadShortcut` shipped as public `@get-bb/plugin-sdk/app` exports without the `experimental_` prefix (#4025), and `docs/api_to_audit.md` had no entry for them. About ten marketplace plugins use them, and Michael decided to keep the names. ## What changed - `packages/plugin-sdk/src/testing/app.tsx`: the realtime comment now sits on `emitRealtime`. `experimental_invalidateRpc` has its own comment: it invalidates the plugin's `useRpc` reads tagged with any of `tags` (`null` invalidates all of them) inside act, with `pluginId` defaulting to the rendered plugin. - `packages/plugin-sdk/src/testing/fake-plugin-host.ts`: the realtime comment now sits on `realtimeSignals`. `experimental_onRpcInvalidation` and `experimental_rpcInvalidations` have comments of their own: the first calls a listener on every invalidate or invalidateAll call, and the second records the tags of each invalidation, with `null` for invalidateAll. - `docs/api_to_audit.md`: a new entry for the five hooks, placed after the `experimental_useSidebarThreads` entry. It records that they skipped the prefix and must not be renamed without runtime aliases, and it describes each hook's behavior. It names the core callers: the bundled Thread list plugin's `ThreadRow` and group rollups, and the core primitives that `plugin-sidebar-hooks.ts` wraps. It lists five audit items to settle before the hooks count as stable. - Plugin SDK version bumped from 0.6.132 to 0.6.133 with `scripts/bump-plugin-sdk.mjs --patch`. The testing declarations are published, so the comment changes ship to npm. There are no wire, CLI or runtime behavior changes. ## How you verified - `pnpm exec turbo run typecheck --filter=@get-bb/plugin-sdk` passes. - `node .github/workflows/check-plugin-sdk-version.mjs` passes. It reports the guarded surface as unchanged, because the testing files are not in its list. The bump is still needed for the npm publish guard. - I checked each new comment and each audit-entry claim against the implementation: `invalidateTags`/`pluginTagScope` in `testing/app.tsx`, the `rpc.experimental_invalidate*` fakes, `apps/app/src/lib/plugin-sidebar-hooks.ts`, `plugins/thread-list/app/rows/ThreadRow.tsx` and `plugins/thread-list/app/list/*`. CI runs the remaining suites. 🤖 Generated with [Claude Code](https://claude.com/claude-code) > AGENT GENERATED Co-authored-by: Claude Opus 5.5 <[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
Three things bb's row paints are client-local and cannot ride on the thread array: whether the composer holds an unsent draft (pencil and working-draft glyphs), the row status another plugin's app-wide script set through
experimental_setThreadRowStatus, and the jump-shortcut pill shown while the app command modifier is held. A plugin list had no way to read any of them, so a status set by the drafts or workflows plugin would vanish when the list changed hands.What changed
Four hooks on
@get-bb/plugin-sdk/app, backed by the same stores the built-in row uses:useSidebarThreadDraft(threadId)→{ hasUnsubmittedDraft }overusePromptDraftHasInputuseSidebarThreadDraftIds()→ReadonlySet<string>overusePromptDraftInputThreadIds, for collapsed-group rollupsuseSidebarThreadRowStatus(threadId)overusePluginThreadRowStatususeSidebarThreadShortcut(threadId)→{ label, ariaKeyshortcuts } | nullover the sidebar shortcut contextTesting harness gains
sidebarDraftThreadIds,sidebarRowStatuses, andsidebarShortcutsoptions. Guide, API index, and surfaces updated. These ship without theexperimental_prefix by owner decision recorded in the plan.Prerequisite: #4024.
How you verified
Hook tests with a faked draft store, the real row-status store, and the real shortcut context provider. Typecheck and tests on the SDK, app, API map, and the guide parity suite.
🤖 Generated with Claude Code