From c59ec71918ecf2796a12e2eefdf09176f536c0a2 Mon Sep 17 00:00:00 2001
From: Adam <2363879+adamdotdevin@users.noreply.github.com>
Date: Wed, 5 Nov 2025 16:00:17 -0600
Subject: fix(desktop): max height on message diffs, session stats

---
 packages/desktop/src/pages/layout.tsx | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

(limited to 'packages/desktop/src/pages/layout.tsx')

diff --git a/packages/desktop/src/pages/layout.tsx b/packages/desktop/src/pages/layout.tsx
index afec9ee3c..22f0a50de 100644
--- a/packages/desktop/src/pages/layout.tsx
+++ b/packages/desktop/src/pages/layout.tsx
@@ -1,5 +1,5 @@
 import { Button, Tooltip, DiffChanges } from "@opencode-ai/ui"
-import { createMemo, ParentProps } from "solid-js"
+import { createMemo, ParentProps, Show } from "solid-js"
 import { getFilename } from "@/utils"
 import { DateTime } from "luxon"
 import { useSync } from "@/context/sync"
@@ -25,8 +25,6 @@ export default function Layout(props: ParentProps) {
             </A>
             <VList data={sync.data.session} class="no-scrollbar">
               {(session) => {
-                const diffs = createMemo(() => session.summary?.diffs ?? [])
-                const filesChanged = createMemo(() => diffs().length)
                 const updated = createMemo(() => DateTime.fromMillis(session.time.updated))
                 return (
                   <A
@@ -57,8 +55,8 @@ export default function Layout(props: ParentProps) {
                           </span>
                         </div>
                         <div class="flex justify-between items-center self-stretch">
-                          <span class="text-12-regular text-text-weak">{`${filesChanged() || "No"} file${filesChanged() !== 1 ? "s" : ""} changed`}</span>
-                          <DiffChanges diff={diffs()} />
+                          <span class="text-12-regular text-text-weak">{`${session.summary?.files || "No"} file${session.summary?.files !== 1 ? "s" : ""} changed`}</span>
+                          <Show when={session.summary}>{(summary) => <DiffChanges changes={summary()} />}</Show>
                         </div>
                       </div>
                     </Tooltip>
-- 
cgit v1.2.3

