Repository navigation
Composer banner slot, with the PR segment and Info row in the GitHub PR Status plugin - #6023
Merged
Merged
Conversation
ymichael
force-pushed
the
bb/git-plugin-pr-1-plugin-fixed-tabs-in-the-thread-thr_i4jcnrjiv8
branch
from
October 22, 2026 23:53
b833f61 to
c74fea1
Compare
ymichael
force-pushed
the
bb/git-plugin-pr2-thread-slots-thr_i4jcnrjiv8
branch
from
October 23, 2026 01:29
9009c2a to
572e9b6
Compare
ymichael
marked this pull request as ready for review
October 23, 2026 02:04
Base automatically changed from
bb/git-plugin-pr-1-plugin-fixed-tabs-in-the-thread-thr_i4jcnrjiv8
to
main
October 23, 2026 02:44
ymichael
force-pushed
the
bb/git-plugin-pr2-thread-slots-thr_i4jcnrjiv8
branch
from
October 23, 2026 03:16
10afe65 to
cbc7f17
Compare
This was referenced Oct 23, 2026
ymichael
force-pushed
the
bb/git-plugin-pr2-thread-slots-thr_i4jcnrjiv8
branch
from
October 23, 2026 18:44
cbc7f17 to
6e038d5
Compare
Add app.slots.experimental_threadContextSegment. Core's parent thread, changed files and active child threads register through it, and the GitHub PR Status plugin now draws the pull request segment, its actions and the Info tab's Pull request row from its own app entry, so core has no pull request UI left. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The toast plugins import from sonner is now a facade over core's appToast, so plugin toasts render and record exactly like core's. The retired experimental_useSidebarThreadPullRequest member keeps main's refetch of cached rows on mount and stale rows on page show. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Core's retired sidebar member and the plugin each keep a copy of the refresh hook. Each copy announces the refetches it starts, and a stale page-show refetch rechecks staleness first, so the two copies no longer read the same row twice. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Segments now take a required group and sort like Info rows and thread actions. experimental_THREAD_CONTEXT_SEGMENT_GROUPS names only the groups core renders (thread, git); GitHub PR Status sorts between them with its own 2_pullRequest group. Core's segments appear as bb--core, the owner id thread actions already use. Co-Authored-By: Claude Opus 5.5 <[email protected]>
A segment registration now takes separate summary, action and details
components, as composer customizations take separate lists, and segments
are { key, pluginId } with the key shape thread actions use. The
before-card placement is gone: active child threads are a core row of
their own above the context row, with their own open state.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
#6143 hid cached PR status in core's PR hook when the GitHub PR Status plugin is disabled. That hook now lives in the plugin, which only renders while enabled, so the check moves to the retired sidebar shim, core's one remaining reader, with #6143's test. Co-Authored-By: Claude Opus 5.5 <[email protected]>
ymichael
force-pushed
the
bb/git-plugin-pr2-thread-slots-thr_i4jcnrjiv8
branch
from
October 23, 2026 19:00
6e038d5 to
3a3b872
Compare
alexandre-vl
added a commit
to alexandre-vl/bb
that referenced
this pull request
Oct 23, 2026
…t bar tidy onto thread context segments get-bb#6023 split ThreadPromptContextBanner into thread context segments and moved the pull request segment into the GitHub PR Status plugin. Both conflicts take main's structure; the merge base chip and the fitted changed-files toggle move into core's changed-files segment (ChangedFilesMergeBaseAction and ChangedFilesSummary), and the segment contract tests find the merge base by its accessible name now that its visible label is gone.
alexandre-vl
added a commit
to alexandre-vl/bb
that referenced
this pull request
Oct 23, 2026
Upstream get-bb#6023 moved active child threads out of the context banner into ThreadChildThreadsBanner, a core row above the thread context segments, and the pull request segment and its tests into the GitHub PR Status plugin. ThreadChildThreadsBanner still renders ActiveChildThreadsCard, so the rows and the count chip carry over as they are: the import takes main's version without AnimatedBody, and the banner tests keep main's Banner harness with this branch's expectations.
This was referenced Oct 23, 2026
Closed
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
Git and GitHub pull request status were still core UI. The composer's context banner hard-wired its parent-thread, changed-files and pull request rows. The Info tab drew the Pull request row from core, using PR data owned by the bundled GitHub PR Status plugin (#6125). There was no slot through which core and plugins could add context beside a thread's composer.
What changed
app.slots.experimental_threadContextSegment(SDK 0.6.75): segments share the context row above an existing thread's composer.summary,action?anddetails?components, like composer customizations take separate lists. The host mounts each in its own crash boundary:summaryin the row,actionat the row's end,detailsbelow the row.groupthenorderplace segments, as for Info rows and thread actions.experimental_THREAD_CONTEXT_SEGMENT_GROUPSnames only core's groups,thread(1_thread) andgit(3_git); the PR plugin uses its own2_pullRequest.threadId,projectId,environment, the visiblesegmentsas{ key, pluginId }(keyis<pluginId>/<id>with core asbb--core, the shape thread action keys use), and a shared one-open-at-a-time disclosure.useVisibleruns in plugin scope per thread.ComposerBox, so it shows under every composer plugin.Core uses the same path. The parent thread (including read-only history) and changed files (with the merge-base action) register through
definePluginAppand the collector, and render through the same host as plugins. Core segments render without a plugin crash boundary, as core Info rows do, so their DOM is unchanged.Active child threads are their own core row (
ThreadChildThreadsBanner) above the context row, like the todo and workflow cards, with their own open state. They are not a segment, so the slot has no card placement that would overlap composerbanners.GitHub PR Status plugin gets an app entry (
plugins/github-pr-status/app.tsx,ui/):experimental_threadInfoRow;Core has no pull request UI or PR imports left. The one exception is the retired
experimental_useSidebarThreadPullRequestruntime member for old marketplace plugins.environmenton slot props. It is{ id } | nullon the new slot and onExperimentalThreadInfoProps.No extra PR reads after the move.
WebSocketManagersends its final unsubscribe a microtask later and cancels it when the same target resubscribes in that task. Without this, a thread switch on the same environment dropped the plugin read subscription and restarted the server's watch, which can rungh.BannerActionSlotand the banner action buttons moved to@bb/shared-ui/prompt-banner-actions, so the plugin draws the same controls.One toast path for core and plugins. The
toastplugins import fromsonneris now a facade over core'sappToast(apps/app/src/lib/notifications/plugin-toast.ts), replacing the recording wrapper.toast(),message,info,success,warning,error,loading,dismissandpromiserender and record exactly like core's toasts.custom,getHistoryandgetToastspass through.actionorcancelis a plain React node (sonner allows it; no bundled plugin uses it) falls back to sonner.The retired
experimental_useSidebarThreadPullRequestmember keeps main's refresh. It uses main's hook, kept in core asuseRetiredSidebarEnvironmentPullRequestwith main's tests: a cached row refetches on mount, and a stale row on page show.windowevent (PULL_REQUESTS_REFETCH_EVENTin the plugin contract) and mark those rows loaded.Docs:
docs/api_to_audit.mdentry; the Info entry and the live-reads and retired-member text updated;frontend-registration.mdandfrontend-api-index.md;No database, daemon wire or CLI changes.
Rebased onto #6143. Its "hide cached PR status when the plugin is disabled" check in core's PR hook moved with that hook's last core caller, the retired sidebar shim (
retired-sidebar-pull-request.ts), with #6143's test; the plugin's own hook only renders while the plugin is enabled. The keyed read stays one PR per environment, so the segment and Info row need no change.Deviations from main
gh pr merge --match-head-commit. That needsheadRefOidon the PR, which Share and persist GitHub PR refreshes #6143 adds, so it lands on top of Share and persist GitHub PR refreshes #6143.Known follow-ups:
environmentfolds in the "Show Git changes and Commit button" setting. That setting should become the git plugin's own when changed files move out of core, and thegitsegment group moves with it.experimental_THREAD_INFO_ROW_GROUPS.pullRequest(from Add Info tab row and section slots that core uses #6117) still names a plugin's group in core. Removing it is a public SDK removal, so it is left for a separate change.How you verified
Checklist results
bb.pullRequest.mergeMethod; Squash merge remembered.Each item was driven in two source dev instances side by side, one on this branch and one on
origin/main2884950, with identical fixtures and disposable PRs inymichael/test-project.Text was identical at 1400 and 390 px for PR + changed files, PR alone, parent + PR + changed files, and parent + PR.
Screenshots were pixel-identical apart from the caret and the scheduled-time text.
The same held for archived history, Show Git changes off, the plugin disabled, the child-thread card with a waiting question, the pending-question stack, and the parent disclosure with its focus handoff.
Toasts: the PR plugin's Mark ready toasts match main's pixel for pixel; the loading toast differs only in the spinner frame. The Drafts plugin's "Draft saved" and the probe's
success,error,infoandpromisetoasts render as core toasts, with the close button, the outlined icon and an entry in the notification center.Actions on disposable PRs: Convert to draft, Mark ready and Squash merge went through with the same toasts and the segment refreshed. The merge method was remembered. A CLI
bb pull-request draftupdated the segment live in the production build (pnpm start:worktree).Requests, from browser CDP counts of
bb--github-pr-statusHTTP reads and WebSocket frames. The scripted session: load a thread with a PR and wait 40 s, open Info, switch to a thread on the same environment and back, switch to another environment and back, then fire a page show after 35 s.Before the WebSocket fix the branch sent 16 frames, because of resubscribes on same-environment switches.
With a probe plugin that renders
experimental_useSidebarThreadPullRequestin the thread header (an old marketplace sidebar's call), the same session gave:Before the shared announcement, the branch's page show read twice.
Tests:
ThreadPromptContextBanner.segments.test.tsx): group and order placement, a plugin's own group,segmentskeys, visibility, one-open disclosure, per-component anduseVisiblecrash isolation, read-only, and the row held while git loads;ThreadChildThreadsBanner;toasttest through the real toaster (error and promise), which fails on the old shim;pnpm exec turbo run test typecheck lint --filter='...[origin/main]' --continue: 239/244 passed on the first run.environment), the server's slot-prop docs table, and the 500-line cap onfrontend-registration.md.CommandPalette,PluginSettings,builtin-pluginshot-reload and the MCP CLI timeout (the first run had heavy parallel load).bb-plugin-plugin-api-docs,bb-plugin-automations,@bb/server.bb plugin buildpasses forplugins/plugin-api-docsandplugins/github-pr-status. The Plugin Guide's Banners card and fixture were checked in the app at desktop and phone layouts.After the groups and component split:
pnpm exec turbo run test typecheck lint --filter='...[origin/main]' --continuegave 242/244. A test-harness mock of the banner and the old auto-open test were updated and@bb/appreran green;bb-plugin-bb--storage-retention(untouched) passed when rerun alone.In the production build (
pnpm start:worktree) on a checkout of this branch: parent, PR and changed files in that order with Merge at the end; the child-threads row above the context row, open together with changed files; only the child row beside a waiting question.CI: see the checks on this PR.
🤖 Generated with Claude Code