Repository navigation
Add an experiment that puts the NEW divider before a finished turn's final assistant message - #6327
Merged
Conversation
…final assistant message With finished turns flat, NEW sat above the first tool call of the turn that ran while the reader was away, so opening the thread replayed the whole turn before the answer. The unreadDividerAtAnswer experiment moves NEW to the settled turn's final assistant message, or the error that ended it. Off, placement is unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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 finished turns are flat (Claude Code's default), the unread NEW divider went above the first row after the read point. For a turn that ran while the reader was away, that row is the turn's first tool call. Opening the thread landed on "Listed files in ." and the reader had to scroll through every tool call and note to reach the answer. With collapsed turns the same rule put NEW above the "Worked for …" row. That's harmless there, but it isn't where reading resumes either.
What changed
New experiment
unreadDividerAtAnswer(Settings → Experiments → NEW divider before final assistant message, orbb settings experiment unreadDividerAtAnswer true). It is off by default and stays off for early adopters.ThreadTimelineUnreadDividerPlacementgainsanchor: "first-unread-row" | "turn-answer".useThreadDetailThreadsets it from the experiment, anduseThreadUnreadDividerStatekeeps it in the opening snapshot, so the landing logic from Timeline: one attach rule, and one landing decision for unread threads #6253 is unchanged.turn-answer,findUnreadDividerIndexstarts from the same first unread row and moves forward to the first row where reading resumes:scopeActive) keeps the old placement, so NEW never jumps onto a streaming reply. If nothing qualifies, it falls back to the first unread row. NEW still never sits on the reader's own message.first-unread-row(experiment off), placement is unchanged.docs/configuration.md(Experiments) andbb guide customization.HOST_DAEMON_PROTOCOL_VERSIONbump. The experiment key is added to@bb/domain, so the existing experiments route and CLI accept it.How you verified
ThreadTimelineRows.unread-divider.test.ts(turn-answer anchor):main's existing cases still run against thefirst-unread-rowanchor.pnpm exec turbo run typecheck lint --filter='...[origin/main]': 146/146 tasks.turbo run test --filter=@bb/app: 6,332 tests.--filter=@bb/domain: 259.apps/servertest/system: 237, including the experiment defaults, PUT and early-adopter tests.pnpm start:worktree:bbCLI.origin/mainapp build served on the same server and data, with the same read point. Each thread was opened from the sidebar at 1280×800, and the row after NEW was read from the DOM.origin/mainorigin/mainbb thread unread) and a read thread both open with no NEW, as onmain;maybeand a misspelled key.maindoes the same, and the branch only moves that divider to the reply.🤖 Generated with Claude Code