fix: shift range from a pinned note in its folder; kanban fits the window; list toolbar; quick dump targets only select; aligned bullets; steady search field; browser voice waits 5 s
MindSift CI & Docker Release / Build, Test in Container & Push (push) Successful in 2m28s
MindSift CI & Docker Release / Build, Test in Container & Push (push) Successful in 2m28s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
5a9c5bac37
commit
e2b9daba75
26 files changed
+208
-138
No files matched your search
@@ -315,7 +315,7 @@ func (w *simWorld) sync(c *simClient, reliable bool) {
|
||||
|
||||
func runSimulation(t *testing.T, seed int64, steps int) {
|
||||
store, u := newSyncTestStore(t)
|
||||
doc, err := store.CreateDocument(u.ID, "", "Sim", "📄", "", flatBlocks([3]interface{}{"root", 0, "Start"}), nil, false)
|
||||
doc, err := store.CreateDocument(u.ID, "", "Sim", "🗒️", "", flatBlocks([3]interface{}{"root", 0, "Start"}), nil, false)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
@@ -71,7 +71,7 @@ func TestLegacySaveRoundTripsThroughTheLog(t *testing.T) {
|
||||
[3]interface{}{"d", 1, "Aufgabe 2"},
|
||||
[3]interface{}{"e", 0, "Anderes"},
|
||||
)
|
||||
doc, err := s.CreateDocument(u.ID, "", "Notiz", "📄", "", initial, nil, false)
|
||||
doc, err := s.CreateDocument(u.ID, "", "Notiz", "🗒️", "", initial, nil, false)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
@@ -111,7 +111,7 @@ func TestLegacySaveRoundTripsThroughTheLog(t *testing.T) {
|
||||
|
||||
func TestApplyDocOpsIsIdempotent(t *testing.T) {
|
||||
s, u := newSyncTestStore(t)
|
||||
doc, _ := s.CreateDocument(u.ID, "", "Notiz", "📄", "", flatBlocks([3]interface{}{"a", 0, "Start"}), nil, false)
|
||||
doc, _ := s.CreateDocument(u.ID, "", "Notiz", "🗒️", "", flatBlocks([3]interface{}{"a", 0, "Start"}), nil, false)
|
||||
a := collab.Actor{UserID: u.ID, ClientID: "tab1", Name: "Owner"}
|
||||
text := "Geändert"
|
||||
op := collab.Op{OpID: "op-1", Kind: collab.OpSetContent, BlockID: "a", BaseVersion: 1, Content: &text}
|
||||
@@ -129,8 +129,8 @@ func TestApplyDocOpsIsIdempotent(t *testing.T) {
|
||||
|
||||
func TestInsertCannotReuseBlockIDOfAnotherNote(t *testing.T) {
|
||||
s, u := newSyncTestStore(t)
|
||||
other, _ := s.CreateDocument(u.ID, "", "Andere", "📄", "", flatBlocks([3]interface{}{"shared_id", 0, "Fremd"}), nil, false)
|
||||
doc, _ := s.CreateDocument(u.ID, "", "Notiz", "📄", "", nil, nil, false)
|
||||
other, _ := s.CreateDocument(u.ID, "", "Andere", "🗒️", "", flatBlocks([3]interface{}{"shared_id", 0, "Fremd"}), nil, false)
|
||||
doc, _ := s.CreateDocument(u.ID, "", "Notiz", "🗒️", "", nil, nil, false)
|
||||
a := collab.Actor{UserID: u.ID, ClientID: "tab1"}
|
||||
content, root := "Übernahme", ""
|
||||
res, _, err := s.ApplyDocOps(doc.ID, a, []collab.Op{{OpID: "x", Kind: collab.OpInsert, BlockID: "shared_id", ParentID: &root, OrderKey: "a0", Content: &content}}, nil)
|
||||
@@ -148,7 +148,7 @@ func TestDocRole(t *testing.T) {
|
||||
reader, _ := s.CreateUser("reader@example.com", "hash", "Reader", "member")
|
||||
writer, _ := s.CreateUser("writer@example.com", "hash", "Writer", "member")
|
||||
stranger, _ := s.CreateUser("stranger@example.com", "hash", "Stranger", "member")
|
||||
doc, _ := s.CreateDocument(owner.ID, "", "Notiz", "📄", "", nil, nil, false)
|
||||
doc, _ := s.CreateDocument(owner.ID, "", "Notiz", "🗒️", "", nil, nil, false)
|
||||
|
||||
now := domain.NowISO()
|
||||
if _, err := s.db.Exec(`INSERT INTO doc_shares (id, doc_id, user_id, permission, created_at, created_by) VALUES ('s1', ?, ?, 'read', ?, ?), ('s2', ?, ?, 'write', ?, ?)`,
|
||||
@@ -167,7 +167,7 @@ func TestDocRole(t *testing.T) {
|
||||
|
||||
func TestBackfillConvertsFlatBlocksToTree(t *testing.T) {
|
||||
s, u := newSyncTestStore(t)
|
||||
doc, _ := s.CreateDocument(u.ID, "", "Alt", "📄", "", nil, nil, false)
|
||||
doc, _ := s.CreateDocument(u.ID, "", "Alt", "🗒️", "", nil, nil, false)
|
||||
if _, err := s.db.Exec(`DELETE FROM blocks WHERE document_id = ?`, doc.ID); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
@@ -186,7 +186,7 @@ func TestBackfillConvertsFlatBlocksToTree(t *testing.T) {
|
||||
|
||||
func TestTaskLinksFollowTheirBlock(t *testing.T) {
|
||||
s, u := newSyncTestStore(t)
|
||||
doc, _ := s.CreateDocument(u.ID, "", "Notiz", "📄", "", []domain.DocumentBlock{{ID: "todo1", Type: "todo", Content: "Anrufen"}}, nil, false)
|
||||
doc, _ := s.CreateDocument(u.ID, "", "Notiz", "🗒️", "", []domain.DocumentBlock{{ID: "todo1", Type: "todo", Content: "Anrufen"}}, nil, false)
|
||||
task, err := s.CreateTaskFromDocBlock(u.ID, doc.ID, "todo1", "Anrufen", false)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
@@ -225,8 +225,8 @@ func TestFixedBlockIDsWorkInSeveralNotes(t *testing.T) {
|
||||
s, u := newSyncTestStore(t)
|
||||
other, _ := s.CreateUser("second@example.com", "hash", "Second", "member")
|
||||
blocks := flatBlocks([3]interface{}{"blk_1", 0, "Willkommen"}, [3]interface{}{"blk_2", 1, "Unterpunkt"})
|
||||
first, _ := s.CreateDocument(u.ID, "", "Start", "📄", "", blocks, nil, false)
|
||||
second, _ := s.CreateDocument(other.ID, "", "Start", "📄", "", blocks, nil, false)
|
||||
first, _ := s.CreateDocument(u.ID, "", "Start", "🗒️", "", blocks, nil, false)
|
||||
second, _ := s.CreateDocument(other.ID, "", "Start", "🗒️", "", blocks, nil, false)
|
||||
|
||||
a, _ := s.GetDocumentByID(u.ID, first.ID)
|
||||
b, _ := s.GetDocumentByID(other.ID, second.ID)
|
||||
@@ -254,7 +254,7 @@ func backdate(t *testing.T, s *Store, docID string, age time.Duration) {
|
||||
|
||||
func TestCompactionKeepsStateAndForcesResync(t *testing.T) {
|
||||
s, u := newSyncTestStore(t)
|
||||
doc, _ := s.CreateDocument(u.ID, "", "Notiz", "📄", "", flatBlocks(
|
||||
doc, _ := s.CreateDocument(u.ID, "", "Notiz", "🗒️", "", flatBlocks(
|
||||
[3]interface{}{"a", 0, "Bleibt"},
|
||||
[3]interface{}{"b", 0, "Gelöscht"},
|
||||
[3]interface{}{"c", 1, "Kind von b"},
|
||||
@@ -324,8 +324,8 @@ func TestCompactionKeepsStateAndForcesResync(t *testing.T) {
|
||||
func TestCompactionRetentionDependsOnSharing(t *testing.T) {
|
||||
s, u := newSyncTestStore(t)
|
||||
other, _ := s.CreateUser("ben@example.com", "hash", "Ben", "member")
|
||||
private, _ := s.CreateDocument(u.ID, "", "Privat", "📄", "", flatBlocks([3]interface{}{"p", 0, "x"}), nil, false)
|
||||
shared, _ := s.CreateDocument(u.ID, "", "Geteilt", "📄", "", flatBlocks([3]interface{}{"s", 0, "x"}), nil, false)
|
||||
private, _ := s.CreateDocument(u.ID, "", "Privat", "🗒️", "", flatBlocks([3]interface{}{"p", 0, "x"}), nil, false)
|
||||
shared, _ := s.CreateDocument(u.ID, "", "Geteilt", "🗒️", "", flatBlocks([3]interface{}{"s", 0, "x"}), nil, false)
|
||||
if _, err := s.CreateDocShare(u.ID, shared.ID, other.Email, "write"); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
@@ -344,7 +344,7 @@ func TestCompactionRetentionDependsOnSharing(t *testing.T) {
|
||||
|
||||
func TestDeletedAtFollowsDeleteAndRestore(t *testing.T) {
|
||||
s, u := newSyncTestStore(t)
|
||||
doc, _ := s.CreateDocument(u.ID, "", "Notiz", "📄", "", flatBlocks([3]interface{}{"a", 0, "x"}, [3]interface{}{"b", 0, "y"}), nil, false)
|
||||
doc, _ := s.CreateDocument(u.ID, "", "Notiz", "🗒️", "", flatBlocks([3]interface{}{"a", 0, "x"}, [3]interface{}{"b", 0, "y"}), nil, false)
|
||||
a := collab.Actor{UserID: u.ID, ClientID: "tab1"}
|
||||
deletedAt := func() string {
|
||||
var v string
|
||||
|
||||
@@ -147,7 +147,7 @@ func (s *Store) CreateDocument(userID, spaceID, title, icon, folderPath string,
|
||||
title = "Unbenannte Notiz"
|
||||
}
|
||||
if icon == "" {
|
||||
icon = "📄"
|
||||
icon = "🗒️"
|
||||
}
|
||||
if blocks == nil {
|
||||
blocks = []domain.DocumentBlock{
|
||||
|
||||
@@ -536,7 +536,7 @@ func (s *Store) ApplyImport(userID string, plan *ImportPlan) (ImportSummary, err
|
||||
}
|
||||
icon := d.icon
|
||||
if icon == "" {
|
||||
icon = "📄"
|
||||
icon = "🗒️"
|
||||
}
|
||||
blocks, files := linkImportMedia(d, plan.Media, nil)
|
||||
doc, err := s.CreateDocument(userID, "", title, icon, d.folder, blocks, nil, false)
|
||||
|
||||
@@ -134,7 +134,7 @@ func (s *Store) ExtractBranch(userID, docID, blockID string, a collab.Actor, lea
|
||||
|
||||
base, tags := branchTitle(root.Content)
|
||||
title := s.uniqueTitle(userID, base)
|
||||
created, err := s.CreateDocument(userID, "", title, "📄", source.FolderPath, children, nil, false)
|
||||
created, err := s.CreateDocument(userID, "", title, "🗒️", source.FolderPath, children, nil, false)
|
||||
if err != nil {
|
||||
return nil, "", err
|
||||
}
|
||||
|
||||
@@ -189,7 +189,7 @@ func TestStoreLifecycle(t *testing.T) {
|
||||
if !store.CanEditTaskList(user2.ID, taskList.ID) {
|
||||
t.Fatalf("editor share should allow editing")
|
||||
}
|
||||
newDoc, err := store.CreateDocument(user.ID, "", "Test Note", "📄", "", []domain.DocumentBlock{
|
||||
newDoc, err := store.CreateDocument(user.ID, "", "Test Note", "🗒️", "", []domain.DocumentBlock{
|
||||
{ID: "blk_1", Type: "bullet", Content: "Geheim", Level: 0},
|
||||
}, []string{"test"}, false)
|
||||
if err != nil {
|
||||
@@ -393,7 +393,7 @@ func TestFolderManagementAndDeletion(t *testing.T) {
|
||||
}
|
||||
|
||||
// 2. Create document in subfolder
|
||||
doc1, err := store.CreateDocument(user.ID, "", "Doc in MindSift", "📄", "Projekte/MindSift", nil, nil, false)
|
||||
doc1, err := store.CreateDocument(user.ID, "", "Doc in MindSift", "🗒️", "Projekte/MindSift", nil, nil, false)
|
||||
if err != nil {
|
||||
t.Fatalf("CreateDocument failed: %v", err)
|
||||
}
|
||||
|
||||
@@ -383,7 +383,7 @@ func (s *Store) UpdateThoughtTriage(userID, thoughtID, action, convertTo, target
|
||||
Level: 0,
|
||||
})
|
||||
}
|
||||
doc, err := s.CreateDocument(userID, "", title, "📄", "", blocks, thought.Tags, false)
|
||||
doc, err := s.CreateDocument(userID, "", title, "🗒️", "", blocks, thought.Tags, false)
|
||||
if err == nil && doc != nil {
|
||||
convertedRefID = doc.ID
|
||||
// A task stays in its list and becomes the note's first checkbox (same link as a task made
|
||||
|
||||
@@ -58,7 +58,7 @@ func TestVisibilityFollowsOrganizations(t *testing.T) {
|
||||
}
|
||||
|
||||
// Sharing: visible people only; an invisible e-mail looks like an unknown one
|
||||
doc, _ := store.CreateDocument(anna.ID, "", "Einkauf", "📄", "", nil, nil, false)
|
||||
doc, _ := store.CreateDocument(anna.ID, "", "Einkauf", "🗒️", "", nil, nil, false)
|
||||
if _, err := store.CreateDocShare(anna.ID, doc.ID, ben.ID, "write"); err != nil {
|
||||
t.Fatalf("share with Ben failed: %v", err)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user