Context
cu list list renders an empty table in the default output mode, while -o json shows the expected lists. The table branch silently drops every row.
Evidence
internal/cmd/list.go:57 — listListCmd accumulates results into var allLists []interface{}, appending typed clickup.List structs returned by client.GetLists(...).
internal/cmd/list.go:121-141 — the table branch type-switches only on map[string]interface{}:
for _, item := range allLists {
// Type assertion based on the actual type
switch v := item.(type) {
case map[string]interface{}:
...
}
}
Since every element is a clickup.List struct (not a map), no case matches, rows stays empty, and the table prints zero rows. JSON output works because it marshals the structs directly.
Suggested fix
Type-switch on clickup.List (or drop the []interface{} indirection entirely and use []clickup.List), and add a regression test that asserts cu list list table output contains the list rows.
Context
cu list listrenders an empty table in the default output mode, while-o jsonshows the expected lists. The table branch silently drops every row.Evidence
internal/cmd/list.go:57—listListCmdaccumulates results intovar allLists []interface{}, appending typedclickup.Liststructs returned byclient.GetLists(...).internal/cmd/list.go:121-141— the table branch type-switches only onmap[string]interface{}:Since every element is a
clickup.Liststruct (not a map), no case matches,rowsstays empty, and the table prints zero rows. JSON output works because it marshals the structs directly.Suggested fix
Type-switch on
clickup.List(or drop the[]interface{}indirection entirely and use[]clickup.List), and add a regression test that assertscu list listtable output contains the list rows.