Skip to main content

Module marks

Module marks 

Source
Expand description

NOTES-5: marks — what an agent leaves on a note without writing in it (the owner, 2026-11-15: “I want to make sure that agents can listen in on notes, and underline sections, add links, and write components into the docuemtn itself.”). A mark is a range of the note’s characters carrying a link, one line of state, or both; the page underlines it.

Anchored as a question is (crate::threads): two Yjs relative positions in the note’s CRDT, resolved now to character offsets of the markdown notes.get answers (from, to), so the mark follows its words through every hand’s edit; every character deleted, it is detached — kept, listed last, drawn nowhere. Nothing here writes the note’s text: the CRDT is read, never changed, and the note’s revision does not move.

Stored in the notes file, note_marks (a table of its own, made by the store’s open on a file from before: such a file opens with no marks): a row per mark — its anchor, the words it held when made, its link and label, who and when, who changed it last — and (NOTES-5’s third requirement, after NOTES-4) a component placed under its passage: component, version (the kept version’s whole hash, which the ui service said holds it) and props (a JSON object, held to 64 KiB as a slot’s are). Those three columns were made nullable by the first pass, so a file from before reads them as none: no migration rewrote a row. Said on the channel for watch: mark_changed (made or changed, the mark whole) and mark_removed.

Structs§

Remark
What a mark carries, as a call gives it: each part None stays as it is (a new mark: none), Some("") takes a link or a label off.

Constants§

TABLES
The table.