feat(vscode): jump transcript to message on timeline bar click#12025
Conversation
| const onScrollToMessage = (e: Event) => { | ||
| const id = (e as CustomEvent<{ id: string }>).detail?.id | ||
| if (!id) return | ||
| const row = rows().find((r) => r.type === "assistant" && r.message.id === id) |
There was a problem hiding this comment.
WARNING: Jump target loses granularity for long assistant messages
TaskTimeline.collect() creates one TimelineBar per non-step-start part, all sharing the same msgId for a given message. transcriptRows() (default chunk size of 8, no size override is passed here) splits a message's parts into multiple rows once it has more than 8 visible parts, each row keeping the same message.id but a different key. Since rows().find(...) returns only the first matching row, clicking any bar for a part beyond the first chunk of a long message (e.g. a turn with many tool calls) always scrolls to the top of that message instead of near the bar's actual part. This isn't wrong per the PR's stated "jump to that message" intent, but the per-part bars visually imply finer-grained navigation than what's delivered for longer turns. Worth considering matching against the containing chunk (e.g. by part id) rather than only the first row for that message id.
Reply with @kilocode-bot fix it to have Kilo Code address this issue.
| "kilo-code": minor | ||
| --- | ||
|
|
||
| Click or press Enter on a bar in the task timeline to jump the transcript to that message. |
There was a problem hiding this comment.
SUGGESTION: Changeset text omits the Space key
onKeyDown in TaskTimeline.tsx triggers the jump on both Enter and Space (e.key === " "), but this user-facing changeset only mentions Enter.
| Click or press Enter on a bar in the task timeline to jump the transcript to that message. | |
| Click or press Enter/Space on a bar in the task timeline to jump the transcript to that message. |
Reply with @kilocode-bot fix it to have Kilo Code address this issue.
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Both previously flagged issues are resolved in the latest commit:
No new issues found in the incremental diff ( Files Reviewed (3 files)
Previous Review Summary (commit 433fa54)Current summary above is authoritative. Previous snapshots are kept for context only. Previous review (commit 433fa54)Status: 2 Issues Found | Recommendation: Address before merge Overview
Issue Details (click to expand)WARNING
SUGGESTION
Files Reviewed (3 files)
Reviewed by claude-sonnet-5-20260630 · Input: 24 · Output: 4.3K · Cached: 551.2K Review guidance: REVIEW.md from base branch |
|
@sylwester-liljegren thanks! Unsure about the mouse cursor on hover because it's also draggable. The old extension had some highlighting going on, that made it easy to follow which bar belongs to which tool. But it's a nice improvement already so I merged it. |
Context
The task timeline (the small bar-chart histogram shown under the chat header, next to the token/cost stats) previously only supported hover tooltips, drag-to-scroll, and keyboard arrow navigation. There was no way to jump the transcript to the message a given bar represents.
Implementation
TaskTimeline.tsx: eachTimelineBarnow retains the source message'smsgId(previously discarded incollect()). A click (pointer-up without a preceding drag) orEnter/Spaceon the focused bar callsjumpToMessage, which dispatches awindowCustomEvent("scrollToMessage", { detail: { id } })— mirroring the existingresumeAutoScrollcross-component event convention already used betweenTaskHeader/TaskTimelineandMessageList(they share no direct props or context signal for this).MessageList.tsx: listens forscrollToMessage, resolves the message to itsTranscriptRowkey, and scrolls to it — viavirtualizer()?.scrollToIndex()when the row is in the virtualized region, orelement.scrollIntoView()(found via the existingdata-row-keyattribute) when the row is in the non-virtualized "direct" tail.createAutoScroll's near-bottom threshold, which resumes auto-follow mid-animation and snaps the view back down before the jump completes. An instant scroll has no such transient frame, so it isn't cancelled.Screenshots / Video
How to Test
Manual/local verification
bun run typecheck,bun run lint, andbun run formatinpackages/kilo-vscode— all pass (agent-executed).Enter/Spaceafter arrow-key selecting a bar) also jumps to the message.Reviewer test steps
Blocked checks and substitute verification
Checklist