feat: select text across bullets and delete it like a text editor; Ctrl+Z in tasks; notes and lists without emoji; custom done columns complete tasks
MindSift CI & Docker Release / Build, Test in Container & Push (push) Successful in 2m33s
MindSift CI & Docker Release / Build, Test in Container & Push (push) Successful in 2m33s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
e2b9daba75
commit
6fb98d4002
27 files changed
+535
-64
No files matched your search
@@ -238,7 +238,7 @@ func (s *Store) ReorderTasks(taskListID string, items []domain.ThoughtReorderIte
|
||||
for _, it := range items {
|
||||
if it.KanbanStatus != nil && *it.KanbanStatus != "" {
|
||||
isCompleted := 0
|
||||
if *it.KanbanStatus == "done" {
|
||||
if isDoneColumn(tx, it.ID, *it.KanbanStatus) {
|
||||
isCompleted = 1
|
||||
var was int
|
||||
_ = tx.QueryRow(`SELECT is_completed FROM thoughts WHERE id = ?`, it.ID).Scan(&was)
|
||||
@@ -275,6 +275,24 @@ func (s *Store) ReorderTasks(taskListID string, items []domain.ThoughtReorderIte
|
||||
return nil
|
||||
}
|
||||
|
||||
// isDoneColumn: whether a Kanban column completes the task: the column of the task's list marked as done
|
||||
// (its ID may be anything), else the default ID "done".
|
||||
func isDoneColumn(q interface {
|
||||
QueryRow(query string, args ...any) *sql.Row
|
||||
}, taskID, column string) bool {
|
||||
var raw string
|
||||
_ = q.QueryRow(`SELECT COALESCE(tl.columns, '') FROM thoughts t LEFT JOIN task_lists tl ON tl.id = t.task_list_id WHERE t.id = ?`, taskID).Scan(&raw)
|
||||
var cols []domain.KanbanColumn
|
||||
if raw != "" && json.Unmarshal([]byte(raw), &cols) == nil && len(cols) > 0 {
|
||||
for _, c := range cols {
|
||||
if c.ID == column {
|
||||
return c.IsDone
|
||||
}
|
||||
}
|
||||
}
|
||||
return column == "done"
|
||||
}
|
||||
|
||||
// UpdateThoughtTriage handles swipe left (discard), swipe right (keep), restore, and conversion to task/document/list_item
|
||||
func (s *Store) UpdateThoughtTriage(userID, thoughtID, action, convertTo, targetListID, dueDate, taskListID string) (*domain.Thought, error) {
|
||||
thought, err := s.GetThoughtByID(userID, thoughtID)
|
||||
|
||||
Reference in new issue
Block a user