Skip entrance animation for messages beyond the first 20

Messages at index 20+ no longer receive the animate-fade-in class or
animationDelay inline style. This avoids scheduling hundreds of CSS
animations on large sessions where the stagger would be invisible
anyway (the earlier cap of 300ms max delay was already clamping them).

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-01-30 13:36:02 -05:00
parent 957f9bc744
commit 4ec186d45b

View File

@@ -209,8 +209,8 @@ export function SessionViewer({
key={msg.uuid} key={msg.uuid}
id={`msg-${msg.uuid}`} id={`msg-${msg.uuid}`}
data-msg-index={item.messageIndex} data-msg-index={item.messageIndex}
className={`animate-fade-in ${isFocused ? "search-match-focused rounded-xl" : ""}`} className={`${idx < 20 ? "animate-fade-in" : ""} ${isFocused ? "search-match-focused rounded-xl" : ""}`}
style={{ animationDelay: `${Math.min(idx * 20, 300)}ms`, animationFillMode: "backwards" }} style={idx < 20 ? { animationDelay: `${idx * 20}ms`, animationFillMode: "backwards" } : undefined}
> >
<MessageBubble <MessageBubble
message={msg} message={msg}