From 36421b4d309e27ccb79cbf2eb66a5063faaad1e8 Mon Sep 17 00:00:00 2001 From: Den <2119348+dzianisv@users.noreply.github.com> Date: Thu, 16 Jul 2026 17:32:53 -0700 Subject: [PATCH] fix(sessions): hide misleading "0 files" in session list (#75) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit session.summary is always a truthy object with files defaulting to 0 until the server populates real counts, so the session list always rendered "· 0 files" regardless of actual changes. SessionInfo.tsx already guards on `summary.files > 0`; apply the same guard in the session list so it no longer shows a count that is never accurate. Note: this does not make the count itself accurate — session.summary is populated server-side and the opencode server currently never updates it after a session runs. Showing correct counts needs either a server-side fix or client-side aggregation from session message parts; this PR only removes the always-wrong "0 files" text. Partially addresses #55 Co-authored-by: engineer --- app/(tabs)/index.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/(tabs)/index.tsx b/app/(tabs)/index.tsx index 4a6a812..f635c17 100644 --- a/app/(tabs)/index.tsx +++ b/app/(tabs)/index.tsx @@ -78,7 +78,10 @@ function SessionItem({ {formatTime(session.time.updated)} - {session.summary && ` · ${session.summary.files} files`} + {/* summary is always present but files defaults to 0 until the + server populates it — only show the count when it's meaningful, + matching the SessionInfo panel's `summary.files > 0` guard (#55) */} + {session.summary && session.summary.files > 0 && ` · ${session.summary.files} files`} {shortDir && (