Skip to content
Source
Sign inSign up
pingdotgg/t3code

perf(web): turn-fold rows scan only their own entries #26688

Closedhieu-lee(GitHub profile, opens in a new tab)wants to merge 1 commit intomain fromrefs/pull/26688/headopened View on GitHub

Showing 1 changed file with 7 additions and 8 deletions.

x
0 of 1 viewed, 1 left
7 additions and 8 deletionsapps/web/src/components/chat/MessagesTimeline.logic.tsModified
View file
@@ -705,8 +705,8 @@
anchorEntryId: string;
createdAt: string;
hiddenEntryIds: ReadonlySet<string>;
- /** Every entry in the segment, including the cards a fold never hides. */
- entryIds: ReadonlySet<string>;
+ /** Every entry in the segment in timeline order, including the cards a fold never hides. */
+ entries: ReadonlyArray<TimelineEntry>;
label: string;
​
@@ -1167,7 +1167,7 @@
anchorEntryId: group.anchorEntryId,
createdAt: group.startBoundary ?? firstEntry.createdAt,
hiddenEntryIds: segmentHiddenIds(firstSegment),
- entryIds: new Set(firstSegment.map((entry) => entry.id)),
+ entries: firstSegment,
label,
for (const [index, { startIndex, steer }] of group.steerSegments.entries()) {
@@ -1184,7 +1184,7 @@
anchorEntryId: anchorEntry.id,
createdAt: steer.createdAt,
hiddenEntryIds: segmentHiddenIds(entries),
- entryIds: new Set(entries.map((entry) => entry.id)),
+ entries,
label: segmentMs !== null ? `Continued for ${formatDuration(segmentMs)}` : "Continued",