Skip to content

fix(chat): show a pending steer sent after a message - #553

Merged
Tryanks merged 1 commit into
mainfrom
fix/pending-steer-trailer
Sep 29, 2026
Merged

Tryanks merged 1 commit into
mainfrom
fix/pending-steer-trailer

Conversation

@Tryanks

@Tryanks Tryanks commented Sep 29, 2026

Copy link
Copy Markdown
Owner

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_row still bounds-checks them for a row snapshot trailing the live timeline.

Test

pending_steer_after_the_last_segment_renders_in_the_trailer renders a running turn of user message → assistant message → pending steer and asserts the steering chip paints. It fails without the fix. The chip gains a debug_selector for it, as the other chat view tests locate elements.

Checks run

  • cargo fmt --all --check
  • cargo clippy --workspace --all-targets --locked -- -D warnings
  • cargo 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.

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.
@Tryanks
Tryanks merged commit 605d749 into main Sep 29, 2026
7 checks passed
@Tryanks
Tryanks deleted the fix/pending-steer-trailer branch September 29, 2026 08:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant