release: v0.2 – collaboration docs, richer demo data, new screenshots
MindSift CI & Docker Release / Build, Test in Container & Push (push) Successful in 1m30s

- Turn the collaboration plan into module docs (Doku/modules/collaboration.md)
  describing the implemented state; remove Doku/plans
- Header version comes from the build: git tag via APP_VERSION (CI passes
  it for tag builds), otherwise "<package version>-dev"; package 0.2.0
- Sample data (setup option and demo mode): six inbox thoughts, two task
  lists with Kanban states, subtasks and due dates, shopping and packing
  lists, three notes in folders incl. a long nested outline; demo mode
  shares the note and two lists with user/user
- e2e/screenshots.sh renews the README screenshots from demo data
- README: live collaboration, editor sharing, image tags, version badge

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
sandrodachandClaude Opus 5.5 committed 2026-10-28 15:32:31 +01:00
1 parent f26f286fb8
commit 4e39b367bd
25 files changed
+590 -373

No files matched your search

+44
View File
@@ -362,3 +362,47 @@ func TestDeletedAtFollowsDeleteAndRestore(t *testing.T) {
t.Fatal("restoring must clear deleted_at")
}
}
func TestDemoAccountsGetSampleDataAndShares(t *testing.T) {
s, _ := newSyncTestStore(t)
if err := s.EnsureDemoAccounts(); err != nil {
t.Fatal(err)
}
admin, _ := s.GetUserByLogin("admin")
member, _ := s.GetUserByLogin("user")
var docID string
if err := s.db.QueryRow(`SELECT id FROM documents WHERE user_id = ? AND title LIKE 'Homelab 2.0%'`, admin.ID).Scan(&docID); err != nil {
t.Fatalf("sample note missing: %v", err)
}
doc, err := s.GetDocumentByID(admin.ID, docID)
if err != nil || len(doc.Blocks) < 20 || doc.FolderPath != "Projekte" {
t.Fatalf("sample note too small or misplaced: %d blocks, folder %q, %v", len(doc.Blocks), doc.FolderPath, err)
}
maxLevel := 0
for _, b := range doc.Blocks {
if b.Level > maxLevel {
maxLevel = b.Level
}
}
if maxLevel < 2 {
t.Fatalf("sample note must have nested bullets, max level %d", maxLevel)
}
if role := s.DocRole(member.ID, docID); role != DocRoleEditor {
t.Fatalf("demo user must be editor of the sample note, got %q", role)
}
var tasks, inbox int
_ = s.db.QueryRow(`SELECT COUNT(*) FROM thoughts WHERE user_id = ? AND converted_type = 'task'`, admin.ID).Scan(&tasks)
_ = s.db.QueryRow(`SELECT COUNT(*) FROM thoughts WHERE user_id = ? AND status = 'inbox'`, admin.ID).Scan(&inbox)
if tasks < 8 || inbox < 5 {
t.Fatalf("expected tasks and inbox thoughts, got %d tasks, %d inbox", tasks, inbox)
}
// Running it again (container restart) must not seed twice
if err := s.EnsureDemoAccounts(); err != nil {
t.Fatal(err)
}
var docs int
_ = s.db.QueryRow(`SELECT COUNT(*) FROM documents WHERE user_id = ?`, admin.ID).Scan(&docs)
if docs != 3 {
t.Fatalf("restart seeded again: %d notes", docs)
}
}