Support API pagination in the CLI#242
Conversation
|
@claude review |
|
Claude finished @chrisghill's task in 2m 35s —— View job Code Review
SummaryThis PR adds lazy-loading interactive pagination (via bubbletea TUI) to all list commands, migrates them from A few issues worth fixing before merge: Bugs1. Unknown
if sortField != "" {
listInput.SortBy = resources.SortByName // default even for unknown values
if strings.EqualFold(sortField, "created_at") {
listInput.SortBy = resources.SortByCreatedAt
}
...
}If the user passes 2.
return []string{r.ID, r.Name, typeName, r.Origin, r.CreatedAt.Format(...)}If Design Concerns3. Column widths sized only from the first batch
if !m.colsApplied && len(msg.rows) > 0 {
m.table.SetColumns(sizeColumns(m.columns, msg.rows))
m.colsApplied = true
}After the first page sizes the columns, later pages with wider data will overflow the fixed column width (capped at 4. SDK dependency is a pre-release pseudo-version
This is a Go pseudo-version (unreleased commit hash), not a tagged release. The 5.
listInput.SortOrder = resources.SortAsc
if strings.EqualFold(sortOrder, "desc") {
listInput.SortOrder = resources.SortDesc
}This block is only reached when Positive Observations
Overall: The pagination architecture is well-thought-out and the implementation is clean. The main blockers are the SDK pseudo-version and the silent sort field default. The |
No description provided.