From 4ec186d45b89c14252e9d86341f173c75647e360 Mon Sep 17 00:00:00 2001 From: teernisse Date: Fri, 30 Jan 2026 13:36:02 -0500 Subject: [PATCH] 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 --- src/client/components/SessionViewer.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/client/components/SessionViewer.tsx b/src/client/components/SessionViewer.tsx index 716d52a..fa3cac1 100644 --- a/src/client/components/SessionViewer.tsx +++ b/src/client/components/SessionViewer.tsx @@ -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} >