The best way to control Claude Code, Codex and more from any computer or phone
fix(web): the minimap keeps the current turn lit while reading a long reply (#30084)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: Julius Marminge <julius0216@outlook.com>
Andrei committed
Nov 15, 2026 at 13:19 UTC
843893e58c3f8fcc1ecce970411e439d1fa69002
3 files changed
+24
-6
apps/web/src/components/chat/MessagesTimeline.logic.test.ts
+12
@@ -32,6 +32,7 @@ import {
32
timelineTurnFoldRunIdsByEntryId,
33
liveAnswerPreview,
34
deriveMessagesTimelineRowsWithState,
35
+ isTimelineMinimapTurnVisible,
36
resolveAssistantMessageCopyState,
37
type MessagesTimelineRow,
38
workEntryDisplayLabel,
@@ -5146,3 +5147,14 @@ describe("subagent continued by a later turn", () => {
5147
]);
5148
});
5149
});
5150
+
5151
+describe("isTimelineMinimapTurnVisible", () => {
5152
+ it("keeps a turn lit while only its reply is on screen", () => {
5153
+ // Turn rows 10..499, viewport inside the reply.
5154
+ expect(isTimelineMinimapTurnVisible(10, 500, 200, 210)).toBe(true);
5155
+ expect(isTimelineMinimapTurnVisible(500, undefined, 600, 610)).toBe(true);
5156
+ expect(isTimelineMinimapTurnVisible(500, undefined, 200, 210)).toBe(false);
5157
+ expect(isTimelineMinimapTurnVisible(10, 500, 500, 510)).toBe(false);
5158
+ expect(isTimelineMinimapTurnVisible(10, 500, null, null)).toBe(false);
5159
+ });
5160
+});
apps/web/src/components/chat/MessagesTimeline.logic.ts
+8
-3
@@ -401,13 +401,18 @@ export function resolveTimelineMinimapVisibleRange(state: {
401
return { start, end };
402
}
403
404
-export function isTimelineMinimapRowVisible(
405
- rowIndex: number,
404
+/** A turn spans its user message up to the next one, so a long reply keeps its strip lit. */
405
+export function isTimelineMinimapTurnVisible(
406
+ turnStartRowIndex: number,
407
+ nextTurnStartRowIndex: number | undefined,
408
visibleStart: number | null | undefined,
409
visibleEnd: number | null | undefined,
410
): boolean {
411
return (
410
- visibleStart != null && visibleEnd != null && rowIndex >= visibleStart && rowIndex <= visibleEnd
412
+ visibleStart != null &&
413
+ visibleEnd != null &&
414
+ turnStartRowIndex <= visibleEnd &&
415
+ (nextTurnStartRowIndex === undefined || nextTurnStartRowIndex > visibleStart)
416
);
417
}
418
apps/web/src/components/chat/MessagesTimeline.tsx
+4
-3
@@ -81,7 +81,7 @@ import {
81
resolveTimelineIsAtEnd,
82
resolveTimelineMinimapHasPersistentGutter,
83
resolveTimelineMinimapCurrentIndex,
84
- isTimelineMinimapRowVisible,
84
+ isTimelineMinimapTurnVisible,
85
resolveTimelineMinimapVisibleRange,
86
resolveTimelineMinimapHitStripWidth,
87
TIMELINE_MINIMAP_TARGET_OFFSET,
@@ -934,10 +934,11 @@ const ConversationTimeline = memo(function ConversationTimeline({
934
firstBufferedRow.getBoundingClientRect().top
935
: state.scroll;
936
const visibleRange = resolveTimelineMinimapVisibleRange({ ...state, scroll });
937
- for (const item of minimapItems) {
937
+ for (const [index, item] of minimapItems.entries()) {
938
const strip = minimapStripMap.get(item.id);
939
- const inView = isTimelineMinimapRowVisible(
939
+ const inView = isTimelineMinimapTurnVisible(
940
item.rowIndex,
941
+ minimapItems[index + 1]?.rowIndex,
942
visibleRange.start,
943
visibleRange.end,
944
);