fix(chat): anchor the commit divider to the boundary, not to the end of the pane - #227
Merged
Merged
Conversation
…of the pane The trailing commit divider rendered after everything in the timeline, so it was not marking a position -- it was tracking the bottom. Every message, thinking step or queued run that arrived pushed it further down, and a boundary that moves is worse than no boundary: it reads as if the commit itself keeps happening later. The boundary belongs immediately after the last run that reviewed the previous commit. Everything that arrives afterwards belongs below it, which is also what the divider means. So it now anchors before whatever first followed that run, and only falls back to the end in the one case where nothing follows it yet -- where the two positions coincide anyway. Placement moves into computeCommitDividers, a pure function: it is the part with the actual reasoning, and it was previously inlined in a component with no way to exercise it. Co-Authored-By: Claude Opus 5 (1M context) <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.
The bug
The trailing commit divider rendered after everything in the timeline, so it was not marking a position — it was tracking the bottom. Every message, thinking step or queued run that arrived pushed it further down.
A boundary that moves is worse than no boundary: it reads as if the commit itself keeps happening later, and content that arrived after the new commit appears above the line that is supposed to mark it.
The fix
The boundary belongs immediately after the last run that reviewed the previous commit. Everything that arrives afterwards belongs below it — which is exactly what the divider is claiming. So it now anchors before whatever first followed that run, and falls back to the end only in the one case where nothing follows it yet, where the two positions coincide anyway.
The between-runs dividers were already correct (they anchor to a run) and are unchanged; the two kinds coexist without interfering.
Placement moved into
computeCommitDividers, a pure function. It holds the only real reasoning in that block and was previously inlined in a component with no way to exercise it.Verification
lint/typecheck/test/buildpass. Placement was exercised against the pure function across the cases that matter — including the reported one:headShafieldNot verified visually in the running app; the check was at the placement level.
🤖 Generated with Claude Code