Repository navigation
Allow copying from history view; copy rich-text and plaintext MIME types. - #3358
Merged
Merged
Conversation
Member
Author
|
I have performed checks on this and ran a (primitive, overly-naive) fuzzer on it to ensure that the changes arenโt introducing obvious flaws. My plan is to merge, try to deploy to staging, then deploy to production. |
dmsnell
force-pushed
the
feature/history-revision-copy
branch
from
May 13, 2026 21:09
41d8b6c to
fff3d87
Compare
Resolves #3042 Resolves #2898 This commit brings two notable changes: - Itโs now possible to select content from an old revision of a note; previously when clicking into the note, the history view and slider would disappear to reveal the current version of the note. - When copying content from a note with Markdown active, the copy buffer receives two MIME payloads: the plaintext Markdown source, which had previously already been supplied; and a new `text/html` version containing the richly-formatted render of the note. This makes it possible to preserve formatting when pasting into other applications which can receive rich pastes, such as a word processor. The changes in this patch were generated by Codex/GPT-5.5 and guided and reviewed by @dmsnell
dmsnell
force-pushed
the
feature/history-revision-copy
branch
from
May 14, 2026 00:17
fff3d87 to
b0e29b8
Compare
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.
Resolves #3042
Resolves #2898
Summary
This 100% vibe-coded change addresses two frustrations with copying in the editor:
These changes fix the history viewer and require an explicit click to close (or a keypress of the
Escapekey, or by navigating to another note). This is a different behavior than the click-outside-to-close model, but it may be more ergonomic, because the old behavior prevents copying parts of an old version of a post.Secondarily, several issues arose during the work on this feature relating to copy and paste behaviors. The app should be more aware of HTML/richly-formatted content when pasting, and will send two copies of copied content into the paste buffer: a
text/plainversion containing the markup source; and atext/htmlversion containing the rendered note. This makes it possible for other applications to use the rendered content after copying.A side-effect of this change is that itโs now possible to preserve basic formatting when pasting HTML content into the app, as it parses the inbound HTML, sanitizes it, and creates Markdown syntax from the HTML.
Before / After
These videos demonstrate both aspects of this change:
As a note on this, most applications provide an alternative paste mode where itโs still possible to paste the plaintext content. In the After video, the plaintext content is automatically pasted into the search box since it doesnโt support rich content, but in something like an email, it would likely be possible with a combination like Cmd + Opt + V or โPaste without formatting.โ
before-trunk-v2.mp4
after-feature-history-revision-copy-v2.mp4