Ingest disk edits to a file open in the editor #50
Labels
No labels
area:docs
area:identity
area:ops
area:plugin
area:server
channel:community
channel:direct
channel:owned
channel:press
channel:social
e2ee-constrained
gate:at-ga
gate:pre-ga
marketing
parity
relay:absent
relay:planned
relay:requested
relay:supported
risk:additive
risk:contract
risk:none
usability
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Nectenda/nectenda#50
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Part of #37. The cheapest strategic win in the programme.
What Relay does
Their headline 0.8.12 feature: edits made to vault files on disk by external
tools — explicitly naming AI agents like Claude Code, scripts and text
editors — are picked up and merged. They ship a companion
relay-skillsrepo forClaude Code and Codex.
Worth knowing this path is also where their current bugs live: #135 (a disk
edit deleting text at two or more places in one file is merged at the wrong
offsets, corrupting the file and propagating the corruption) and #137 (a
freshly shared folder left a file 0 bytes on both devices while showing "Synced").
Both open, both reproduced by their maintainer, both opened this month.
What we do today
We already do this, and have for some time.
content-sync.ts:749 onLocalModifyreads the file, compares against theY.Text, and applies aminimal prefix/suffix diff (
applyMinimalDiff) rather than a destructivedelete-all-insert-all — precisely so concurrent changes from other clients
survive. It also guards the empty-placeholder case that once blanked a note in
both vaults.
External edits to closed files already ingest correctly.
The gap: one line
content-sync.ts:762:A disk write to a note the user currently has open is silently dropped — which is
exactly the Claude-Code-edits-an-open-note case.
What changes
Ingest while the editor is bound, routing the diff through the same yCollab
binding rather than around it. Plus a finer diff than prefix/suffix, since #135
is the failure mode of a coarse one.
Then a skills repo, and the marketing story we do not currently tell.
Risk
risk:none.Verification
The case their #135 describes: a disk edit deleting text at two separate places
in one file, applied while the file is open, with a second vault connected.
Neither vault may end up with a wrong file. Invert and confirm the test fails.
Moved to the Vikunja board as NEC-27: https://projectron.nerchure.com/tasks/27