Skip to content

mblackman/tiddlywiki-timelord

Repository files navigation

Timelord for TiddlyWiki

Full revision history for TiddlyWiki tiddlers — diffs, restores, and delete capture across every field, not just text.

Demo

Features

  • Infinite revision history — No automatic pruning, ever. The wiki is the source of truth.
  • Full restore — Click any revision and restore the tiddler to that exact state (including all fields and tags). Restores are themselves undoable.
  • Delete capture — When a tiddler is deleted, its final state is saved before removal. A "Deleted Tiddlers" sidebar tab keeps them discoverable and restorable.
  • Diff view — See exactly what changed between any two revisions, including both text diffs and field changes (e.g., added/removed tags).
  • Edit summaries — Annotate why a change was made with an optional edit summary, displayed alongside each revision in the history.
  • Smart storage — Revisions use delta and diff compression under the hood to minimize storage bloat while retaining a complete history of all fields.
  • Bulk-operation pause & exclusions — Toggle tracking off globally for mass imports, or exclude specific tiddlers via filters in the Settings tab.
  • Chain integrity tools — Verify and repair revision chains from the Settings tab. Broken revisions are flagged and the first healthy revision after a break is promoted to a full snapshot.
  • Revision stats & pruning — A stats view in the More sidebar shows total revisions, storage bytes, and top tiddlers by revision count. Filter-based pruning lets you bulk-remove history for matched tiddlers.
  • In-wiki help — Built-in documentation accessible from the plugin info panel.

Building

npm install
npm run build-plugin   # outputs build/timelord.tid
npm run build-all      # build-plugin + seed demo data + build demo wiki to build/index.html

Demo site

The demo wiki ships with pre-built revision histories generated by a seed script. Content definitions live in scripts/demo-content.js — a declarative list of tiddlers and their edit sequences. The seed engine (scripts/seed-demo.js) replays these through the Revisor class to produce valid revision chains with proper hashes, deltas, and snapshots.

npm run seed-demo      # regenerate demo/tiddlers/ from demo-content.js (idempotent)

Revision tiddlers in demo/tiddlers/ are gitignored (generated artifacts). Content tiddlers are committed. build-all and clean-serve both run the seed automatically.

Demo vs. debug wikis

The repo has two wiki directories:

  • demo/ — the canonical wiki that gets built and published. build-all / build-demo always build from this directory.
  • debug/ — a local sandbox for testing. Gitignored and persistent across dev-server restarts. Seeded from demo/ on first use.
npm run serve          # dev server from debug/ at localhost:8081 (edits persist)
npm run clean-serve    # seed demo data, wipe debug/, re-seed from demo/, then serve (fresh start)
npm run build-debug    # build debug/ to build/index.html (sandbox preview)
npm run clean-debug    # wipe debug/ and re-seed from demo/ (explicit reset)

To promote a sandbox change into the canonical demo, edit scripts/demo-content.js and re-run npm run seed-demo.

Testing

npm test               # run all tests
npm run test:coverage  # run with coverage report

Tests use Jest with a mock TiddlyWiki runtime. Coverage targets ~90% for core code paths.

Installation

Install it from the Demo page by dragging and dropping the plugin.

Or if you are testing locally:

Import build/timelord.tid into your TiddlyWiki by drag-and-drop or the standard import dialog.

Requirements

TiddlyWiki >=5.3.0.

Usage

Once a tiddler has been edited, the plugin automatically archives the previous version as a system tiddler.

  • To view revisions, diffs, and restore a tiddler, click the Info button on a tiddler and go to the Revisions tab.
  • To view or restore deleted tiddlers, open the sidebar and navigate to the Deleted Tiddlers tab.

Documentation

Developer-facing documentation lives in docs/. Start there for architecture, data model, storage modes, integration points, and schema-versioning guidance.

About

A TiddlyWiki plugin to provide revision history for Tiddlers.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors