Let each provider choose whether finished turns collapse - #3729
Merged
SawyerHood merged 1 commit intoSep 15, 2026
Merged
SawyerHood merged 1 commit into
SawyerHood merged 1 commit into
Conversation
A finished turn always folded its work into one "Worked for" row. Providers now declare a default with `completedTurnDisplay: "collapse" | "flat"` on `bb.providers.register`, and the user can override it per provider through the new `providerCompletedTurnDisplay` general setting (Settings → Providers, `bb settings completed-turns`). Claude Code defaults to flat. The server resolves the effective display once per request and passes it to the timeline, turn-summary details, and conversation outline builds; it is part of the timeline cache key, the cursor surface, and the outline projection key, so a setting change rebuilds rows at the same sequence. A flat build keeps full turn detail so summary-mode pages still carry every finished-turn row. Timeline responses report `completedTurnDisplay`, and the thread timeline controller folds it into the loaded surface key through `resolveLoadedTimelineSurfaceKey`. Since #3686 a refresh keeps older loaded pages; without this, switching the display left older pages in the previous display until reload. Plugin SDK 0.4.95. Co-Authored-By: Claude Code <noreply@anthropic.com>
SawyerHood
deleted the
bb/right-now-we-have-a-behavior-where-basically-if-thr_ijt7ix8c5k
branch
September 15, 2026 17:56
albrand
added a commit
to albrand/bb
that referenced
this pull request
Sep 17, 2026
An earlier whole-file fork resolution dropped upstream get-bb#3729's validation from the plugin SDK host policy while its tests stayed, so a declaration got no default and an invalid value was accepted. The validator, its constant, the normalized field and the call site are restored verbatim from upstream; every other host-policy rule the fork carries is untouched.
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 a turn finished, the thread timeline always folded its work into one "Worked for" row and left only the final answer visible.
groupCompletedTurnMessagesin@bb/thread-viewran for every completed turn, and there was no provider declaration field or user setting to turn it off. For agents that narrate their work as they go, such as Claude Code, the narration and tool rows disappeared from view as soon as the turn ended. #3144 reports this for Claude Code turns shapedtext, tool, text, ...: prose the user was reading while the turn ran collapses into the summary row at completion.What changed
bb.providers.registeracceptscompletedTurnDisplay: "collapse" | "flat", defaulting to"collapse". Host policy validates it and it is projected ontoProviderInfo.completedTurnDisplay. Claude Code declares"flat". The field has noexperimental_prefix, so an older server ignores it instead of refusing to load the plugin. Plugin SDK 0.4.95.providerCompletedTurnDisplay, a map of provider id tocollapseorflat. A provider without an entry uses its default.bb settings completed-turns [provider-id] [collapse|flat|default]lists each provider's display and where it comes from, or sets one;defaultremoves the entry.collapse) and pass it to the@bb/thread-viewbuilders. It is part of the timeline response cache key, the cursor surface, and the outline projection key, so a setting change rebuilds at the same sequence. A cursor minted under one display returns 400 under the other. A flat build keeps full turn detail, so summary pages still carry every finished-turn row.completedTurnDisplay.resolveLoadedTimelineSurfaceKey(@bb/client-core) folds it into the thread timeline controller's surface key. Since Keep older timeline pages loaded while a thread streams #3686 a refresh keeps older loaded pages, and without this a display change left those pages in the previous display until reload.docs/configuration.md,docs/provider-plugin-api.md,docs/timeline-pagination.md, the bb-cli skill references, the customization guide template, and the plugin-authoring references.HOST_DAEMON_PROTOCOL_VERSIONis unchanged.How you verified
packages/thread-view/test/completed-turn-summary-rendering.test.ts: a flat finished turn keeps the rows it had while running, including a turn whose work summary detail would otherwise drop; a turn-details request in flat mode returns the ungrouped rows. Removing the flat branch or the full-detail override makes these fail.apps/server/test/public/public-thread-timeline-completed-turn-display.test.ts: Claude Code threads render flat by default and Codex threads collapse; a setting change applies to the timeline, turn details, and outline at the samemaxSeq; with several loaded pages, switching the display replaces the loaded pages and reloading older pages matches the canonical timeline. Removing the display from the cache key, the outline key, or the surface key makes these fail.apps/app/src/components/thread/timeline/useThreadTimelineController.test.tsx: loaded older rows are replaced when the display changes.bb settings completed-turns, and the Providers switches.pnpm exec turbo run typecheckacross the repo.pnpm exec turbo run testfor@bb/domain,@get-bb/plugin-sdk,@bb/thread-view,@bb/server,@bb/cli,@bb/app,@bb/client-core,@bb/db,@bb/sdk,@bb/server-contract,@bb/provider-parity,@bb/templates,@bb/demo-server,@bb/plugin-api-map,@bb/provider-bridge-protocol, andbb-plugin-provider-claude-code. Everything passed except two@bb/servertimeouts under parallel load (public-thread-data,timeline-in-turn-window), which pass when run alone. On this machine the@bb/serverrun also logsENOSPCwatcher errors frombuiltin-plugins.test.ts, which happen on clean main too because the machine's inotify watch budget is exhausted.node .github/workflows/check-plugin-sdk-version.mjsandnode packages/plugin-sdk/scripts/check-npm-version-guard.mjspass.timelinePage.historySnapshotandolderCursor, whose cursor surface now includes the display.bb settings completed-turnsset and cleared the same setting.Fixes #3144
Fixes #3283
Related: #1656 reported the same disappear-on-completion effect for replies to mid-turn messages.
🤖 Generated with Claude Code