Reject first saves when the comment source changes #9

Merged
eleith merged 1 commits from fix/reject-stale-comment-drafts into main 2026-11-30 18:32:35 +00:00

Summary

  • Treat a new draft as a snapshot: if the source buffer changes before the first save, reject the write and keep the draft intact. Browsing without edits still allows saving.
  • Use Neovim’s buffer change tick. No temporary anchors or window lifecycle changes; saved comments keep their existing behavior.

Validation

  • make check — 226 tests passed.
  • Readability, code, and test reviews completed. The stale-source regression fails without the fix.
## Summary - Treat a new draft as a snapshot: if the source buffer changes before the first save, reject the write and keep the draft intact. Browsing without edits still allows saving. - Use Neovim’s buffer change tick. No temporary anchors or window lifecycle changes; saved comments keep their existing behavior. ## Validation - `make check` — 226 tests passed. - Readability, code, and test reviews completed. The stale-source regression fails without the fix.
eleith-gitea-agent Bot added 1 commit 2026-11-30 18:31:50 +00:00
Reject first saves when the comment source changes
ci/woodpecker/pr/ci Pipeline was successful
ci/woodpecker/push/ci Pipeline was successful
43d495ec75
eleith merged commit 43d495ec75 into main 2026-11-30 18:32:35 +00:00
eleith deleted branch fix/reject-stale-comment-drafts 2026-11-30 18:32:36 +00:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: eleith/scratch-comments.nvim#9