4 Commits

Author SHA1 Message Date
c389bab46e Add version history with rollback and per-note created/synced info
All checks were successful
ci / test (push) Successful in 3m8s
ci / release (push) Successful in 11m21s
Server (schema v2, auto-migrates): every accepted overwrite snapshots the
superseded revision into note_history (capped at 50 per note); new
GET /api/v1/notes/{id}/history endpoint; compact purges orphaned history.

Client: notes get a synced_at stamp on every confirmed server exchange;
an info footer under the editor and a Ctrl/Cmd+I panel show created/
modified/last-synced plus the revision list. Restoring a revision applies
it as a normal edit through the sync path, so rollback is non-destructive.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-25 22:20:19 +02:00
bd2b8e6241 Fix Android IME typing: editor clobbered its own autosave echo
Some checks failed
ci / test (push) Has been cancelled
ci / release (push) Has been cancelled
The $: block applying note changes to CodeMirror listed the autosave
bookkeeping vars (saveTimer, lastKnown) as dependencies, so the 400 ms
autosave re-ran it before App delivered the updated note prop. That stale
run misread the save echo as an external sync change and replaced the
whole doc mid-typing: on Android this aborted every IME composition and
threw the cursor to the top of the note.

Apply note/query via $: fn(prop) so the statements re-run only when the
prop itself changes.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-23 00:04:24 +02:00
a9ea8c7f73 New notebook logo: spiral-bound page icon for favicon/PWA/desktop
SVG source in frontend/public/icon.svg, rendered to 192/512/maskable PNGs
and desktop/build/appicon.png; SVG favicon with PNG fallback; icons added
to the service-worker precache.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-12 07:24:39 +02:00
175c89e400 Implement Tefter per SPEC.md: NV-style notes with server, sync, PWA, desktop
- frontend/: Svelte 4 + TS + Vite app — omnibar (search-and-create), ranked
  diacritic-insensitive filtering, CodeMirror 6 markdown editor with 400ms
  autosave, marked+DOMPurify preview with [[wiki-links]], tag filter, undo
  toast, light/dark, narrow-screen stacked layout, IndexedDB store, pull-then-
  push sync engine with conflict handling, versioned cache-first service
  worker + manifest (installable PWA)
- server/: tefterd — Go stdlib HTTP + modernc.org/sqlite, /api/v1 sync API
  (changes/batch/health/import), SHA-256 hashed bearer token, LWW-with-
  conflict-copies push rules, subcommands: init, token rotate, import
  simplenote, compact, backup (VACUUM INTO); embeds the frontend bundle
- desktop/: Wails v2 shell — single instance, hide-to-tray (fyne systray),
  global Ctrl+Shift+Space hotkey, quit-on-close flag
- Simplenote import (CLI + web upload), idempotent via source_id dedupe;
  verified against a real 242-note export
- Makefile (frontend/server/server-all/desktop/test), GitHub release workflow,
  README with systemd/Caddy/backup docs

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-12 07:16:01 +02:00