feat(ui): image paste from clipboard in editor#76
Open
advancedresearcharray wants to merge 14 commits into
Open
feat(ui): image paste from clipboard in editor#76advancedresearcharray wants to merge 14 commits into
advancedresearcharray wants to merge 14 commits into
Conversation
Enable clipboard paste and drag-and-drop image upload in both visual (BlockNote) and source (CodeMirror) editor modes with loading placeholders, standardized paste filenames, and error toasts. Co-authored-by: Cursor <cursoragent@cursor.com>
CodeMirror upload already renames via uploadAssetForEditor; derive alt text from the uploaded asset ref instead of pre-renaming the file twice. Co-authored-by: Cursor <cursoragent@cursor.com>
…kiwifs#425) Delegate file rename to the upload callback (same as CodeMirror path) and derive alt text from the uploaded asset ref basename. Co-authored-by: Cursor <cursoragent@cursor.com>
Block source-mode save while uploads are in-flight, fix Safari clipboard extraction fallback, add paste/drop handler tests, and remove unused ProseMirror plugin to avoid double-handling with BlockNote uploadFile. Co-authored-by: Cursor <cursoragent@cursor.com>
…iwifs#425) Include onUploadStart/onUploadEnd in MarkdownSourceEditor.imagePaste typing so source-mode save gating receives upload lifecycle events. Add 2026-07-03 delivery episode log. Co-authored-by: Cursor <cursoragent@cursor.com>
Track BlockNote uploadFile lifecycle with pending upload counter so autosave and manual save wait for in-flight paste/drop uploads in both editor modes. Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Record hands-on test verification and PR publish for image paste from clipboard after failed fleet delivery check. Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Document peer-review pass and green test runs after fleet delivery check failure. Co-authored-by: Cursor <cursoragent@cursor.com>
Guard save gating while kiwi-upload:// placeholders remain in source markdown; records final hands-on delivery verification. Co-authored-by: Cursor <cursoragent@cursor.com>
Add onDocChange to CodeMirror paste extension so controlled sourceText tracks upload placeholders, and handle visual-mode drops on wrapper dead zones outside the BlockNote surface. Co-authored-by: Cursor <cursoragent@cursor.com>
Record test verification (19 targeted, 208 full UI) after peer-review fixes for source-mode onDocChange sync and visual wrapper drop handling. Co-authored-by: Cursor <cursoragent@cursor.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes kiwifs#425.
POST /api/kiwi/assets, insertsmarkdownplaceholder during upload; error toast on failure (413 max size, etc.)Peer-review fixes
onDocChangesync — CodeMirror programmatic paste/drop dispatches callhandleSourceTextChangeso controlledsourceTextstays in sync (save gating, autosave, mode switch)handleVisualImageDrop— Handles image drops on editor padding/dead zones BlockNote does not coverFiles changed
ui/src/lib/editorImagePaste.tsui/src/lib/editorImagePasteExtension.tsonDocChangeReact syncui/src/lib/editorVisualImageDrop.tsui/src/components/EditorImageDropOverlay.tsxui/src/components/KiwiEditor.tsxui/src/components/editor/MarkdownSourceEditor.tsxui/src/lib/*.test.tsTest plan
cd ui && npm test -- editorImagePaste editorVisualImageDrop— 19 passedcd ui && npm test— 208 passed