NEC-270: P3 · Make the plugin the only writer of a bound canvas file #343
No reviewers
Labels
No labels
area:docs
area:identity
area:ops
area:plugin
area:server
channel:community
channel:direct
channel:owned
channel:press
channel:social
dependencies
e2ee-constrained
gate:at-ga
gate:pre-ga
marketing
parity
relay:absent
relay:planned
relay:requested
relay:supported
risk:additive
risk:contract
risk:none
security
usability
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Nectenda/nectenda!343
Loading…
Reference in a new issue
No description provided.
Delete branch "worktree-nec-270-make-the-plugin-the-only-writer-of-a-bou"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Task: NEC-270 — https://projectron.nerchure.com/tasks/281
While a canvas view is bound live, the plugin is now the only writer of its file: the view's
requestSaveis replaced on the instance (Obsidian's 2 s save holdssavebound at construction, so that is the one way at it) andsaveis wrapped, each capturing what the view shows and writing nothing; StructuredSync writes the file from the document under compare-and-swap, for every local transaction under the bound view as it always did for remote ones, and a bound canvas view is kept out of the text-view guard's list. Any change to the file while bound is therefore someone else's by construction and is read in against the file it replaced — the view-history classification (holds,baseFor, theview-saveledger origin,reloaded()) that brought a deleted card back and deleted a new one in canvas hardness seed 1103 is gone. Excalidraw's view keeps writing its own file (BoundView.writesFile); the lifecycle'sliverow allowswrite-beginunless a writer is bound. Verified against Obsidian 1.13.7, 1.14.4 and 1.15.0's own TextFileView code (the contract test pins the own-property, bound-save and reload-order facts, with Advanced Canvas installed) and against the 19 community canvas plugins that touch a live canvas. The runs found and fixed three things before this opened: a drag in progress carried to the peer by a capture Obsidian's reload offer provoked; a plugin'ssetViewData(_, false)refused as a reload; and a live card's typing lost from the typist's own file (hardness seed 981946044, round 8). Gate green one57680fb; canvas hardness seeds 1360304150 (1.15.0/1.15.0) and 53028451 (1.15.0/1.13.7) each passed an hour, nothing lost. Review findings 4–6 are recorded as residuals in sync-limitations.md. The Markdown side is NEC-379 in Backlog. Installed in the local vaults for a manual pass before opening.Spec:
docs/changes/NEC-270-plugin-only-writer-bound-canvas/spec.mdChangelog
Canvas: while a board is open and syncing live, Nectenda now writes its file itself, so a link update or an outside edit can no longer bring back a deleted card or drop a new one.