summaryrefslogtreecommitdiff
path: root/internal/cli/list.go
diff options
context:
space:
mode:
authorClaudomator Agent <agent@claudomator>2026-03-16 21:02:07 +0000
committerClaudomator Agent <agent@claudomator>2026-03-16 21:02:07 +0000
commit26dc313f16a2827b0f7a4651f495f36f669cea73 (patch)
treeda8fcda11d986cf01b7cd75cee7abc6894287327 /internal/cli/list.go
parentb8381507ff61c7fb69a91490a9fd58403da8c0fa (diff)
feat: expose project field in API and CLI
- POST /api/tasks now reads and stores the project field from request body - GET /api/tasks/{id} returns project in response (via Task struct json tags) - list command: adds PROJECT column to tabwriter output - status command: prints Project line when non-empty - Tests: TestProject_RoundTrip (API), TestListTasks_ShowsProject, TestStatusCmd_ShowsProject (CLI) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'internal/cli/list.go')
-rw-r--r--internal/cli/list.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/internal/cli/list.go b/internal/cli/list.go
index 3425388..ab80868 100644
--- a/internal/cli/list.go
+++ b/internal/cli/list.go
@@ -49,10 +49,10 @@ func listTasks(state string) error {
}
w := tabwriter.NewWriter(os.Stdout, 0, 0, 2, ' ', 0)
- fmt.Fprintln(w, "ID\tNAME\tSTATE\tPRIORITY\tCREATED")
+ fmt.Fprintln(w, "ID\tNAME\tPROJECT\tSTATE\tPRIORITY\tCREATED")
for _, t := range tasks {
- fmt.Fprintf(w, "%.8s\t%s\t%s\t%s\t%s\n",
- t.ID, t.Name, t.State, t.Priority, t.CreatedAt.Format("2006-01-02 15:04"))
+ fmt.Fprintf(w, "%.8s\t%s\t%s\t%s\t%s\t%s\n",
+ t.ID, t.Name, t.Project, t.State, t.Priority, t.CreatedAt.Format("2006-01-02 15:04"))
}
w.Flush()
return nil