feat(tasks): deepening a task into a note keeps the task, linked to the note's first checkbox
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
c851b8e3ba
commit
1a56be572c
5 files changed
+66
-3
No files matched your search
@@ -310,6 +310,7 @@ func (s *Store) UpdateThoughtTriage(userID, thoughtID, action, convertTo, target
|
||||
newStatus = domain.StatusConverted
|
||||
convertedType = "task"
|
||||
} else if convertTo == "document" {
|
||||
isTask := thought.Status == domain.StatusKept || (thought.Status == domain.StatusConverted && thought.ConvertedType == "task")
|
||||
newStatus = domain.StatusConverted
|
||||
convertedType = "document"
|
||||
title := thought.Content
|
||||
@@ -373,6 +374,13 @@ func (s *Store) UpdateThoughtTriage(userID, thoughtID, action, convertTo, target
|
||||
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
|
||||
// from a note block); a thought from the inbox turns into the note
|
||||
if isTask {
|
||||
newStatus = domain.StatusKept
|
||||
convertedType = "document_block"
|
||||
convertedRefID = doc.ID + ":" + blocks[0].ID
|
||||
}
|
||||
}
|
||||
} else if convertTo == "list_item" && targetListID != "" {
|
||||
// Same rule as adding an item in the list itself: owner or editor
|
||||
|
||||
Reference in new issue
Block a user