From 32ede5388bb6c66c5d5679c2d73fd6ec6b2342bf Mon Sep 17 00:00:00 2001
From: Matthias Nott <mnott@mnsoft.org>
Date: Sun, 15 Mar 2026 13:43:18 +0100
Subject: [PATCH] Update splash screen config and add session unread indicator

---
 components/SessionPicker.tsx |   11 ++++++++++-
 1 files changed, 10 insertions(+), 1 deletions(-)

diff --git a/components/SessionPicker.tsx b/components/SessionPicker.tsx
index 349d47a..2ae9a26 100644
--- a/components/SessionPicker.tsx
+++ b/components/SessionPicker.tsx
@@ -265,6 +265,7 @@
   } = useChat();
   const [editingId, setEditingId] = useState<string | null>(null);
   const [keyboardHeight, setKeyboardHeight] = useState(0);
+  const sessionScrollRef = useRef<ScrollView>(null);
 
   // Sort: active first, then by index
   const sortedSessions = [...sessions].sort((a, b) => {
@@ -312,7 +313,14 @@
   const handleStartRename = useCallback((session: WsSession) => {
     Haptics.impactAsync(Haptics.ImpactFeedbackStyle.Light);
     setEditingId(session.id);
-  }, []);
+    // Scroll down after keyboard appears so the rename field is visible
+    const idx = sortedSessions.findIndex(s => s.id === session.id);
+    if (idx >= 0 && sessionScrollRef.current) {
+      setTimeout(() => {
+        sessionScrollRef.current?.scrollTo({ y: idx * 60, animated: true });
+      }, 400);
+    }
+  }, [sortedSessions]);
 
   const handleConfirmRename = useCallback(
     (sessionId: string, newName: string) => {
@@ -407,6 +415,7 @@
 
             {/* Session list */}
             <ScrollView
+              ref={sessionScrollRef}
               style={{ paddingHorizontal: 16 }}
               showsVerticalScrollIndicator={false}
               keyboardShouldPersistTaps="handled"

--
Gitblit v1.3.1