lune
created pr with
124.1
changed status to
closed
Closing as superceded by 126
cmds
checkout latest patchset:
ssh pr.pico.sh print 124 | git am -3checkout any patchset in a patch request:
ssh pr.pico.sh print 124.[rev] | git am -3add changes to patch request:
git format-patch main --stdout | ssh pr.pico.sh pr add 124set PR to open (enables RSS notifications):
ssh pr.pico.sh pr open 124set PR to draft (stops RSS notifications):
ssh pr.pico.sh pr draft 124
Patchset
124.1
listing real name of tasks
juan
construction of db for management of decrypted names of tasks
2026-04-21T03:21:16Zjuan
fix UTF8 chracteres
2026-04-21T05:43:09Zjuan
filter by status and coloring types of status
2026-04-21T21:13:24Zjuan
update help
2026-04-21T21:18:53Zjuan
list areas names
2026-04-21T21:21:36Zjuan
adjust table tasks to truncate name and list area
2026-04-21T21:44:53Zjuan
partial implementation of listing tasks by areas
2026-04-21T21:56:40Zjuan
final implementation of listing tasks by areas with UTF-8 chracteres
2026-04-21T22:05:20Zjuan
sort on task list to show first do now
2026-04-21T22:10:20Zjuan
update with 8 char of id and db.go
2026-04-21T22:33:29Zjuan
partial implementation of TUI menu on task update
2026-04-21T23:27:54Zjuan
task name correcion on TUI menu of Update task
2026-04-21T23:35:35Zjuan
→ TUI menu for update task with others flags
2026-04-21T23:38:19Zjuan
helper for TUI update task
2026-04-21T23:43:02Zjuan
search by first 8 char of note id for editing it
2026-04-21T23:49:56Zjuan
partial implementation on note TUI menu for update
2026-04-22T00:00:17Zjuan
TUI menu notebook just with tags
2026-04-22T00:05:46Zjuan
Note update now let you insert only the first 8 char of notebook id in update
2026-04-22T00:20:55Zjuan
implementation of (lune note notebook-list) for listing all notebooks and its ID
2026-04-22T00:25:53Zjuan
partial implementation of lune note show-content ID
2026-04-22T01:10:51Zjuan
convert \n in new line and \ in space for lune note show-content ID
2026-04-22T02:01:11Zjuan
2026-04-22T02:18:42Z
TUI menu for update task with others flags
juan
2026-04-21T23:43:02ZSemantic diff summary
0 added,
2 modified,
0 signature changed,
0 removed
across 1 analyzed file
+75
-13
cmd/task/interactive.go
#
| ... | ... | @@ -12,15 +14,14 @@ import ( | |
| 12 | 14 | ) | |
| 13 | 15 | ||
| 14 | 16 | func runUpdateInteractive(cmd *cobra.Command, task *lunatask.Task, builder *lunatask.TaskUpdateBuilder) error { | |
| 17 | + | // Existing fields | |
| 15 | 18 | name := "" | |
| 16 | - | // Try enriching from local DB first | |
| 17 | 19 | dbName, _ := db.EnrichTask(task.ID) | |
| 18 | 20 | if dbName != "" { | |
| 19 | 21 | name = dbName | |
| 20 | 22 | } else if task.Name != nil { | |
| 21 | 23 | name = *task.Name | |
| 22 | 24 | } | |
| 23 | - | ||
| 24 | 25 | if name == "" { | |
| 25 | 26 | name = "Unnamed Task" | |
| 26 | 27 | } |
| ... | ... | @@ -29,12 +30,35 @@ func runUpdateInteractive(cmd *cobra.Command, task *lunatask.Task, builder *luna | |
| 29 | 30 | if task.Status != nil { | |
| 30 | 31 | newStatus = string(*task.Status) | |
| 31 | 32 | } | |
| 32 | - | ||
| 33 | + | ||
| 34 | + | // New fields | |
| 35 | + | priority := "normal" | |
| 36 | + | if task.Priority != nil { | |
| 37 | + | priority = string(*task.Priority) | |
| 38 | + | } | |
| 39 | + | ||
| 40 | + | motivation := "" | |
| 41 | + | if task.Motivation != nil { | |
| 42 | + | motivation = string(*task.Motivation) | |
| 43 | + | } | |
| 44 | + | ||
| 45 | + | note := "" | |
| 46 | + | if task.Note != nil { | |
| 47 | + | note = *task.Note | |
| 48 | + | } | |
| 49 | + | ||
| 50 | + | estimate := 0 | |
| 51 | + | if task.Estimate != nil { | |
| 52 | + | estimate = *task.Estimate | |
| 53 | + | } | |
| 54 | + | estStr := fmt.Sprintf("%d", estimate) | |
| 55 | + | ||
| 56 | + | important := task.Eisenhower != nil && task.Eisenhower.IsImportant() | |
| 57 | + | urgent := task.Eisenhower != nil && task.Eisenhower.IsUrgent() | |
| 58 | + | ||
| 33 | 59 | form := huh.NewForm( | |
| 34 | 60 | huh.NewGroup( | |
| 35 | - | huh.NewInput(). | |
| 36 | - | Title("Task Name"). | |
| 37 | - | Value(&name), | |
| 61 | + | huh.NewInput().Title("Task Name").Value(&name), | |
| 38 | 62 | huh.NewSelect[string](). | |
| 39 | 63 | Title("Status"). | |
| 40 | 64 | Options( |
| ... | ... | @@ -43,21 +67,59 @@ func runUpdateInteractive(cmd *cobra.Command, task *lunatask.Task, builder *luna | |
| 43 | 67 | huh.NewOption("In Progress", "in-progress"), | |
| 44 | 68 | huh.NewOption("Waiting", "waiting"), | |
| 45 | 69 | huh.NewOption("Completed", "completed"), | |
| 46 | - | ). | |
| 47 | - | Value(&newStatus), | |
| 70 | + | ).Value(&newStatus), | |
| 71 | + | ), | |
| 72 | + | huh.NewGroup( | |
| 73 | + | huh.NewSelect[string](). | |
| 74 | + | Title("Priority"). | |
| 75 | + | Options( | |
| 76 | + | huh.NewOption("Lowest", "lowest"), | |
| 77 | + | huh.NewOption("Low", "low"), | |
| 78 | + | huh.NewOption("Normal", "normal"), | |
| 79 | + | huh.NewOption("High", "high"), | |
| 80 | + | huh.NewOption("Highest", "highest"), | |
| 81 | + | ).Value(&priority), | |
| 82 | + | huh.NewSelect[string](). | |
| 83 | + | Title("Motivation"). | |
| 84 | + | Options( | |
| 85 | + | huh.NewOption("Must", "must"), | |
| 86 | + | huh.NewOption("Should", "should"), | |
| 87 | + | huh.NewOption("Want", "want"), | |
| 88 | + | ).Value(&motivation), | |
| 89 | + | huh.NewInput().Title("Note").Value(¬e), | |
| 90 | + | huh.NewInput().Title("Estimate (minutes)").Value(&estStr), | |
| 91 | + | ), | |
| 92 | + | huh.NewGroup( | |
| 93 | + | huh.NewConfirm().Title("Important?").Value(&important), | |
| 94 | + | huh.NewConfirm().Title("Urgent?").Value(&urgent), | |
| 48 | 95 | ), | |
| 49 | 96 | ) | |
| 50 | - | ||
| 97 | + | ||
| 51 | 98 | if err := form.Run(); err != nil { | |
| 52 | 99 | return err | |
| 53 | 100 | } | |
| 54 | 101 | ||
| 102 | + | // Apply updates | |
| 55 | 103 | builder.Name(name) | |
| 56 | - | ||
| 57 | 104 | if newStatus != "" { | |
| 58 | - | status := lunatask.TaskStatus(newStatus) | |
| 59 | - | builder.WithStatus(status) | |
| 105 | + | builder.WithStatus(lunatask.TaskStatus(newStatus)) | |
| 106 | + | } | |
| 107 | + | if priority != "" { | |
| 108 | + | p, _ := lunatask.ParsePriority(priority) | |
| 109 | + | builder.Priority(p) | |
| 110 | + | } | |
| 111 | + | if motivation != "" { | |
| 112 | + | m, _ := lunatask.ParseMotivation(motivation) | |
| 113 | + | builder.WithMotivation(m) | |
| 60 | 114 | } | |
| 115 | + | builder.WithNote(note) | |
| 116 | + | ||
| 117 | + | if est, err := strconv.Atoi(estStr); err == nil { | |
| 118 | + | builder.WithEstimate(est) | |
| 119 | + | } | |
| 120 | + | ||
| 121 | + | if important { builder.Important() } else { builder.NotImportant() } | |
| 122 | + | if urgent { builder.Urgent() } else { builder.NotUrgent() } | |
| 61 | 123 | ||
| 62 | 124 | return nil | |
| 63 | 125 | } |