Repository navigation
Offer a saved draft instead of restoring it; drop it on confirmed Cancel - #114
Merged
Merged
Conversation
… with Cancel The editor no longer puts a saved draft into the text field. It shows the text of the page and a note that an unsaved draft is available, with buttons to show the changes (a line diff), apply the draft (undoable) or discard it. The forms of the editor which reload the page (linking a mention) still bring the text back without asking. Leaving the editor with Cancel and confirming the warning about unsaved changes now removes the draft; before, the draft was written again when the page was hidden, so it came back the next time. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AFJFMQsAsMsE7UBcDahhFi
The draft offer refreshes the hints for the title of a new page when a draft is applied, and the forms linking a mention keep the draft coming back unasked. The test of a refused save looks for its own note, since new pages now show another one. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AFJFMQsAsMsE7UBcDahhFi
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AFJFMQsAsMsE7UBcDahhFi
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.
What
Notes
data-msg-restoredbecamedata-msg-available(plus show/hide/apply/unchanged messages).Tests
autosave.spec.jsrewritten for offer/apply/show changes/discard/Cancel (confirmed, declined, untouched);preview.spec.jsadjusted.composer installof the dev dependencies failed in this environment).FormsTestwas only changed for the renamed attribute and syntax-checked.Generated by Claude Code