Bookmark System
Status: Implemented Crate: crates/application/src/bookmark/ Repository:
crates/infrastructure/sqlite/src/workspace/event_log_repository.rs
Overview
Section titled “Overview”The Bookmark System provides named anchors into the event log timeline. A bookmark is a lightweight record that associates a user-visible name with a specific timestamp in the event log. Bookmarks are not database snapshots — they mark a point in time that can be used to reconstruct workspace state by replaying the event log up to that timestamp.
Bookmarks replace the former git-backed checkpoint system. Named markers are more intuitive for users (“Chapter 3 Draft”) than opaque database snapshots, and they survive history collapse — the event log background task that summarizes old events never prunes bookmarks.
Diagram
Section titled “Diagram”Key Concepts
Section titled “Key Concepts”Timestamp-Based Anchoring
Section titled “Timestamp-Based Anchoring”A bookmark’s timestamp field contains an ISO 8601 timestamp that corresponds to a point in the event log. Reconstruction
works by identifying the bookmark’s timestamp and replaying:
- The structural event log up to that timestamp (for page/block/tag mutations)
- CRDT snapshots at that timestamp (for block content)
This makes bookmarks resilient to history collapse — even when old fine-grained events are summarized, the bookmark timestamp remains valid as a boundary marker.
Survival Through History Collapse
Section titled “Survival Through History Collapse”The HistoryCollapseTask background task summarizes events older than the retention window (default 90 days). Bookmarks
are explicitly excluded from this process. A bookmark created months ago remains valid indefinitely.
Database Schema
Section titled “Database Schema”The bookmarks table is part of the V001 baseline migration alongside event_log and event_log_summaries:
CREATE TABLE bookmarks ( id TEXT PRIMARY KEY, -- UUID name TEXT NOT NULL, -- User-visible name ("Chapter 3 Draft") description TEXT, -- Optional context or notes timestamp TEXT NOT NULL, -- ISO 8601 point in the event log this bookmark marks created_by TEXT, -- User ID or agent ID created_at TEXT NOT NULL);Application Layer
Section titled “Application Layer”Four CRUD use cases in crates/application/src/bookmark/:
| Use Case | Description |
|---|---|
CreateBookmarkUseCase | Create a named bookmark at a given timestamp |
GetBookmarkUseCase | Retrieve a single bookmark by ID |
ListBookmarksUseCase | List all bookmarks in the workspace |
DeleteBookmarkUseCase | Remove a bookmark (does not affect the event log) |
Tauri Commands
Section titled “Tauri Commands”create_bookmark— Create a named bookmarkget_bookmark— Retrieve a bookmark by IDlist_bookmarks— List all workspace bookmarksdelete_bookmark— Delete a bookmark
Related
Section titled “Related”- Event Log System — The timeline that bookmarks anchor into
crates/application/src/bookmark/— Use case implementationsdocs/solutions/architecture/crdt-blob-passthrough-pipeline.md— CRDT content reconstruction (developer docs)
Was this page helpful?
Thanks for your feedback!