fix(chat): show a pending steer sent after a message - #553
Merged
Merged
Conversation
Since the timeline is virtualized by segment (#547), a row read its turn's entries from its first row's start to its last row's end. A pending steer belongs to no segment, so one that followed a message fell outside that span and the trailer never drew it: the steer vanished until the next tool run, whose range reaches the turn's end, covered it again. The turn's span now comes from the timeline itself.
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.
Behaviour
A steer sent while the turn's last segment is a message (the user's prompt or an assistant reply) disappeared while pending and only showed up once the next tool run arrived. Regression from #547.
Cause
Since #547 the render path rebuilt a turn's entry span from its segment rows (first row's start to last row's end). A pending steer is not part of any segment and renders in the turn's trailer, so one after a message fell outside that span. An activity run's range already extends to the turn's end, which is why a steer after a tool run was unaffected and why the missing steer reappeared with the next activity.
The render path now takes the turn's span from the timeline (entries are sorted by turn). Row ranges are rebased with
saturating_sub;render_rowstill bounds-checks them for a row snapshot trailing the live timeline.Test
pending_steer_after_the_last_segment_renders_in_the_trailerrenders a running turn of user message → assistant message → pending steer and asserts the steering chip paints. It fails without the fix. The chip gains adebug_selectorfor it, as the other chat view tests locate elements.Checks run
cargo fmt --all --checkcargo clippy --workspace --all-targets --locked -- -D warningscargo nextest run -p tcode-ui --locked(320 passed)Full workspace tests and the mobile/Web checks are left to CI. Not exercised by hand in the running app.