Skip to content

Notes

Plinken includes a block-based note editor for writing session notes, lyrics, production plans, or any text alongside your project. Notes use Y.js CRDTs for real-time collaborative editing across team members in a Space.

ActionDescription
Notebook PanelToggle the note list sidebar
Note EditorOpens when you select or create a note

Each note has:

PropertyTypeDescription
idstringUnique UUID
titlestringExtracted from the first line of content
created_bystringCreator’s user ID
created_ati64Creation timestamp (ms since epoch)
modified_ati64Last modification timestamp (ms since epoch)

Note content is stored as an array of blocks (similar to Notion). Each block has:

PropertyTypeDescription
idstringUnique block ID (e.g., blk_7fa)
typeBlockTypeBlock kind — see table below
propsBlockPropsAdditional properties (heading level, checked state, etc.)
textstringText content
childrenBlock[]Nested child blocks
TypeMarkdownRendered As
Paragraphplain textNormal text
Heading# H1, ## H2, ### H3Heading (level 1–3)
BulletList- item or * itemBullet point (•)
NumberedList1. itemNumbered item
Todo- [ ] task or - [x] taskCheckbox (☐ / ☑)
Quote> textBlockquote (│)
Divider---Horizontal rule
Code```langCode block with optional language
PropertyTypeUsed By
levelu8 (1–3)Heading
checkedboolTodo
numberu32NumberedList
languagestringCode

Type markdown patterns and they’re automatically converted to blocks:

You TypeConverts To
# TitleHeading 1
## SubtitleHeading 2
### SectionHeading 3
- ItemBullet list
* ItemBullet list
1. ItemNumbered list
- [ ] TaskUnchecked todo
- [x] TaskChecked todo
> QuoteBlockquote
---Divider
```Code block

Create a new note by calling the module’s create_note method:

-- From Lua scripts, use commands to interact
pl.log("Notes are managed through the UI")

Notes are created with:

  • A UUID v4 identifier
  • The current user’s ID as creator
  • Current timestamp for created/modified
  • Content initialized as a Y.Doc with the title text

The notebook panel supports:

FeatureDescription
SearchFilter notes by title text and content (case-insensitive)
SortChoose from four sort modes (see below)
ModeLabelDescription
ModifiedDescNewest FirstMost recently modified first (default)
ModifiedAscOldest FirstLeast recently modified first
TitleAscA → ZAlphabetical by title
TitleDescZ → AReverse alphabetical by title

Deleting a note:

  • Removes the note metadata from the list
  • Destroys the Y.Doc instance
  • Clears the selection if the deleted note was selected
  • Queues a delete request to the server (in collaborative mode)

Notes use Y.js (via the yrs Rust implementation) for conflict-free collaborative editing.

  1. Y.Doc per note — Each note has a Y.Doc containing a Y.Text field for content
  2. Local edits → Generate Y.js updates → Queued as PendingDocUpdate → Sent to server
  3. Remote edits → Server broadcasts Y.js updates → Applied locally via apply_remote_update
  4. Sync — On first access, the full doc state is synced from the server

The Notes module queues several types of operations for server communication:

OperationDescription
UpdatesY.Doc binary updates (content changes)
Sync RequestsRequest full doc state for notes not yet loaded
CreatesNew notes to be created on the server
Title UpdatesTitle changes to broadcast to collaborators
DeletesNotes to be deleted on the server

Titles are derived from the first line of note content. When you edit a note:

  • The title in the metadata is updated
  • A pending_title_update is queued for server broadcast
  • Remote title updates arrive via update_note_title and refresh the local display
AspectDetails
PersistenceLocal SQLite database
Content formatY.Doc binary state (base64 for transport)
SyncY.js CRDT updates over WebSocket (in Spaces)
Module IDnotes

Notes show relative timestamps in the list:

Time DifferenceDisplay
< 60 seconds”Just now”
< 1 hour”5m ago”
< 1 day”3h ago”
< 1 week”2d ago”
≥ 1 week”Mar 15” (date format)