Conversation
Uniform pagination support across all List methods, types.FlexibleTime for date-only API responses, and types.FlexInt for float-encoded integers.
List methods now accept option structs and return result wrappers. Pass nil opts where no pagination is needed, unwrap result fields (.Events, .Entries, .People, .Results, etc.), and wire server-side Limit on search and campfire messages to replace client-side slicing.
There was a problem hiding this comment.
2 issues found across 18 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="internal/commands/search.go">
<violation number="1" location="internal/commands/search.go:57">
P2: Guard should be `limit > 0`, not `limit != 0`. A negative `--limit` value would be forwarded to the server, producing undefined behavior instead of being silently ignored as it was before.</violation>
</file>
<file name="internal/commands/campfire.go">
<violation number="1" location="internal/commands/campfire.go:218">
P1: Behavioral regression: `Limit` truncates from the start of the paginated result (oldest messages), but the old `lines[len(lines)-limit:]` slicing took from the end (newest messages). Users will now see the oldest N campfire lines instead of the most recent N.
To preserve the old "show most recent" behavior, either fetch all lines (`Limit: -1`) and keep the tail-slicing, or use a two-pass approach (e.g., fetch total count from `Meta.TotalCount` then request the last page).</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
There was a problem hiding this comment.
Pull request overview
Upgrades the Basecamp Go SDK dependency to github.com/basecamp/basecamp-sdk/go@v0.4.0 and updates CLI/TUI call sites to the SDK’s new uniform pagination/result-wrapping conventions (e.g., passing nil opts and unwrapping .Events, .Entries, .People, .Results).
Changes:
- Bump SDK version in
go.mod/go.sumand record it insdk-provenance.json+API-COVERAGE.md. - Update many SDK
List*/timeline/people/search call sites to pass pagination opts and unwrap new result structs. - Move search/campfire “limit” behavior to server-side where supported.
Reviewed changes
Copilot reviewed 17 out of 18 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| internal/version/sdk-provenance.json | Records upgraded SDK version/revision provenance. |
| go.mod | Bumps basecamp-sdk/go to v0.4.0. |
| go.sum | Updates checksums for the new SDK version. |
| API-COVERAGE.md | Notes SDK version and key SDK behavior changes. |
| internal/tui/workspace/views/search.go | Unwraps Search() results from new result struct. |
| internal/tui/workspace/data/hub_global.go | Updates Campfire list/lines + timeline calls to new pagination signatures/result structs. |
| internal/tui/workspace/data/hub.go | Updates Campfire lines, timeline, and boosts calls to new signatures/result structs. |
| internal/names/resolver.go | Updates People().Pingable to use new result struct. |
| internal/commands/search.go | Uses SDK-side limit and unwraps search results. |
| internal/commands/campfire.go | Uses SDK-side limit for campfire messages and updates list signatures. |
| internal/commands/timeline.go | Updates timeline calls for new result struct + pagination opts. |
| internal/commands/people.go | Updates pingable people to new result struct. |
| internal/commands/boost.go | Updates boosts list calls to accept pagination opts. |
| internal/commands/webhooks.go | Updates webhooks list call to accept pagination opts. |
| internal/commands/todolistgroups.go | Updates todolist groups list call to accept pagination opts. |
| internal/commands/templates.go | Updates templates list call to accept pagination opts. |
| internal/commands/messagetypes.go | Updates message types list call to accept pagination opts. |
| internal/commands/timesheet.go | Unwraps timesheet report entries and minor command construction cleanup. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…l.go nil opts - search.go: Change `limit != 0` to `limit > 0` to avoid forwarding negative values to the server - campfire.go: Revert to client-side tail-slicing with nil SDK opts to preserve "show most recent N" semantics (SDK server-side Limit may return oldest N depending on API ordering) - detail.go: Add nil opts to ListRecording call added on main after branch creation
go mod download -json omits .Time for semver tags. Fall back to the cached .info file which always includes it. Corrects the stale updated_at in sdk-provenance.json (was preserving the old pseudo-version timestamp instead of the v0.4.0 tag time).
There was a problem hiding this comment.
1 issue found across 5 files (changes from recent commits).
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="internal/commands/campfire.go">
<violation number="1" location="internal/commands/campfire.go:219">
P1: Server-side limit was removed and replaced with client-side slicing, contradicting the PR's stated intent and the pattern used by every other list command. Passing `nil` defaults the SDK to fetching 100 lines (`DefaultCampfireLineLimit`), so `--limit 200` silently caps at 100. Use `CampfireLineListOptions{Limit: limit}` to let the server handle the limit, matching the old behavior and the rest of the codebase.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
Summary
basecamp-sdk/gofrom pre-release pseudo-version to v0.4.0.Events,.Entries,.People,.Results, etc.)Limiton search and campfire messages, replacing client-side slicingTest plan
go build ./...compiles cleanbin/cigreen (unit tests, e2e tests, lint, vet, surface snapshot, skill drift, SDK provenance)Summary by cubic
Upgrade
github.com/basecamp/basecamp-sdk/goto v0.4.0 and adapt the CLI to the new pagination API. Use server-side limits for search; keep client-side tail-slicing for campfire messages to preserve “most recent N.”Dependencies
github.com/basecamp/basecamp-sdk/goto v0.4.0 (uniform Limit/Page;types.FlexibleTime,types.FlexInt).go.mod,go.sum,internal/version/sdk-provenance.json, and note version inAPI-COVERAGE.md.scripts/bump-sdk.shto read semver tag timestamps from.infowhengo mod download -jsonomits.Time.Refactors
niloptions where no pagination is needed; unwrap result fields (.Events,.Entries,.People,.Results).Limit(only whenlimit > 0); remove client-side slicing.nilopts and tail-slice locally to show newest N.Written for commit 42dbd0c. Summary will update on new commits.