From 31862f3a401613c340d9d196037a7a3d734fc1d5 Mon Sep 17 00:00:00 2001 From: teernisse Date: Wed, 25 Feb 2026 16:32:08 -0500 Subject: [PATCH] perf(dashboard): optimize CSS transitions and add entrance animations MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Performance and polish improvements across dashboard components: Transition optimizations (reduces reflow/repaint overhead): - OptionButton: transition-all → transition-[transform,border-color, background-color,box-shadow] - QuestionBlock: Add transition-colors to textarea, transition-all → transition-[transform,filter] on send button - SimpleInput: Same pattern as QuestionBlock - Sidebar: transition-all → transition-colors for project buttons Animation additions: - App: Add animate-fade-in-up to loading and error state containers - MessageBubble: Make fade-in-up animation conditional on non-compact mode to avoid animation spam in card preview Using specific transition properties instead of transition-all tells the browser exactly which properties to watch, avoiding unnecessary style recalculation on unrelated property changes. Co-Authored-By: Claude Opus 4.5 --- dashboard/components/App.js | 4 ++-- dashboard/components/MessageBubble.js | 2 +- dashboard/components/OptionButton.js | 2 +- dashboard/components/QuestionBlock.js | 4 ++-- dashboard/components/Sidebar.js | 4 ++-- dashboard/components/SimpleInput.js | 4 ++-- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/dashboard/components/App.js b/dashboard/components/App.js index 7438f9e..ac271d1 100644 --- a/dashboard/components/App.js +++ b/dashboard/components/App.js @@ -347,11 +347,11 @@ export function App() {
${loading ? html` -
+
Loading sessions...
` : error ? html` -
+

Failed to connect to API

${error}

diff --git a/dashboard/components/MessageBubble.js b/dashboard/components/MessageBubble.js index 88956d5..fbf65b2 100644 --- a/dashboard/components/MessageBubble.js +++ b/dashboard/components/MessageBubble.js @@ -17,7 +17,7 @@ export function MessageBubble({ msg, userBg, compact = false, formatTime }) { const maxW = compact ? 'max-w-[92%]' : 'max-w-[86%]'; return html` -
+
${number}. diff --git a/dashboard/components/QuestionBlock.js b/dashboard/components/QuestionBlock.js index 3bd9142..5561bd2 100644 --- a/dashboard/components/QuestionBlock.js +++ b/dashboard/components/QuestionBlock.js @@ -73,12 +73,12 @@ export function QuestionBlock({ questions, sessionId, status, onRespond }) { onBlur=${() => setFocused(false)} placeholder="Type a response..." rows="1" - class="flex-1 resize-none overflow-hidden rounded-xl border border-selection/75 bg-bg/70 px-3 py-2 text-sm text-fg placeholder:text-dim focus:outline-none" + class="flex-1 resize-none overflow-hidden rounded-xl border border-selection/75 bg-bg/70 px-3 py-2 text-sm text-fg transition-colors duration-150 placeholder:text-dim focus:outline-none" style=${{ minHeight: '38px', maxHeight: '150px', borderColor: focused ? meta.borderColor : undefined }} />