NEC-381: Re-adding a shared folder after Stop syncing here deleted its notes, drawings and attachments everywhere #349

Merged
nectenda-agent merged 1 commit from worktree-nec-381-re-adding-a-shared-folder-after-stop-syn into main 2026-11-09 09:16:10 +00:00
Collaborator

Task: NEC-381 — https://projectron.nerchure.com/tasks/403

"Stop syncing here" removed only the mapping; the folder's listing store kept its pinned listing, undecided deletes and synced attachment hashes, keyed by folder id. Adding the folder again landed it beside the old one, empty, and its first start read every listed file as deleted here and deleted them everywhere (13 notes, 4 structured files, 20 attachments in the user's vaults). The attachment engine was also never let go of on an unmap, so in the same session it kept the old path and hashes. Now a folder mapped that this vault does not hold is forgotten first and starts as a first start (SAFE-A56); pins and the deletes-made-here record carry the path they were taken under and are read only there; most of what was pinned missing here is placed again rather than deleted (SAFE-A36); and the refresh lets the attachment engine go of folders no longer mapped at their path. Fresh-context review findings fixed and mutation-checked; local gate green including the container e2e run.

Spec: docs/changes/NEC-381-readd-after-stop-syncing/spec.md

Changelog

Adding a shared folder again after "Stop syncing here" no longer deletes its notes, drawings and attachments everywhere: the folder starts afresh and fills from the server.

Task: NEC-381 — https://projectron.nerchure.com/tasks/403 "Stop syncing here" removed only the mapping; the folder's listing store kept its pinned listing, undecided deletes and synced attachment hashes, keyed by folder id. Adding the folder again landed it beside the old one, empty, and its first start read every listed file as deleted here and deleted them everywhere (13 notes, 4 structured files, 20 attachments in the user's vaults). The attachment engine was also never let go of on an unmap, so in the same session it kept the old path and hashes. Now a folder mapped that this vault does not hold is forgotten first and starts as a first start (SAFE-A56); pins and the deletes-made-here record carry the path they were taken under and are read only there; most of what was pinned missing here is placed again rather than deleted (SAFE-A36); and the refresh lets the attachment engine go of folders no longer mapped at their path. Fresh-context review findings fixed and mutation-checked; local gate green including the container e2e run. Spec: `docs/changes/NEC-381-readd-after-stop-syncing/spec.md` ## Changelog Adding a shared folder again after "Stop syncing here" no longer deletes its notes, drawings and attachments everywhere: the folder starts afresh and fills from the server.
Start a folder mapped anew as a first start, and let the attachment engine go of an unmapped one
All checks were successful
Release note / release-note (pull_request) Successful in 18s
CI / build (pull_request) Successful in 3m48s
CI / e2e (pull_request) Successful in 17m4s
CI / promote (pull_request) Has been skipped
CI / build (push) Successful in 4m10s
CI / e2e (push) Successful in 17m0s
CI / promote (push) Successful in 30s
b5af2905f3
"Stop syncing here" removed the mapping and nothing else. The listing's
store, keyed by folder id, kept the pinned listing, the undecided deletes
and what the attachments last synced as; adding the folder again landed it
beside the old one, empty, and its first start read every listed file as
deleted here. Each document unchanged since this vault last agreed on it,
13 notes, 4 structured files and 20 attachments were deleted everywhere,
and the other vault moved them to .trash. The attachment engine had also
never been let go of: the refresh only connects, and a folder still held
is not connected again, so in the same session it kept the old path and
the hashes it "last synced", which is the check that lets an attachment's
delete go everywhere.

Now a folder mapped that this vault does not hold is forgotten first, so
its first start places everything and deletes nothing (SAFE-A56). Pins
record the path they were taken under and are read only there; most of
what was pinned missing here is placed again, not deleted, as a listing
that lost most of what it pinned already was for files present but
unlisted (SAFE-A36). The refresh lets the attachment engine go of every
folder no longer mapped at its path before reconnecting the live ones.

Task: NEC-381

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EV8ztXZM4vrRMGDTyZjN6J
Sign in to join this conversation.
No reviewers
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
Nectenda/nectenda!349
No description provided.