feat: link dialog finds bullets of all notes; richer sample data with help notes, deep nesting and linked to-dos
MindSift CI & Docker Release / Build, Test in Container & Push (push) Successful in 2m46s

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
sandrodachandClaude Opus 5.5 committed 2026-11-01 17:23:53 +01:00
1 parent ae96aa5f2b
commit ca56220e68
12 files changed
+303 -40

No files matched your search

+13 -3
View File
@@ -3,6 +3,7 @@ package storage
import (
"errors"
"path/filepath"
"strings"
"testing"
"time"
@@ -398,13 +399,22 @@ func TestDemoAccountsGetSampleDataAndShares(t *testing.T) {
t.Fatalf("expected tasks and inbox thoughts, got %d tasks, %d inbox", tasks, inbox)
}
// Running it again (container restart) must not seed twice
var before, docs int
_ = s.db.QueryRow(`SELECT COUNT(*) FROM documents WHERE user_id = ?`, admin.ID).Scan(&before)
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 != 4 {
t.Fatalf("restart seeded again: %d notes", docs)
if docs != before || docs < 10 {
t.Fatalf("restart seeded again or sample notes missing: %d notes before, %d after", before, docs)
}
// The linked example: a task tied to a note checkbox, with the checkboxes below as subtasks
var subtasks string
if err := s.db.QueryRow(`SELECT subtasks FROM thoughts WHERE user_id = ? AND converted_type = 'document_block' AND content LIKE 'Backup-Konzept%'`, admin.ID).Scan(&subtasks); err != nil {
t.Fatalf("linked sample task missing: %v", err)
}
if !strings.Contains(subtasks, "systemd-Timer") || !strings.Contains(subtasks, "blockId") {
t.Fatalf("checkboxes below should be linked subtasks: %s", subtasks)
}
}