lune

created pr with 124.1 on 2026-04-22T02:46:44Z · by 613b58b7
changed status to closed on 2026-06-21T16:45:31Z · by 66ddd677
Closing as superceded by 126
cmds
checkout latest patchset:
ssh pr.pico.sh print 124 | git am -3
checkout any patchset in a patch request:
ssh pr.pico.sh print 124.[rev] | git am -3
add changes to patch request:
git format-patch main --stdout | ssh pr.pico.sh pr add 124
set PR to open (enables RSS notifications):
ssh pr.pico.sh pr open 124
set PR to draft (stops RSS notifications):
ssh pr.pico.sh pr draft 124

Patchset 124.1 on 2026-04-22T02:46:44Z · commit 226352b

listing real name of tasks
juan 2026-04-21T03:21:16Z
construction of db for management of decrypted names of tasks
juan 2026-04-21T05:43:09Z
fix UTF8 chracteres
juan 2026-04-21T21:13:24Z
filter by status and coloring types of status
juan 2026-04-21T21:18:53Z
update help
juan 2026-04-21T21:21:36Z
list areas names
juan 2026-04-21T21:44:53Z
adjust table tasks to truncate name and list area
juan 2026-04-21T21:56:40Z
partial implementation of listing tasks by areas
juan 2026-04-21T22:05:20Z
final implementation of listing tasks by areas with UTF-8 chracteres
juan 2026-04-21T22:10:20Z
sort on task list to show first do now
juan 2026-04-21T22:33:29Z
update with 8 char of id and db.go
juan 2026-04-21T23:27:54Z
partial implementation of TUI menu on task update
juan 2026-04-21T23:35:35Z
task name correcion on TUI menu of Update task
juan 2026-04-21T23:38:19Z
TUI menu for update task with others flags
juan 2026-04-21T23:43:02Z
helper for TUI update task
juan 2026-04-21T23:49:56Z
search by first 8 char of note id for editing it
juan 2026-04-22T00:00:17Z
partial implementation on note TUI menu for update
juan 2026-04-22T00:05:46Z
TUI menu notebook just with tags
juan 2026-04-22T00:20:55Z
Note update now let you insert only the first 8 char of notebook id in update
juan 2026-04-22T00:25:53Z
implementation of (lune note notebook-list) for listing all notebooks and its ID
juan 2026-04-22T01:10:51Z
partial implementation of lune note show-content ID
juan 2026-04-22T02:01:11Z
convert \n in new line and \ in space for lune note show-content ID
juan 2026-04-22T02:18:42Z
+0 -1 cmd/area/list.go #
......@@ -26,7 +26,6 @@ type displayArea struct {
2626 // ListCmd lists configured areas and their goals.
2727 var ListCmd = &cobra.Command{
2828 Use: "list",
29- Aliases: []string{"lista"},
3029 Short: "List areas",
3130 Long: `List areas configured in lune or found in your local database.
3231
+0 -1 cmd/goal/list.go #
......@@ -20,7 +20,6 @@ import (
2020 // ListCmd lists configured goals.
2121 var ListCmd = &cobra.Command{
2222 Use: "list [AREA]",
23- Aliases: []string{"lista"},
2423 Short: "List goals",
2524 Long: `List goals configured in lune or found in your local database.
2625
+0 -1 cmd/note/list.go #
......@@ -28,7 +28,6 @@ type enrichedNote struct {
2828 // ListCmd lists notes. Exported for potential use by shortcuts.
2929 var ListCmd = &cobra.Command{
3030 Use: "list",
31- Aliases: []string{"lista"},
3231 Short: "List notes",
3332 Long: `List notes from Lunatask.
3433
+36 -1 cmd/task/list.go #
......@@ -8,6 +8,7 @@ import (
88 "encoding/json"
99 "errors"
1010 "fmt"
11+ "sort"
1112 "strings"
1213 "time"
1314
......@@ -33,7 +34,6 @@ var ErrUnknownArea = errors.New("unknown area key")
3334 // ListCmd lists tasks. Exported for potential use by shortcuts.
3435 var ListCmd = &cobra.Command{
3536 Use: "list [AREA]",
36- Aliases: []string{"lista"},
3737 Short: "List tasks",
3838 Long: `List tasks from Lunatask.
3939
......@@ -118,6 +118,8 @@ func runList(cmd *cobra.Command, args []string) error {
118118 return outputJSONEnriched(cmd, filtered)
119119 }
120120
121+ sortTasks(filtered)
122+
121123 return outputTableEnriched(cmd, filtered)
122124 }
123125
......@@ -360,3 +362,36 @@ func outputTableEnriched(cmd *cobra.Command, tasks []enrichedTask) error {
360362 fmt.Fprintln(cmd.OutOrStdout(), tbl.Render())
361363 return nil
362364 }
365+
366+func sortTasks(tasks []enrichedTask) {
367+ priority := map[lunatask.TaskStatus]int{
368+ lunatask.StatusInProgress: 1,
369+ lunatask.StatusNext: 2,
370+ lunatask.StatusWaiting: 3,
371+ lunatask.StatusLater: 4,
372+ lunatask.StatusCompleted: 5,
373+ }
374+
375+ sort.Slice(tasks, func(i, j int) bool {
376+ pI := 100
377+ if tasks[i].Status != nil {
378+ if p, ok := priority[*tasks[i].Status]; ok {
379+ pI = p
380+ }
381+ }
382+
383+ pJ := 100
384+ if tasks[j].Status != nil {
385+ if p, ok := priority[*tasks[j].Status]; ok {
386+ pJ = p
387+ }
388+ }
389+
390+ if pI != pJ {
391+ return pI < pJ
392+ }
393+
394+ // Secondary sort by creation date (newest first)
395+ return tasks[i].CreatedAt.After(tasks[j].CreatedAt)
396+ })
397+}
Back to top