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