Skip to content

Store todo lists in SQLite instead of markdown files - #22

Merged
andresbott merged 16 commits into
mainfrom
feat/sqlite-storage
Nov 14, 2026
Merged

andresbott merged 16 commits into
mainfrom
feat/sqlite-storage

Conversation

@andresbott

Copy link
Copy Markdown
Member

Summary

Todo lists were persisted as markdown files, which made concurrent edits, stable item references and live reload fragile. Lists now live in a SQLite database, with items addressed by ID.

What

  • Add a SQLite store with schema, transactional writes and a revision counter; newer schemas are refused.
  • CLI commands use --id selectors, and a new import command (plus auto-import) converts existing markdown into the db, which is created only on the first CLI write.
  • The TUI runs on the store and live-reloads when the revision changes, rebuilding the tree and reporting failures when a post-write reload fails.
  • Markdown persistence and rendering are dropped; the parser remains for import only.
  • Imports go through a temp file and hard link (falling back to rename), never removing the target, and the db gets mode 0644.
  • Docs updated, with the design spec and plan added.

Notes

  • Breaking: the markdown file is no longer the source of truth, so existing lists must be imported.

@andresbott
andresbott merged commit 6c39747 into main Nov 14, 2026
3 checks passed
@andresbott
andresbott deleted the feat/sqlite-storage branch November 14, 2026 13:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant