Skip to content

fix(ui): clear pending edits immediately when discarding - #23

Merged
gnacho merged 1 commit into
mainfrom
fix/issue-22-discard-immediately
Sep 13, 2026
Merged

gnacho merged 1 commit into
mainfrom
fix/issue-22-discard-immediately

Conversation

@gnacho

@gnacho gnacho commented Sep 13, 2026

Copy link
Copy Markdown
Owner

Closes #22.

Choosing Discard on the new-note path left the edits in the editor until the new note was actually created, so cancelling the title dialog afterwards kept them around (still unsaved).

The editor reset is now a shared helper and discard() is exposed, so the parent clears the pending edits as soon as the user discards them. The switch-note path keeps working as before.

Verification:

  • npm run build and vue-tsc --noEmit pass
  • Browser walkthrough with Playwright: after Discard on the new-note path and cancelling the title dialog, the content is back to the stored note and no note is created; the switch-note discard path still works; 0 JS errors

Choosing Discard on the new-note path left the edits in the editor until the
new note was created, so cancelling the title dialog afterwards kept them
around. Extract the editor reset into a shared helper and expose discard() so
the parent clears the pending edits as soon as the user discards them.

Closes #22
@gnacho
gnacho merged commit 1f1f34f into main Sep 13, 2026
@gnacho
gnacho deleted the fix/issue-22-discard-immediately branch September 13, 2026 10:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Discard should clear pending edits immediately

1 participant