Repository navigation
Preserve agent messages around timeline steers - #897
Merged
Merged
Conversation
SawyerHood
force-pushed
the
agent/preserve-agent-messages-around-steers
branch
from
July 30, 2026 00:44
1f38991 to
b8ef167
Compare
SawyerHood
marked this pull request as ready for review
July 30, 2026 00:44
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.
What changed
Why
Completed-turn grouping only preserved the globally final assistant message for a provider turn. When a human steer split a long provider turn into multiple visible exchanges, the preceding segment's last agent message remained inside the collapsed work summary and disappeared from the conversation flow.
This restores the intended visible order:
History tracing shows this behavior was introduced by
a0c5475ab(June 23, "Split completed turn summaries at user boundaries"), not by the July timeline pagination optimizations.Cross-version DOM audit
Three isolated builds were run against identical thread-only databases:
ec8b31a1e, the parent of PR Bound timeline windows by event count #882afe167761, containing PRs Bound timeline windows by event count #882, Bound thread timeline cost within long-running turns #891, and Fix paginated timeline scroll and streaming stability #8941f389914dThe corpus contains 19 selected threads and 45,418 events, spanning 10 to 10,207 events and including Codex/Claude threads, parent/child threads, giant completed turns, and multi-page histories. The databases contain no hosts, environments, project sources, daemon sessions, app settings, or Connect configuration.
After loading every older page, canonicalized top-level timeline row DOM was exact for all 19/19 threads between the pre-optimization and post-optimization builds. Canonicalization removed only transient inline transition measurements and generated Radix IDs; row order, IDs, structure, classes, attributes, and rendered text remained strict.
This PR changed 11/19 sampled threads by restoring 102 assistant rows at human boundaries. No conversation row was removed. Two now-empty collapsed summary rows disappeared because their only content became the visible assistant row; the remaining in-place text changes were collapsed-duration labels recalculated without the extracted terminal message.
Validation
@bb/thread-viewtest suite: 345 tests passedpnpm exec turbo run typecheck --filter=@bb/thread-viewgit diff --check