VectorCraft: closing an untouched drawing writes nothing. Release 0.8.1. #16

Open
oliver.maklott wants to merge 1 commit from vectorcraft-clean-open into main

Opening a VectorCraft drawing and closing it without an edit showed the "unsaved changes" dialog.

Cause. The host sends flush before every close. The control adapter answered every flush with a save, so an untouched drawing was always written back (an SVG in VectorCraft's own form). Whenever that save was refused (lifecycle, read-only session, busy path), the session counted as unsaved and the discard dialog appeared.

Fix (shim/limedoc-shim.js). Flush now:

  • waits for the running write-watch pass to end, then runs one more, so an in-app Save made just before closing goes out once (it used to go out twice: once from the watch, once from the flush);
  • saves only while the app still reports unsaved changes.

This also covers the untouched EffectCraft import that the old asNew check handled.

Smoke (real builds):

  • VectorCraft 0.24.1: 10/10. Two new checks: an untouched flush writes nothing; an in-app Save followed by a flush saves once. Both fail on 0.8.0.
  • EffectCraft 0.26.0: 18/18.
  • deno task test:artcraft: 123/123.

Release 0.8.1.

🤖 Generated with Claude Code

Opening a VectorCraft drawing and closing it without an edit showed the "unsaved changes" dialog. **Cause.** The host sends `flush` before every close. The control adapter answered every flush with a save, so an untouched drawing was always written back (an SVG in VectorCraft's own form). Whenever that save was refused (lifecycle, read-only session, busy path), the session counted as unsaved and the discard dialog appeared. **Fix** (`shim/limedoc-shim.js`). Flush now: - waits for the running write-watch pass to end, then runs one more, so an in-app Save made just before closing goes out once (it used to go out twice: once from the watch, once from the flush); - saves only while the app still reports unsaved changes. This also covers the untouched EffectCraft import that the old `asNew` check handled. **Smoke** (real builds): - VectorCraft 0.24.1: 10/10. Two new checks: an untouched flush writes nothing; an in-app Save followed by a flush saves once. Both fail on 0.8.0. - EffectCraft 0.26.0: 18/18. - `deno task test:artcraft`: 123/123. Release 0.8.1. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Closing an untouched VectorCraft drawing writes nothing; an in-app Save just before closing arrives once. Release 0.8.1.
All checks were successful
Publish / dev-image (pull_request) Successful in 0s
Publish / sidecar-smoke (pull_request) Successful in 4s
Publish / test (pull_request) Successful in 52s
Publish / pack-and-publish (pull_request) Has been skipped
23059bf78c
The host flushes before every close. The control adapter answered every
flush with a save, so an untouched SVG was written back in VectorCraft's
form, and any refusal of that save (lifecycle, read-only session, busy
path) brought up the discard dialog although nothing was edited. Flush now
lets a running write-watch pass end, runs one more (an in-app Save made
just before closing goes out from there, once instead of twice), and saves
only while the app still reports unsaved changes. This also covers the
untouched EffectCraft import the old check handled.

Smoke: VectorCraft 0.24.1 10/10 (new: untouched flush writes nothing;
in-app Save then flush saves once; both fail on 0.8.0), EffectCraft
0.26.0 18/18.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
All checks were successful
Publish / dev-image (pull_request) Successful in 0s
Publish / sidecar-smoke (pull_request) Successful in 4s
Publish / test (pull_request) Successful in 52s
Publish / pack-and-publish (pull_request) Has been skipped
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin vectorcraft-clean-open:vectorcraft-clean-open
git switch vectorcraft-clean-open

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch main
git merge --no-ff vectorcraft-clean-open
git switch vectorcraft-clean-open
git rebase main
git switch main
git merge --ff-only vectorcraft-clean-open
git switch vectorcraft-clean-open
git rebase main
git switch main
git merge --no-ff vectorcraft-clean-open
git switch main
git merge --squash vectorcraft-clean-open
git switch main
git merge --ff-only vectorcraft-clean-open
git switch main
git merge vectorcraft-clean-open
git push origin main
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
limedoc-plugins/artcraft!16
No description provided.