feat(agents): fit session turn timeline to the transcript width - #355
Merged
Merged
Conversation
The turn strip above the session transcript now always fits the panel: new turns re-divide the same width instead of extending it, segment widths stay proportional to turn duration (with a small floor so short turns stay visible), and there is no horizontal scrolling. Segments show "duration · N tool calls" when there is room, fall back to the duration alone, then to no text. The tooltip always shows the turn number, duration and tool call count (including 0), plus "Failed" for failed turns. Click-to-jump and failed-turn colors are kept; zoom now changes strip height and label size. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.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.
Summary
The blue turn timeline above the Agent Session transcript used to get wider with every new agent response. It now always fits the transcript panel's width.
45.7s · 2 tool callswhen it has room. A narrower one shows only the duration, and one too narrow for that shows no text. The label is chosen by measuring the text in the page font, so text is never cut off mid-word.0 tool calls, and addsFailedfor failed turns.Changes
TurnTimeline.tsx(new): the timeline component, split out ofAgentSessionView.tsx.turnTimelineLayout.ts(new): pure helpers for segment widths, label choice and tooltip text.AgentSessionView.tsx/.module.css: use the new component and replace the old scrolling timeline styles.agent-session-turn-timeline.test.ts(new): unit tests.Testing
vitest: 11 tests cover proportional widths, staying within the width as up to 500 turns are added one by one, more turns than pixels, turns with no duration, and the label and tooltip rules.eslintandtsc --noEmitpass.Notes
In very long sessions the gaps between segments disappear, so the timeline reads as one solid band. Each segment still has its own hover details.