feat: New from Clipboard (Cmd+N) and Reveal in Finder - #8
Merged
Conversation
New from Clipboard saves the clipboard's text to a user-chosen path (filename suggested from the first heading or line of the content) and opens it through the standard open_file_in_window routing. Entry points: File menu (Cmd+N) and a Welcome-screen button. Empty/non-text clipboard shows an info dialog. Clipboard is read Rust-side via tauri-plugin-clipboard-manager, and the file write goes through a new write_text_file command mirroring read_file_as_text. Reveal in Finder / Show in File Explorer selects the open document in the OS file manager via the opener plugin's reveal_item_in_dir. Entry points: File menu (platform-specific label) and a viewer toolbar button. Hidden and no-op for the bundled user guide (no path on disk). Also rewrites src/USERGUIDE.md, which still documented the pre-refactor editor app (tabs, editing, saving), for the view-only viewer. Tests: 14 new Vitest cases (filename derivation + clipboard flow), 6 new Playwright specs; the web-mode mock gains a seedable clipboard, write_text_file/reveal_in_dir handling, and message-dialog recording. Co-Authored-By: Claude Fable 5 <noreply@anthropic.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
Two companion features for getting content into and out of MarkDoc:
New from Clipboard (⌘N / Ctrl+N)
tauri-plugin-clipboard-manager— no webview clipboard permission issues), suggests a filename derived from the content (first ATX heading, else first line, sanitised, dated fallback), shows the native save dialog, writes the file, and opens it through the standardopen_file_in_windowrouting.read_clipboard_text(),write_text_file(path, contents)(mirrors theread_file_as_textpattern — paths are user-authorised via the save dialog).Reveal in Finder / Show in File Explorer
reveal_item_in_dir.Docs
src/USERGUIDE.mdwas still documenting the pre-refactor editor app (tabs, editing, saving, ⌘E) — rewritten for the view-only viewer, including the new features.Test plan
new-from-clipboard.spec.tsandreveal.spec.ts; web-mode mock gains a seedable clipboard and recordswrite_text_file/reveal_in_dir/ message dialogs)cargo check/clippy -D warnings/cargo test🤖 Generated with Claude Code