@@ -99,16 +196,19 @@ export function StoryList() {
setSelectedStoryId(story.id)}
>
-
-
+
+
setSelectedStoryId(story.id)}
+ >
{story.name}
{story.description && (
-
+
{story.description}
)}
@@ -117,7 +217,32 @@ export function StoryList() {
•
{formatDate(story.updated_at)}
-
+
+
+
+ e.stopPropagation()}
+ >
+
+
+
+
+ handleEditClick(story)}>
+
+ Edit
+
+ handleDeleteClick(story.id)}
+ className="text-destructive focus:text-destructive"
+ >
+
+ Delete
+
+
+
))
@@ -169,6 +294,76 @@ export function StoryList() {
+
+ {/* Edit Story Dialog */}
+
+
+
+ Edit Story
+
+ Update the story name and description.
+
+
+
+
+ Name
+ setNewStoryName(e.target.value)}
+ onKeyDown={(e) => {
+ if (e.key === 'Enter') {
+ handleUpdateStory();
+ }
+ }}
+ />
+
+
+ Description (optional)
+
+
+
+ setEditDialogOpen(false)}>
+ Cancel
+
+
+ {updateStory.isPending ? 'Saving...' : 'Save'}
+
+
+
+
+
+ {/* Delete Story Confirmation Dialog */}
+
+
+
+ Are you sure?
+
+ This will permanently delete the story and all its items. This action cannot be undone.
+
+
+
+ Cancel
+
+
+ {deleteStory.isPending ? 'Deleting...' : 'Delete'}
+
+
+
+
+
);
}
diff --git a/app/src/components/ui/popover.tsx b/app/src/components/ui/popover.tsx
new file mode 100644
index 00000000..c4014dc6
--- /dev/null
+++ b/app/src/components/ui/popover.tsx
@@ -0,0 +1,28 @@
+import * as PopoverPrimitive from '@radix-ui/react-popover';
+import * as React from 'react';
+import { cn } from '@/lib/utils/cn';
+
+const Popover = PopoverPrimitive.Root;
+
+const PopoverTrigger = PopoverPrimitive.Trigger;
+
+const PopoverContent = React.forwardRef<
+ React.ElementRef