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 39aab5b

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
+9 -4 cmd/note/delete.go #
......@@ -9,6 +9,7 @@ import (
99
1010 "git.secluded.site/go-lunatask"
1111 "git.secluded.site/lune/internal/client"
12+ "git.secluded.site/lune/internal/db"
1213 "git.secluded.site/lune/internal/ui"
1314 "git.secluded.site/lune/internal/validate"
1415 "github.com/spf13/cobra"
......@@ -20,9 +21,10 @@ var DeleteCmd = &cobra.Command{
2021 Short: "Delete a note",
2122 Long: `Delete a note from Lunatask.
2223
23-Accepts a UUID or lunatask:// deep link.`,
24- Args: cobra.ExactArgs(1),
25- RunE: runDelete,
24+Accepts a UUID, lunatask:// deep link, or 8-char short ID.`,
25+ Args: cobra.ExactArgs(1),
26+ RunE: runDelete,
27+ SilenceUsage: true,
2628 }
2729
2830 func init() {
......@@ -30,7 +32,10 @@ func init() {
3032 }
3133
3234 func runDelete(cmd *cobra.Command, args []string) error {
33- id, err := validate.Reference(args[0])
35+ idInput := args[0]
36+ id := db.CompleteID(idInput)
37+
38+ id, err := validate.Reference(id)
3439 if err != nil {
3540 return err
3641 }
+36 -8 cmd/note/list.go #
......@@ -178,12 +178,18 @@ func outputTableEnriched(cmd *cobra.Command, notes []enrichedNote) error {
178178 rows := make([][]string, 0, len(notes))
179179
180180 for _, note := range notes {
181- notebook := "-"
181+ // Resolve Area name
182+ notebookName := "-"
182183 if note.NotebookID != nil {
183- notebook = *note.NotebookID
184+ notebookName = *note.NotebookID
184185 if cfg != nil {
185186 if nb := cfg.NotebookByID(*note.NotebookID); nb != nil {
186- notebook = nb.Key
187+ notebookName = nb.Key
188+ } else if cfg.Experimental.LocalDB {
189+ // Proactive area lookup in local DB
190+ if dbName, _ := db.EnrichTask(*note.NotebookID); dbName != "" {
191+ notebookName = dbName
192+ }
187193 }
188194 }
189195 }
......@@ -202,21 +208,43 @@ func outputTableEnriched(cmd *cobra.Command, notes []enrichedNote) error {
202208 if name == "" {
203209 name = note.ID[:8] + "..."
204210 }
211+
212+ // Truncate notebook name for better table layout
213+ if len(notebookName) > 8 {
214+ notebookName = notebookName[:8] + "..."
215+ }
205216
206- rows = append(rows, []string{name, notebook, dateOn, pinned})
217+ rows = append(rows, []string{note.ID[:8], name, notebookName, dateOn, pinned})
207218 }
208219
209220 tbl := table.New().
210- Headers("NAME", "NOTEBOOK", "DATE", "📌").
221+ Headers("ID", "NAME", "NOTEBOOK", "DATE", "📌").
211222 Rows(rows...).
212223 StyleFunc(func(row, col int) lipgloss.Style {
224+ style := lipgloss.NewStyle()
225+
226+ // Set column widths via style
227+ switch col {
228+ case 0: // ID
229+ style = style.Width(10)
230+ case 1: // NAME
231+ style = style.Width(35)
232+ case 2: // NOTEBOOK
233+ style = style.Width(15)
234+ case 3: // DATE
235+ style = style.Width(12)
236+ case 4: // PIN
237+ style = style.Width(5)
238+ }
239+
213240 if row == table.HeaderRow {
214- return ui.TableHeaderStyle()
241+ return style.Inherit(ui.TableHeaderStyle())
215242 }
216243
217- return lipgloss.NewStyle()
244+ return style
218245 }).
219- Border(ui.TableBorder())
246+ Border(ui.TableBorder()).
247+ BorderRow(true)
220248
221249 fmt.Fprintln(cmd.OutOrStdout(), tbl.Render())
222250
+9 -4 cmd/note/show.go #
......@@ -11,6 +11,7 @@ import (
1111 "git.secluded.site/go-lunatask"
1212 "git.secluded.site/lune/internal/client"
1313 "git.secluded.site/lune/internal/config"
14+ "git.secluded.site/lune/internal/db"
1415 "git.secluded.site/lune/internal/ui"
1516 "git.secluded.site/lune/internal/validate"
1617 "github.com/spf13/cobra"
......@@ -22,12 +23,13 @@ var ShowCmd = &cobra.Command{
2223 Short: "Show note details",
2324 Long: `Show detailed information for a note.
2425
25-Accepts a UUID or lunatask:// deep link.
26+Accepts a UUID, lunatask:// deep link, or 8-char short ID.
2627
2728 Note: Due to end-to-end encryption, note name and content
2829 are not available through the API. Only metadata is shown.`,
29- Args: cobra.ExactArgs(1),
30- RunE: runShow,
30+ Args: cobra.ExactArgs(1),
31+ RunE: runShow,
32+ SilenceUsage: true,
3133 }
3234
3335 func init() {
......@@ -35,7 +37,10 @@ func init() {
3537 }
3638
3739 func runShow(cmd *cobra.Command, args []string) error {
38- id, err := validate.Reference(args[0])
40+ idInput := args[0]
41+ id := db.CompleteID(idInput)
42+
43+ id, err := validate.Reference(id)
3944 if err != nil {
4045 return err
4146 }
Back to top