The open-source AI voice studio. Clone, dictate, create.
Auto-select first story when navigating to Stories tab
Jamie Pine626e3740e105
diff --git a/app/src/components/StoriesTab/StoryList.tsx b/app/src/components/StoriesTab/StoryList.tsxindex 64719257..4222a800 100644--- a/app/src/components/StoriesTab/StoryList.tsx+++ b/app/src/components/StoriesTab/StoryList.tsx@@ -1,5 +1,5 @@import { BookOpen, MoreHorizontal, Pencil, Plus, Trash2 } from 'lucide-react';-import { useState } from 'react';+import { useEffect, useState } from 'react';import {AlertDialog,AlertDialogAction,@@ -62,6 +62,13 @@ export function StoryList() {const [newStoryDescription, setNewStoryDescription] = useState('');const { toast } = useToast();+ // Auto-select the first story when the list loads with no selection+ useEffect(() => {+ if (!selectedStoryId && stories && stories.length > 0) {+ setSelectedStoryId(stories[0].id);+ }+ }, [selectedStoryId, stories, setSelectedStoryId]);+const handleCreateStory = () => {if (!newStoryName.trim()) {toast({