From 7b3e915d9beac5a79a0b2fc87fc1439be92dcf46 Mon Sep 17 00:00:00 2001 From: Michael Yankelev Date: Tue, 10 Feb 2026 21:15:37 +0100 Subject: [PATCH 1/4] docs: start work on text editor modal todo MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Moved todo from pending to done — beginning implementation. Co-Authored-By: Claude Opus 4.6 --- .../{pending => done}/2026-01-23-simple-text-file-editor-modal.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .planning/todos/{pending => done}/2026-01-23-simple-text-file-editor-modal.md (100%) 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 From 8ecd4c3c29035f99c9a1e77e1248482e24e921ab Mon Sep 17 00:00:00 2001 From: Michael Yankelev Date: Tue, 10 Feb 2026 21:48:35 +0100 Subject: [PATCH 2/4] feat: add in-browser text file editor with full crypto round-trip MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add a text editor modal that allows editing text files directly in the browser. The full flow: download → decrypt → edit → encrypt → re-upload → update folder metadata → unpin old CID. - Add replaceFileInFolder service and updateFile hook operation - Create TextEditorDialog component with loading/saving/error states - Add "Edit" context menu option for text file extensions - Add Pencil design screen for the text editor modal - Add E2E page object and 5 test cases (Phase 5.5) Co-Authored-By: Claude Opus 4.6 --- .../components/file-browser/ContextMenu.tsx | 16 + .../components/file-browser/FileBrowser.tsx | 80 ++ .../file-browser/TextEditorDialog.tsx | 207 +++ apps/web/src/components/ui/Modal.tsx | 9 +- apps/web/src/hooks/useFolder.ts | 78 ++ apps/web/src/services/folder.service.ts | 57 + apps/web/src/styles/text-editor-dialog.css | 123 ++ designs/cipher-box-design.pen | 1169 +++++++++++++++++ tests/e2e/page-objects/dialogs/index.ts | 1 + .../dialogs/text-editor-dialog.page.ts | 196 +++ .../file-browser/context-menu.page.ts | 14 + tests/e2e/tests/full-workflow.spec.ts | 143 ++ 12 files changed, 2091 insertions(+), 2 deletions(-) create mode 100644 apps/web/src/components/file-browser/TextEditorDialog.tsx create mode 100644 apps/web/src/styles/text-editor-dialog.css create mode 100644 tests/e2e/page-objects/dialogs/text-editor-dialog.page.ts 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 */}