diff --git a/.planning/todos/pending/2026-01-23-simple-text-file-editor-modal.md b/.planning/todos/done/2026-01-23-simple-text-file-editor-modal.md similarity index 100% rename from .planning/todos/pending/2026-01-23-simple-text-file-editor-modal.md rename to .planning/todos/done/2026-01-23-simple-text-file-editor-modal.md diff --git a/apps/web/src/components/file-browser/ContextMenu.tsx b/apps/web/src/components/file-browser/ContextMenu.tsx index 781622a2cd..61d8789417 100644 --- a/apps/web/src/components/file-browser/ContextMenu.tsx +++ b/apps/web/src/components/file-browser/ContextMenu.tsx @@ -22,6 +22,8 @@ type ContextMenuProps = { onClose: () => void; /** Callback when download is clicked (files only) */ onDownload?: () => void; + /** Callback when edit is clicked (text files only) */ + onEdit?: () => void; /** Callback when rename is clicked */ onRename: () => void; /** Callback when move is clicked */ @@ -50,6 +52,7 @@ export function ContextMenu({ item, onClose, onDownload, + onEdit, onRename, onMove, onDelete, @@ -128,6 +131,11 @@ export function ContextMenu({ onClose(); }; + const handleEdit = () => { + onEdit?.(); + onClose(); + }; + const handleRename = () => { onRename(); onClose(); @@ -176,6 +184,14 @@ export function ContextMenu({ )} + {/* Edit - text files only */} + {isFile && onEdit && ( + + )} + {/* Rename */}