Skip to content

Version tracking #11

@kirillt

Description

@kirillt

When we modify a note, its ResourceId changes as well. This is expected since we use content-addressing. In order to provide proper UX, we need to track versions of the same note and present them to user as a single note. We also need UI elements to present older versions to user ("timeback machine"). User should be able to view or remove unwanted versions. Forking older versions into another note is separate feature.

Version storage must be stored in .ark/versions file and should look approximately like this:

3155416 -> 7705444
5839051 -> 8921986
9279849 -> 1558729
3155416 -> 9763586
2128401 -> 19145158

Each entry of the file is a pair of ResourceIds, left id is parent and right id is child.

This feature needs a button to invoke list of versions, or "timeback machine", for any note. Each version must have a button to see its content (read-only mode), to remove it and to fork it (separate issue).

When we remove a version, we must keep the history unbroken.
Suppose, we have entries like this in storage:

3155416 -> 7705444
7705444 -> 8921986

If we want to remove 7705444 version, then we must replace these 2 entries with new entry:

3155416 -> 8921986

Metadata

Metadata

Labels

Type

No type

Projects

Status

Todo

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions